/* ============================================================
   DE VERRADERS ONLINE - ACCOUNT SYSTEM STYLES
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-card-hover: #222233;
    --bg-input: #15151f;

    --text-primary: #e8e6e3;
    --text-secondary: #9995a0;
    --text-muted: #66636b;

    --gold: #daa520;
    --gold-light: #f4d03f;
    --gold-dark: #b8860b;

    --accent: #daa520;
    --accent-hover: #f4d03f;

    --red: #e74c3c;
    --red-dark: #c0392b;
    --green: #2ecc71;
    --green-dark: #27ae60;
    --blue: #3498db;

    --traitor-color: #e74c3c;
    --traitor-bg: rgba(231, 76, 60, 0.1);
    --faithful-color: #3498db;
    --faithful-bg: rgba(52, 152, 219, 0.1);

    --border: #2a2a35;
    --border-light: #3a3a45;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);

    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition: 0.2s ease;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body.account-page {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* ---- CASTLE BACKGROUND SCENE ---- */
body.account-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -2;
    background:
        /* Stars */
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 25% 8%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 40% 22%, rgba(255,215,0,0.5), transparent),
        radial-gradient(1px 1px at 55% 5%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 70% 18%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 85% 12%, rgba(255,215,0,0.4), transparent),
        radial-gradient(1px 1px at 15% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90% 25%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 33% 3%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 77% 7%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 62% 28%, rgba(255,215,0,0.3), transparent),
        /* Moon */
        radial-gradient(40px 40px at 82% 12%, rgba(255,240,200,0.15), transparent 70%),
        radial-gradient(30px 30px at 82% 12%, rgba(255,240,200,0.25), transparent 60%),
        /* Sky gradient */
        linear-gradient(to bottom,
            #050510 0%,
            #0a0a1a 20%,
            #0f0f25 40%,
            #121220 60%,
            #0a0a15 100%
        );
}

body.account-page::after {
    content: '';
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 55%;
    z-index: -1;
    background:
        /* Center main tower */
        linear-gradient(to top, #0c0c14 0%, transparent 85%)
            no-repeat 50% bottom / 60px 220px,
        /* Center tower cap */
        conic-gradient(from -30deg at 50% 0%, transparent 40%, #0e0e18 40%, #0e0e18 60%, transparent 60%)
            no-repeat 50% calc(100% - 220px) / 80px 35px,
        /* Left large tower */
        linear-gradient(to top, #0a0a12 0%, transparent 80%)
            no-repeat 30% bottom / 50px 180px,
        /* Left tower cap */
        conic-gradient(from -30deg at 50% 0%, transparent 40%, #0b0b14 40%, #0b0b14 60%, transparent 60%)
            no-repeat 30% calc(100% - 180px) / 70px 30px,
        /* Right large tower */
        linear-gradient(to top, #0a0a12 0%, transparent 80%)
            no-repeat 70% bottom / 50px 190px,
        /* Right tower cap */
        conic-gradient(from -30deg at 50% 0%, transparent 40%, #0b0b14 40%, #0b0b14 60%, transparent 60%)
            no-repeat 70% calc(100% - 190px) / 70px 30px,
        /* Far left turret */
        linear-gradient(to top, #08080f 0%, transparent 75%)
            no-repeat 12% bottom / 35px 130px,
        /* Far right turret */
        linear-gradient(to top, #08080f 0%, transparent 75%)
            no-repeat 88% bottom / 35px 140px,
        /* Main wall between towers */
        linear-gradient(to top, #0b0b14 0%, #0b0b14 70%, transparent 100%)
            no-repeat 50% bottom / 45% 120px,
        /* Left wall */
        linear-gradient(to top, #090912 0%, #090912 65%, transparent 100%)
            no-repeat 20% bottom / 25% 90px,
        /* Right wall */
        linear-gradient(to top, #090912 0%, #090912 65%, transparent 100%)
            no-repeat 80% bottom / 25% 95px,
        /* Battlements on main wall */
        repeating-linear-gradient(90deg,
            #0d0d16 0px, #0d0d16 18px,
            transparent 18px, transparent 24px
        ) no-repeat 28% calc(100% - 120px) / 44% 14px,
        /* Gate arch */
        radial-gradient(ellipse 20px 25px at 50% 100%, transparent 60%, #0b0b14 60%)
            no-repeat 50% calc(100% - 40px) / 40px 30px,
        /* Window lights left tower */
        radial-gradient(4px 6px at center, rgba(255,180,50,0.35), transparent)
            no-repeat 30% calc(100% - 140px) / 8px 10px,
        radial-gradient(4px 6px at center, rgba(255,180,50,0.25), transparent)
            no-repeat 30% calc(100% - 100px) / 8px 10px,
        /* Window lights center tower */
        radial-gradient(4px 6px at center, rgba(255,180,50,0.4), transparent)
            no-repeat 50% calc(100% - 170px) / 8px 10px,
        radial-gradient(4px 6px at center, rgba(255,180,50,0.3), transparent)
            no-repeat 50% calc(100% - 130px) / 8px 10px,
        /* Window lights right tower */
        radial-gradient(4px 6px at center, rgba(255,180,50,0.3), transparent)
            no-repeat 70% calc(100% - 150px) / 8px 10px,
        radial-gradient(4px 6px at center, rgba(255,180,50,0.2), transparent)
            no-repeat 70% calc(100% - 110px) / 8px 10px,
        /* Ground / hill */
        linear-gradient(to top, #0a0a10 0%, transparent 100%)
            no-repeat bottom / 100% 80px,
        /* Mist layer */
        linear-gradient(to top, rgba(15,15,25,0.7) 0%, transparent 100%)
            no-repeat bottom / 100% 60px;
    pointer-events: none;
}

/* Fog animation overlay */
@keyframes fogDrift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.main-content {
    position: relative;
    z-index: 1;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--gold-light);
}

/* ---- NAVIGATION ---- */
.nav-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
}
.nav-logo:hover { color: var(--gold-light); }
.nav-logo-icon { font-size: 1.3rem; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.nav-cta {
    background: var(--gold-dark);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
}
.nav-link.nav-cta:hover {
    background: var(--gold);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.nav-user-name {
    font-weight: 600;
    color: var(--text-primary);
}
.nav-user-level {
    background: var(--gold-dark);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.nav-logout { color: var(--text-muted); }
.nav-logout:hover { color: var(--red); }

/* Mobile Toggle */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-mobile-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }
    .nav-container.nav-open .nav-links { display: flex; }
    .nav-user { flex-direction: column; gap: 0.5rem; }
}

/* ---- MAIN CONTENT ---- */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---- FLASH MESSAGES ---- */
.flash-messages {
    margin-bottom: 1.5rem;
}
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.flash-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--green-dark);
    color: var(--green);
}
.flash-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--red-dark);
    color: var(--red);
}
.flash-info {
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid var(--blue);
    color: var(--blue);
}

/* ---- ALERTS ---- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.alert ul {
    list-style: none;
    padding: 0;
}
.alert ul li + li { margin-top: 0.25rem; }
.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #f5a6a0;
}

/* ---- AUTH PAGES (LOGIN / REGISTER) ---- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2rem;
}

.auth-card {
    background: rgba(18, 18, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(218, 165, 32, 0.15);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(218, 165, 32, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.25rem;
}
.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.auth-footer p + p { margin-top: 0.5rem; }

/* ---- FORM ELEMENTS ---- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239995a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.form-row {
    flex-direction: row !important;
    align-items: center;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrapper input {
    padding-right: 2.5rem;
}
.password-toggle {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color var(--transition);
    padding: 0.2rem;
}
.password-toggle:hover { color: var(--text-primary); }

/* Password strength indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
    border-radius: 2px;
}
.password-strength.strength-weak::after { width: 25%; background: var(--red); }
.password-strength.strength-fair::after { width: 50%; background: #f39c12; }
.password-strength.strength-good::after { width: 75%; background: #3498db; }
.password-strength.strength-strong::after { width: 100%; background: var(--green); }

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.checkbox-label input[type="checkbox"] {
    accent-color: var(--gold);
    width: 1.1rem;
    height: 1.1rem;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0a0f;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-full { width: 100%; }

/* ---- PROFILE PAGE ---- */
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    position: relative;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.3);
}
.avatar-emoji { font-size: 2.8rem; }

.profile-info {
    flex: 1;
}
.profile-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.25rem;
}
.profile-title {
    display: inline-block;
    background: rgba(218, 165, 32, 0.15);
    color: var(--gold);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-level {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.level-badge {
    background: var(--gold-dark);
    color: #fff;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.level-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    max-width: 200px;
}
.level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 4px;
    transition: width 0.5s ease;
}
.level-xp {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.profile-edit-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

@media (max-width: 640px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-meta { justify-content: center; }
    .profile-level { justify-content: center; }
    .profile-edit-btn {
        position: static;
        width: 100%;
    }
}

/* ---- STATISTICS ---- */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}
.stat-card.stat-highlight {
    border-color: var(--gold-dark);
    background: rgba(218, 165, 32, 0.05);
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Role Stats */
.role-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .role-stats { grid-template-columns: 1fr; }
}

.role-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.role-traitor-card {
    border-color: rgba(231, 76, 60, 0.3);
    background: var(--traitor-bg);
}
.role-faithful-card {
    border-color: rgba(52, 152, 219, 0.3);
    background: var(--faithful-bg);
}

.role-stat-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 1rem;
}
.role-traitor-card h3 { color: var(--traitor-color); }
.role-faithful-card h3 { color: var(--faithful-color); }

.role-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.role-stat-grid div {
    text-align: center;
}
.role-stat-grid strong {
    display: block;
    font-size: 1.3rem;
    color: var(--text-primary);
}
.role-stat-grid small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Extra stats */
.extra-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}
.extra-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.extra-stat-icon { font-size: 1.2rem; }
.extra-stat strong { color: var(--text-primary); }

/* ---- ACHIEVEMENTS ---- */
.achievement-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}
.achievement-card:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.achievement-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 2.5rem;
    text-align: center;
}

.achievement-info {
    flex: 1;
}
.achievement-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.achievement-info small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}
.achievement-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Achievement categories */
.achievement-traitor { border-left: 3px solid var(--traitor-color); }
.achievement-faithful { border-left: 3px solid var(--faithful-color); }
.achievement-rare { border-left: 3px solid var(--gold); }
.achievement-general { border-left: 3px solid var(--text-muted); }
.achievement-mission { border-left: 3px solid var(--green); }
.achievement-social { border-left: 3px solid #9b59b6; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state p { margin-bottom: 1rem; }

/* ---- SETTINGS PAGE ---- */
.settings-container {
    max-width: 700px;
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.settings-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.settings-tab {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    cursor: pointer;
}
.settings-tab:hover { color: var(--text-secondary); }
.settings-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.settings-panel {
    display: none;
}
.settings-panel.active {
    display: block;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Character select grid */
.character-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
}
.character-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.82rem;
}
.character-option:hover {
    border-color: var(--border-light);
}
.character-option.selected,
.character-option:has(input:checked) {
    border-color: var(--gold);
    background: rgba(218, 165, 32, 0.1);
}
.character-option input[type="radio"] {
    accent-color: var(--gold);
}
.character-name {
    color: var(--text-secondary);
}
.character-option:has(input:checked) .character-name {
    color: var(--gold);
}

/* Account info section */
.account-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.account-info h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.info-label { color: var(--text-muted); }
.info-value { color: var(--text-primary); font-weight: 500; }

/* ---- FOOTER ---- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
    .auth-card { padding: 1.5rem; }
    .main-content { padding: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .achievements-grid { grid-template-columns: 1fr; }
    .character-select-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-tab { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
}
