/* ============================================================
   LingoSpree - Design System v4  (Teal / Amber Sprint 8)
   Forest Teal primary · Warm Amber secondary · Cream light bg
   ============================================================ */

/* ── Default: Warm Cream Light Mode ── */
:root {
  /* Backgrounds — warm cream, not cold grey */
  --bg: #f9f6f1;
  --bg2: #ffffff;
  --bg3: #f3efe9;
  --surface: rgba(255, 255, 255, 0.9);
  --surface2: #ffffff;

  /* Borders — warm, not cold */
  --border: rgba(180, 155, 120, 0.18);
  --border2: rgba(180, 155, 120, 0.30);

  /* Text — near black with warmth */
  --text: #1a1a1a;
  --text2: #3d3d3d;
  --text3: #8a8272;

  /* Primary accent — Forest Teal */
  --accent: #0d9488;
  --accent2: #0f766e;
  --accent3: #134e4a;
  --accent-alpha: rgba(13, 148, 136, 0.10);

  /* Secondary — Warm Amber */
  --amber: #d97706;
  --amber2: #b45309;
  --amber-alpha: rgba(217, 119, 6, 0.10);

  /* Tertiary — Electric Violet (for CTA/premium) */
  --violet: #7c3aed;
  --violet-alpha: rgba(124, 58, 237, 0.10);

  /* Semantic */
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --gold: #d97706;

  /* Radius — generous */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 999px;

  /* Shadows — warm tinted */
  --shadow: 0 2px 16px rgba(13, 148, 136, 0.08);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(13, 148, 136, 0.15);

  /* Fonts */
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', 'Inter', system-ui, sans-serif;
  --nav-h: 64px;
  --transition: 0.18s ease;
}

/* ── Dark Mode: Deep Teal-tinted Charcoal ── */
[data-theme="dark"] {
  --bg: #0f1a1a;
  --bg2: #162020;
  --bg3: #1d2b2b;
  --surface: rgba(255, 255, 255, 0.05);
  --surface2: rgba(255, 255, 255, 0.09);
  --border: rgba(13, 148, 136, 0.18);
  --border2: rgba(13, 148, 136, 0.28);
  --text: #e8f5f4;
  --text2: #9dbdba;
  --text3: #5a8480;
  --accent: #14b8a6;
  --accent2: #0d9488;
  --accent-alpha: rgba(20, 184, 166, 0.12);
  --amber: #fbbf24;
  --amber2: #d97706;
  --amber-alpha: rgba(251, 191, 36, 0.12);
  --violet: #a78bfa;
  --violet-alpha: rgba(167, 139, 250, 0.12);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.60);
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Global Level Filter ── */
#global-filter-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  border-bottom: 1px solid var(--border);
}

.filter-pill {
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text3);
}

.filter-pill:hover {
  background: var(--bg3);
  color: var(--text);
}

.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-pill.locked {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
  font-size: 0.8rem;
}

.filter-pill.locked:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--violet);
  color: var(--violet);
  opacity: 0.8;
}

/* Hide filter for certain pages */
body.hide-filter #global-filter-container {
  display: none;
}

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: var(--font);
}

img {
  max-width: 100%;
  display: block;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

h4 {
  font-size: 1.1rem;
}

p {
  color: var(--text2);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* ── Global Nav ── Langey style: transparent bar + centered pill group ── */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

[data-theme="dark"] .global-nav {
  background: var(--bg);
}

/* LEFT: credits pill */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.nav-logo {
  display: none;
}

/* hide flag on desktop */

.nav-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* Global Transitions for Production Polish */
a,
button,
.card,
.btn,
.lesson-card,
input,
select {
  transition: all var(--transition);
}

/* CENTER: pill group */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 4px;
}

.nav-link {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
  background: var(--text);
  color: #fff;
  font-weight: 600;
}

[data-theme="dark"] .nav-link.active {
  background: #f0f0f0;
  color: #111;
}

/* No underline indicator - pill does the job */
.nav-link.active::after {
  display: none;
}

/* RIGHT: actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.nav-xp,
.nav-streak {
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text2);
}

.nav-xp {
  color: var(--warning);
}

.nav-streak {
  color: #ea580c;
}

[data-theme="dark"] .nav-xp {
  color: #f59e0b;
}

[data-theme="dark"] .nav-streak {
  color: #f97316;
}

.nav-credits {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--warning);
}

[data-theme="dark"] .nav-credits {
  color: #f59e0b;
}

.nav-hamburger {
  display: none;
  font-size: 1.4rem;
  color: var(--text);
  padding: 8px;
}

/* Nav-left: brand + credits */
.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* More dropdown */
.nav-more-wrap {
  position: relative;
}

.nav-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.nav-more-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 6px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.nav-more-wrap.open .nav-more-menu {
  display: flex;
}

.nav-more-item {
  display: block;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-more-item:hover {
  background: var(--bg3);
  color: var(--text);
}

.nav-more-item.active {
  background: var(--text);
  color: #fff;
}

/* Settings button (right side) */
.btn-settings {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-settings:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ── Buttons ── Langey: solid black pill (primary), outline pill (secondary/ghost) ── */
.btn-primary {

  padding: 10px 22px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  transition: all var(--transition);
  box-shadow: none;
}

.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  opacity: .95;
}

.btn-primary.btn-lg {
  padding: 13px 32px;
  font-size: 1rem;
}

.btn-primary.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-secondary {
  padding: 10px 22px;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1.5px solid var(--border2);
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--text);
}

.btn-ghost {
  padding: 10px 22px;
  border-radius: 999px;
  color: var(--text2);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border2);
  background: rgba(0, 0, 0, 0.04);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.10);
}

.btn-success {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
}

.btn-success:hover {
  opacity: .85;
}

.btn-danger {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
}

.btn-danger:hover {
  opacity: .85;
}

/* ── Cards ── Langey: pure white, soft shadow, rounded ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.start-here-card {
  animation: pulseGlow 2s infinite;
  border: 2px solid rgba(34, 197, 94, 0.5) !important;
  border-left: 6px solid #22c55e !important;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.15)) !important;
}

[data-theme="dark"] .card {
  background: var(--bg2);
}

.card-glass {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

[data-theme="dark"] .card-glass {
  background: var(--bg2);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-free {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-premium {
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-level {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ── Progress Bar ── */
.progress-bar-wrap {
  background: var(--bg3);
  border-radius: 100px;
  overflow: hidden;
  height: 8px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-fill.success {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.progress-bar-fill.warning {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

/* ── Inputs ── */
.input-field {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition);
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.inp.quiz-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-alpha);
}

/* Progress Tracking Styles */
.progress-bar-container {
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s ease-out;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.status-locked {
  background: var(--bg3);
  color: var(--text3);
}

.status-available {
  background: var(--accent-alpha);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.status-in-progress {
  background: var(--gold-alpha);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.status-completed {
  background: var(--success)22;
  color: var(--success);
  border: 1px solid var(--success);
}

.input-field::placeholder {
  color: var(--text3);
}

/* ── Layout ── */
#app {
  min-height: 100vh;
  padding-top: var(--nav-h);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section {
  margin-bottom: 56px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.85rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-muted {
  color: var(--text2);
}

.font-bold {
  font-weight: 700;
}

/* ── Section Headers ── */
.section-header {
  margin-bottom: 28px;
}

.section-header h2 {
  margin-bottom: 6px;
}

.section-tag {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(167, 139, 250, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  z-index: 999;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: var(--success);
  color: var(--success);
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

/* ── XP Popup ── */
.xp-popup {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 200;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  animation: xpFloat 1.8s ease forwards;
  pointer-events: none;
}

@keyframes xpFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }

  20% {
    opacity: 1;
    transform: translateY(-10px) scale(1.1);
  }

  80% {
    opacity: 1;
    transform: translateY(-40px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-60px) scale(0.9);
  }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow), var(--shadow-glow);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-card h2 {
  margin-bottom: 12px;
}

.modal-card p {
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Mobile Nav ── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: -280px;
  bottom: 0;
  width: 280px;
  z-index: 201;
  background: var(--bg2);
  border-right: 1px solid var(--border2);
  padding: 80px 20px 24px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-drawer.open {
  left: 0;
}

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.4rem;
  color: var(--text2);
  padding: 8px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text2);
  transition: all var(--transition);
}

.mobile-nav-link:hover {
  background: var(--surface);
  color: var(--text);
}

/* ── LANDING PAGE ── Langey minimal style ── */
.landing-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-h) 24px 80px;
  background: var(--bg);
}

/* no bg blob or particles - clean like langey */
.hero-bg,
.hero-particles,
.particle {
  display: none;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.hero-mark {
  font-size: 4rem;
  margin-bottom: 28px;
  display: block;
  line-height: 1;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}

/* Remove gradient text - plain black like langey */
.gradient-text {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: none;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text3);
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Langey-style CTA: soft warm fill, pill shaped */
#hero-start-btn {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border2);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
}

#hero-start-btn:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.hero-sub {
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 56px;
}

.hero-eyebrow {
  display: none;
}

/* removed in new minimal design */

/* Stats row */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg2);
}

.hero-stat-item {
  flex: 1;
  padding: 18px 12px;
  border-right: 1px solid var(--border);
  min-width: 80px;
}

.hero-stat-item:last-child {
  border-right: none;
}

.hero-stat-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}



.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent2);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 2px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.feature-card p {
  font-size: 0.88rem;
}

/* Levels preview */
.levels-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.level-pill {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: 100px;
  border: 2px solid;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all var(--transition);
  cursor: pointer;
}

.level-pill:hover {
  transform: scale(1.05);
}

/* ── DASHBOARD ── */
.dashboard-header {
  margin-bottom: 36px;
}

.level-badge-big {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 12px;
  padding: 8px 18px;
  margin-bottom: 12px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
}

.stat-lbl {
  font-size: 0.78rem;
  color: var(--text3);
  margin-top: 2px;
}

/* CEFR Roadmap */
.roadmap {
  position: relative;
}

.roadmap-track {
  display: flex;
  gap: 0;
  align-items: center;
  overflow-x: auto;
  padding: 20px 0 30px;
}

.roadmap-node {
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.roadmap-connector {
  flex-shrink: 0;
  height: 3px;
  width: 60px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: -30px;
}

.roadmap-connector.done {
  background: linear-gradient(90deg, var(--success), var(--success));
  opacity: 0.6;
}

.node-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  position: relative;
  border: 3px solid;
  transition: all 0.3s ease;
  background: var(--bg2);
}

.node-circle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.node-label {
  margin-top: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  font-family: var(--font-display);
}

.node-sublabel {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 2px;
  text-align: center;
  max-width: 90px;
}

.node-lock {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 1px solid var(--border2);
}

.node-done-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: white;
}

/* Quick launch cards */
.quick-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
  cursor: pointer;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(108, 99, 255, 0.1), 0 4px 6px -2px rgba(108, 99, 255, 0.05);
  border-color: var(--border2);
  cursor: pointer;
}

.quick-card-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.quick-card h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.quick-card p {
  font-size: 0.78rem;
  color: var(--text3);
}

/* ── LESSON VIEW ── */
.lesson-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 24px;
}

.lesson-breadcrumb span:last-child {
  color: var(--text2);
}

.lesson-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.lesson-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.lesson-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.lesson-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.lesson-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.lesson-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.lesson-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text3);
}

.lesson-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.lesson-card.completed::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
  font-weight: 700;
}

/* Lesson Detail */
.lesson-detail {
  max-width: 860px;
  margin: 0 auto;
}

.lesson-header-card {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.lesson-theory-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.lesson-theory-card h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--accent2);
}

.lesson-theory-card p {
  font-size: 0.9rem;
  line-height: 1.8;
  white-space: pre-line;
}

/* Vocab Table */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
}

.vocab-table th,
.vocab-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.vocab-table th {
  color: var(--text3);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.vocab-table tr:hover td {
  background: var(--surface);
}

.vocab-german {
  font-weight: 700;
  color: var(--accent2);
}

.audio-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.audio-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

/* Grammar Table */
.grammar-card {
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.grammar-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.grammar-table th,
.grammar-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(108, 99, 255, 0.15);
  font-size: 0.875rem;
}

.grammar-table th {
  color: var(--accent2);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
}

.grammar-person {
  color: var(--text3);
}

.grammar-form {
  font-weight: 700;
  color: var(--accent2);
}

/* Examples */
.example-card {
  background: var(--bg3);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 10px;
  border-left: 3px solid var(--accent);
}

.example-de {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.example-en {
  font-size: 0.85rem;
  color: var(--text3);
}

/* ── FLASHCARDS ── */
.flashcard-scene {
  perspective: 1200px;
  width: 100%;
  max-width: 480px;
  height: 280px;
  margin: 0 auto 28px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard-inner.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  border: 1px solid var(--border);
}

.flashcard-front {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
}

.flashcard-back {
  transform: rotateY(180deg);
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.15);
}

.fc-hint {
  font-size: 0.72rem;
  color: var(--text3);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fc-german {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.fc-category {
  font-size: 0.72rem;
  background: var(--surface2);
  border-radius: 6px;
  padding: 3px 10px;
  color: var(--text3);
}

.fc-english {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 10px;
}

.fc-example {
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.6;
}

/* SRS buttons */
.srs-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.srs-btn {
  flex: 1;
  max-width: 120px;
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  border: 2px solid;
  transition: all var(--transition);
  cursor: pointer;
}

.srs-again {
  background: var(--surface);
  border-color: var(--danger);
  color: var(--danger);
}

.srs-again:hover {
  background: var(--danger);
  color: #fff;
  transform: translateY(-2px);
}

.srs-hard {
  background: var(--surface);
  border-color: var(--warning);
  color: var(--warning);
}

.srs-hard:hover {
  background: var(--warning);
  color: #fff;
  transform: translateY(-2px);
}

.srs-easy {
  background: var(--surface);
  border-color: var(--success);
  color: var(--success);
}

.srs-easy:hover {
  background: var(--success);
  color: #fff;
  transform: translateY(-2px);
}

/* Deck stats */
.deck-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.deck-stat-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ── EXAM ── */
.exam-progress-bar {
  margin-bottom: 32px;
}

.exam-q-num {
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 8px;
}

.exam-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--warning);
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 24px;
}

.question-type-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent2);
  background: rgba(108, 99, 255, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 16px;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mcq-option {
  padding: 14px 20px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.mcq-option:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.mcq-option.selected {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.15);
}

.mcq-option.correct {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.mcq-option.wrong {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Score result */
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 6px solid var(--accent);
  background: radial-gradient(circle, rgba(108, 99, 255, 0.15), transparent);
}

.score-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent2);
  line-height: 1;
}

.score-pct {
  font-size: 0.9rem;
  color: var(--text3);
}

.score-grade {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

/* Semantic feedback */
.semantic-feedback {
  padding: 14px 18px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.semantic-feedback.perfect {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.semantic-feedback.good {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.semantic-feedback.acceptable {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--accent2);
}

.semantic-feedback.wrong {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

/* ── SPEAKING ── */
.speaking-target {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  margin-bottom: 32px;
}

.speaking-target .target-de {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.speaking-target .target-en {
  font-size: 0.95rem;
  color: var(--text3);
}

.mic-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  box-shadow: 0 0 30px rgba(108, 99, 255, 0.5);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.mic-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 50px rgba(108, 99, 255, 0.7);
}

.mic-btn.active {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  animation: micPulse 1.2s ease-in-out infinite;
}

@keyframes micPulse {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
  }

  50% {
    box-shadow: 0 0 55px rgba(239, 68, 68, 0.8);
  }
}

.transcript-box {
  min-height: 80px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 20px;
}

.transcript-interim {
  color: var(--text3);
  font-style: italic;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  margin: 0 auto 20px;
  width: 200px;
}

.wave-bar {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  animation: waveBounce ease-in-out infinite;
}

@keyframes waveBounce {

  0%,
  100% {
    height: 6px;
  }

  50% {
    height: 32px;
  }
}

/* ── PRICING ── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  transition: all var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.pricing-card.popular {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(34, 211, 238, 0.05));
  border-color: rgba(108, 99, 255, 0.5);
  box-shadow: var(--shadow-glow);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.pricing-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 8px;
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--text);
}

.pricing-price sup {
  font-size: 1.2rem;
  vertical-align: super;
  color: var(--text2);
}

.pricing-price .period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text3);
}

.pricing-desc {
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text2);
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
}

.pricing-features li.locked::before {
  content: '✕';
  color: var(--text3);
}

.pricing-features li.locked {
  color: var(--text3);
}

/* ── PREMIUM UI EXTRAS ── */
/* Progress Ring (Conic Gradient) */
.progress-ring-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.progress-ring {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* use custom property inline: --progress: 45%; */
  background: conic-gradient(var(--accent) var(--progress, 0%), var(--bg3) 0deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: --progress 0.5s ease;
}

.progress-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  background: var(--bg);
  border-radius: 50%;
}

.progress-ring-val {
  position: relative;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  z-index: 1;
}

/* Messaging Chat Bubbles */
.chat-msg {
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 1.05rem;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 2px;
}

.chat-msg.hero {
  align-self: flex-start;
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Visual Tooltip (Image Cards) */
.visual-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

.visual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.visual-card-text {
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  z-index: 2;
  font-weight: 700;
  font-size: 1.2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.visual-tooltip {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.visual-card:hover .visual-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Journey Node Glow */
.journey-node.active-glow {
  box-shadow: 0 0 20px var(--accent-alpha);
  border-color: var(--accent) !important;
  transform: scale(1.02);
}

/* ── Animations ── */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.slide-up {
  animation: slideUp 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger>* {
  opacity: 0;
  animation: slideUp 0.4s ease forwards;
}

.stagger>*:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger>*:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger>*:nth-child(3) {
  animation-delay: 0.15s;
}

.stagger>*:nth-child(4) {
  animation-delay: 0.2s;
}

.stagger>*:nth-child(5) {
  animation-delay: 0.25s;
}

.stagger>*:nth-child(6) {
  animation-delay: 0.3s;
}

/* ── Responsive ── */
@media (max-width: 900px) {

  .grid-3,
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-4,
  .stat-cards,
  .quick-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 640px) {

  .nav-links,
  .nav-xp,
  .nav-streak,
  .nav-credits,
  .nav-hamburger,
  .nav-actions {
    display: none !important;
  }

  .global-nav {
    justify-content: center;
    padding-top: env(safe-area-inset-top);
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text3);
    flex: 1;
    transition: all 0.2s;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item.active {
    color: var(--accent);
  }

  .bottom-nav-item.active .bn-icon {
    transform: scale(1.15) translateY(-2px);
  }

  .bn-icon {
    font-size: 1.4rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .bn-label {
    font-size: 0.65rem;
    font-weight: 700;
  }

  body {
    padding-bottom: 75px;
  }

  .grid-2,
  .grid-3,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .stat-cards,
  .quick-cards {
    grid-template-columns: 1fr 1fr;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .flashcard-scene {
    height: 240px;
  }

  .roadmap-track {
    flex-wrap: wrap;
    justify-content: center;
  }

  .roadmap-connector {
    display: none;
  }
}

/* ── Unit Context Badge (Focused Practice Mode) ─────────────────── */
.unit-context-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: var(--accent, #6366f1);
  padding: 0.4rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.unit-clear-btn {
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  border-radius: 2rem;
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.unit-clear-btn:hover {
  opacity: 1;
}

/* =========================================================================
   ALPHABET VIEW
   ========================================================================= */
.abc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.abc-tile {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.abc-tile:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.abc-letter {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.abc-phonetic {
  font-size: 0.85rem;
  color: var(--text3);
  font-weight: 500;
}

.abc-modal-content {
  text-align: center;
  padding: 2.5rem 2rem;
  max-width: 400px;
}

.abc-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.abc-modal-header h2 {
  font-size: 4rem;
  font-weight: 900;
  margin: 0;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.abc-modal-phonetic {
  font-size: 1.25rem;
  color: var(--text3);
  font-weight: 600;
  margin-bottom: 2rem;
}

.abc-hint-box {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--secondary);
  padding: 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text2);
  margin-bottom: 1.5rem;
}

.abc-example-box {
  background: var(--surface2);
  border-radius: 1rem;
  padding: 1.5rem;
}

.abc-example-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.abc-example-word {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.abc-example-en {
  font-size: 1.1rem;
  color: var(--text3);
}

.btn-icon-small {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.btn-icon-small:hover {
  background: var(--surface);
  transform: scale(1.1);
}