* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f0f8 100%);
    min-height: 100vh;
}

header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5aa0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-user-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.user-info-below-logo {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: #666;
    align-items: flex-start;
}

.user-info-below-logo .username-display {
    color: #2c5aa0;
    font-weight: 500;
}

.hamburger-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.patent-notice {
    font-size: 0.65rem;
    font-weight: 600;
    color: #1565c0;
    background: #b3d9ff;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-align: center;
    line-height: 1.3;
}

.hamburger-menu {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #2c5aa0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    transition: all 0.3s;
    position: relative;
    z-index: 1001;
}

.hamburger-menu:hover {
    background: #f0f4f8;
}

.hamburger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: #2c5aa0;
    transition: all 0.3s;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    left: 0;
    background: white;
    border: 2px solid #2c5aa0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    min-width: 180px;
    overflow: hidden;
    z-index: 1000;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-menu a {
    padding: 1rem 1.5rem;
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 1px solid #e3f2fd;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #f0f4f8;
    padding-left: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 2rem;
    text-align: center;
}

/* ローディング */
.loading {
    display: none;
    text-align: center;
    padding: 3rem;
}

.loading.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* セクション */
.info-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.5rem;
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f0f8;
}

/* 情報カード */
.info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
}

.info-value {
    color: #1a1a1a;
}

/* プランカード */
.plan-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    color: white;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.plan-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 700;
}

.plan-details {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.plan-details .info-row {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.plan-details .info-label,
.plan-details .info-value {
    color: white;
}

.plan-features {
    margin-bottom: 1.5rem;
}

.plan-features h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.plan-features ul {
    list-style: none;
    padding-left: 0;
}

.plan-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.plan-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #4caf50;
}

.plan-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-upgrade,
.btn-cancel,
.btn-secondary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-upgrade {
    background: white;
    color: #667eea;
    flex: 1;
}

.btn-upgrade:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    flex: 1;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.modal.show {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8f0f8;
}

.modal-header h2 {
    color: #2c5aa0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.warning-box strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.warning-box p {
    color: #856404;
    margin-bottom: 0.5rem;
}

.warning-box ul {
    margin-left: 1.5rem;
    color: #856404;
}

.warning-box li {
    margin: 0.25rem 0;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* パスワード変更モーダルのフォームスタイル */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input[type="password"]:focus {
    outline: none;
    border-color: #2c5aa0;
}

.required {
    color: #dc3545;
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
}

.password-requirements li {
    padding: 0.25rem 0;
}

.password-requirements li:before {
    content: '• ';
    color: #2c5aa0;
}

.field-error {
    display: none;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #1e3a70;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-right {
        width: 100%;
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .info-section {
        padding: 1.5rem;
    }

    .plan-card {
        padding: 1.5rem;
    }

    .plan-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .info-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .plan-actions {
        flex-direction: column;
    }

    .btn-upgrade,
    .btn-cancel {
        width: 100%;
    }
}
