/**
 * Account SPA Styles - Simplified for account-only page
 * No tabs, just scrollable sections
 */

/* ========== BODY & GLOBAL ========== */
.account-spa-body {
    background: var(--bg-core);
    margin: 0;
    padding: 0;
    /* Allow normal page scroll */
}

/* ========== HEADER ========== */
.account-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
    padding-left: 12px;
    border-left: 1px solid var(--border-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--hover-light);
    border-color: var(--gold-main);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--hover-light);
    border-color: var(--gold-main);
    color: var(--gold-main);
    transform: translateX(-2px);
}

.btn-back .icon-mask {
    width: 18px;
    height: 18px;
    background-color: currentColor;
}

/* ========== MAIN CONTENT AREA ========== */
.account-main {
    max-width: 1000px;
    /* Increased for better desktop experience */
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px 80px 24px;
    /* Extra bottom padding for scroll */
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== ACCOUNT PAGE SECTIONS ========== */

/* Profile Hero */
.account-page-hero {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    background: linear-gradient(135deg,
            rgba(255, 215, 0, 0.05) 0%,
            rgba(184, 134, 11, 0.03) 100%);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.account-page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle,
            rgba(255, 215, 0, 0.08) 0%,
            transparent 70%);
    pointer-events: none;
}

.hero-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    z-index: 1;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    border: 3px solid var(--border-medium);
    box-shadow: var(--shadow-medium);
}

.hero-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: var(--bg-input);
    border: 3px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold-main);
}

.hero-info {
    flex: 1;
    z-index: 1;
}

.hero-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-main);
}

.hero-email {
    font-size: 1rem;
    color: var(--text-dim);
    margin: 0 0 12px 0;
}

/* Account Section */
.account-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .icon-mask {
    width: 24px;
    height: 24px;
    background-color: var(--gold-main);
}

/* Form Fields */
.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.form-field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-field input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-main);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-field input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-field small {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.btn-primary {
    background: var(--grad-accent);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-core);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--bg-input);
    border-color: var(--border-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--hover-light);
    border-color: var(--border-medium);
}

/* Danger Zone */
.danger-zone {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 24px;
}

.danger-zone .section-title {
    color: #ef4444;
}

.danger-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-logout,
.btn-delete-account {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.btn-logout {
    background: var(--bg-input);
    border-color: var(--border-light);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: var(--hover-light);
    border-color: var(--border-medium);
}

.btn-delete-account {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-delete-account:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* Sync Section */
.sync-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 16px;
}

.sync-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sync-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.sync-time {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.btn-sync {
    padding: 10px 20px;
    background: var(--grad-accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--bg-core);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sync:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .account-header {
        padding: 0 16px;
        height: 56px;
    }

    .brand-subtitle {
        display: none;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .btn-back span {
        display: none;
    }

    .account-main {
        padding: 24px 16px 60px 16px;
    }

    .account-page-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .hero-name {
        font-size: 1.5rem;
    }

    .account-section {
        padding: 24px 16px;
    }

    .btn-group {
        flex-direction: column;
    }

    .danger-actions {
        flex-direction: column;
    }
}