/* ═══════════════════════════════════════════════════════════════════
   Slots Scholar — Game UI Theme
   Social Casino 数值策划学习平台 · 暗黑金霓虹风格
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700;900&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────────── */
:root {
    --bg-deep:       #0a0a14;
    --bg-surface:    #12122a;
    --bg-card:       #1a1a36;
    --bg-card-hover: #222248;
    --bg-elevated:   #252550;

    --gold:          #e8b830;
    --gold-bright:   #ffd700;
    --gold-dark:     #b8941f;
    --gold-glow:     rgba(232, 184, 48, 0.3);

    --accent-mauve:  #b89bb8;
    --accent-sage:   #7eb8a0;
    --accent-dusty:  #a0a0b8;

    --text-primary:  #e8e0d0;
    --text-secondary:#a0a0b8;
    --text-muted:    #6a6a80;

    --success:       #5ec49e;
    --warning:       #e8b830;
    --danger:        #e0556a;
    --info:          #6ab0e8;

    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     20px;
    --radius-xl:     28px;

    --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:     0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg:     0 8px 40px rgba(0,0,0,0.5);
    --shadow-gold:   0 0 24px var(--gold-glow);

    --font:          'Noto Sans SC', -apple-system, sans-serif;
    --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Starfield background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(232,184,48,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(184,155,184,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(126,184,160,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

/* ─── Typography ─────────────────────────────────────────────────── */
h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

.gradient-text {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--accent-mauve));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── App Shell ──────────────────────────────────────────────────── */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 100px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Top Navigation ─────────────────────────────────────────────── */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin-top: 8px;
    background: rgba(18,18,42,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(232,184,48,0.1);
    border-radius: var(--radius-lg);
    position: sticky;
    top: 8px;
    z-index: 100;
}

.nav-left .logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-left .logo:hover { color: var(--gold-bright); }

.logo-icon {
    font-size: 1.5rem;
    animation: reelBounce 2s ease-in-out infinite;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}
.nav-link:hover {
    background: rgba(232,184,48,0.1);
    color: var(--gold);
}

.username-badge {
    padding: 4px 12px;
    background: rgba(232,184,48,0.1);
    border: 1px solid rgba(232,184,48,0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gold);
    margin-right: 8px;
}

/* ─── Main Content ───────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding-top: 20px;
}

/* ─── Flash Messages ─────────────────────────────────────────────── */
.flash-container {
    margin: 12px 0;
}

.alert {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}
.alert-success {
    background: rgba(94,196,158,0.15);
    border: 1px solid rgba(94,196,158,0.3);
    color: var(--success);
}
.alert-error, .alert-warning {
    background: rgba(232,184,48,0.1);
    border: 1px solid rgba(232,184,48,0.3);
    color: var(--warning);
}

/* ─── Stats Grid ─────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--accent-mauve));
    opacity: 0;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    border-color: rgba(232,184,48,0.2);
}
.stat-card:hover::after { opacity: 1; }

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Progress Section ───────────────────────────────────────────── */
.progress-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.04);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.progress-bar {
    height: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-bright));
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 12px var(--gold-glow);
}
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: shimmer 2s infinite;
}

.progress-sub {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(232,184,48,0.2);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(232,184,48,0.35);
    color: #1a1a2e;
}

.btn-secondary {
    background: rgba(184,155,184,0.15);
    color: var(--accent-mauve);
    border: 1px solid rgba(184,155,184,0.25);
}
.btn-secondary:hover {
    background: rgba(184,155,184,0.25);
    border-color: rgba(184,155,184,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(232,184,48,0.3);
}
.btn-outline:hover {
    background: rgba(232,184,48,0.1);
    border-color: var(--gold);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.82rem;
}

.btn-block { width: 100%; }

/* ─── Chapter Cards ──────────────────────────────────────────────── */
.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
}
.chapter-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(232,184,48,0.15);
}

.chapter-item--completed {
    opacity: 0.7;
    border-color: rgba(94,196,158,0.2);
}
.chapter-item--current {
    border-color: rgba(232,184,48,0.25);
    box-shadow: 0 0 16px rgba(232,184,48,0.08);
}
.chapter-item--locked {
    opacity: 0.4;
}

.chapter-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(232,184,48,0.1);
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.chapter-item--completed .chapter-num {
    background: rgba(94,196,158,0.15);
    color: var(--success);
}
.chapter-item--locked .chapter-num {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
}

.chapter-info { flex: 1; min-width: 0; }
.chapter-title { font-weight: 600; font-size: 0.95rem; }
.chapter-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.chapter-action { flex-shrink: 0; }

.status-badge {
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}
.status-completed { color: var(--success); }
.status-unlocked { color: var(--gold); }
.status-in_progress { color: var(--info); }
.status-locked { color: var(--text-muted); }

/* ─── Current Task Card ──────────────────────────────────────────── */
.current-task-card {
    background: linear-gradient(135deg, rgba(232,184,48,0.08), rgba(184,155,184,0.06));
    border: 1px solid rgba(232,184,48,0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}
.current-task-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(232,184,48,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.task-badge {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(232,184,48,0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 10px;
}

.current-task-card h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}
.current-task-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* ─── Achievement Preview ────────────────────────────────────────── */
.achievement-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.ach-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.04);
}

.ach-icon { font-size: 1.1rem; }
.ach-name { font-weight: 500; }

/* ─── Bottom Nav (Mobile) ────────────────────────────────────────── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(18,18,42,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(232,184,48,0.1);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
    z-index: 100;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: var(--transition);
}
.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
    color: var(--gold);
}
.bottom-nav .nav-icon { font-size: 1.3rem; }

@media (max-width: 640px) {
    .app-container { padding-bottom: 80px; }
    .bottom-nav { display: flex; }
    .top-nav { border-radius: var(--radius-md); margin-top: 4px; }
    .nav-right .nav-link { display: none; }
    .username-badge { font-size: 0.78rem; padding: 3px 10px; }
    .top-nav { padding: 10px 14px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 1.1rem; }
}

/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes reelBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px var(--gold-glow); }
    50% { box-shadow: 0 0 24px rgba(232,184,48,0.5); }
}

.animate-in {
    animation: fadeInUp 0.5s ease-out both;
}
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }
.animate-in:nth-child(7) { animation-delay: 0.35s; }
.animate-in:nth-child(8) { animation-delay: 0.4s; }
.animate-in:nth-child(9) { animation-delay: 0.45s; }
.animate-in:nth-child(10) { animation-delay: 0.5s; }

/* ─── Landing Page (index) ───────────────────────────────────────── */
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.hero-section {
    text-align: center;
    margin-bottom: 36px;
}

.hero-slot-icon {
    font-size: 4.5rem;
    display: block;
    margin-bottom: 8px;
    animation: reelBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--gold-glow));
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 40%, var(--accent-mauve) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.04em;
}

/* ─── Auth Panels (two-card layout) ──────────────────────────────── */
.auth-panels {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-panel {
    background: var(--bg-card);
    border: 1px solid rgba(232,184,48,0.1);
    border-radius: var(--radius-lg);
    padding: 28px 24px 24px;
    box-shadow: var(--shadow-md);
}

.auth-panel--login {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.auth-panel--register {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

.auth-panel__header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.auth-panel__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.auth-panel--login .auth-panel__icon {
    background: rgba(232,184,48,0.12);
    color: var(--gold);
}

.auth-panel--register .auth-panel__icon {
    background: rgba(184,155,184,0.12);
    color: var(--accent-mauve);
}

/* ─── Auth Divider ───────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin: -1px 0;
    position: relative;
    z-index: 2;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(232,184,48,0.12);
}

.auth-divider__text {
    flex-shrink: 0;
    padding: 4px 16px;
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ─── Forms ──────────────────────────────────────────────────────── */
.auth-form { }

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 15px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.92rem;
    transition: var(--transition);
    outline: none;
}
.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(232,184,48,0.1);
}
.form-group input::placeholder {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ─── Landing Footer ─────────────────────────────────────────────── */
.landing-footer {
    text-align: center;
    margin-top: 32px;
}

.landing-footer__brand {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.landing-footer__links {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.landing-footer__links a {
    color: var(--text-muted);
    transition: var(--transition);
}
.landing-footer__links a:hover {
    color: var(--gold);
}

/* ─── Dashboard Page ─────────────────────────────────────────────── */
.dashboard {
    animation: fadeInUp 0.4s ease-out;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

/* ─── Chapter View ───────────────────────────────────────────────── */
.chapter-view {
    max-width: 800px;
    margin: 0 auto;
}

.chapter-header {
    text-align: center;
    margin-bottom: 24px;
}

.chapter-day-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(232,184,48,0.1);
    border: 1px solid rgba(232,184,48,0.25);
    border-radius: 20px;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.chapter-content {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.04);
    line-height: 1.8;
    font-size: 0.95rem;
}

.chapter-content h1 { font-size: 1.8rem; margin-bottom: 16px; }
.chapter-content h2 { font-size: 1.3rem; margin: 24px 0 10px; color: var(--gold); }
.chapter-content h3 { font-size: 1.1rem; margin: 20px 0 8px; }
.chapter-content p { margin-bottom: 12px; color: var(--text-secondary); }
.chapter-content ul, .chapter-content ol { margin: 8px 0 16px 24px; color: var(--text-secondary); }
.chapter-content li { margin-bottom: 4px; }
.chapter-content code {
    background: rgba(232,184,48,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--gold);
}
.chapter-content strong { color: var(--text-primary); }

.chapter-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

/* ─── Map View ───────────────────────────────────────────────────── */
.map-view {
    max-width: 700px;
    margin: 0 auto;
}

.map-title {
    text-align: center;
    margin-bottom: 30px;
}

.map-nodes {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.map-node {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    position: relative;
}

.map-node::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 50%;
    bottom: -50%;
    width: 2px;
    background: rgba(232,184,48,0.15);
}
.map-node:last-child::before { display: none; }

.node-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    flex-shrink: 0;
    z-index: 1;
    transition: var(--transition);
}
.node-icon.completed {
    background: rgba(94,196,158,0.15);
    border: 2px solid var(--success);
}
.node-icon.current {
    background: rgba(232,184,48,0.1);
    border: 2px solid var(--gold);
    animation: glowPulse 2s ease-in-out infinite;
}
.node-icon.locked {
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.06);
    opacity: 0.4;
}

.node-body { flex: 1; min-width: 0; }
.node-title { font-weight: 600; font-size: 0.95rem; }
.node-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.node-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Achievement Page ───────────────────────────────────────────── */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.achievement-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.04);
}
.achievement-card.unlocked {
    border-color: rgba(232,184,48,0.2);
}
.achievement-card.locked {
    opacity: 0.4;
}

.achievement-card .ach-badge {
    font-size: 2.5rem;
}
.achievement-card .ach-title {
    font-weight: 600;
    font-size: 0.9rem;
}
.achievement-card .ach-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.achievement-card .ach-xp {
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 500;
}

/* ─── Profile Page ───────────────────────────────────────────────── */
.profile-view { max-width: 700px; margin: 0 auto; }

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.04);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: rgba(232,184,48,0.08);
    border-radius: 50%;
}

.profile-info h2 { font-size: 1.3rem; }
.profile-info .profile-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.grades-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grade-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.04);
}

.grade-score {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.grade-score.high { background: rgba(94,196,158,0.15); color: var(--success); }
.grade-score.med { background: rgba(232,184,48,0.1); color: var(--gold); }
.grade-score.low { background: rgba(224,85,106,0.1); color: var(--danger); }

/* ─── Utility ────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }

.text-gold { color: var(--gold); }
.text-sage { color: var(--accent-sage); }
.text-muted { color: var(--text-muted); }

/* ─── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
    background: rgba(232,184,48,0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(232,184,48,0.4); }
