/* ═══════════════════════════════════════════════════════════════════════════
   EnglishPath – Main Stylesheet
   Mobile-first · CSS custom properties · Dark-mode via [data-theme="dark"]
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. CUSTOM PROPERTIES ─────────────────────────────────────────────────── */
:root {
  /* Brand */
  --color-primary:       #2563EB;
  --color-primary-dark:  #1D4ED8;
  --color-primary-light: #EFF6FF;
  --color-secondary:     #7C3AED;
  --color-success:       #10B981;
  --color-warning:       #F59E0B;
  --color-danger:        #EF4444;
  --color-info:          #0891B2;

  /* Paths */
  --path-immigration:    #2563EB;
  --path-test-prep:      #7C3AED;
  --path-business:       #059669;
  --path-general:        #D97706;

  /* CEFR */
  --cefr-a1: #10B981;
  --cefr-a2: #34D399;
  --cefr-b1: #3B82F6;
  --cefr-b2: #6366F1;
  --cefr-c1: #8B5CF6;
  --cefr-c2: #EC4899;

  /* Surface (light theme) */
  --bg:           #F1F5F9;
  --bg-card:      #FFFFFF;
  --bg-input:     #F8FAFC;
  --bg-hover:     #F1F5F9;
  --border:       #E2E8F0;
  --border-focus: #93C5FD;

  /* Text */
  --text-primary:  #1E293B;
  --text-secondary:#475569;
  --text-muted:    #94A3B8;
  --text-inverse:  #FFFFFF;

  /* Nav */
  --nav-bg:     #FFFFFF;
  --nav-border: #E2E8F0;
  --nav-height: 60px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radii */
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);

  /* Transitions */
  --transition: 150ms ease;
  --transition-md: 250ms ease;
}

/* Dark theme */
[data-theme="dark"] {
  --bg:           #0F172A;
  --bg-card:      #1E293B;
  --bg-input:     #0F172A;
  --bg-hover:     #263248;
  --border:       #334155;
  --border-focus: #3B82F6;

  --text-primary:  #F1F5F9;
  --text-secondary:#94A3B8;
  --text-muted:    #64748B;

  --nav-bg:     #1E293B;
  --nav-border: #334155;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 6px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.4);
}

/* ── 2. RESET ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-md), color var(--transition-md);
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── 3. LAYOUT ────────────────────────────────────────────────────────────── */
.main-content {
  padding: var(--space-4);
  padding-top: calc(var(--nav-height) + var(--space-4));
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
}

.container { max-width: 900px; margin: 0 auto; }
.container--narrow { max-width: 560px; margin: 0 auto; }

.page-header {
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-4);
}
.page-header h1 { font-size: var(--text-2xl); font-weight: 700; }
.page-header p  { color: var(--text-secondary); margin-top: var(--space-1); }

@media (min-width: 768px) {
  .main-content { padding: var(--space-6); padding-top: calc(var(--nav-height) + var(--space-6)); }
}

/* Grid helpers */
.grid-2 { display: grid; gap: var(--space-4); }
.grid-3 { display: grid; gap: var(--space-4); }
.grid-4 { display: grid; gap: var(--space-4); }

@media (min-width: 640px)  { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px)  { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px)  { .grid-3 { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 640px)  { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4,1fr); } }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.flex-gap     { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }

/* ── 4. NAVIGATION ────────────────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topnav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--space-4);
  max-width: 1280px;
  margin: 0 auto;
}

.topnav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.topnav__logo:hover { text-decoration: none; }
.topnav__logo-icon { font-size: 1.4rem; }
.topnav__logo-text { display: none; }

@media (min-width: 480px) { .topnav__logo-text { display: inline; } }

.topnav__links {
  display: none;
  gap: var(--space-1);
  align-items: center;
}
.topnav__links a {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.topnav__links a:hover,
.topnav__links a.active {
  background: var(--bg-hover);
  color: var(--color-primary);
}
.topnav__links a.active { font-weight: 600; }

@media (min-width: 768px) {
  .topnav__links { display: flex; }
}

.topnav__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.review-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-warning);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-decoration: none;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}

/* User menu */
.user-menu { position: relative; }
.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px var(--space-2) 4px 4px;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.user-menu__trigger:hover { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.user-menu__name { font-size: var(--text-sm); font-weight: 600; display: none; }
.user-menu__caret { font-size: var(--text-xs); }

@media (min-width: 480px) { .user-menu__name { display: inline; } }

.user-menu__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}
.user-menu__dropdown.open { display: block; animation: slideDown .15s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }

.user-menu__dropdown a {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: background var(--transition);
  text-decoration: none;
}
.user-menu__dropdown a:hover { background: var(--bg-hover); }
.user-menu__info { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }

.xp-mini { font-size: var(--text-xs); color: var(--text-secondary); }
.xp-bar-mini {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin-top: 4px;
  overflow: hidden;
}
.xp-bar-mini__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width .4s ease;
}

/* Avatar */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
}
.avatar--lg { width: 64px; height: 64px; font-size: var(--text-2xl); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--space-2);
  border-radius: var(--radius);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-md);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) { .hamburger { display: none; } }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  top: var(--nav-height);
  left: -100%;
  width: min(280px, 85vw);
  height: calc(100vh - var(--nav-height));
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 99;
  overflow-y: auto;
  transition: left var(--transition-md);
  padding: var(--space-4);
}
.mobile-drawer.open { left: 0; }
.mobile-drawer a {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition);
}
.mobile-drawer a:hover { background: var(--bg-hover); }
.mobile-drawer li + li { margin-top: var(--space-1); }

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 98;
}
.drawer-overlay.open { display: block; }

/* ── 5. BUTTONS ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}
.btn:disabled { opacity: .5; pointer-events: none; }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}
.btn--secondary:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }

.btn--success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}
.btn--success:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }

.btn--danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn--danger:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-hover); text-decoration: none; }

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary-light); text-decoration: none; }

.btn--sm  { font-size: var(--text-xs); padding: 0.4rem 0.9rem; }
.btn--lg  { font-size: var(--text-base); padding: 0.8rem 1.75rem; }
.btn--xl  { font-size: var(--text-lg); padding: 1rem 2.25rem; border-radius: var(--radius-lg); }
.btn--full { width: 100%; }
.btn--icon { padding: 0.5rem; width: 36px; height: 36px; }

/* ── 6. CARDS ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-md), transform var(--transition-md), border-color var(--transition-md);
}
.card:hover { box-shadow: var(--shadow-md); }
.card--clickable { cursor: pointer; }
.card--clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card--accent-top { border-top: 4px solid var(--color-primary); }

.card__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.card__body { padding: var(--space-5); }
.card__footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg-hover);
}

/* Stat cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stat-card__icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
}
.stat-card__value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-card__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-card__change {
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: 600;
}

/* Lesson card */
.lesson-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-md);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.lesson-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }

.lesson-card__stripe {
  height: 5px;
  background: var(--color-primary);
}
.lesson-card__body { padding: var(--space-4); flex: 1; }
.lesson-card__meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.lesson-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}
.lesson-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lesson-card__footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.lesson-card__footer .status-done   { color: var(--color-success); font-weight: 700; }
.lesson-card__footer .status-active { color: var(--color-primary); font-weight: 700; }

/* ── 7. BADGES & TAGS ─────────────────────────────────────────────────────── */
.cefr-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: #fff;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
}

/* ── 8. FORMS ─────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}
.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-input::placeholder { color: var(--text-muted); }
.form-error {
  font-size: var(--text-sm);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.form-hint { font-size: var(--text-sm); color: var(--text-muted); }

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

/* Auth cards */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: linear-gradient(135deg, #1E3A5F 0%, #0F172A 100%);
}
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-xl);
}
.auth-card__logo {
  text-align: center;
  margin-bottom: var(--space-6);
}
.auth-card__logo-icon { font-size: 3rem; }
.auth-card__logo-name { font-size: var(--text-2xl); font-weight: 800; margin-top: var(--space-2); }
.auth-card__logo-tag  { color: var(--text-secondary); font-size: var(--text-sm); }
.auth-card h2 { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-6); }

/* Path selector on registration */
.path-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.path-option {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  user-select: none;
}
.path-option input[type="radio"] { display: none; }
.path-option__icon  { font-size: 1.75rem; margin-bottom: var(--space-1); }
.path-option__label { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.path-option__desc  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.path-option:hover  { border-color: var(--color-primary); background: var(--color-primary-light); }
.path-option.selected { border-color: var(--color-primary); background: var(--color-primary-light); }

/* ── 9. PROGRESS BARS ─────────────────────────────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transition: width .5s ease;
}
.progress-bar--sm  { height: 4px; }
.progress-bar--lg  { height: 12px; }
.progress-bar--success .progress-bar__fill { background: var(--color-success); }
.progress-bar--warning .progress-bar__fill { background: var(--color-warning); }
.progress-bar--danger  .progress-bar__fill { background: var(--color-danger); }

/* XP progress on dashboard */
.xp-progress { margin: var(--space-3) 0; }
.xp-progress__labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}
.xp-progress__bar {
  height: 10px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.xp-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #818CF8);
  border-radius: var(--radius-full);
  transition: width .6s cubic-bezier(.25,.46,.45,.94);
}

/* ── 10. EXERCISES ────────────────────────────────────────────────────────── */
.exercise-container {
  max-width: 700px;
  margin: 0 auto;
}

.exercise-progress {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.exercise-progress__bar { flex: 1; }
.exercise-progress__count {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.exercise-progress__xp {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-warning);
  white-space: nowrap;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  animation: fadeSlideIn .25s ease;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: none; }
}

.exercise-type-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-3);
}

.exercise-question {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: var(--space-5);
}

/* Multiple choice */
.mc-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.mc-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  font-size: var(--text-base);
  background: var(--bg-card);
  text-align: left;
  width: 100%;
  color: var(--text-primary);
}
.mc-option:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.mc-option.selected   { border-color: var(--color-primary); background: var(--color-primary-light); }
.mc-option.correct    { border-color: var(--color-success) !important; background: #ECFDF5 !important; color: #065F46; }
.mc-option.incorrect  { border-color: var(--color-danger)  !important; background: #FEF2F2 !important; color: #991B1B; }
.mc-option__letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}
.mc-option.selected .mc-option__letter   { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.mc-option.correct  .mc-option__letter   { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.mc-option.incorrect .mc-option__letter  { background: var(--color-danger);  border-color: var(--color-danger);  color: #fff; }

/* Fill in the blank */
.fill-blank-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.fill-blank-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.fill-blank-input.correct   { border-color: var(--color-success); background: #ECFDF5; }
.fill-blank-input.incorrect { border-color: var(--color-danger);  background: #FEF2F2; }

/* Matching exercise */
.matching-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.match-item {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition);
  text-align: center;
  background: var(--bg-card);
  color: var(--text-primary);
}
.match-item:hover   { border-color: var(--color-primary); }
.match-item.selected{ border-color: var(--color-primary); background: var(--color-primary-light); }
.match-item.matched { border-color: var(--color-success); background: #ECFDF5; color: #065F46; pointer-events: none; }
.match-item.wrong   { border-color: var(--color-danger);  background: #FEF2F2; animation: shake .4s ease; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-5px); }
  40%,80%  { transform: translateX(5px); }
}

/* Word ordering */
.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 52px;
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  border: 2px dashed var(--border);
}
.word-token {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  color: var(--text-primary);
}
.word-token:hover          { border-color: var(--color-primary); background: var(--color-primary-light); }
.word-token.in-answer      { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.word-token.correct-token  { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.word-token.wrong-token    { background: var(--color-danger);  color: #fff; border-color: var(--color-danger); }

.answer-area {
  min-height: 52px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

/* Feedback panel */
.feedback-panel {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-4);
  display: none;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.feedback-panel.correct   { background: #ECFDF5; border: 1px solid #6EE7B7; }
.feedback-panel.incorrect { background: #FEF2F2; border: 1px solid #FCA5A5; }
.feedback-panel.show      { display: block; }
.feedback-panel__header   { font-weight: 700; font-size: var(--text-base); margin-bottom: var(--space-1); }
.feedback-panel__header.correct   { color: #065F46; }
.feedback-panel__header.incorrect { color: #991B1B; }
.feedback-panel__explanation { font-size: var(--text-sm); color: var(--text-secondary); }
.feedback-panel__answer      { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-top: var(--space-1); }

/* Exercise actions */
.exercise-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

/* Speaking */
.speak-prompt {
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-align: center;
  border: 2px dashed var(--border);
  line-height: 1.5;
}
.record-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-full);
  background: var(--color-danger);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-base);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  margin: 0 auto;
}
.record-btn:hover { background: #DC2626; transform: scale(1.05); }
.record-btn.recording {
  background: #DC2626;
  animation: recordPulse 1.2s ease infinite;
}
@keyframes recordPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  50%      { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}
.transcript-area {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  min-height: 60px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-3);
  font-style: italic;
}

/* ── 11. VOCABULARY / SRS FLASHCARDS ──────────────────────────────────────── */
.flashcard-scene {
  perspective: 1000px;
  max-width: 540px;
  margin: 0 auto var(--space-6);
  height: 280px;
  cursor: pointer;
}
.flashcard {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.175,.885,.32,1.275);
  position: relative;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  text-align: center;
}
.flashcard__front {
  background: linear-gradient(135deg, #1E3A5F 0%, #1E293B 100%);
  color: #fff;
}
.flashcard__back {
  background: var(--bg-card);
  transform: rotateY(180deg);
}
.flashcard__word {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.flashcard__ipa {
  font-size: var(--text-base);
  opacity: .7;
  font-family: var(--font-mono);
}
.flashcard__hint {
  font-size: var(--text-sm);
  opacity: .5;
  margin-top: var(--space-4);
}
.flashcard__definition {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  line-height: 1.4;
}
.flashcard__example {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}
.flashcard__category {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}

/* SRS rating buttons */
.srs-ratings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  max-width: 540px;
  margin: 0 auto;
}
.srs-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text-primary);
}
.srs-btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.srs-btn__emoji { font-size: 1.4rem; }
.srs-btn__label { font-size: var(--text-xs); font-weight: 700; }
.srs-btn__interval { font-size: 10px; color: var(--text-muted); }

.srs-btn--blackout { border-color: #EF4444; }
.srs-btn--blackout:hover { background: #FEF2F2; border-color: #EF4444; }
.srs-btn--hard     { border-color: #F97316; }
.srs-btn--hard:hover { background: #FFF7ED; border-color: #F97316; }
.srs-btn--good     { border-color: #3B82F6; }
.srs-btn--good:hover { background: #EFF6FF; border-color: #3B82F6; }
.srs-btn--easy     { border-color: #10B981; }
.srs-btn--easy:hover { background: #ECFDF5; border-color: #10B981; }

/* ── 12. TOAST NOTIFICATIONS ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-xl);
  pointer-events: all;
  max-width: 320px;
  animation: toastIn .3s ease;
  font-size: var(--text-sm);
  font-weight: 500;
}
@keyframes toastIn {
  from { opacity:0; transform: translateX(100%); }
  to   { opacity:1; transform: none; }
}
.toast--success { border-left: 4px solid var(--color-success); }
.toast--error   { border-left: 4px solid var(--color-danger); }
.toast--info    { border-left: 4px solid var(--color-primary); }
.toast--warning { border-left: 4px solid var(--color-warning); }
.toast.removing { animation: toastOut .3s ease forwards; }
@keyframes toastOut { to { opacity:0; transform: translateX(100%); } }

/* ── 13. BADGES / ACHIEVEMENTS ────────────────────────────────────────────── */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-4);
}
.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-align: center;
  transition: all var(--transition-md);
}
.badge-card:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.badge-card.locked { opacity: .4; filter: grayscale(1); }
.badge-card__icon  { font-size: 2.5rem; margin-bottom: var(--space-2); }
.badge-card__name  { font-size: var(--text-sm); font-weight: 700; }
.badge-card__desc  { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* ── 14. DASHBOARD / HOME ─────────────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #1E3A5F 0%, #1E1B4B 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  color: #fff;
  margin-bottom: var(--space-6);
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 80px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.03);
  border-radius: 50%;
}
.welcome-banner__greeting { font-size: var(--text-sm); opacity: .8; margin-bottom: var(--space-1); }
.welcome-banner__name     { font-size: var(--text-3xl); font-weight: 800; margin-bottom: var(--space-2); }
.welcome-banner__streak   { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); opacity: .9; }

.daily-goal {
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-4);
  backdrop-filter: blur(4px);
}
.daily-goal__label { font-size: var(--text-xs); opacity: .7; margin-bottom: var(--space-2); }
.daily-goal__bar {
  height: 8px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.daily-goal__fill {
  height: 100%;
  background: linear-gradient(90deg, #34D399, #10B981);
  border-radius: var(--radius-full);
  transition: width .6s ease;
}

/* ── 15. LESSON CONTENT ───────────────────────────────────────────────────── */
.lesson-content {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.8;
  color: var(--text-primary);
}
.lesson-content h2 { font-size: var(--text-2xl); font-weight: 700; margin: var(--space-8) 0 var(--space-4); }
.lesson-content h3 { font-size: var(--text-xl);  font-weight: 600; margin: var(--space-6) 0 var(--space-3); }
.lesson-content p  { margin-bottom: var(--space-4); }
.lesson-content ul,
.lesson-content ol { margin: var(--space-3) 0 var(--space-4) var(--space-6); }
.lesson-content li { margin-bottom: var(--space-2); }
.lesson-content ul { list-style: disc; }
.lesson-content ol { list-style: decimal; }

.lesson-content .example-box {
  background: var(--bg-hover);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-4);
  margin: var(--space-5) 0;
  font-size: var(--text-sm);
}
.lesson-content .example-box em { display: block; color: var(--text-secondary); margin-top: var(--space-1); font-style: italic; }

.lesson-content .tip-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-5) 0;
}
.lesson-content .tip-box::before { content: '💡 Tip: '; font-weight: 700; color: #92400E; }
[data-theme="dark"] .lesson-content .tip-box { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }
[data-theme="dark"] .lesson-content .tip-box::before { color: var(--color-warning); }

.lesson-content .warning-box {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-5) 0;
}
.lesson-content .warning-box::before { content: '⚠️ Note: '; font-weight: 700; color: #991B1B; }
[data-theme="dark"] .lesson-content .warning-box { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); }

/* Dialogue box for lessons */
.dialogue {
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}
.dialogue-line {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.dialogue-line:last-child { margin-bottom: 0; }
.dialogue-speaker {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  min-width: 60px;
  text-transform: uppercase;
}
.dialogue-text { font-size: var(--text-sm); color: var(--text-primary); }

/* ── 16. TEST PREP ────────────────────────────────────────────────────────── */
.test-section-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 640px) { .test-section-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .test-section-grid { grid-template-columns: repeat(4, 1fr); } }

.test-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-md);
  text-decoration: none;
  display: block;
  color: var(--text-primary);
}
.test-section-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.test-section-card__icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.test-section-card__name { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-1); }
.test-section-card__desc { font-size: var(--text-sm); color: var(--text-secondary); }
.test-section-card__score {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-top: var(--space-3);
}

.score-estimator {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-top: var(--space-6);
}
.score-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.score-band {
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-align: center;
  font-size: var(--text-xs);
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.score-band.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 700;
}
.score-band__score { font-size: var(--text-lg); font-weight: 800; color: var(--text-primary); }
.score-band__level { color: var(--text-muted); }

/* ── 17. PROGRESS / ANALYTICS ─────────────────────────────────────────────── */
.chart-container {
  position: relative;
  height: 200px;
  width: 100%;
  overflow: hidden;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: 100%;
  padding-top: var(--space-4);
}
.bar-chart__bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.bar-chart__bar {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--color-primary);
  min-height: 4px;
  transition: height .6s cubic-bezier(.25,.46,.45,.94);
  opacity: .85;
}
.bar-chart__bar:hover { opacity: 1; }
.bar-chart__label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

.activity-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--border);
  transition: background var(--transition);
}
.cal-cell[data-count="0"] { background: var(--border); }
.cal-cell[data-count="1"] { background: #BFDBFE; }
.cal-cell[data-count="2"] { background: #60A5FA; }
.cal-cell[data-count="3"] { background: #2563EB; }
.cal-cell[data-count="4"] { background: #1D4ED8; }
[data-theme="dark"] .cal-cell[data-count="1"] { background: #1D4ED8; }
[data-theme="dark"] .cal-cell[data-count="2"] { background: #2563EB; }
[data-theme="dark"] .cal-cell[data-count="3"] { background: #3B82F6; }
[data-theme="dark"] .cal-cell[data-count="4"] { background: #60A5FA; }

/* ── 18. PROFILE ──────────────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}
.profile-header__info { flex: 1; min-width: 200px; }
.profile-header__name { font-size: var(--text-2xl); font-weight: 800; }
.profile-header__email { color: var(--text-secondary); font-size: var(--text-sm); }
.profile-header__joined { color: var(--text-muted); font-size: var(--text-xs); margin-top: var(--space-1); }

/* ── 19. SITE FOOTER ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) var(--space-4);
  margin-top: var(--space-12);
  text-align: center;
}
.site-footer__brand { font-weight: 600; color: var(--text-primary); }
.site-footer__copy  { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-1); }

/* ── 20. UTILITIES ────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success{ color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning{ color: var(--color-warning); }
.text-primary-color { color: var(--color-primary); }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Dark mode toggle btn */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  width: 36px; height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--bg-hover); border-color: var(--color-primary); }

/* Level up animation overlay */
.levelup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s ease;
}
.levelup-card {
  background: linear-gradient(135deg, #1E3A5F 0%, #1E1B4B 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  text-align: center;
  color: #fff;
  max-width: 360px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: popIn .5s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes popIn {
  0%   { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}
.levelup-card__emoji { font-size: 4rem; margin-bottom: var(--space-3); }
.levelup-card h2 { font-size: var(--text-3xl); font-weight: 800; }
.levelup-card p  { opacity: .8; margin-top: var(--space-2); }

/* Confetti dots */
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti-dot {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  animation: confettiFall linear forwards;
  pointer-events: none;
  z-index: 10000;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-hover) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text  { height: 1em; margin-bottom: .5em; }
.skeleton-title { height: 1.5em; width: 60%; margin-bottom: .5em; }
.skeleton-card  { height: 180px; border-radius: var(--radius-lg); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--text-secondary);
}
.empty-state__icon  { font-size: 3.5rem; margin-bottom: var(--space-4); }
.empty-state__title { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.empty-state__desc  { max-width: 360px; margin: 0 auto var(--space-5); }

/* ── 21. RESPONSIVE FINE-TUNING ───────────────────────────────────────────── */
@media (max-width: 639px) {
  .hide-mobile  { display: none !important; }
  .auth-card    { padding: var(--space-5); }
  .path-selector { grid-template-columns: 1fr; }
  .srs-ratings  { grid-template-columns: repeat(2, 1fr); }
  .welcome-banner { padding: var(--space-4); }
  .welcome-banner__name { font-size: var(--text-2xl); }
  .flashcard-scene { height: 240px; }
  .exercise-card { padding: var(--space-4); }
}

@media (min-width: 640px) {
  .hide-tablet { display: none !important; }
}

@media (min-width: 1024px) {
  .main-content { padding: var(--space-8); padding-top: calc(var(--nav-height) + var(--space-8)); }
}

/* Print styles */
@media print {
  .topnav, .site-footer, .btn, .toast-container { display: none !important; }
  .main-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
