/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #0b0b1f;
  --surface:      rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.10);
  --border:       rgba(255, 255, 255, 0.12);
  --text:         #e2e8f0;
  --text-muted:   #94a3b8;
  --accent:       #818cf8;
  --accent-dark:  #6366f1;
  --correct:      #22c55e;
  --correct-bg:   rgba(34, 197, 94, 0.18);
  --correct-light:#86efac;
  --correct-light-bg: rgba(134, 239, 172, 0.12);
  --wrong:        #f87171;
  --wrong-bg:     rgba(248, 113, 113, 0.18);
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 8px 32px rgba(0, 0, 0, 0.4);
  --transition:   0.22s ease;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ================================================
   STARS BACKGROUND
   ================================================ */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 30%, #1a1060 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, #0d1a4a 0%, transparent 55%),
    #0b0b1f;
  overflow: hidden;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 10%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 60%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 25%, #fff 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 80%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 45%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 75%, #fff 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 90%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 55%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 32%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 73% 65%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 5%  50%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 10%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 18% 92%, rgba(255,255,255,0.8) 0%, transparent 100%);
}

.stars::after {
  background-image:
    radial-gradient(1px 1px at 3%  20%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 70%, #fff 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 5%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 48%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 35%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 80%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(2px 2px at 12% 58%, rgba(200,200,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 95% 90%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 28%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 57% 73%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 38% 18%, rgba(255,255,255,0.8) 0%, transparent 100%);
}

/* ================================================
   SCREENS
   ================================================ */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ================================================
   LANDING SCREEN
   ================================================ */
#screen-landing {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.landing-content {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.landing-icon {
  font-size: 4rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 20px rgba(129,140,248,0.6));
}

.landing-content h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #c7d2fe, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-content h2 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.landing-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.quiz-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.quiz-meta span {
  background: rgba(129,140,248,0.12);
  border: 1px solid rgba(129,140,248,0.25);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-dark), #7c3aed);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99,102,241,0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-next {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--accent-dark), #7c3aed);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 3px 14px rgba(99,102,241,0.35);
  align-self: flex-end;
}

.btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(99,102,241,0.5);
}

.btn-next.hidden,
.explanation.hidden {
  display: none;
}

/* ================================================
   QUIZ HEADER
   ================================================ */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: rgba(11, 11, 31, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-menu:hover {
  background: var(--surface-hover);
}

.score-display {
  display: flex;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
}

.score-correct {
  color: var(--correct);
  background: var(--correct-bg);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.95rem;
  min-width: 60px;
  text-align: center;
  transition: transform 0.15s;
}

.score-wrong {
  color: var(--wrong);
  background: var(--wrong-bg);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.95rem;
  min-width: 60px;
  text-align: center;
  transition: transform 0.15s;
}

.score-correct.bump,
.score-wrong.bump {
  transform: scale(1.2);
}

/* ================================================
   DROPDOWN MENU
   ================================================ */
.dropdown-menu {
  position: absolute;
  top: 60px;
  left: 1.25rem;
  background: #1a1a3e;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  z-index: 200;
  box-shadow: var(--shadow);
  min-width: 180px;
  animation: fadeDown 0.15s ease;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background var(--transition);
}

.dropdown-item:hover {
  background: var(--surface-hover);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
}

.hidden {
  display: none !important;
}

/* ================================================
   QUIZ MAIN
   ================================================ */
.quiz-main {
  flex: 1;
  padding: 1.5rem 1.25rem 1rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.topic-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  background: rgba(129,140,248,0.1);
  border: 1px solid rgba(129,140,248,0.2);
  border-radius: 20px;
  padding: 0.25rem 0.8rem;
  margin-bottom: 0.5rem;
}

.question-number {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* ================================================
   OPTIONS
   ================================================ */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 0.95rem;
  transition:
    background var(--transition),
    border-color var(--transition),
    transform 0.12s ease;
  line-height: 1.45;
}

.option-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: rgba(129,140,248,0.4);
  transform: translateX(3px);
}

.option-btn:disabled {
  cursor: default;
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

/* Correct answer chosen */
.option-btn.correct {
  background: var(--correct-bg);
  border-color: var(--correct);
}

.option-btn.correct .option-letter {
  background: var(--correct);
  border-color: var(--correct);
  color: #fff;
}

/* Wrong answer chosen */
.option-btn.wrong {
  background: var(--wrong-bg);
  border-color: var(--wrong);
}

.option-btn.wrong .option-letter {
  background: var(--wrong);
  border-color: var(--wrong);
  color: #fff;
}

/* Correct answer (not chosen — shown after wrong pick) */
.option-btn.correct-highlight {
  background: var(--correct-light-bg);
  border-color: var(--correct-light);
}

.option-btn.correct-highlight .option-letter {
  background: var(--correct-light);
  border-color: var(--correct-light);
  color: #166534;
}

/* ================================================
   FILL DRAG QUESTIONS
   ================================================ */
.fill-drag-area {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 0.25rem;
}

.fill-interaction-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.fill-match-group {
  gap: 0.75rem;
}

.fill-group-row {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.fill-sentence {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
}

.fill-dropzone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  min-height: 38px;
  padding: 0.35rem 0.7rem;
  margin: 0 0.35rem;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.fill-dropzone.filled {
  border-style: solid;
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(129, 140, 248, 0.14);
  color: #e0e7ff;
}

.fill-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(129, 140, 248, 0.15);
  color: var(--text);
}

.fill-dropzone.correct {
  border-style: solid;
  border-color: var(--correct);
  background: var(--correct-bg);
  color: #dcfce7;
}

.fill-dropzone.wrong {
  border-style: solid;
  border-color: var(--wrong);
  background: var(--wrong-bg);
  color: #fee2e2;
}

.fill-correct-hint {
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
  font-size: 0.78rem;
  color: var(--correct-light);
  font-weight: 600;
}

.fill-word-bank {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.word-chip {
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: grab;
  transition: transform 0.12s ease, background var(--transition), border-color var(--transition), opacity var(--transition);
}

.word-chip:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(129, 140, 248, 0.12);
}

.word-chip.dragging {
  opacity: 0.45;
}

.word-chip.selected {
  border-color: var(--accent);
  background: rgba(129, 140, 248, 0.18);
  color: #e0e7ff;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.word-chip.used {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.3);
  color: rgba(226, 232, 240, 0.55);
  opacity: 0.65;
}

.word-chip:disabled {
  cursor: default;
}

.word-chip.answer {
  border-color: var(--correct-light);
  background: var(--correct-light-bg);
  color: var(--correct-light);
}

.word-chip.picked-wrong {
  border-color: var(--wrong);
  background: var(--wrong-bg);
  color: #fecaca;
}

.planet-order-board {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.8rem;
}

.planet-order-sun {
  align-self: flex-start;
  background: rgba(250, 204, 21, 0.2);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde68a;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-weight: 700;
  font-size: 0.86rem;
}

.planet-order-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.planet-order-label {
  min-width: 88px;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.planet-order-dropzone {
  min-width: 160px;
}

/* ================================================
   EXPLANATION
   ================================================ */
.explanation {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.2);
  font-size: 0.9rem;
  color: #c7d2fe;
  line-height: 1.55;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.explanation-icon {
  font-size: 1rem;
  margin-top: 1px;
}

/* ================================================
   PROGRESS FOOTER
   ================================================ */
.progress-footer {
  position: sticky;
  bottom: 0;
  background: rgba(11, 11, 31, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 0.6rem 1.25rem 0.75rem;
}

.progress-info {
  display: flex;
  justify-content: flex-end;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, #6366f1, #a78bfa);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* ================================================
   RESULTS SCREEN
   ================================================ */
#screen-results {
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1.25rem 3rem;
  overflow-y: auto;
}

.results-content {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.results-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 18px rgba(250,204,21,0.5));
  margin-top: 0.5rem;
}

.results-icon--gold-cat {
  width: 4.2rem;
  height: 4.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-icon-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(250,204,21,0.5));
}

.results-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.results-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.results-subtitle-text {
  display: block;
}

.results-subtitle-cat {
  display: block;
  height: 240px;
  width: auto;
  max-width: 100%;
  margin: 0.75rem auto 0;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(250,204,21,0.45));
}

.result-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.stat-card {
  flex: 1;
  min-width: 120px;
  max-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.stat-correct { border-color: rgba(34,197,94,0.35); background: var(--correct-bg); }
.stat-wrong   { border-color: rgba(248,113,113,0.35); background: var(--wrong-bg); }
.stat-percent { border-color: rgba(129,140,248,0.35); background: rgba(129,140,248,0.1); }

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat-correct .stat-number { color: var(--correct); }
.stat-wrong   .stat-number { color: var(--wrong); }
.stat-percent .stat-number { color: var(--accent); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ================================================
   STUDY SECTION
   ================================================ */
.study-section {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.study-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.study-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.study-topic-group {
  margin-bottom: 1.25rem;
}

.study-topic-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.study-question-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem;
}

.study-question-item:last-child {
  border-bottom: none;
}

.study-q-num {
  color: var(--text-muted);
  min-width: 28px;
  font-size: 0.8rem;
  padding-top: 2px;
}

.study-q-text {
  flex: 1;
  color: var(--text);
  line-height: 1.4;
}

.study-q-answer {
  font-size: 0.8rem;
  color: var(--correct-light);
  font-style: italic;
}

.perfect-section {
  font-size: 1.05rem;
  color: #fde68a;
  background: rgba(250,204,21,0.08);
  border: 1px solid rgba(250,204,21,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
}

/* ================================================
   RESPONSIVE
   ================================================ */
/* ================================================
   MODE BUTTONS (LANDING)
   ================================================ */
.mode-buttons {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
}

.btn-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  color: var(--text);
  min-width: 0;
  flex: 1;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-mode:hover {
  background: rgba(99,102,241,0.15);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.3);
}

.btn-mode--random:hover {
  background: rgba(124,58,237,0.18);
  border-color: #a78bfa;
  box-shadow: 0 6px 24px rgba(124,58,237,0.35);
}

.btn-mode-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.btn-mode-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.btn-mode-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

.start-title {
  margin: 0.4rem 0 0.75rem;
  text-align: center;
  font-size: 1.05rem;
  color: #c7d2fe;
  letter-spacing: 0.3px;
}

.quiz-picker {
  margin-top: 1.15rem;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

.quiz-picker-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.quiz-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
}

.quiz-picker-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.quiz-picker-item input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

/* ================================================
   QUESTION IMAGES
   ================================================ */
.question-images {
  margin: 0.75rem 0 0.25rem;
}

.question-images--single .question-img-wrap {
  width: 100%;
}

.question-images--pair {
  display: flex;
  gap: 0.75rem;
}

.question-images--pair .question-img-wrap {
  flex: 1;
  min-width: 0;
}

.question-img-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.img-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
  background: rgba(255,255,255,0.04);
  max-height: 240px;
  object-fit: cover;
}

/* Placeholder when image hasn't loaded */
.question-img[src$=".jpg"]:not([complete]),
.question-img:-moz-broken {
  min-height: 120px;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 480px) {
  .landing-content {
    padding: 2rem 1.5rem;
  }

  .landing-content h1 {
    font-size: 1.8rem;
  }

  .mode-buttons {
    gap: 0.6rem;
  }

  .btn-mode {
    padding: 0.95rem 0.55rem;
  }

  .btn-mode-title {
    font-size: 0.9rem;
  }

  .btn-mode-desc {
    font-size: 0.68rem;
  }

  .quiz-picker-grid {
    grid-template-columns: 1fr;
  }

  .question-card {
    padding: 1.25rem;
  }

  .question-text {
    font-size: 1rem;
  }

  .option-btn {
    font-size: 0.9rem;
  }

  .result-stats {
    gap: 0.75rem;
  }

  .stat-card {
    min-width: 90px;
  }

  .stat-number {
    font-size: 1.6rem;
  }
}
