/* ==========================================================================
   LINGOPULSE — Vibrant Neuro-Arcade English Mastery Stylesheet
   ========================================================================== */

:root {
  --bg: #080c1a;
  --bg-elev: rgba(16, 23, 46, 0.74);
  --bg-card: rgba(19, 27, 54, 0.84);
  --bg-card-hover: rgba(26, 37, 72, 0.94);
  --border: rgba(148, 179, 255, 0.16);
  --border-bright: rgba(0, 229, 255, 0.45);

  --text: #f1f5ff;
  --text-dim: #9fb0d8;
  --text-muted: #7082ad;

  --cyan: #00e5ff;
  --mint: #10f5a0;
  --amber: #ffb703;
  --coral: #ff5e7e;
  --violet: #a855f7;
  --blue: #4f8cff;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 46px rgba(2, 6, 23, 0.55);
  --font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================= Ambient Background Orbs & HyperFlow Aura ================= */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.28;
  animation: orbFloat 18s ease-in-out infinite alternate;
}
.orb-1 { width: 460px; height: 460px; background: #00e5ff; top: -140px; left: -90px; }
.orb-2 { width: 520px; height: 520px; background: #9d4edd; bottom: -180px; right: -100px; animation-delay: -6s; }
.orb-3 { width: 340px; height: 340px; background: #ff5e7e; top: 45%; left: 48%; opacity: 0.14; animation-delay: -11s; }

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.12); }
}

body.hyperflow-active::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  box-shadow: inset 0 0 65px rgba(255, 183, 3, 0.34), inset 0 0 28px rgba(0, 229, 255, 0.35);
  animation: feverPulse 1.2s ease-in-out infinite alternate;
}
@keyframes feverPulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

body.zen-mode .nav-rail { display: none; }
body.zen-mode .bg-orbs { opacity: 0.35; }
body.zen-mode .app-viewport { padding: 24px 36px; }

.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

/* ================= App Shell & Top HUD ================= */
.app-shell {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.top-hud {
  height: 66px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  background: rgba(9, 14, 30, 0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: linear-gradient(135deg, #00e5ff, #9d4edd);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.42);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-name span { color: var(--cyan); }
.brand-sub { font-size: 10.5px; color: var(--text-dim); font-weight: 600; letter-spacing: 0.08em; }

.hud-center-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hud-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 13px;
}
.hud-xp-track {
  width: 82px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.hud-xp-track > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.streak-pill strong { color: var(--amber); }

.focus-dock {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dock-btn, .dock-select {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.dock-btn:hover, .dock-select:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
}
.dock-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(16, 245, 160, 0.2));
  border-color: var(--mint);
  color: var(--mint);
  box-shadow: 0 0 14px rgba(16, 245, 160, 0.25);
}
.dock-btn.icon-only { width: 36px; padding: 0; display: grid; place-items: center; }
.dock-select { padding: 0 24px 0 11px; }
.dock-select option { background: #10172e; color: #f1f5ff; }

/* Bilingual VI / EN Switcher Pill */
.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  gap: 2px;
}
.lang-opt {
  height: 100%;
  padding: 0 9px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.lang-opt:hover { color: #fff; }
.lang-opt.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.28), rgba(16, 245, 160, 0.24));
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

/* ================= Body Split: Nav Rail + Viewport ================= */
.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.nav-rail {
  width: 216px;
  flex-shrink: 0;
  padding: 16px 12px;
  background: rgba(9, 14, 30, 0.65);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.nav-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 10px 10px 4px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(168, 85, 247, 0.16));
  border-color: rgba(0, 229, 255, 0.42);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.12);
}
.nav-item.highlight {
  color: #ffd166;
}
.nav-item.highlight.active {
  background: linear-gradient(135deg, rgba(255, 94, 126, 0.24), rgba(255, 183, 3, 0.2));
  border-color: rgba(255, 183, 3, 0.55);
}
.nav-ic { font-size: 16px; width: 22px; text-align: center; }
.nav-badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  background: var(--coral);
  color: #fff;
}
.nav-footer-tip {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.5;
}
.nav-footer-tip code {
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 10.5px;
}

.app-viewport {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 22px 26px 40px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 179, 255, 0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 229, 255, 0.4); }

/* ================= Reusable Surfaces, Buttons, Pills ================= */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 10px; }

.btn-primary {
  background: linear-gradient(135deg, #00d2ff, #3a7bd5 55%, #9d4edd);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 229, 255, 0.35);
}
.btn-glow { box-shadow: 0 6px 24px rgba(0, 229, 255, 0.32); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-amber {
  background: linear-gradient(135deg, #ff9f1c, #ffb703);
  color: #0b0f1f;
}
.btn-amber:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(255, 183, 3, 0.35); }

.btn-mint {
  background: linear-gradient(135deg, #06d6a0, #10f5a0);
  color: #06181a;
}
.btn-coral {
  background: linear-gradient(135deg, #ff477e, #ff5e7e);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 7px 13px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.btn-ghost:hover { color: #fff; border-color: var(--cyan); background: rgba(0, 229, 255, 0.08); }
.btn-ghost.danger-txt:hover { border-color: var(--coral); color: var(--coral); }

.btn-icon-pill {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid rgba(255, 183, 3, 0.4);
  background: rgba(255, 183, 3, 0.12);
  color: #ffd166;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}
.btn-icon-pill:hover { background: rgba(255, 183, 3, 0.22); transform: translateY(-1px); }

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.tag-pill.cyan { background: rgba(0, 229, 255, 0.14); color: var(--cyan); border: 1px solid rgba(0, 229, 255, 0.35); }
.tag-pill.mint { background: rgba(16, 245, 160, 0.14); color: var(--mint); border: 1px solid rgba(16, 245, 160, 0.35); }
.tag-pill.amber { background: rgba(255, 183, 3, 0.14); color: var(--amber); border: 1px solid rgba(255, 183, 3, 0.35); }
.tag-pill.coral { background: rgba(255, 94, 126, 0.16); color: #ff85a1; border: 1px solid rgba(255, 94, 126, 0.4); }
.tag-pill.violet { background: rgba(168, 85, 247, 0.16); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.4); }
.tag-pill.blue { background: rgba(79, 140, 255, 0.16); color: #93c5fd; border: 1px solid rgba(79, 140, 255, 0.4); }

.tiny-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}
.tiny-tag.mint { background: rgba(16, 245, 160, 0.15); color: var(--mint); }
.tiny-tag.cyan { background: rgba(0, 229, 255, 0.15); color: var(--cyan); }
.tiny-tag.coral { background: rgba(255, 94, 126, 0.15); color: #ff85a1; }

.tiny-muted { font-size: 12.5px; color: var(--text-dim); }
.grad-text { background: linear-gradient(90deg, var(--cyan), var(--mint), var(--amber)); -webkit-background-clip: text; color: transparent; }
.cyan-hl { color: var(--cyan); }
.mint-hl { color: var(--mint); }
.amber-hl { color: var(--amber); }
.coral-hl { color: var(--coral); }
.hidden { display: none !important; }

/* ================= Dashboard Layout ================= */
.dashboard-wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-card {
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(18, 28, 60, 0.92), rgba(29, 20, 62, 0.85));
  border-color: rgba(0, 229, 255, 0.25);
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  color: var(--cyan);
  margin-bottom: 10px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  animation: pulseGlow 1.6s infinite;
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}
.hero-title {
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 10px;
}
.hero-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.exam-pill-card {
  padding: 14px 16px;
  border-radius: 15px;
  background: rgba(8, 13, 30, 0.62);
  border: 1px solid var(--border);
}
.exam-pill-label { font-size: 11.5px; color: var(--text-dim); font-weight: 600; }
.exam-pill-val { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.2; margin: 2px 0; }
.exam-pill-val small { font-size: 14px; opacity: 0.7; }
.exam-pill-val.cyan { color: var(--cyan); }
.exam-pill-val.mint { color: var(--mint); }
.exam-pill-val.amber { color: var(--amber); }
.exam-pill-val.coral { color: #ff85a1; }
.exam-pill-sub { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }

/* Filter Bar */
.filter-bar {
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.filter-group { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.filter-label { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-btn {
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}
.pill-btn:hover { border-color: var(--cyan); color: #fff; }
.pill-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(16, 245, 160, 0.2));
  border-color: var(--cyan);
  color: #fff;
}
.pill-btn.track.active {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.28), rgba(255, 94, 126, 0.22));
  border-color: var(--amber);
  color: #ffe8a3;
}

/* Arenas Grid */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.section-head h2 { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.section-hint { font-size: 12.5px; color: var(--amber); font-weight: 600; }

.arena-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.arena-card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.arena-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent, var(--cyan));
}
.arena-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent, var(--cyan));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}
.accent-cyan { --accent: var(--cyan); }
.accent-violet { --accent: var(--violet); }
.accent-amber { --accent: var(--amber); }
.accent-coral { --accent: var(--coral); }
.accent-mint { --accent: var(--mint); }
.accent-blue { --accent: var(--blue); }

.arena-top { display: flex; justify-content: space-between; align-items: center; }
.arena-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 21px;
  background: rgba(255, 255, 255, 0.07);
}
.arena-badge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.07); color: var(--text-dim);
}
.arena-card h3 { font-family: var(--font-display); font-size: 17.5px; font-weight: 800; }
.arena-card p { font-size: 13px; color: var(--text-dim); flex: 1; }
.arena-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.skill-bar-mini { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.skill-bar-mini i { display: block; height: 100%; border-radius: 99px; background: var(--accent, var(--cyan)); }
.arena-cta { font-size: 12.5px; font-weight: 800; color: var(--accent, var(--cyan)); }

/* Bottom Analytics Row */
.analytics-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 16px;
}
.radar-card, .quest-card { padding: 20px 22px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title-row h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 800; }
.radar-svg { width: 100%; max-width: 300px; display: block; margin: 0 auto; }

.quest-progress-bar {
  height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.09); overflow: hidden; margin-bottom: 14px;
}
.quest-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--amber), var(--mint)); border-radius: 99px; transition: width 0.5s ease;
}
.quest-list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.quest-list li {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-dim);
  padding: 8px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.04);
}
.quest-list li.done { color: var(--mint); background: rgba(16, 245, 160, 0.08); }
.q-check { font-weight: 900; width: 18px; text-align: center; }

.science-tip-box {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(0, 229, 255, 0.08); border: 1px solid rgba(0, 229, 255, 0.25);
  font-size: 12.5px; color: #cdefff;
}

/* ================= Arena Stage Shared Styles ================= */
.arena-stage {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.arena-stage.wide { max-width: 1180px; }

.stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.stage-progress-wrap { flex: 1; min-width: 180px; }
.stage-step-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin-bottom: 5px; }
.stage-progress-bar-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-dim); }
.stage-progress {
  height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden;
}
.stage-progress > div {
  height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--mint)); transition: width 0.35s ease;
}

.seg-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  gap: 4px;
}
.seg-tab {
  padding: 7px 14px; border-radius: 9px; border: none; background: transparent; color: var(--text-dim);
  font-family: var(--font-body); font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.16s ease;
}
.seg-tab.active { background: linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(168, 85, 247, 0.24)); color: #fff; }

.combo-pill {
  padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 800;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border); color: var(--cyan);
}
.combo-pill.hot { background: rgba(255, 183, 3, 0.18); border-color: var(--amber); color: var(--amber); }
.combo-pill.fever {
  background: linear-gradient(135deg, #ff5e7e, #ffb703); color: #090d1c; border-color: #fff;
  box-shadow: 0 0 22px rgba(255, 183, 3, 0.55);
  animation: pulseGlow 0.9s infinite;
}

.game-card { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; }
.card-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.question-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}
.question-sub { font-size: 14px; color: var(--text-dim); margin-top: -8px; }
.cloze-blank {
  display: inline-block; padding: 0 10px; margin: 0 3px; border-bottom: 2.5px solid var(--cyan);
  color: var(--cyan); font-weight: 800;
}
.upgrade-pill {
  padding: 2px 9px; border-radius: 8px; background: rgba(255, 183, 3, 0.16); color: #ffd166; font-weight: 700;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.options-stack { display: flex; flex-direction: column; gap: 10px; }

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}
.option-card:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.opt-key {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.09); font-size: 12px; font-weight: 800; color: var(--text-dim);
}
.option-card.correct {
  background: rgba(16, 245, 160, 0.16) !important;
  border-color: var(--mint) !important;
  color: #dcfff0;
  box-shadow: 0 0 20px rgba(16, 245, 160, 0.22);
}
.option-card.correct .opt-key { background: var(--mint); color: #06181a; }
.option-card.wrong {
  background: rgba(255, 94, 126, 0.18) !important;
  border-color: var(--coral) !important;
  color: #ffd5df;
}
.option-card.eliminated { opacity: 0.22; text-decoration: line-through; pointer-events: none; }

/* Feedback Panel */
.feedback-panel {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeSlideUp 0.22s ease;
}
.feedback-panel.ok { background: rgba(16, 245, 160, 0.09); border-color: rgba(16, 245, 160, 0.38); }
.feedback-panel.err { background: rgba(255, 94, 126, 0.09); border-color: rgba(255, 94, 126, 0.38); }
.fb-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.fb-word-pill {
  padding: 4px 12px; border-radius: 99px; background: rgba(0, 0, 0, 0.3); font-size: 13px; color: var(--cyan);
}
.fb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; font-size: 13.5px; color: var(--text-dim); }
.fb-k { color: var(--text); font-weight: 700; }
.mini-chip {
  display: inline-block; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700;
  background: rgba(0, 229, 255, 0.14); color: var(--cyan); margin: 2px 3px 2px 0;
}
.formula-pill {
  padding: 4px 11px; border-radius: 8px; background: rgba(168, 85, 247, 0.2); color: #e9d5ff; font-size: 12.5px; font-weight: 700;
}
.fb-sentence { font-size: 14.5px; color: #e2f5ff; }
.fb-fix { font-size: 14px; }
.fb-rule { font-size: 13.5px; color: var(--text-dim); }
.fb-actions { display: flex; justify-content: flex-end; padding-top: 4px; }

/* ================= Flashcards (3D Flip) ================= */
.flashcard-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.fc-counter { font-size: 13px; color: var(--text-dim); }
.flip-card {
  width: 100%; max-width: 640px; min-height: 360px; perspective: 1200px; cursor: pointer; position: relative;
}
.flip-face {
  position: absolute; inset: 0; padding: 28px; backface-visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
.flip-front { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.flip-back { transform: rotateY(180deg); justify-content: center; gap: 10px; }
.flip-card.flipped .flip-front { transform: rotateY(180deg); }
.flip-card.flipped .flip-back { transform: rotateY(360deg); }

.fc-emoji { font-size: 52px; }
.fc-word { font-family: var(--font-display); font-size: 36px; font-weight: 900; color: var(--cyan); }
.fc-ipa { font-size: 15px; color: var(--text-dim); }
.stress-pill { padding: 2px 9px; border-radius: 8px; background: rgba(255, 183, 3, 0.18); color: var(--amber); font-weight: 800; }
.fc-pos { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.fc-tap-hint { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.fc-back-head { display: flex; justify-content: space-between; align-items: center; }
.fc-back-head h3 { font-family: var(--font-display); font-size: 22px; }
.fc-back-head small { font-weight: 500; color: var(--text-dim); font-size: 14px; }
.fc-meaning-vi { font-size: 17px; font-weight: 700; color: var(--mint); }
.fc-meaning-en { font-size: 13.5px; color: var(--text-dim); font-style: italic; }
.fc-box { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 13px; }
.fc-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ================= Grammar Forge & Error Sniper ================= */
.forge-dropzone {
  min-height: 76px;
  padding: 14px;
  border-radius: 14px;
  border: 2px dashed rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.forge-dropzone.correct { border-color: var(--mint); background: rgba(16, 245, 160, 0.12); border-style: solid; }
.forge-dropzone.wrong { border-color: var(--coral); background: rgba(255, 94, 126, 0.12); border-style: solid; }
.dropzone-placeholder { color: var(--text-muted); font-size: 13.5px; }

.forge-bank { display: flex; flex-wrap: wrap; gap: 9px; padding: 8px 0; }
.forge-tile {
  padding: 10px 15px; border-radius: 11px; border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.08); color: #fff; font-family: var(--font-body); font-size: 14.5px; font-weight: 700;
  cursor: pointer; transition: all 0.15s ease;
}
.forge-tile:hover { border-color: var(--cyan); background: rgba(0, 229, 255, 0.16); transform: translateY(-2px); }
.forge-tile.placed { background: linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(168, 85, 247, 0.24)); border-color: var(--cyan); }
.forge-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.sniper-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sniper-seg {
  flex: 1 1 45%;
  display: flex; align-items: center; gap: 10px;
  padding: 16px; border-radius: 14px; border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.05); color: #fff;
  font-family: var(--font-body); font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.16s ease;
}
.sniper-seg:hover { border-color: var(--amber); background: rgba(255, 183, 3, 0.12); transform: translateY(-2px); }
.seg-num {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1); font-size: 11.5px; color: var(--amber);
}
.sniper-seg.target-hit { border-color: var(--mint); background: rgba(16, 245, 160, 0.16); box-shadow: 0 0 18px rgba(16, 245, 160, 0.25); }
.sniper-seg.wrong { border-color: var(--coral); background: rgba(255, 94, 126, 0.18); }

/* ================= Listening Studio (EchoWave) ================= */
.audio-inline-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.audio-deck {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 16px;
  background: rgba(8, 12, 28, 0.72); border: 1px solid rgba(255, 183, 3, 0.3);
}
.play-orb {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #ffb703, #ff5e7e); color: #090d1c; font-size: 20px; font-weight: 900;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 24px rgba(255, 183, 3, 0.45); transition: transform 0.15s ease;
}
.play-orb:hover { transform: scale(1.07); }

.wave-stage {
  flex: 1; min-width: 160px; height: 48px; display: flex; align-items: center; gap: 4px; justify-content: center;
}
.wave-bar {
  width: 4px; height: 10px; border-radius: 99px;
  background: linear-gradient(180deg, var(--cyan), var(--amber));
  opacity: 0.45; transition: height 0.2s ease;
}
.wave-stage.playing .wave-bar {
  opacity: 1;
  animation: waveDance 0.75s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 0.045s);
}
@keyframes waveDance {
  0% { height: 8px; }
  100% { height: 42px; }
}

.deck-controls { display: flex; flex-direction: column; gap: 6px; }
.deck-pills { display: flex; gap: 5px; }
.mini-pill {
  padding: 4px 9px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05); color: var(--text-dim); font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.mini-pill.active { background: rgba(0, 229, 255, 0.2); border-color: var(--cyan); color: #fff; }

.dictation-box { display: flex; flex-direction: column; gap: 14px; }
.dictation-sentence { font-size: 18px; line-height: 2.1; font-weight: 600; }
.dictation-input {
  width: 136px; padding: 4px 10px; margin: 0 4px; border-radius: 9px;
  border: 1.5px solid var(--cyan); background: rgba(0, 229, 255, 0.08);
  color: #fff; font-family: var(--font-body); font-size: 15px; font-weight: 700; text-align: center; outline: none;
}
.dictation-input.correct { border-color: var(--mint); background: rgba(16, 245, 160, 0.16); color: var(--mint); }
.dictation-input.wrong { border-color: var(--coral); background: rgba(255, 94, 126, 0.16); color: #ff9bb0; width: 175px; }
.chip-helper-label { font-size: 12.5px; color: var(--text-dim); }
.chip-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.word-chip {
  padding: 7px 13px; border-radius: 99px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
}
.word-chip:hover { border-color: var(--amber); background: rgba(255, 183, 3, 0.18); }
.comp-question { font-size: 17px; font-weight: 700; }
.transcript-box {
  padding: 12px 14px; border-radius: 11px; background: rgba(0, 0, 0, 0.28); font-size: 13.5px; color: #dbeafe;
}
.transcript-label { font-size: 11.5px; font-weight: 800; color: var(--amber); margin-bottom: 4px; }

/* ================= Speaking Studio (VoxStage) ================= */
.shadow-card, .cue-card {
  padding: 18px 20px; border-radius: 15px; background: rgba(8, 13, 30, 0.65); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.shadow-target { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.5; }
.shadow-stress { font-size: 13.5px; color: var(--amber); }
.shadow-ipa { font-size: 13px; color: var(--cyan); }
.shadow-tip { font-size: 13px; color: var(--text-dim); }
.shadow-btns { display: flex; gap: 8px; margin-top: 4px; }

.sp-word { display: inline-block; padding: 1px 5px; border-radius: 6px; margin: 1px; }
.sp-word.hit { background: rgba(16, 245, 160, 0.2); color: var(--mint); }
.sp-word.close { background: rgba(255, 183, 3, 0.22); color: var(--amber); }
.sp-word.miss { background: rgba(255, 94, 126, 0.22); color: #ff85a1; text-decoration: underline wavy var(--coral); }

.cue-prompt { font-size: 15.5px; font-weight: 600; }
.cue-bullets { list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--text-dim); }
.bingo-section { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.bingo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; margin-bottom: 8px; flex-wrap: wrap; }
.bingo-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.bingo-pill {
  padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); color: var(--text-dim); transition: all 0.2s ease;
}
.bingo-pill.hit {
  background: linear-gradient(135deg, rgba(16, 245, 160, 0.28), rgba(0, 229, 255, 0.25));
  border-color: var(--mint); color: #fff; transform: scale(1.06); box-shadow: 0 0 14px rgba(16, 245, 160, 0.35);
}

.mic-studio {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 18px; border-radius: 16px; background: rgba(255, 94, 126, 0.07); border: 1px solid rgba(255, 94, 126, 0.28);
}
.mic-orb {
  min-width: 160px; padding: 14px 18px; border-radius: 16px; border: none;
  background: linear-gradient(135deg, #ff5e7e, #9d4edd); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; box-shadow: 0 8px 26px rgba(255, 94, 126, 0.35);
  transition: transform 0.16s ease;
}
.mic-orb:hover { transform: scale(1.03); }
.mic-orb.recording {
  background: linear-gradient(135deg, #ef4444, #ff9f1c);
  animation: pulseGlow 1s infinite;
}
.mic-icon { font-size: 26px; }
.mic-label { font-size: 12.5px; }

.mic-meter-wrap { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.mic-meter-bars { height: 34px; display: flex; align-items: flex-end; gap: 4px; }
.mic-meter-bars i {
  flex: 1; border-radius: 4px; background: linear-gradient(180deg, var(--coral), var(--amber)); transition: height 0.08s ease;
}
.live-transcript-box {
  min-height: 46px; padding: 10px 13px; border-radius: 10px; background: rgba(0, 0, 0, 0.34); font-size: 14px;
}
.mic-error { font-size: 12.5px; color: #ff9bb0; }

.fallback-practice { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.fallback-row { display: flex; gap: 8px; }
.text-input {
  flex: 1; padding: 10px 14px; border-radius: 11px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06); color: #fff; font-family: var(--font-body); font-size: 13.5px; outline: none;
}
.text-input:focus { border-color: var(--cyan); }

.model-toggle-wrap { display: flex; flex-direction: column; gap: 10px; }
.model-box {
  padding: 15px 17px; border-radius: 13px; background: rgba(16, 245, 160, 0.08); border: 1px solid rgba(16, 245, 160, 0.28);
  font-size: 14px; line-height: 1.65;
}
.model-box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.model-pre { white-space: pre-wrap; font-family: var(--font-body); font-size: 13.5px; color: #e2fff3; }

/* ================= Reading Arena (ScanQuest) ================= */
.reading-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.passage-pane, .question-pane { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.passage-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.evidence-banner {
  padding: 10px 13px; border-radius: 11px; background: rgba(255, 183, 3, 0.1); border: 1px solid rgba(255, 183, 3, 0.3);
  font-size: 12.5px; color: #ffe4a3;
}
.gloss-popup {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 11px; background: rgba(0, 229, 255, 0.16); border: 1px solid var(--cyan); font-size: 13.5px;
}
.mini-close { background: none; border: none; color: #fff; cursor: pointer; font-weight: 800; }

.passage-body { display: flex; flex-direction: column; gap: 8px; }
.passage-sentence {
  display: flex; align-items: baseline; gap: 9px; padding: 9px 11px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; font-size: 14.5px; line-height: 1.65; transition: all 0.15s ease;
}
.passage-sentence:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.15); }
.passage-sentence.evidence-picked { background: rgba(0, 229, 255, 0.12); border-color: var(--cyan); }
.passage-sentence.evidence-true { background: rgba(16, 245, 160, 0.16) !important; border-color: var(--mint) !important; box-shadow: 0 0 18px rgba(16, 245, 160, 0.2); }
.s-badge {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.09); color: var(--text-dim);
}
.gloss-word {
  border-bottom: 1.5px dotted var(--mint); color: #a7ffdf; font-weight: 600; cursor: help;
}
.gloss-word:hover { background: rgba(16, 245, 160, 0.18); border-radius: 4px; }
.reading-q-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.45; }
.evidence-status { font-size: 12px; color: var(--text-muted); }

/* ================= Writing Studio (CraftLab) ================= */
.weak-sentence-box {
  padding: 15px 18px; border-radius: 13px; background: rgba(255, 94, 126, 0.09); border: 1px solid rgba(255, 94, 126, 0.35);
}
.weak-badge { font-size: 11.5px; font-weight: 800; color: #ff85a1; display: block; margin-bottom: 4px; }
.weak-sentence-box p { font-size: 16px; font-style: italic; color: #ffe4eb; }

.writing-split { display: grid; grid-template-columns: 0.95fr 1.25fr; gap: 16px; align-items: start; }
.writing-guide, .writing-editor-pane { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.writing-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.writing-prompt { font-size: 14px; color: #dbeafe; background: rgba(0, 0, 0, 0.26); padding: 12px 14px; border-radius: 12px; }
.guide-box h4 { font-size: 13px; font-weight: 800; color: var(--cyan); margin-bottom: 7px; }
.guide-box ul { list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-dim); }

.editor-hud { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.word-meter { flex: 1; min-width: 180px; font-size: 13px; }
.mini-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin-top: 5px; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--mint)); transition: width 0.25s ease; }
.editor-badges { display: flex; gap: 6px; }

.essay-textarea {
  width: 100%; min-height: 270px; padding: 16px; border-radius: 14px;
  border: 1.5px solid var(--border); background: rgba(7, 11, 24, 0.78); color: #f8fafc;
  font-family: var(--font-body); font-size: 14.5px; line-height: 1.7; resize: vertical; outline: none;
}
.essay-textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.14); }
.editor-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.grade-report {
  padding: 18px; border-radius: 14px; background: rgba(16, 245, 160, 0.08); border: 1px solid rgba(16, 245, 160, 0.35);
  display: flex; flex-direction: column; gap: 14px; animation: fadeSlideUp 0.25s ease;
}
.grade-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.grade-top h3 { font-family: var(--font-display); font-size: 22px; }
.rubric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rubric-item {
  padding: 10px; border-radius: 11px; background: rgba(0, 0, 0, 0.32); text-align: center;
}
.rubric-item span { display: block; font-size: 11px; color: var(--text-dim); }
.rubric-item strong { font-family: var(--font-display); font-size: 20px; color: var(--amber); }
.grade-tips ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; font-size: 13px; color: #dbeafe; }

/* ================= Boss Blitz ================= */
.boss-hud-center { flex: 1; min-width: 220px; }
.boss-name-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.boss-hp-bar { height: 11px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.boss-hp-bar > div {
  height: 100%; background: linear-gradient(90deg, #ff477e, #ff9f1c); border-radius: 99px; transition: width 0.35s ease;
}
.hearts-pill { font-size: 15px; letter-spacing: 2px; }
.timer-chip {
  padding: 5px 11px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 800; color: var(--cyan);
}
.timer-chip.danger { background: rgba(255, 94, 126, 0.25); color: #ff85a1; animation: pulseGlow 0.6s infinite; }
.timer-chip.frozen { background: rgba(0, 229, 255, 0.22); color: #a5f3fc; }

.powerup-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.powerup-btn {
  padding: 5px 11px; border-radius: 9px; border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.1); color: #e0f7ff; font-family: var(--font-body); font-size: 12px; font-weight: 700; cursor: pointer;
}
.powerup-btn:hover:not(:disabled) { background: rgba(0, 229, 255, 0.22); }
.powerup-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ================= NeuroVault ================= */
.vault-head-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.vault-grid-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.vault-grid-top > .glass-card, .vault-section { padding: 20px 22px; }
.curve-svg { width: 100%; display: block; margin: 4px 0 8px; }
.empty-box {
  padding: 20px; text-align: center; border-radius: 12px; background: rgba(255, 255, 255, 0.04); color: var(--text-dim); font-size: 13.5px;
}
.mistake-list { display: flex; flex-direction: column; gap: 9px; max-height: 220px; overflow-y: auto; }
.mistake-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 11px; background: rgba(255, 94, 126, 0.07); border: 1px solid rgba(255, 94, 126, 0.24);
}
.mistake-item p { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }

.srs-list { display: flex; flex-direction: column; gap: 9px; }
.srs-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 13px; border-radius: 11px; background: rgba(255, 255, 255, 0.04);
}
.srs-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.due-badge { padding: 2px 8px; border-radius: 99px; background: rgba(255, 183, 3, 0.2); color: var(--amber); font-size: 11px; font-weight: 800; }
.srs-bar-wrap { display: flex; align-items: center; gap: 9px; width: 170px; flex-shrink: 0; }
.srs-bar { flex: 1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.srs-bar i { display: block; height: 100%; border-radius: 99px; }
.srs-pct { font-size: 12px; font-weight: 800; width: 34px; text-align: right; }

.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trophy-card {
  padding: 16px 14px; border-radius: 14px; text-align: center;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04);
}
.trophy-card.unlocked {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(16, 245, 160, 0.1));
  border-color: rgba(16, 245, 160, 0.45);
}
.trophy-card.locked { opacity: 0.42; filter: grayscale(0.9); }
.trophy-icon { font-size: 30px; margin-bottom: 6px; }
.trophy-name { font-size: 13.5px; font-weight: 800; margin-bottom: 3px; }
.trophy-desc { font-size: 11.5px; color: var(--text-dim); }

/* ================= Result Screens ================= */
.result-card {
  padding: 34px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.result-trophy { font-size: 56px; animation: bounceIn 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
.result-title { font-family: var(--font-display); font-size: 28px; font-weight: 900; }
.result-sub { font-size: 15px; color: var(--cyan); font-weight: 700; }
.result-note { max-width: 600px; font-size: 14px; color: var(--text-dim); }
.result-stats-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 8px 0; }
.r-stat {
  min-width: 115px; padding: 12px 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--border);
}
.r-stat strong { display: block; font-family: var(--font-display); font-size: 24px; color: var(--mint); }
.r-stat span { font-size: 11.5px; color: var(--text-dim); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* ================= Floating FX, Toasts & Animations ================= */
.fx-float-badge {
  position: fixed; z-index: 120; pointer-events: none; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-size: 18px; font-weight: 900;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.7);
  animation: floatUpFade 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes floatUpFade {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.85); }
  25% { opacity: 1; transform: translate(-50%, -18px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -62px) scale(0.95); }
}

.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 130; display: flex; flex-direction: column; gap: 8px;
}
.toast-item {
  padding: 11px 16px; border-radius: 12px; background: rgba(13, 21, 44, 0.96);
  border: 1px solid var(--cyan); color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); animation: fadeSlideUp 0.25s ease;
}
.toast-item.out { opacity: 0; transform: translateY(10px); transition: all 0.35s ease; }

.fade-in { animation: fadeSlideUp 0.28s ease; }
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
.shake-anim { animation: shakeX 0.35s ease; }
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

/* ================= Responsive Breakpoints ================= */
@media (max-width: 1024px) {
  .hero-card { grid-template-columns: 1fr; }
  .arena-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-row, .reading-split, .writing-split, .vault-grid-top { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .rubric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .top-hud { height: auto; padding: 10px 12px; flex-wrap: wrap; }
  .nav-rail { width: 66px; padding: 10px 6px; }
  .nav-lbl, .nav-group-label, .nav-footer-tip { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .arena-grid, .options-grid, .fb-grid { grid-template-columns: 1fr; }
  .app-viewport { padding: 14px; }
  .hero-title { font-size: 23px; }
}
