/* ═══════════════════════════════════════════
   MathApp – Modern CSS with SVG Icons & Animations
   ═══════════════════════════════════════════ */

:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --secondary: #00B894;
    --secondary-dark: #00A381;
    --accent: #0984E3;
    --bg: #F8F9FE;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A2E;
    --text: #2D3436;
    --text-light: #636E72;
    --text-muted: #B2BEC3;
    --border: #E8ECF4;
    --success: #00B894;
    --danger: #E17055;
    --warning: #FDCB6E;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 50px;
    --shadow: 0 2px 16px rgba(108,92,231,0.08);
    --shadow-lg: 0 8px 32px rgba(108,92,231,0.12);
    --shadow-glow: 0 0 20px rgba(108,92,231,0.25);
    --transition: all 0.25s cubic-bezier(.4,0,.2,1);
    --sidebar-w: 240px;
    --node-size: 64px;
    --node-size-sm: 52px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.85; }

/* ─── SVG Icons ─── */
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.brand-icon { width: 26px; height: 26px; }
.nav-icon { width: 22px; height: 22px; }
.badge-icon { width: 16px; height: 16px; }
.btn-icon { width: 18px; height: 18px; }
.title-icon { width: 24px; height: 24px; vertical-align: -4px; margin-right: 6px; }
.stat-svg { width: 32px; height: 32px; color: var(--primary); }
.feature-icon { width: 36px; height: 36px; color: #fff; }
.empty-icon { width: 48px; height: 48px; color: var(--text-muted); margin-bottom: 12px; }
.back-icon { width: 18px; height: 18px; vertical-align: -3px; }
.mini-icon { width: 16px; height: 16px; vertical-align: -2px; }
.tiny-icon { width: 14px; height: 14px; vertical-align: -2px; }
.status-icon { width: 28px; height: 28px; color: var(--text-muted); }
.status-icon.completed-icon { color: var(--success); }
.xp-mini { width: 14px; height: 14px; vertical-align: -2px; }
.explain-icon { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent); }
.tf-icon { width: 18px; height: 18px; vertical-align: -3px; }
.tf-icon.correct { color: var(--success); }
.tf-icon.wrong { color: var(--danger); }
.settings-section-icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; color: var(--primary); }
.badge-mini-icon { width: 16px; height: 16px; vertical-align: -2px; }

/* ─── Animations ─── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    60% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-30px); }
}
@keyframes fillBar {
    from { width: 0; }
    to { width: var(--target-width); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes nodeGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108,92,231,0.3); }
    50% { box-shadow: 0 0 0 12px rgba(108,92,231,0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in { animation: fadeIn 0.4s ease both; }
.pop-in { animation: popIn 0.4s ease both; }
.slide-in { animation: slideIn 0.35s ease both; }
.slide-out { animation: slideOut 0.25s ease both; }
.pulse { animation: pulse 2s ease-in-out infinite; }
.animate-fill { animation: fillBar 1s ease both; width: var(--target-width); }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius-full); font-weight: 600;
    font-size: 0.95rem; border: 2px solid transparent; cursor: pointer;
    transition: var(--transition); text-decoration: none; font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: var(--shadow-glow); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm);
    font-size: 1rem; transition: var(--transition); background: var(--bg); font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}
.field-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; display: block; }

/* ─── Alerts ─── */
.alert { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.9rem; }
.alert-error, .alert-danger { background: #FFEAEA; color: var(--danger); border: 1px solid #FFCDD2; }
.alert-success { background: #E8F8F5; color: var(--success); border: 1px solid #A3E4D7; }

/* ─── Landing Page (Dark) ─── */
.landing-dark { background: #0D1117; color: #fff; }

.land-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 32px; position: sticky; top: 0; z-index: 100;
    background: rgba(13,17,23,0.9); backdrop-filter: blur(12px);
    border-bottom: 1px solid #1A1D2E;
}
.land-nav-brand { font-size: 1.3rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.land-nav-links { display: flex; align-items: center; gap: 16px; }
.land-nav-links a { color: #8A8FA8; font-weight: 500; font-size: 0.92rem; text-decoration: none; }
.land-nav-links a:hover { color: #fff; }

.land-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: 12px; font-weight: 700;
    font-size: 0.92rem; text-decoration: none; transition: all 0.2s ease;
}
.land-btn-ghost { color: #fff; border: 2px solid #2A2E3D; background: transparent; }
.land-btn-ghost:hover { border-color: #58CC02; color: #58CC02; }
.land-btn-green { background: #58CC02; color: #fff; border: 2px solid #58CC02; }
.land-btn-green:hover { background: #4CAF00; transform: translateY(-1px); }
.land-btn-lg { padding: 14px 32px; font-size: 1rem; }

/* Hero */
.land-hero {
    display: flex; align-items: center; justify-content: center; gap: 60px;
    padding: 80px 32px 60px; max-width: 1100px; margin: 0 auto;
}
.land-hero-content { max-width: 520px; }
.land-hero-badge {
    display: inline-block; background: rgba(88,204,2,0.12); color: #58CC02;
    padding: 6px 16px; border-radius: 50px; font-size: 0.82rem; font-weight: 700;
    margin-bottom: 16px;
}
.land-hero-content h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 8px; }
.land-hero-tagline { font-size: 1.15rem; color: #58CC02; font-weight: 600; margin-bottom: 14px; }
.land-gradient {
    background: linear-gradient(135deg, #58CC02, #1CB0F6, #6C5CE7);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.land-hero-sub { font-size: 1.1rem; color: #8A8FA8; margin-bottom: 28px; line-height: 1.6; }
.land-hero-btns { margin-bottom: 24px; }
.land-hero-trust { display: flex; gap: 20px; flex-wrap: wrap; }
.land-trust-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: #8A8FA8; }
.land-trust-item .icon { width: 18px; height: 18px; }

/* Phone mockup */
.land-phone {
    width: 260px; height: 420px; background: #1A1D2E; border-radius: 28px;
    border: 3px solid #2A2E3D; padding: 20px; display: flex; flex-direction: column;
    align-items: center; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.land-phone-screen { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 30px; }
.lp-node {
    width: 56px; height: 56px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
}
.lp-node .icon { width: 22px; height: 22px; }
.lp-done { background: #58CC02; color: #fff; box-shadow: 0 4px 0 #3D8C00; }
.lp-current { background: #58CC02; color: #fff; box-shadow: 0 4px 0 #3D8C00; outline: 3px dashed rgba(88,204,2,0.4); outline-offset: 5px; }
.lp-locked { background: #2A2E3D; color: #555B6E; box-shadow: 0 4px 0 #1A1D2E; }
.land-phone-screen .lp-node:nth-child(2) { transform: translateX(-30px); }
.land-phone-screen .lp-node:nth-child(4) { transform: translateX(30px); }


/* ─── Auth Pages (Dark) ─── */
.auth-dark { background: #0D1117; min-height: 100vh; }
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.auth-card {
    background: #1A1D2E; border-radius: 20px; padding: 40px;
    width: 100%; max-width: 420px; border: 1px solid #2A2E3D;
}
.auth-logo {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    font-size: 1.3rem; font-weight: 800; color: #fff; text-decoration: none;
    margin-bottom: 24px;
}
.auth-card h1 { text-align: center; font-size: 1.5rem; color: #fff; margin-bottom: 4px; }
.auth-sub { text-align: center; color: #636E82; font-size: 0.9rem; margin-bottom: 24px; }

.auth-alert {
    background: rgba(255,75,75,0.1); border: 1px solid rgba(255,75,75,0.3);
    border-radius: 12px; padding: 12px 16px; color: #FF6B6B;
    font-size: 0.88rem; margin-bottom: 16px;
}
.auth-alert p { margin: 2px 0; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field label { display: block; font-size: 0.82rem; color: #8A8FA8; font-weight: 600; margin-bottom: 6px; }
.auth-input-wrap {
    display: flex; align-items: center; gap: 10px;
    background: #0D1117; border: 2px solid #2A2E3D; border-radius: 12px;
    padding: 0 14px; transition: border-color 0.2s;
}
.auth-input-wrap:focus-within { border-color: #58CC02; }
.auth-input-icon { width: 18px; height: 18px; color: #636E82; flex-shrink: 0; }
.auth-input-wrap input {
    flex: 1; background: none; border: none; color: #fff; padding: 13px 0;
    font-size: 0.95rem; font-family: inherit; outline: none;
}
.auth-input-wrap input::placeholder { color: #3A3F50; }

.auth-submit {
    width: 100%; padding: 14px; background: #58CC02; color: #fff; border: none;
    border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: all 0.2s; margin-top: 4px;
}
.auth-submit:hover { background: #4CAF00; transform: translateY(-1px); }

.auth-switch { text-align: center; color: #636E82; font-size: 0.88rem; margin-top: 18px; }
.auth-switch a { color: #58CC02; font-weight: 600; }

/* ─── Onboarding (Dark) ─── */
.onboard-card {
    background: #1A1D2E; border-radius: 20px; padding: 40px;
    width: 100%; max-width: 520px; border: 1px solid #2A2E3D; text-align: center;
}
.onboard-header { margin-bottom: 28px; }
.onboard-icon-circle {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
    background: linear-gradient(135deg, #58CC02, #1CB0F6);
    display: flex; align-items: center; justify-content: center;
}
.onboard-header h1 { font-size: 1.4rem; color: #fff; margin-bottom: 4px; }
.onboard-header p { color: #636E82; font-size: 0.9rem; }

.ob-step-label {
    display: flex; align-items: center; gap: 6px; justify-content: center;
    font-size: 0.78rem; color: #636E82; font-weight: 600; margin-bottom: 10px;
}
.ob-step-top {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.ob-back {
    width: 36px; height: 36px; border-radius: 50%; background: #0D1117;
    border: 2px solid #2A2E3D; display: flex; align-items: center; justify-content: center;
    color: #636E82; cursor: pointer; transition: all 0.2s; text-decoration: none;
    flex-shrink: 0; font-family: inherit;
}
.ob-back:hover { border-color: #58CC02; color: #fff; }
.ob-back .icon { width: 18px; height: 18px; }
.ob-step-top .ob-step-label { margin-bottom: 0; flex: 1; }
.ob-step-label .icon { width: 16px; height: 16px; }
.ob-step h2 { font-size: 1.15rem; color: #fff; margin-bottom: 16px; }

.ob-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ob-grid-compact { gap: 6px; }
.ob-chip {
    padding: 9px 18px; background: #0D1117; border: 2px solid #2A2E3D;
    border-radius: 50px; color: #B2BEC3; font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.ob-chip:hover { border-color: #58CC02; color: #fff; }
.ob-chip.selected { background: #58CC02; border-color: #58CC02; color: #fff; transform: scale(1.05); }

.ob-grid-list { display: flex; flex-direction: column; gap: 8px; }
.ob-list-btn {
    display: flex; align-items: center; gap: 14px; text-align: left;
    padding: 14px 18px; background: #0D1117; border: 2px solid #2A2E3D;
    border-radius: 14px; color: #fff; cursor: pointer; transition: all 0.15s;
    font-family: inherit; font-size: 0.92rem; width: 100%;
}
.ob-list-btn .icon { width: 24px; height: 24px; flex-shrink: 0; }
.ob-list-btn small { color: #636E82; font-weight: 400; }
.ob-list-btn:hover { border-color: #58CC02; }
.ob-list-btn.selected { background: #58CC02; border-color: #58CC02; }
.ob-list-btn.selected small { color: rgba(255,255,255,0.7); }

.ob-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.ob-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #2A2E3D;
    transition: all 0.3s;
}
.ob-dot.active { background: #58CC02; width: 24px; border-radius: 4px; }

@media (max-width: 480px) {
    .auth-card, .onboard-card { padding: 28px 20px; }
}

/* ─── Public Pages ─── */
.public-page { min-height: 100vh; }
.public-content { max-width: 700px; margin: 40px auto; padding: 0 24px; }
.public-content h1 { margin-bottom: 20px; }
.public-content p { color: var(--text-light); margin-bottom: 16px; line-height: 1.7; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 32px; }
.pricing-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 32px;
    box-shadow: var(--shadow); text-align: center; border: 2px solid var(--border); transition: var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.featured { border-color: var(--primary); }
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-card .price { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.pricing-card ul { list-style: none; margin-bottom: 24px; }
.pricing-card li { padding: 6px 0; color: var(--text-light); }

/* ─── App Layout ─── */
.app-layout { background: var(--bg); }
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); background: #1A1D2E; border-right: 1px solid #2A2E3D;
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 50; padding: 20px 0;
}
.sidebar-brand { font-size: 1.3rem; font-weight: 800; color: #fff; padding: 0 20px 20px; display: flex; align-items: center; gap: 8px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px;
    color: rgba(255,255,255,0.5); font-weight: 500; transition: var(--transition);
    font-size: 0.95rem;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(108,92,231,0.2); color: #fff; font-weight: 600; border-right: 3px solid var(--primary); }
.sidebar-footer { border-top: 1px solid #2A2E3D; padding-top: 8px; }

.app-main { flex: 1; margin-left: var(--sidebar-w); }
.app-header {
    padding: 16px 32px; background: var(--bg-card); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: flex-end;
}
.header-stats { display: flex; gap: 12px; }
.stat-badge {
    padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 5px;
}
.stat-badge.xp { background: #EDE7F6; color: var(--primary); }
.stat-badge.streak { background: #FFF3E0; color: #E17055; }
.stat-badge.rank { background: #E8F8F5; color: var(--secondary); }

.app-content { padding: 32px; max-width: 900px; }

/* ─── Mobile Nav ─── */
.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: #1A1D2E; border-top: 1px solid #2A2E3D;
    padding: 8px 0; z-index: 100; justify-content: space-around;
}
.mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 8px; color: rgba(255,255,255,0.35); transition: var(--transition);
    text-decoration: none; font-size: 0.65rem; font-weight: 500;
}
.mobile-nav-item .icon { width: 22px; height: 22px; }
.mobile-nav-item.active { color: #fff; }

/* ═══════════════════════════════════════════
   DUOLINGO-STYLE LEARN PATH (3-Column)
   ═══════════════════════════════════════════ */
.page-title { font-size: 1.6rem; margin-bottom: 24px; display: flex; align-items: center; }

/* 3-column learn layout */
.learn-layout .learn-wrapper {
    display: flex;
    min-height: 100vh;
}
.learn-layout .sidebar { position: fixed; }
.learn-main {
    flex: 1;
    margin-left: var(--sidebar-w); padding: 0;
    display: flex; flex-direction: column; align-items: center;
    background: #1A1D2E;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sticky header wrapper */
.learn-sticky-header {
    position: sticky;
    top: 5px;
    z-index: 30;
    margin: 5px 5px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #1A1D2E;
    max-width: 500px;
    width: calc(100% - 10px);
}

/* Top stats bar */
.learn-topbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 14px 20px;
    background: #1A1D2E;
    border-bottom: 1px solid #2A2E3D;
}
.topbar-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1rem;
    color: #B2BEC3;
}
.topbar-icon { width: 28px; height: 28px; }
.topbar-klasse { color: #58CC02; }
.topbar-streak { color: #FF9600; }
.topbar-gems { color: #1CB0F6; }
.topbar-lives { color: #FF4B4B; }

/* Unit Banner */
.unit-banner {
    background: var(--success);
    padding: 18px 28px;
    display: flex; align-items: center; justify-content: space-between;
    color: #fff;
}
.unit-banner-sub { font-size: 0.78rem; opacity: 0.8; display: block; }
.unit-banner-title { font-weight: 700; font-size: 1.1rem; }
.unit-nav { display: flex; gap: 6px; }
.unit-nav-pill {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 0.82rem; font-weight: 700;
    background: rgba(255,255,255,0.2); color: #fff; text-decoration: none;
    transition: var(--transition);
}
.unit-nav-pill.active { background: #fff; color: var(--primary); }
.unit-nav-pill:hover { background: rgba(255,255,255,0.4); }

/* The winding path — big S-curve per unit */
.path-container {
    display: flex; flex-direction: column; align-items: center;
    gap: 24px; padding: 28px 20px 20px; width: 100%; max-width: 500px;
    position: relative;
}

.path-row {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: relative; animation: fadeIn 0.3s ease both;
    z-index: 1;
}

/*
   Big S: Mitte → links → Mitte → rechts → Mitte
   20 Positionen pro Zyklus, langsame Kurve
*/
.path-row:nth-child(20n+1)  { transform: translateX(0); }
.path-row:nth-child(20n+2)  { transform: translateX(-50px); }
.path-row:nth-child(20n+3)  { transform: translateX(-100px); }
.path-row:nth-child(20n+4)  { transform: translateX(-160px); }
.path-row:nth-child(20n+5)  { transform: translateX(-200px); }
.path-row:nth-child(20n+6)  { transform: translateX(-200px); }
.path-row:nth-child(20n+7)  { transform: translateX(-160px); }
.path-row:nth-child(20n+8)  { transform: translateX(-100px); }
.path-row:nth-child(20n+9)  { transform: translateX(-50px); }
.path-row:nth-child(20n+10) { transform: translateX(0); }
.path-row:nth-child(20n+11) { transform: translateX(50px); }
.path-row:nth-child(20n+12) { transform: translateX(100px); }
.path-row:nth-child(20n+13) { transform: translateX(160px); }
.path-row:nth-child(20n+14) { transform: translateX(200px); }
.path-row:nth-child(20n+15) { transform: translateX(200px); }
.path-row:nth-child(20n+16) { transform: translateX(160px); }
.path-row:nth-child(20n+17) { transform: translateX(100px); }
.path-row:nth-child(20n+18) { transform: translateX(50px); }
.path-row:nth-child(20n+19) { transform: translateX(0); }
.path-row:nth-child(20n+20) { transform: translateX(0); }

.path-node {
    text-decoration: none; display: flex; flex-direction: column;
    align-items: center; gap: 4px; position: relative;
}

.node-circle {
    width: 70px; height: 70px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); position: relative;
    border: none; background: #3A3F50;
    box-shadow: 0 6px 0 #2A2E3D;
    color: #636E72;
}
.node-circle .node-icon { width: 28px; height: 28px; }

/* Locked */
.node-locked .node-circle {
    background: #3A3F50; color: #555B6E;
    box-shadow: 0 6px 0 #2A2E3D;
}
.node-locked { cursor: default; pointer-events: none; }

/* Current — segmented ring around it */
.node-current .node-circle {
    width: 76px; height: 76px; background: var(--success); color: #fff;
    box-shadow: 0 6px 0 #00896E;
}
.node-current .node-circle .node-icon { width: 32px; height: 32px; }
.node-current:hover .node-circle { transform: scale(1.06); }
.pulse-glow .node-circle { animation: nodeGlow 2s ease-in-out infinite; }

/* SVG ring around current node */
.node-ring-wrap {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 100px; height: 100px;
}
.node-ring-svg {
    position: absolute; top: 0; left: 0;
    width: 100px; height: 100px;
    transform: rotate(-90deg);
}
.node-ring-wrap .node-circle {
    position: relative; z-index: 1;
}
.ring-seg {
    fill: none; stroke-width: 7; stroke-linecap: round;
}
.ring-seg-bg { stroke: #2F3447; }
.ring-seg-done { stroke: var(--success); }

/* Completed */
.node-completed .node-circle {
    background: var(--success); color: #fff;
    box-shadow: 0 6px 0 #00896E;
}
.node-done { cursor: default; pointer-events: none; }

/* Node type colors for current */
.node-type-chest.node-current .node-circle { background: #F39C12; box-shadow: 0 6px 0 #C87F0A; outline-color: rgba(243,156,18,0.35); }
.node-type-test.node-current .node-circle { background: #E17055; box-shadow: 0 6px 0 #B85544; outline-color: rgba(225,112,85,0.35); }
.node-type-review.node-current .node-circle { background: var(--accent); box-shadow: 0 6px 0 #0770C2; outline-color: rgba(9,132,227,0.35); }

/* Chest completed = gold */
.node-type-chest.node-completed .node-circle { background: #F39C12; box-shadow: 0 6px 0 #C87F0A; }
/* Test completed */
.node-type-test.node-completed .node-circle { background: #E17055; box-shadow: 0 6px 0 #B85544; }

/* (dots removed, ring segments used instead) */

/* START label */
.node-start-label {
    position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
    background: var(--success); color: #fff; padding: 4px 16px;
    border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 1px; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,184,148,0.3);
}

.node-title { font-size: 0.78rem; color: rgba(255,255,255,0.5); font-weight: 500; max-width: 120px; text-align: center; }

/* Right sidebar — hidden, info is in topbar now */
.right-sidebar {
    display: none;
}
.right-stats {
    display: flex; justify-content: space-around; padding: 12px 0 20px;
    border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.rs-stat {
    display: flex; align-items: center; gap: 5px; font-weight: 700;
    font-size: 0.95rem; color: var(--text);
}
.rs-card {
    background: var(--bg); border-radius: var(--radius); margin-bottom: 16px;
    border: 1px solid var(--border); overflow: hidden;
}
.rs-card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; font-weight: 700; font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
}
.rs-link { font-size: 0.82rem; font-weight: 600; color: var(--primary); }
.rs-card-body { padding: 14px 16px; }
.rs-league-icon { width: 32px; height: 32px; color: var(--warning); margin-bottom: 6px; }
.rs-card-body p { font-size: 0.88rem; color: var(--text-light); }

.rs-quest { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rs-quest-icon { width: 28px; height: 28px; color: var(--primary); flex-shrink: 0; }
.rs-quest-info { flex: 1; }
.rs-quest-info span { font-size: 0.85rem; font-weight: 500; }
.rs-quest-bar { height: 8px; background: var(--border); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.rs-quest-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.4s ease; }
.rs-empty { font-size: 0.85rem; color: var(--text-muted); }

.rs-footer-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.rs-footer-links a { font-size: 0.78rem; color: var(--text-muted); }

/* Result page stars */
.result-stars { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.result-star { width: 36px; height: 36px; }
.result-hint { font-size: 0.9rem; color: var(--text-light); margin-bottom: 20px; text-align: center; }

/* Chest animation */
.chest-animation { margin-bottom: 16px; }
.chest-big-icon { width: 72px; height: 72px; color: #F39C12; }

/* Lesson round info */
.lesson-header-info { flex: 1; }
.lesson-round-info {
    display: flex; align-items: center; gap: 8px; font-size: 0.82rem;
    color: var(--text-light); margin-top: 2px;
}
.mini-stars { display: flex; gap: 2px; }
.mini-star { width: 14px; height: 14px; }

/* ─── Detail Pages ─── */
.back-link { color: var(--text-light); font-size: 0.9rem; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 4px; }
.detail-header { margin-bottom: 28px; }
.detail-main-icon { width: 48px; height: 48px; color: var(--primary); margin-bottom: 8px; }
.detail-header h1 { font-size: 1.8rem; }
.detail-header p { color: var(--text-light); }

.units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.unit-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); transition: var(--transition);
}
.unit-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.unit-card h3 { margin-bottom: 6px; }
.unit-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.unit-lessons { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.mini-lesson { font-size: 0.88rem; color: var(--text-light); padding: 4px 0; display: flex; align-items: center; gap: 6px; }
.mini-lesson.completed { color: var(--success); }

.lessons-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-list-item {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-card); border-radius: var(--radius); padding: 16px 20px;
    box-shadow: var(--shadow); transition: var(--transition); text-decoration: none; color: var(--text);
}
.lesson-list-item:hover { box-shadow: var(--shadow-lg); transform: translateX(4px); }
.lesson-list-item.completed { border-left: 4px solid var(--success); }
.lesson-info { display: flex; align-items: center; gap: 14px; }
.lesson-info h3 { font-size: 1rem; }
.lesson-info p { color: var(--text-light); font-size: 0.85rem; }
.lesson-xp { font-weight: 700; color: var(--primary); font-size: 0.9rem; display: flex; align-items: center; gap: 4px; }

/* ─── Lesson Page ─── */
.lesson-page { background: var(--bg); min-height: 100vh; }
.lesson-container { max-width: 640px; margin: 0 auto; padding: 20px; }
.lesson-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.close-btn {
    width: 40px; height: 40px; border-radius: 50%; background: var(--bg-card);
    border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
    color: var(--text-light); text-decoration: none; transition: var(--transition);
}
.close-btn:hover { border-color: var(--danger); color: var(--danger); }
.close-btn .icon { width: 18px; height: 18px; }
.lesson-header h2 { flex: 1; font-size: 1.1rem; }
.lesson-progress-bar { width: 100%; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.lesson-progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px; transition: width 0.4s cubic-bezier(.4,0,.2,1);
}

.question-card { margin-bottom: 24px; }
.question-number { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.question-text { font-size: 1.2rem; font-weight: 600; margin-bottom: 20px; line-height: 1.5; }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-grid { grid-template-columns: 1fr 1fr; }
.option-card {
    display: flex; align-items: center; gap: 10px; padding: 16px;
    background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius);
    cursor: pointer; transition: var(--transition);
}
.option-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.option-card input[type="radio"] { display: none; }
.option-card:has(input:checked) { border-color: var(--primary); background: rgba(108,92,231,0.06); box-shadow: var(--shadow-glow); }
.option-text { font-weight: 500; display: flex; align-items: center; gap: 6px; }

.text-input-group { margin-bottom: 16px; }
.text-answer {
    width: 100%; padding: 14px 18px; border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 1.05rem; transition: var(--transition); font-family: inherit;
}
.text-answer:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.15); }
.lesson-actions { text-align: center; margin-top: 24px; }

/* ─── New question types ─── */
/* Fill blank */
.session-fill-blank { margin-bottom: 20px; }
.fill-context {
    background: #232740; border-radius: 12px; padding: 16px;
    color: #B2BEC3; font-size: 0.95rem; line-height: 1.7; margin-bottom: 14px;
    white-space: pre-wrap;
}
.fill-field { text-align: center; }

/* Find error */
.session-find-error { margin-bottom: 20px; }
.error-display {
    background: #2A1A1A; border: 2px solid #E17055; border-radius: 12px;
    padding: 16px; color: #FF6B6B; font-size: 0.95rem; line-height: 1.7;
    margin-bottom: 10px; white-space: pre-wrap; font-family: monospace;
}
.error-prompt { color: #8A8FA8; font-size: 0.88rem; margin-bottom: 10px; }

/* Order steps & Drag build */
.session-order-steps, .session-drag-build { margin-bottom: 20px; }
.steps-pool, .build-pool {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
    min-height: 48px;
}
.step-chip, .build-chip {
    background: #232740; border: 2px solid #3A3F50; border-radius: 10px;
    padding: 10px 16px; color: #fff; font-weight: 600; font-size: 0.92rem;
    cursor: pointer; transition: all 0.15s ease; user-select: none;
}
.step-chip:hover, .build-chip:hover { border-color: var(--primary); background: #2A2E4A; }
.steps-target, .build-target {
    min-height: 60px; border: 2px dashed #3A3F50; border-radius: 12px;
    padding: 12px; display: flex; flex-wrap: wrap; gap: 8px;
    align-items: flex-start;
}
.steps-target .step-chip, .build-target .build-chip {
    border-color: var(--success); background: rgba(0,184,148,0.1);
}
.steps-hint, .build-hint { color: #636E82; font-size: 0.85rem; margin: 0; }

/* Speed round */
.speed-mode { position: relative; }
.speed-label {
    display: flex; align-items: center; gap: 6px; justify-content: center;
    color: #FF9600; font-weight: 700; font-size: 0.85rem; margin-bottom: 10px;
}
.speed-label .icon { width: 18px; height: 18px; }

/* Timer bar */
.timer-bar {
    height: 6px; background: #2A2E3D; border-radius: 3px;
    margin-bottom: 16px; overflow: hidden;
}
.timer-fill {
    height: 100%; background: linear-gradient(90deg, #58CC02, #FF9600, #FF4B4B);
    border-radius: 3px; transition: width 0.1s linear; width: 0;
}

/* Card flip */
.session-card-flip { text-align: center; margin-bottom: 20px; }
.flip-card {
    width: 100%; max-width: 300px; height: 180px; margin: 0 auto 16px;
    perspective: 600px; cursor: pointer;
}
.flip-card .flip-front, .flip-card .flip-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; font-size: 1.1rem; font-weight: 600;
    transition: transform 0.5s ease;
}
.flip-card .flip-front {
    background: #232740; color: #8A8FA8; transform: rotateY(0);
}
.flip-card .flip-back {
    background: var(--success); color: #fff; transform: rotateY(180deg);
}
.flip-card.flipped .flip-front { transform: rotateY(180deg); }
.flip-card.flipped .flip-back { transform: rotateY(0); }
.flip-card { position: relative; }
.flip-prompt { color: #8A8FA8; font-size: 0.88rem; margin-bottom: 12px; }

/* ─── Result Page ─── */
.result-page { background: #0D1117; min-height: 100vh; padding: 32px 20px; }
.result-container { max-width: 640px; margin: 0 auto; }
.result-card {
    background: #1A1D2E; border-radius: var(--radius); padding: 40px;
    box-shadow: var(--shadow-lg); text-align: center; border: 1px solid #2A2E3D;
}
.result-icon-wrap {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
}
.result-icon-wrap.success { background: rgba(0,184,148,0.15); color: var(--success); }
.result-icon-wrap.retry { background: rgba(225,112,85,0.15); color: var(--danger); }
.result-main-icon { width: 40px; height: 40px; }
.result-title { margin-bottom: 24px; color: #fff; }
.result-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; }
.result-stat { text-align: center; }
.rs-val { display: block; font-size: 1.6rem; font-weight: 800; color: #fff; }
.rs-label { font-size: 0.82rem; color: #636E82; }

/* Stars */
.result-stars-row { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin-bottom: 16px; }
.res-star { width: 40px; height: 40px; }
.res-star-big { width: 52px; height: 52px; }
.star-gold { color: #FDCB6E; }
.star-gray { color: #2A2E3D; }

.result-bar { height: 10px; background: #2A2E3D; border-radius: 5px; margin-bottom: 16px; overflow: hidden; }
.result-bar-fill { height: 100%; background: linear-gradient(90deg, #58CC02, #1CB0F6); border-radius: 5px; }

.result-complete-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(88,204,2,0.12); color: #58CC02;
    padding: 8px 18px; border-radius: 20px; font-weight: 700; font-size: 0.88rem;
    margin-bottom: 20px;
}
.result-round-info { color: #636E82; font-size: 0.9rem; margin-bottom: 20px; }

/* Wrong answers */
.result-wrong-section { text-align: left; margin-bottom: 24px; }
.rw-title { font-size: 0.95rem; color: #8A8FA8; font-weight: 700; margin-bottom: 10px; }
.rw-card {
    background: #0D1117; border-radius: 12px; padding: 14px; margin-bottom: 8px;
    border: 1px solid #2A2E3D;
}
.rw-q { font-weight: 600; color: #fff; margin-bottom: 8px; font-size: 0.92rem; }
.rw-answers { display: flex; gap: 16px; margin-bottom: 6px; }
.rw-given { display: flex; align-items: center; gap: 4px; color: #FF6B6B; font-size: 0.85rem; }
.rw-correct { display: flex; align-items: center; gap: 4px; color: #58CC02; font-size: 0.85rem; }
.rw-explain { display: flex; align-items: flex-start; gap: 4px; color: #636E82; font-size: 0.82rem; margin-top: 4px; }

.result-actions { display: flex; gap: 10px; }

.result-progress { margin-bottom: 28px; }
.progress-bar { width: 100%; height: 12px; background: var(--border); border-radius: 6px; overflow: hidden; }
.progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 6px;
}

.result-details { text-align: left; margin-bottom: 28px; }
.result-item {
    display: flex; gap: 12px; padding: 14px; border-radius: var(--radius-sm); margin-bottom: 8px;
    transition: var(--transition);
}
.result-item.correct { background: rgba(0,184,148,0.1); }
.result-item.wrong { background: rgba(225,112,85,0.1); }
.result-item-icon .icon { width: 22px; height: 22px; }
.result-item.correct .result-item-icon { color: var(--success); }
.result-item.wrong .result-item-icon { color: var(--danger); }
.result-question { font-weight: 600; margin-bottom: 4px; color: #fff; }
.result-answer, .result-correct { font-size: 0.88rem; color: #8A8FA8; }
.result-explanation { font-size: 0.88rem; color: var(--accent); margin-top: 4px; display: flex; align-items: flex-start; gap: 4px; }
.result-actions { display: flex; gap: 12px; justify-content: center; }

/* ─── Practice Page ─── */
.practice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.practice-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow); text-align: center; transition: var(--transition);
}
.practice-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.practice-icon-wrap {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(108,92,231,0.08);
}
.practice-svg { width: 28px; height: 28px; color: var(--primary); }
.practice-card h3 { margin-bottom: 6px; }
.practice-card p { color: var(--text-light); font-size: 0.88rem; margin-bottom: 14px; }

/* ─── Profile Page (Dark) ─── */
.prof-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }

.prof-header {
    text-align: center; background: #1A1D2E; border-radius: 20px;
    padding: 32px 20px; margin-bottom: 16px; border: 1px solid #2A2E3D;
}
.prof-avatar-ring {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
    background: linear-gradient(135deg, #58CC02, #1CB0F6);
    display: flex; align-items: center; justify-content: center;
}
.prof-avatar-icon { width: 40px; height: 40px; color: #fff; }
.prof-name { font-size: 1.4rem; color: #fff; margin-bottom: 8px; }
.prof-badges { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.prof-badge {
    padding: 4px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 700;
}
.badge-rank { background: rgba(108,92,231,0.15); color: #6C5CE7; }
.badge-league { background: rgba(253,203,110,0.15); color: #FDCB6E; }
.prof-meta { color: #636E82; font-size: 0.82rem; }

.prof-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px;
}
.prof-stat {
    background: #1A1D2E; border-radius: 14px; padding: 16px; text-align: center;
    border: 1px solid #2A2E3D;
}
.ps-icon {
    width: 40px; height: 40px; border-radius: 10px; margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center;
}
.ps-icon .icon { width: 20px; height: 20px; }
.ps-val { display: block; font-size: 1.3rem; font-weight: 800; color: #fff; }
.ps-label { font-size: 0.75rem; color: #636E82; }

.prof-links { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.prof-link-card {
    display: flex; align-items: center; gap: 12px;
    background: #1A1D2E; border-radius: 12px; padding: 14px 16px;
    text-decoration: none; color: #fff; font-weight: 600; font-size: 0.92rem;
    border: 1px solid #2A2E3D; transition: all 0.2s;
}
.prof-link-card:hover { background: #232740; transform: translateX(4px); }
.prof-link-card .icon { width: 22px; height: 22px; flex-shrink: 0; }
.prof-link-card span { flex: 1; }
.pl-arrow { width: 16px; height: 16px; color: #3A3F50; }

.prof-section { margin-bottom: 16px; }
.prof-sec-title { font-size: 0.95rem; color: #8A8FA8; font-weight: 700; margin-bottom: 10px; }
.prof-achievements { display: flex; flex-wrap: wrap; gap: 8px; }
.prof-ach {
    display: flex; align-items: center; gap: 6px;
    background: #1A1D2E; padding: 8px 14px; border-radius: 20px;
    font-size: 0.82rem; color: #B2BEC3; font-weight: 500;
}
.prof-ach .icon { width: 16px; height: 16px; }

/* ─── Leaderboard (Dark) ─── */
.lb-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }
.lb-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 20px; }

/* Podium */
.lb-podium {
    display: flex; align-items: flex-end; justify-content: center; gap: 12px;
    margin-bottom: 24px; padding: 0 10px;
}
.lb-pod { text-align: center; flex: 1; }
.pod-avatar {
    width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 6px;
    background: #2A2E3D; display: flex; align-items: center; justify-content: center;
}
.pod-avatar .icon { width: 24px; height: 24px; color: #636E82; }
.pod-gold { background: linear-gradient(135deg, #FDCB6E, #FF9600); }
.pod-gold .icon { color: #fff; }
.pod-medal {
    display: inline-block; width: 24px; height: 24px; border-radius: 50%;
    background: #2A2E3D; color: #8A8FA8; font-size: 0.75rem; font-weight: 800;
    line-height: 24px; margin-bottom: 4px;
}
.pod-medal-1 { background: #FDCB6E; color: #1A1D2E; }
.pod-name { display: block; font-weight: 700; color: #fff; font-size: 0.88rem; }
.pod-xp { display: block; font-size: 0.78rem; color: #8A8FA8; }
.lb-pod-1 { transform: translateY(-16px); }
.lb-pod-1 .pod-avatar { width: 64px; height: 64px; }
.lb-pod-1 .pod-avatar .icon { width: 30px; height: 30px; }

/* List */
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
    display: flex; align-items: center; gap: 12px;
    background: #1A1D2E; border-radius: 12px; padding: 12px 16px;
    border: 1px solid #2A2E3D;
}
.lb-me { border-color: #58CC02; background: rgba(88,204,2,0.05); }
.lb-rank { font-weight: 800; color: #636E82; font-size: 0.88rem; width: 36px; }
.lb-user-icon {
    width: 36px; height: 36px; border-radius: 50%; background: #2A2E3D;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lb-user-icon .icon { width: 18px; height: 18px; color: #636E82; }
.lb-user-info { flex: 1; }
.lb-user-name { font-weight: 600; color: #fff; display: block; font-size: 0.92rem; }
.lb-user-meta { font-size: 0.75rem; color: #636E82; }
.lb-user-stats { text-align: right; }
.lb-xp { display: block; font-weight: 700; color: #6C5CE7; font-size: 0.92rem; }
.lb-streak { display: flex; align-items: center; gap: 3px; font-size: 0.78rem; color: #636E82; justify-content: flex-end; }

/* ─── Achievements (Dark) ─── */
.ach-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }
.ach-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 20px; }

.ach-grid { display: flex; flex-direction: column; gap: 8px; }
.ach-card {
    display: flex; align-items: center; gap: 14px;
    background: #1A1D2E; border-radius: 14px; padding: 16px;
    border: 1px solid #2A2E3D; transition: all 0.2s;
}
.ach-unlocked { border-color: #2A2E3D; }
.ach-locked { opacity: 0.5; }

.ach-icon-wrap {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #2A2E3D;
}
.ach-icon-done { background: rgba(253,203,110,0.15); }
.ach-icon { width: 24px; height: 24px; }
.ach-icon-done .ach-icon { color: #FDCB6E; }
.ach-locked .ach-icon { color: #3A3F50; }

.ach-info { flex: 1; }
.ach-name { font-weight: 700; color: #fff; display: block; font-size: 0.95rem; }
.ach-desc { font-size: 0.8rem; color: #636E82; display: block; margin-top: 2px; }

.ach-done-badge {
    width: 28px; height: 28px; border-radius: 50%; background: #58CC02;
    display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.ach-req { font-size: 0.78rem; color: #3A3F50; font-weight: 600; white-space: nowrap; }

/* ─── Progress (Dark) ─── */
.prog-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }
.prog-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 24px; }

.prog-hero {
    display: flex; align-items: center; gap: 24px;
    background: #1A1D2E; border-radius: 20px; padding: 28px;
    border: 1px solid #2A2E3D; margin-bottom: 16px;
}
.prog-circle-wrap { position: relative; width: 100px; height: 100px; flex-shrink: 0; }
.prog-circle { width: 100px; height: 100px; transform: rotate(-90deg); }
.prog-ring-bg { fill: none; stroke: #2A2E3D; stroke-width: 8; }
.prog-ring-fill {
    fill: none; stroke: #58CC02; stroke-width: 8; stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}
.prog-pct {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 1.4rem; font-weight: 800; color: #fff;
}
.prog-hero-info { }
.prog-hero-val { display: block; font-size: 1.3rem; font-weight: 800; color: #fff; }
.prog-hero-label { font-size: 0.85rem; color: #636E82; }

.prog-stats { display: flex; flex-direction: column; gap: 8px; }
.prog-stat {
    display: flex; align-items: center; gap: 14px;
    background: #1A1D2E; border-radius: 12px; padding: 14px 16px;
    border: 1px solid #2A2E3D;
}
.pgs-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pgs-icon .icon { width: 20px; height: 20px; }
.pgs-val { display: block; font-weight: 800; color: #fff; font-size: 1.05rem; }
.pgs-label { font-size: 0.78rem; color: #636E82; }
.achievement-card p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
.achievement-status { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.unlocked-text { color: var(--success); display: inline-flex; align-items: center; gap: 4px; }

/* ─── Progress Page ─── */
.progress-overview { margin-bottom: 28px; }
.big-progress-card {
    display: flex; align-items: center; gap: 24px; background: var(--bg-card);
    border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.big-progress-circle {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800; flex-shrink: 0;
}
.progress-bar-big { height: 16px; background: var(--border); border-radius: 8px; overflow: hidden; }
.progress-bar-big .progress-fill { height: 100%; border-radius: 8px; }

/* ─── Settings ─── */
.settings-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); margin-bottom: 16px; transition: var(--transition);
}
.settings-card:hover { box-shadow: var(--shadow-lg); }
.settings-card h3 { margin-bottom: 8px; display: flex; align-items: center; }
.settings-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 6px; }

.empty-state { text-align: center; padding: 40px; color: var(--text-light); font-size: 1.1rem; display: flex; flex-direction: column; align-items: center; }

/* ─── Panel Layout ─── */
.panel-layout { background: #F0F2F8; }
.panel-wrapper { display: flex; min-height: 100vh; }
.panel-sidebar {
    width: var(--sidebar-w); background: var(--bg-dark); color: #fff;
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 50; padding: 20px 0;
}
.panel-sidebar .sidebar-brand { color: #fff; padding: 0 20px 20px; }
.panel-sidebar .nav-item { color: rgba(255,255,255,0.6); }
.panel-sidebar .nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.panel-sidebar .nav-item.active { background: rgba(108,92,231,0.3); color: #fff; border-right: 3px solid var(--primary); }
.panel-sidebar .sidebar-footer { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 8px; }
.panel-main { flex: 1; margin-left: var(--sidebar-w); padding: 32px; }

.panel-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.panel-header-row .page-title { margin-bottom: 0; }

.panel-table-wrap { overflow-x: auto; }
.panel-table {
    width: 100%; background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow); border-collapse: collapse; overflow: hidden;
}
.panel-table thead { background: var(--bg); }
.panel-table th { padding: 14px 18px; text-align: left; font-size: 0.82rem; text-transform: uppercase; color: var(--text-light); font-weight: 600; }
.panel-table td { padding: 14px 18px; border-top: 1px solid var(--border); font-size: 0.92rem; }
.panel-table .actions { display: flex; gap: 8px; align-items: center; }
.inline-form { display: inline; }

.panel-form-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 32px;
    box-shadow: var(--shadow); max-width: 600px;
}
.panel-form .form-actions { display: flex; gap: 12px; margin-top: 24px; }
.panel-stat { border-left: 4px solid var(--primary); }

.option-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.option-row input[type="text"] { flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; }
.option-row label { display: flex; align-items: center; gap: 4px; font-size: 0.88rem; white-space: nowrap; }
.options-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.options-section h3 { margin-bottom: 14px; font-size: 1rem; }

.role-form { display: flex; align-items: center; gap: 8px; }
.role-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; font-family: inherit; }
.field-help { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* Panel Path Builder */
.builder-path { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.builder-node {
    background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden; transition: var(--transition);
}
.builder-node:hover { box-shadow: var(--shadow-lg); }
.builder-node-header {
    display: flex; align-items: center; gap: 14px; padding: 16px 20px;
}
.builder-node-icon {
    width: 44px; height: 44px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.builder-node-icon .icon { width: 22px; height: 22px; }
.type-lesson .builder-node-icon { background: rgba(108,92,231,0.1); color: var(--primary); }
.type-chest .builder-node-icon { background: rgba(243,156,18,0.1); color: #F39C12; }
.type-test .builder-node-icon { background: rgba(225,112,85,0.1); color: #E17055; }
.type-review .builder-node-icon { background: rgba(9,132,227,0.1); color: var(--accent); }
.builder-node-info { flex: 1; }
.builder-node-type { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); display: block; }
.builder-node-title { font-weight: 600; font-size: 1rem; display: block; }
.builder-node-meta { font-size: 0.8rem; color: var(--text-light); display: block; margin-top: 2px; }
.builder-node-actions { display: flex; gap: 6px; }

.builder-rounds { border-top: 1px solid var(--border); }
.builder-round {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px 12px 78px; border-bottom: 1px solid var(--border);
    color: var(--text); text-decoration: none; transition: var(--transition);
}
.builder-round:last-child { border-bottom: none; }
.builder-round:hover { background: var(--bg); }
.builder-round .icon { width: 16px; height: 16px; color: var(--text-muted); }
.round-q-count { font-size: 0.82rem; color: var(--text-muted); }
.builder-empty { padding: 12px 20px 12px 78px; color: var(--text-muted); font-size: 0.88rem; }

.builder-add-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Node detail rounds */
.builder-rounds-detail { display: flex; flex-direction: column; gap: 10px; }
.builder-round-card {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-card); border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: var(--transition);
}
.builder-round-card:hover { box-shadow: var(--shadow-lg); transform: translateX(4px); }
.round-number { font-weight: 700; display: block; }
.round-diff { font-size: 0.82rem; color: var(--text-light); }
.round-card-right { display: flex; align-items: center; gap: 10px; }
.round-card-right .icon { width: 18px; height: 18px; color: var(--text-muted); }

/* Question cards in panel */
.question-list { display: flex; flex-direction: column; gap: 12px; }
.question-card-panel {
    background: var(--bg-card); border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow);
}
.qc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.qc-number { font-weight: 700; color: var(--primary); }
.qc-type { font-size: 0.78rem; background: var(--bg); padding: 2px 10px; border-radius: var(--radius-full); color: var(--text-light); }
.qc-text { font-weight: 600; margin-bottom: 4px; }
.qc-answer { font-size: 0.88rem; color: var(--text-light); margin-bottom: 8px; }
.qc-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.qc-option { padding: 4px 12px; border-radius: var(--radius-full); background: var(--bg); font-size: 0.82rem; }
.qc-correct { background: rgba(0,184,148,0.12); color: var(--success); font-weight: 600; }
.qc-actions { display: flex; gap: 8px; }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }

/* Curriculum drill-down */
.cur-breadcrumb {
    display: flex; align-items: center; gap: 6px; margin-bottom: 16px;
    font-size: 0.85rem; color: var(--text-muted); flex-wrap: wrap;
}
.cur-breadcrumb a { color: var(--primary); }
.cur-breadcrumb span { color: var(--text-muted); }

.cur-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.cur-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card); border-radius: var(--radius); padding: 16px 20px;
    box-shadow: var(--shadow); text-decoration: none; color: var(--text);
    transition: var(--transition);
}
.cur-card:hover { box-shadow: var(--shadow-lg); transform: translateX(4px); }
.cur-card-icon { width: 24px; height: 24px; color: var(--primary); flex-shrink: 0; }
.cur-card span { flex: 1; font-weight: 600; }
.cur-arrow { width: 18px; height: 18px; color: var(--text-muted); }

.cur-add-form { margin-top: 16px; }
.inline-add {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.inline-add input {
    padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.92rem; font-family: inherit;
}
.inline-add input:focus { outline: none; border-color: var(--primary); }

/* ─── Learn Overview ─── */
/* Unit section headers in path */
.unit-section-header {
    width: 100%; max-width: 500px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; margin-top: 12px;
    background: #232740; border-radius: 14px;
    border-left: 4px solid var(--primary);
}
.unit-section-header.unit-locked { opacity: 0.5; }
.ush-left { display: flex; flex-direction: column; }
.ush-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: #636E82; font-weight: 600; }
.ush-title { font-size: 1.1rem; font-weight: 700; color: #fff; }
.ush-badge { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ush-badge .icon { width: 18px; height: 18px; }
.ush-done { background: rgba(0,184,148,0.15); color: var(--success); }
.ush-lock { background: rgba(99,110,114,0.15); color: #636E82; }

/* ─── Settings Page ─── */
.settings-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }
.settings-page-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 20px; }

.set-section {
    background: #232740; border-radius: 14px; padding: 18px; margin-bottom: 12px;
}
.set-danger { border: 1px solid rgba(255,75,75,0.3); }
.set-sec-title {
    font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}
.set-sec-icon { width: 18px; height: 18px; color: var(--primary); }
.set-form { display: flex; flex-direction: column; gap: 10px; }

.set-row { display: flex; flex-direction: column; gap: 4px; }
.set-row label { font-size: 0.82rem; color: #8A8FA8; font-weight: 600; }
.set-row input, .set-row select {
    background: #1A1D2E; border: 2px solid #2A2E3D; border-radius: 10px;
    padding: 10px 14px; color: #fff; font-size: 0.92rem; font-family: inherit;
}
.set-row input:focus, .set-row select:focus {
    outline: none; border-color: var(--primary);
}

.set-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0;
}
.set-toggle-row span { color: #B2BEC3; font-size: 0.92rem; }

/* Toggle switch */
.toggle { position: relative; width: 48px; height: 26px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #3A3F50; border-radius: 26px; cursor: pointer;
    transition: 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 20px; height: 20px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
    transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: #58CC02; }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

.set-danger-text { color: #8A8FA8; font-size: 0.85rem; margin-bottom: 12px; }

/* ─── Practice ─── */
.practice-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }
.practice-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.practice-desc { color: #8A8FA8; font-size: 0.9rem; margin-bottom: 20px; }
.practice-units { display: flex; flex-direction: column; gap: 10px; }
.practice-unit-card {
    display: flex; align-items: center; gap: 14px;
    background: #232740; border-radius: 14px; padding: 16px;
    text-decoration: none; color: #fff; transition: all 0.2s ease;
}
.practice-unit-card:hover { background: #2A2E4A; transform: translateX(4px); }
.pu-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pu-icon .icon { width: 24px; height: 24px; }
.pu-info { flex: 1; }
.pu-title { font-weight: 700; display: block; font-size: 0.95rem; }
.pu-meta { font-size: 0.8rem; color: #636E82; display: block; margin-top: 2px; }
.pu-badge {
    background: #58CC02; color: #fff; font-size: 0.72rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}

/* ─── Shop ─── */
.shop-container { width: 100%; max-width: 500px; padding: 20px 16px 80px; }
.shop-header { display: flex; justify-content: center; gap: 12px; align-items: center; padding: 16px 0; }
.shop-coins-display {
    display: flex; align-items: center; gap: 8px;
    background: #232740; border-radius: 50px; padding: 10px 24px;
}
.shop-coin-icon { width: 32px; height: 32px; color: #1CB0F6; }
.shop-coin-amount { font-size: 1.4rem; font-weight: 800; color: #fff; }

.shop-inv-btn {
    display: flex; align-items: center; gap: 6px;
    background: #232740; border-radius: 50px; padding: 10px 18px;
    color: #fff; font-weight: 600; font-size: 0.88rem;
    text-decoration: none; transition: all 0.2s ease;
}
.shop-inv-btn:hover { background: #2A2E4A; }
.shop-inv-btn .icon { width: 18px; height: 18px; color: #FDCB6E; }

.shop-section { margin-bottom: 8px; }
.shop-section-title {
    font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.shop-sec-icon { width: 20px; height: 20px; }
.shop-divider { height: 1px; background: #2A2E3D; margin: 20px 0; }

/* Coin packs */
.coin-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coin-pack {
    background: #232740; border-radius: 14px; padding: 18px 14px;
    text-align: center; cursor: pointer; transition: all 0.2s ease;
    border: 2px solid transparent; position: relative;
}
.coin-pack:hover { border-color: #1CB0F6; transform: translateY(-2px); }
.coin-pack.cp-popular { border-color: #1CB0F6; }
.coin-pack.cp-best { border-color: #FDCB6E; }
.cp-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #1CB0F6; color: #fff; font-size: 0.68rem; font-weight: 700;
    padding: 3px 12px; border-radius: 20px; white-space: nowrap;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.cp-best .cp-badge { background: #FDCB6E; color: #1A1D2E; }
.cp-coins { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 4px; }
.cp-icon { width: 24px; height: 24px; color: #1CB0F6; }
.cp-coins span { font-size: 1.3rem; font-weight: 800; color: #fff; }
.cp-bonus { font-size: 0.72rem; color: #58CC02; font-weight: 600; display: block; margin-bottom: 4px; }
.cp-price {
    display: inline-block; background: #1CB0F6; color: #fff; font-weight: 700;
    padding: 6px 16px; border-radius: 8px; font-size: 0.88rem; margin-top: 6px;
}

/* Ad card */
.shop-ad-card {
    display: flex; align-items: center; gap: 14px;
    background: #232740; border-radius: 14px; padding: 16px;
}
.ad-left {
    width: 48px; height: 48px; border-radius: 12px;
    background: rgba(88,204,2,0.15); color: #58CC02;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ad-left .icon { width: 24px; height: 24px; }
.ad-info { flex: 1; }
.ad-title { font-weight: 700; color: #fff; display: block; font-size: 0.95rem; }
.ad-desc { font-size: 0.82rem; color: #8A8FA8; display: block; margin-top: 2px; }
.ad-reward {
    display: flex; align-items: center; gap: 4px;
    color: #1CB0F6; font-weight: 700; font-size: 0.95rem;
}
.ad-reward .icon { width: 16px; height: 16px; }

/* Shop item cards */
.shop-item-card {
    display: flex; align-items: center; gap: 14px;
    background: #232740; border-radius: 14px; padding: 14px 16px;
    margin-bottom: 8px;
}
.si-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.si-icon .icon { width: 22px; height: 22px; }
.shop-type-life { background: rgba(255,75,75,0.15); color: #FF4B4B; }
.shop-type-xp_boost { background: rgba(108,92,231,0.15); color: var(--primary); }
.shop-type-streak_freeze { background: rgba(255,150,0,0.15); color: #FF9600; }
.shop-type-avatar { background: rgba(0,184,148,0.15); color: var(--success); }
.si-info { flex: 1; }
.si-title { font-weight: 700; color: #fff; display: block; font-size: 0.92rem; }
.si-desc { font-size: 0.8rem; color: #8A8FA8; display: block; margin-top: 2px; }

.shop-buy-btn {
    display: flex; align-items: center; gap: 5px;
    background: #1CB0F6; color: #fff; border: none; border-radius: 10px;
    padding: 10px 18px; font-weight: 700; font-size: 0.92rem;
    cursor: pointer; transition: all 0.2s ease; font-family: inherit;
}
.shop-buy-btn:hover { background: #0E9FE0; transform: scale(1.04); }
.shop-btn-coin { width: 16px; height: 16px; }
.shop-disabled { background: #3A3F50; color: #636E82; cursor: not-allowed; }
.shop-disabled:hover { transform: none; background: #3A3F50; }

@media (max-width: 400px) {
    .coin-packs { grid-template-columns: 1fr; }
}

/* ─── Inventory ─── */
.inv-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }
.inv-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 20px; }

.inv-status-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px;
}
.inv-stat {
    display: flex; align-items: center; gap: 10px;
    background: #232740; border-radius: 12px; padding: 14px;
}
.inv-stat-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.inv-stat-icon .icon { width: 20px; height: 20px; }
.inv-stat-val { font-weight: 800; color: #fff; font-size: 1.1rem; display: block; }
.inv-stat-label { font-size: 0.75rem; color: #636E82; }

.inv-section { margin-bottom: 8px; }
.inv-sec-title { font-size: 0.95rem; font-weight: 700; color: #8A8FA8; margin-bottom: 10px; }

.inv-boost-card {
    display: flex; align-items: center; gap: 12px;
    background: #232740; border-radius: 12px; padding: 14px; margin-bottom: 8px;
}
.inv-boost-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.inv-boost-icon .icon { width: 20px; height: 20px; }
.boost-xp { background: rgba(108,92,231,0.15); color: #6C5CE7; }
.boost-streak { background: rgba(255,150,0,0.15); color: #FF9600; }
.inv-boost-info { flex: 1; }
.inv-boost-name { font-weight: 600; color: #fff; display: block; font-size: 0.92rem; }
.inv-boost-time { font-size: 0.78rem; color: #636E82; }
.inv-boost-badge {
    background: #58CC02; color: #fff; font-size: 0.7rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
}

.inv-empty { text-align: center; padding: 20px; color: #636E82; font-size: 0.9rem; }

.inv-item-card {
    display: flex; align-items: center; gap: 12px;
    background: #232740; border-radius: 12px; padding: 14px; margin-bottom: 8px;
}
.inv-item-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.inv-item-icon .icon { width: 22px; height: 22px; }
.inv-item-info { flex: 1; min-width: 0; }
.inv-item-name { font-weight: 600; color: #fff; display: block; font-size: 0.92rem; }
.inv-item-desc { font-size: 0.78rem; color: #636E82; display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-item-qty {
    font-weight: 800; color: #8A8FA8; font-size: 0.9rem;
    background: #1A1D2E; padding: 4px 10px; border-radius: 8px; flex-shrink: 0;
}
.inv-use-btn {
    background: #58CC02; color: #fff; border: none; border-radius: 10px;
    padding: 10px 18px; font-weight: 700; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s ease; font-family: inherit;
    white-space: nowrap;
}
.inv-use-btn:hover { background: #4CAF00; transform: scale(1.04); }

.inv-purchase-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #2A2E3D;
}
.inv-purchase-row:last-child { border-bottom: none; }
.inv-p-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.inv-p-icon .icon { width: 18px; height: 18px; }
.inv-p-info { flex: 1; }
.inv-p-name { font-weight: 600; color: #fff; display: block; font-size: 0.88rem; }
.inv-p-date { font-size: 0.75rem; color: #636E82; }
.inv-p-price { color: #1CB0F6; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; gap: 3px; }

/* ─── Formulas ─── */
.formulas-page { width: 100%; max-width: 800px; padding: 28px 16px 80px; }
.formulas-header { margin-bottom: 24px; }
.formulas-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 14px; }
.formulas-search {
    display: flex; align-items: center; gap: 10px;
    background: #232740; border-radius: 12px; padding: 12px 16px;
}
.search-icon { width: 20px; height: 20px; color: #636E82; }
.formulas-search input {
    flex: 1; background: none; border: none; color: #fff; font-size: 1rem;
    font-family: inherit; outline: none;
}
.formulas-search input::placeholder { color: #636E82; }

.formulas-cats { display: flex; flex-direction: column; gap: 8px; }
.formula-cat-card {
    display: flex; align-items: center; gap: 14px;
    background: #232740; border-radius: 12px; padding: 16px;
    text-decoration: none; color: #fff; transition: all 0.2s ease;
}
.formula-cat-card:hover { background: #2A2E4A; transform: translateX(4px); }
.fcc-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(253,203,110,0.15); color: #FDCB6E;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fcc-icon .icon { width: 22px; height: 22px; }
.fcc-info { flex: 1; }
.fcc-title { font-weight: 700; display: block; }
.fcc-count { font-size: 0.8rem; color: #636E82; }
.fcc-arrow { width: 18px; height: 18px; color: #636E82; }

/* Search results */
.search-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.search-result-card {
    display: block; background: #232740; border-radius: 12px; padding: 14px 16px;
    text-decoration: none; color: #fff; transition: all 0.2s ease;
}
.search-result-card:hover { background: #2A2E4A; transform: translateX(4px); }
.sr-top { margin-bottom: 4px; }
.sr-cat { font-size: 0.7rem; color: #FDCB6E; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.sr-title { font-weight: 700; font-size: 0.95rem; display: block; margin-bottom: 4px; }
.sr-preview { font-size: 0.82rem; color: #8A8FA8; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { text-align: center; padding: 24px; color: #636E82; font-size: 0.92rem; }

.fr-subtitle { font-size: 1rem; color: #8A8FA8; margin-bottom: 12px; }

/* Formula detail layout */
.formulas-detail-layout { display: flex; gap: 24px; }
.fd-sidebar { width: 200px; flex-shrink: 0; }
.fd-back { display: flex; align-items: center; gap: 4px; color: #8A8FA8; font-size: 0.85rem; margin-bottom: 12px; }
.fd-cat-link {
    display: block; padding: 8px 12px; border-radius: 8px; color: #8A8FA8;
    font-size: 0.88rem; text-decoration: none; transition: all 0.15s ease; margin-bottom: 2px;
}
.fd-cat-link:hover { background: #232740; color: #fff; }
.fd-cat-link.active { background: #232740; color: #fff; font-weight: 600; }
.fd-content { flex: 1; min-width: 0; }
.fd-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 16px; }

.formula-card {
    background: #232740; border-radius: 14px; padding: 20px; margin-bottom: 12px;
}
.fc-cat { font-size: 0.72rem; color: #FDCB6E; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.fc-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.fc-content { color: #B2BEC3; font-size: 0.92rem; line-height: 1.7; margin-bottom: 10px; white-space: pre-wrap; }
.fc-example {
    background: #1A1D2E; border-radius: 10px; padding: 14px;
    font-size: 0.88rem; color: #8A8FA8; line-height: 1.6; white-space: pre-wrap;
}
.fc-ex-label { color: #58CC02; font-weight: 700; }

@media (max-width: 600px) {
    .formulas-detail-layout { flex-direction: column; }
    .fd-sidebar { width: 100%; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
    .fd-cat-link { white-space: nowrap; }
    .fd-back { display: none; }
}

/* ─── Learn Overview (page) ─── */

.overview-container {
    width: 100%; max-width: 500px; padding: 28px 16px 80px;
}
.overview-title {
    font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 20px;
}
.overview-units { display: flex; flex-direction: column; gap: 12px; }
.overview-unit-card {
    display: flex; align-items: center; gap: 14px;
    background: #232740; border-radius: 14px; padding: 18px 16px;
    text-decoration: none; color: #fff; transition: all 0.2s ease;
    border-left: 4px solid var(--primary);
}
.overview-unit-card:hover { background: #2A2E4A; transform: translateX(4px); }
.ouc-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ouc-icon .icon { width: 24px; height: 24px; }
.ouc-info { flex: 1; }
.ouc-title { font-weight: 700; font-size: 1rem; display: block; }
.ouc-desc { font-size: 0.82rem; color: #8A8FA8; display: block; margin-top: 2px; }
.ouc-meta { font-size: 0.78rem; color: #636E82; display: block; margin-top: 4px; }
.ouc-arrow { width: 18px; height: 18px; color: #636E82; }

/* ═══════════════════════════════════════════
   SESSION / LESSON PAGE (Duolingo-style)
   ═══════════════════════════════════════════ */
.session-page { background: #0D1117; min-height: 100vh; }
.session-container {
    max-width: 600px; margin: 0 auto; min-height: 100vh;
    display: flex; flex-direction: column;
}

/* Top bar */
.session-topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; position: sticky; top: 0;
    background: #0D1117; z-index: 20;
}
.session-close {
    width: 36px; height: 36px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    color: #636E82; transition: var(--transition); background: #1A1D2E;
}
.session-close:hover { color: #fff; background: #2A2E3D; }
.session-close .icon { width: 20px; height: 20px; }

/* Progress segments */
.session-progress { flex: 1; display: flex; gap: 3px; height: 14px; }
.seg {
    flex: 1; border-radius: 7px; transition: all 0.3s ease;
}
.seg-pending { background: #2A2E3D; }
.seg-current { background: #6C5CE7; }
.seg-correct { background: var(--success); }
.seg-wrong { background: var(--danger); }

/* Lives / Hearts */
.session-lives { display: flex; gap: 2px; }
.heart { width: 22px; height: 22px; }
.heart-full { color: #E74C3C; }
.heart-empty { color: #D5D8DC; }

/* Review banner */
.review-banner {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px; background: rgba(255,150,0,0.1); color: #FF9600;
    font-weight: 600; font-size: 0.9rem; border-radius: var(--radius-sm);
    margin: 0 20px 8px; border: 1px solid rgba(255,150,0,0.2);
}
.review-icon { width: 18px; height: 18px; }

/* Question body */
.session-body { flex: 1; padding: 20px 20px 120px; }
.session-question-text {
    font-size: 1.4rem; font-weight: 700; line-height: 1.4;
    margin-bottom: 28px; color: #fff;
}
.session-question-text.dim { opacity: 0.5; }
.session-given-answer {
    font-size: 1rem; color: #8A8FA8; margin-bottom: 20px;
    padding: 12px 16px; background: #1A1D2E; border-radius: var(--radius-sm);
}

/* Option cards */
.session-options {
    display: grid; grid-template-columns: 1fr; gap: 10px;
}
.session-tf { grid-template-columns: 1fr 1fr; }

.session-option-card {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border: 2.5px solid #2A2E3D;
    border-radius: var(--radius); cursor: pointer;
    transition: var(--transition); background: #1A1D2E;
    font-size: 1.05rem; font-weight: 500; color: #fff;
}
.session-option-card input[type="radio"] { display: none; }
.session-option-card:hover { border-color: #58CC02; background: #232740; }
.session-option-card.selected {
    border-color: #58CC02; background: rgba(88,204,2,0.1);
    box-shadow: 0 0 0 3px rgba(88,204,2,0.12);
}
.tf-card-icon { width: 22px; height: 22px; }
.tf-true .tf-card-icon { color: var(--success); }
.tf-false .tf-card-icon { color: var(--danger); }

/* Text input */
.session-text-input { margin-bottom: 20px; }
.session-answer-field {
    width: 100%; padding: 16px 20px; border: 2.5px solid #2A2E3D;
    border-radius: var(--radius); font-size: 1.15rem; font-family: inherit;
    transition: var(--transition); text-align: center;
    background: #1A1D2E; color: #fff;
}
.session-answer-field:focus {
    outline: none; border-color: #58CC02;
    box-shadow: 0 0 0 3px rgba(88,204,2,0.15);
}
.session-answer-field::placeholder { color: #3A3F50; }

/* Bottom check button */
.session-bottom {
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 16px 20px; background: #0D1117;
    border-top: 1px solid #1A1D2E;
    display: flex; justify-content: center;
    max-width: 600px; margin: 0 auto;
}
.btn-check {
    width: 100%; padding: 16px; border-radius: var(--radius);
    font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; background: #2A2E3D; color: #636E82;
    border: none; cursor: not-allowed; transition: var(--transition);
    font-family: inherit;
}
.btn-check.btn-ready {
    background: var(--success); color: #fff; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,184,148,0.3);
}
.btn-check.btn-ready:hover { background: var(--secondary-dark); transform: translateY(-1px); }

/* Feedback states on options */
.feedback-locked { pointer-events: none; }
.session-option-card.option-correct {
    border-color: var(--success); background: rgba(0,184,148,0.1);
}
.session-option-card.option-wrong {
    border-color: var(--danger); background: rgba(225,112,85,0.1);
}
.feedback-field {
    display: flex; align-items: center; justify-content: center;
    min-height: 52px;
}
.field-correct { border-color: var(--success); background: rgba(0,184,148,0.1); color: var(--success); font-weight: 600; }
.field-wrong { border-color: var(--danger); background: rgba(225,112,85,0.1); color: var(--danger); font-weight: 600; }

/* Feedback bar */
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.slide-up { animation: slideUp 0.3s ease both; }

.feedback-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 20px; z-index: 30;
    max-width: 600px; margin: 0 auto;
}
.feedback-correct { background: #0D2818; border-top: 3px solid var(--success); }
.feedback-wrong { background: #2A1A1A; border-top: 3px solid var(--danger); }

.feedback-content { margin-bottom: 14px; }
.feedback-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.feedback-icon { width: 28px; height: 28px; }
.feedback-correct .feedback-icon { color: var(--success); }
.feedback-wrong .feedback-icon { color: var(--danger); }
.feedback-title { font-size: 1.2rem; font-weight: 700; }
.feedback-correct .feedback-title { color: var(--success); }
.feedback-wrong .feedback-title { color: var(--danger); }
.feedback-correct-answer { font-size: 0.92rem; color: #fff; font-weight: 500; margin-bottom: 4px; }
.feedback-explanation { font-size: 0.88rem; color: #8A8FA8; }
.feedback-life-lost {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.85rem; color: var(--danger); font-weight: 600; margin-top: 6px;
}
.heart-lost { width: 16px; height: 16px; color: var(--danger); }

.btn-feedback-correct {
    background: var(--success); color: #fff; border-color: var(--success);
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.btn-feedback-correct:hover { background: var(--secondary-dark); }
.btn-feedback-wrong {
    background: var(--danger); color: #fff; border-color: var(--danger);
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.btn-feedback-wrong:hover { opacity: 0.9; }

/* No lives page */
.no-lives-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.no-lives-card { text-align: center; max-width: 400px; }
.no-lives-hearts { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.heart-big { width: 36px; height: 36px; color: #3A3F50; }
.no-lives-card h1 { font-size: 1.6rem; margin-bottom: 10px; color: #fff; }
.no-lives-card p { color: #8A8FA8; margin-bottom: 20px; }
.no-lives-actions { margin-bottom: 16px; }
.no-lives-hint { font-size: 0.82rem; color: var(--text-muted); }

/* ─── Responsive ─── */

@media (max-width: 768px) {
    .hero { flex-direction: column; padding: 40px 20px; gap: 32px; text-align: center; }
    .hero-content h1 { font-size: 2rem; }
    .hero-actions { justify-content: center; }
    .hero-visual { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .features { padding: 32px 20px; }
    .nav-links a:not(.btn) { display: none; }

    .sidebar { display: none; }
    .app-main { margin-left: 0; }
    .app-content { padding: 20px; padding-bottom: 80px; }
    .mobile-nav { display: flex; }

    .learn-layout .learn-wrapper { grid-template-columns: 1fr; }
    .learn-main { margin-left: 0; padding-bottom: 80px; }
    .right-sidebar { display: none; }

    .path-row:nth-child(20n+2)  { transform: translateX(-32px); }
    .path-row:nth-child(20n+3)  { transform: translateX(-64px); }
    .path-row:nth-child(20n+4)  { transform: translateX(-100px); }
    .path-row:nth-child(20n+5)  { transform: translateX(-128px); }
    .path-row:nth-child(20n+6)  { transform: translateX(-128px); }
    .path-row:nth-child(20n+7)  { transform: translateX(-100px); }
    .path-row:nth-child(20n+8)  { transform: translateX(-64px); }
    .path-row:nth-child(20n+9)  { transform: translateX(-32px); }
    .path-row:nth-child(20n+11) { transform: translateX(32px); }
    .path-row:nth-child(20n+12) { transform: translateX(64px); }
    .path-row:nth-child(20n+13) { transform: translateX(100px); }
    .path-row:nth-child(20n+14) { transform: translateX(128px); }
    .path-row:nth-child(20n+15) { transform: translateX(128px); }
    .path-row:nth-child(20n+16) { transform: translateX(100px); }
    .path-row:nth-child(20n+17) { transform: translateX(64px); }
    .path-row:nth-child(20n+18) { transform: translateX(32px); }
    .node-circle { width: 60px; height: 60px; }
    .node-current .node-circle { width: 66px; height: 66px; }

    .options-grid { grid-template-columns: 1fr; }
    .result-stats { gap: 16px; }

    .panel-sidebar { display: none; }
    .panel-main { margin-left: 0; padding: 16px; }
    .panel-table { font-size: 0.82rem; }
    .panel-table th, .panel-table td { padding: 10px 12px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.6rem; }
    .hero-card { padding: 14px 18px; }
    .auth-card { padding: 28px 20px; }
    .result-card { padding: 28px 20px; }
    .onboarding-card { padding: 28px 20px; }
    .choice-btn { padding: 8px 14px; font-size: 0.82rem; }
    .skill-btn { padding: 14px 16px; }
}

/* Branding */
.brand-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }
.preview-img { max-width: 200px; max-height: 80px; border-radius: 8px; margin-bottom: 8px; }
.preview-favicon { width: 32px; height: 32px; border-radius: 4px; margin-bottom: 8px; }
.settings-preview { margin-bottom: 8px; }

/* Features */
.land-features { padding: 60px 32px; max-width: 1100px; margin: 0 auto; }
.land-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.land-feat {
    background: #1A1D2E; border-radius: 16px; padding: 28px;
    border: 1px solid #2A2E3D; transition: all 0.2s ease;
}
.land-feat:hover { border-color: #3A3F50; transform: translateY(-4px); }
.land-feat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.land-feat-icon .icon { width: 24px; height: 24px; }
.land-feat h3 { font-size: 1.05rem; margin-bottom: 6px; }
.land-feat p { color: #8A8FA8; font-size: 0.88rem; line-height: 1.5; }

/* How it works */
.land-how { padding: 60px 32px; max-width: 800px; margin: 0 auto; text-align: center; }
.land-how h2 { font-size: 1.8rem; margin-bottom: 32px; }
.land-steps { display: flex; gap: 32px; justify-content: center; }
.land-step { flex: 1; text-align: center; }
.land-step-num {
    width: 48px; height: 48px; border-radius: 50%; background: #58CC02; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 800; margin: 0 auto 12px;
}
.land-step h3 { margin-bottom: 6px; }
.land-step p { color: #8A8FA8; font-size: 0.88rem; }

/* CTA */
.land-cta {
    text-align: center; padding: 60px 32px;
    background: linear-gradient(135deg, rgba(88,204,2,0.08), rgba(28,176,246,0.08));
    border-radius: 24px; max-width: 700px; margin: 40px auto;
}
.land-cta h2 { font-size: 1.8rem; margin-bottom: 10px; }
.land-cta p { color: #8A8FA8; margin-bottom: 24px; }

/* SEO section */
.land-seo { max-width: 700px; margin: 40px auto; padding: 0 32px; text-align: center; }
.land-seo h2 { font-size: 1.3rem; margin-bottom: 10px; }
.land-seo p { color: #636E82; font-size: 0.9rem; line-height: 1.7; margin-bottom: 16px; }
.land-seo-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.land-seo-tags span {
    background: #1A1D2E; color: #636E82; padding: 5px 14px;
    border-radius: 20px; font-size: 0.78rem; font-weight: 500;
}

/* Footer */
.land-footer { text-align: center; padding: 40px 32px; border-top: 1px solid #1A1D2E; margin-top: 40px; }
.land-footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.land-footer-links a { color: #636E82; font-size: 0.85rem; text-decoration: none; }
.land-footer-links a:hover { color: #fff; }
.land-footer-copy { color: #3A3F50; font-size: 0.82rem; }

@media (max-width: 768px) {
    .land-hero { flex-direction: column; padding: 40px 20px; gap: 32px; text-align: center; }
    .land-hero-content h1 { font-size: 2rem; }
    .land-hero-trust { justify-content: center; }
    .land-phone { display: none; }
    .land-features-grid { grid-template-columns: 1fr; }
    .land-steps { flex-direction: column; gap: 20px; }
    .land-nav-links a:not(.land-btn) { display: none; }
    .land-cta { margin: 20px 16px; }
}

/* Contact form */
.contact-page { max-width: 480px; margin: 40px auto; padding: 0 20px; text-align: center; }
.contact-page h1 { color: #fff; margin-bottom: 6px; }
.contact-sub { color: #636E82; margin-bottom: 24px; font-size: 0.92rem; }
.contact-form { text-align: left; display: flex; flex-direction: column; gap: 12px; }
.cf-field label { display: block; font-size: 0.82rem; color: #8A8FA8; font-weight: 600; margin-bottom: 4px; }
.cf-field input, .cf-field textarea {
    width: 100%; background: #1A1D2E; border: 2px solid #2A2E3D; border-radius: 12px;
    padding: 12px 14px; color: #fff; font-size: 0.95rem; font-family: inherit;
}
.cf-field input:focus, .cf-field textarea:focus { outline: none; border-color: #58CC02; }
.cf-field input::placeholder, .cf-field textarea::placeholder { color: #3A3F50; }

/* Panel unread message */
.msg-unread { border-left: 3px solid #58CC02; }

/* Panel Dashboard */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.dash-stat {
    background: var(--bg-card); border-radius: 14px; padding: 20px; text-align: center;
    border-left: 4px solid var(--primary); box-shadow: var(--shadow);
}
.ds-val { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.ds-label { font-size: 0.82rem; color: var(--text-light); }

.dash-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-chart-card {
    background: var(--bg-card); border-radius: 14px; padding: 20px;
    box-shadow: var(--shadow);
}
.dash-chart-card h3 { font-size: 0.95rem; margin-bottom: 12px; color: var(--text); }
.dash-chart-sub { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 8px; }

.dash-donut-wrap { position: relative; max-width: 200px; margin: 0 auto; }
.dash-donut-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 1.4rem; font-weight: 800; color: var(--text);
}

@media (max-width: 768px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-charts { grid-template-columns: 1fr; }
}

/* Report button & modal */
.feedback-top-row { display: flex; align-items: center; justify-content: space-between; }
.report-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: none; color: #E74C3C;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
}
.report-btn:hover { color: #FF6B6B; }
.report-btn .icon { width: 18px; height: 18px; }

.report-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.report-modal {
    background: #1A1D2E; border-radius: 16px; padding: 24px;
    width: 100%; max-width: 380px; border: 1px solid #2A2E3D;
}
.report-modal h3 { color: #fff; margin-bottom: 14px; font-size: 1.1rem; }
.report-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.report-reason {
    padding: 8px 14px; background: #0D1117; border: 2px solid #2A2E3D;
    border-radius: 20px; color: #B2BEC3; font-size: 0.82rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.report-reason:hover { border-color: #FF4B4B; }
.report-reason.selected { background: #FF4B4B; border-color: #FF4B4B; color: #fff; }
.report-modal textarea {
    width: 100%; background: #0D1117; border: 2px solid #2A2E3D; border-radius: 10px;
    padding: 10px; color: #fff; font-family: inherit; font-size: 0.88rem; margin-bottom: 12px;
    resize: none;
}
.report-modal textarea:focus { outline: none; border-color: #FF4B4B; }
.report-modal textarea::placeholder { color: #3A3F50; }
.report-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Report cards in panel */
.report-card {
    background: var(--bg-card); border-radius: 14px; padding: 18px;
    box-shadow: var(--shadow); margin-bottom: 12px;
}
.rc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rc-header-left { display: flex; align-items: center; gap: 8px; }
.rc-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.rc-open { background: #FFEAEA; color: #E74C3C; }
.rc-done { background: #E8F8F5; color: #58CC02; }
.rc-reason { font-weight: 600; font-size: 0.88rem; }
.rc-date { font-size: 0.78rem; color: var(--text-muted); }

.rc-section { margin-bottom: 10px; }
.rc-label { font-size: 0.72rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; display: block; margin-bottom: 2px; }
.rc-value { font-size: 0.92rem; color: var(--text); }
.rc-wrong { color: #E74C3C; }
.rc-right { color: #58CC02; }
.rc-row { display: flex; gap: 16px; }
.rc-half { flex: 1; }

.rc-details { margin: 10px 0; }
.rc-details summary {
    cursor: pointer; font-size: 0.82rem; color: var(--text-muted); font-weight: 600;
    padding: 6px 0;
}
.rc-tech { margin-top: 8px; }
.rc-tech-row {
    display: flex; justify-content: space-between; padding: 4px 0;
    border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.rc-tech-row span:first-child { color: var(--text-muted); font-weight: 600; }
.rc-tech-row span:last-child { color: var(--text-light); }

.rc-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Toast notification */
.report-toast {
    position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
    background: #1A1D2E; border: 1px solid #58CC02; color: #58CC02;
    padding: 12px 24px; border-radius: 12px; font-weight: 600; font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px; z-index: 200;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ─── School System ─── */
.sch-container { width: 100%; max-width: 500px; padding: 28px 16px 80px; }
.sch-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 16px; }

.sch-card {
    background: #1A1D2E; border-radius: 14px; padding: 18px;
    border: 1px solid #2A2E3D; margin-bottom: 12px;
}
.sch-card h3 { color: #fff; font-size: 0.95rem; margin-bottom: 10px; }

.sch-inline-form { display: flex; gap: 8px; align-items: center; }
.sch-inline-form input {
    flex: 1; background: #0D1117; border: 2px solid #2A2E3D; border-radius: 10px;
    padding: 10px 14px; color: #fff; font-family: inherit; font-size: 0.92rem;
}
.sch-inline-form input:focus { outline: none; border-color: #58CC02; }
.sch-inline-form input::placeholder { color: #3A3F50; }

.sch-section { margin-bottom: 20px; }
.sch-sec-title { font-size: 0.9rem; color: #8A8FA8; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

.sch-link-card {
    display: flex; align-items: center; gap: 12px;
    background: #1A1D2E; border-radius: 12px; padding: 14px 16px;
    text-decoration: none; color: #fff; border: 1px solid #2A2E3D;
    transition: all 0.2s; margin-bottom: 6px;
}
.sch-link-card:hover { background: #232740; transform: translateX(4px); }
.sch-link-card .icon { width: 22px; height: 22px; flex-shrink: 0; }

.sch-assignment-card {
    display: flex; align-items: center; justify-content: space-between;
    background: #1A1D2E; border-radius: 12px; padding: 14px 16px;
    border: 1px solid #2A2E3D; margin-bottom: 6px;
}
.sac-title { font-weight: 700; color: #fff; display: block; font-size: 0.92rem; }
.sac-meta { font-size: 0.78rem; color: #636E82; }
.sac-done { font-weight: 800; color: #58CC02; font-size: 0.95rem; }

.sch-student-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    border-bottom: 1px solid #2A2E3D; color: #B2BEC3; font-size: 0.92rem;
}
.sch-student-row .icon { width: 18px; height: 18px; }

.sch-form { display: flex; flex-direction: column; gap: 12px; }
.sch-select {
    width: 100%; background: #0D1117; border: 2px solid #2A2E3D; border-radius: 10px;
    padding: 10px 14px; color: #fff; font-family: inherit; font-size: 0.92rem;
}
.sch-select:focus { outline: none; border-color: #58CC02; }

.sch-task-card {
    display: flex; align-items: center; justify-content: space-between;
    background: #1A1D2E; border-radius: 12px; padding: 14px 16px;
    border: 1px solid #2A2E3D; margin-bottom: 6px;
}
.task-done { border-color: #58CC02; }
.task-overdue { border-color: #FF4B4B; }
.stc-title { font-weight: 700; color: #fff; display: block; font-size: 0.92rem; }
.stc-meta { font-size: 0.78rem; color: #636E82; }
.stc-badge { padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 0.82rem; }
.stc-done { background: rgba(88,204,2,0.15); color: #58CC02; }

/* Legal content */
.legal-content { color: #8A8FA8; font-size: 0.92rem; line-height: 1.8; text-align: left; }
.legal-content h2 { color: #fff; font-size: 1.1rem; margin: 24px 0 8px; }
.legal-content h3 { color: #B2BEC3; font-size: 0.95rem; margin: 16px 0 6px; }
.legal-content p { margin-bottom: 12px; }
.legal-content ul, .legal-content ol { margin: 8px 0 12px 20px; }
.legal-content li { margin-bottom: 4px; }
.legal-content a { color: #58CC02; }

/* TOS checkbox */
.auth-tos { margin-top: 4px; }
.tos-label { display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem; color: #636E82; cursor: pointer; }
.tos-label input[type="checkbox"] { margin-top: 3px; accent-color: #58CC02; }
.tos-label a { color: #58CC02; }
