/* ─────────────────────────────────────────────────────────────────
   NEO Quiz Studio — style.css
   Brand palette inspired by Nepal Economics Olympiad (ecolympnepal.org)
   ───────────────────────────────────────────────────────────────── */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Primary palette */
  --navy:       #1a3a5c;
  --navy-dark:  #0d2340;
  --navy-light: #22497a;
  --teal:       #0f6b5e;
  --teal-light: #19877a;
  --gold:       #c8a94f;
  --gold-light: #e2c97c;

  /* Neutrals */
  --bg:         #f5f7fa;
  --surface:    #ffffff;
  --surface-2:  #f0f3f8;
  --border:     rgba(26,58,92,0.12);
  --text:       #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  /* Status */
  --correct:      #059669;
  --correct-bg:   #d1fae5;
  --incorrect:    #dc2626;
  --incorrect-bg: #fee2e2;
  --pending:      #d4a017;
  --pending-bg:   #fef9c3;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(26,58,92,0.10);
  --shadow-lg:  0 12px 40px rgba(26,58,92,0.14);
  --shadow-xl:  0 24px 64px rgba(26,58,92,0.18);

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── UTILITY ────────────────────────────────────────────────── */
.hidden  { display: none !important; }
.visible { display: block; }

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-emblem {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(26,58,92,0.25);
  transition: transform var(--t-base);
  overflow: hidden;
  line-height: 0;
}
.logo-emblem:hover { transform: scale(1.06); }

.logo-title {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.logo-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.header-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  transition: all var(--t-fast);
}
.header-nav a:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ── UPLOAD SECTION ─────────────────────────────────────────── */
.upload-section {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(26,58,92,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(15,107,94,0.05) 0%, transparent 60%),
    var(--bg);
}

.upload-hero { max-width: 680px; width: 100%; text-align: center; }

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(15,107,94,0.08);
  border: 1px solid rgba(15,107,94,0.2);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy-dark);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--teal) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed rgba(26,58,92,0.25);
  border-radius: var(--r-xl);
  padding: 52px 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  position: relative;
  margin-bottom: 20px;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--navy);
  background: rgba(26,58,92,0.03);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(26,58,92,0.06);
  transform: translateY(-2px);
}

.drop-icon {
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.drop-main {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.drop-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.file-label {
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#fileInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 8px;
  font-style: italic;
}

/* Sample info */
.sample-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(15,107,94,0.05);
  border: 1px solid rgba(15,107,94,0.15);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 0;
}

.sample-info svg { flex-shrink: 0; margin-top: 1px; }
.sample-info code {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  background: rgba(15,107,94,0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--teal);
}

/* Stats row */
.upload-stats {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-pill {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  min-width: 140px;
  transition: all var(--t-base);
}
.stat-pill:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-n {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-l {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── PROGRESS BAR ───────────────────────────────────────────── */
.progress-rail {
  height: 4px;
  background: rgba(26,58,92,0.1);
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 90;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--teal), var(--gold));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  border-radius: 0 2px 2px 0;
}

/* ── QUIZ SECTION ───────────────────────────────────────────── */
.quiz-section {
  min-height: calc(100vh - 64px);
  padding: 28px 24px 60px;
}

.quiz-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

/* Sidebar */
.quiz-sidebar {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.btn-ghost {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  transition: all var(--t-fast);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--navy);
  border-color: var(--navy);
}

.sidebar-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.score-ring-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-center-text {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.score-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Question Map */
.question-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.qmap-btn {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qmap-btn:hover {
  border-color: var(--navy);
  background: rgba(26,58,92,0.06);
  color: var(--navy);
}

.qmap-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,58,92,0.35);
}

.qmap-btn.correct {
  background: var(--correct-bg);
  border-color: var(--correct);
  color: var(--correct);
}

.qmap-btn.incorrect {
  background: var(--incorrect-bg);
  border-color: var(--incorrect);
  color: var(--incorrect);
}

/* Sidebar meta */
.sidebar-meta { display: flex; flex-direction: column; gap: 6px; }

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child { border-bottom: none; }

.meta-key {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.meta-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--navy);
}
.correct-val { color: var(--correct); }
.incorrect-val { color: var(--incorrect); }

/* ── QUIZ MAIN ──────────────────────────────────────────────── */
.quiz-main { min-width: 0; }

.question-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qcard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.q-counter {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.q-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
}

.q-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1.6;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--border);
}

/* Options */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: all var(--t-base);
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

.option-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  opacity: 0;
  transition: opacity var(--t-base);
}

.option-btn:hover:not(:disabled) {
  border-color: var(--navy);
  background: rgba(26,58,92,0.04);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.option-key {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(26,58,92,0.08);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--navy);
  transition: all var(--t-base);
  flex-shrink: 0;
  z-index: 1;
}

.option-text {
  z-index: 1;
  flex: 1;
}

/* Option states */
.option-btn.selected {
  border-color: var(--navy);
  background: rgba(26,58,92,0.07);
}
.option-btn.selected .option-key {
  background: var(--navy);
  color: #fff;
}

.option-btn.correct-ans {
  border-color: var(--correct);
  background: var(--correct-bg);
  border-radius: var(--r-md);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  cursor: default;
}
.option-btn.correct-ans .option-key {
  background: var(--correct);
  color: #fff;
}

.option-btn.wrong-ans {
  border-color: var(--incorrect);
  background: var(--incorrect-bg);
  border-radius: var(--r-md);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  cursor: default;
}
.option-btn.wrong-ans .option-key {
  background: var(--incorrect);
  color: #fff;
}

.option-btn:disabled { cursor: not-allowed; }
.option-btn:disabled:not(.correct-ans):not(.wrong-ans) {
  opacity: 0.55;
}

/* Option body row (key + text + status in one line) */
.option-body-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  width: 100%;
}

/* Inline explanation shown inside the option after answering */
.option-explanation {
  display: none;
  padding: 10px 20px 14px 68px; /* aligns with text after the key badge */
  font-size: 0.83rem;
  line-height: 1.6;
  border-top: 1px solid rgba(0,0,0,0.07);
  color: var(--text-muted);
  text-align: left;
  font-style: italic;
}

.option-btn.correct-ans .option-explanation,
.option-btn.wrong-ans   .option-explanation,
.option-btn.neutral-ans  .option-explanation {
  display: block;
}

.option-btn.correct-ans .option-explanation { color: #065f46; }
.option-btn.wrong-ans   .option-explanation { color: #991b1b; }
.option-btn.neutral-ans {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  cursor: default;
  opacity: 0.75;
}
.option-btn.neutral-ans .option-explanation { color: var(--text-muted); }

/* ── CARD ACTIONS ───────────────────────────────────────────── */
.qcard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 28px;
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: 0 2px 12px rgba(26,58,92,0.3);
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,58,92,0.4);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 28px;
  cursor: pointer;
  transition: all var(--t-base);
}
.btn-outline:hover {
  border-color: var(--navy);
  background: rgba(26,58,92,0.05);
}
.btn-outline:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-full { width: 100%; }

/* ── RESULTS SECTION ────────────────────────────────────────── */
.results-section {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(26,58,92,0.08) 0%, transparent 70%),
    var(--bg);
}

.results-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 48px 40px;
  max-width: 820px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.results-hero {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--border);
}

.results-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.results-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--navy-dark);
  margin-bottom: 12px;
}

.results-big-score {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.results-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 440px;
  margin: 0 auto;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.result-stat {
  padding: 24px;
  border-radius: var(--r-lg);
  text-align: center;
}
.correct-bg  { background: var(--correct-bg);   }
.incorrect-bg{ background: var(--incorrect-bg); }
.skipped-bg  { background: var(--pending-bg);   }

.rs-n {
  display: block;
  font-size: 2.8rem;
  font-weight: 900;
  font-family: 'Playfair Display', serif;
  line-height: 1;
  margin-bottom: 6px;
}
.correct-bg  .rs-n { color: var(--correct); }
.incorrect-bg .rs-n { color: var(--incorrect); }
.skipped-bg  .rs-n { color: var(--pending); }

.rs-l {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Review List */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.review-item {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: box-shadow var(--t-base);
}
.review-item:hover { box-shadow: var(--shadow-sm); }

.review-item-header {
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.review-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.dot-correct   { background: var(--correct); }
.dot-incorrect { background: var(--incorrect); }
.dot-skipped   { background: var(--pending); }

.review-q-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  margin-top: 2px;
}

.review-q-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  line-height: 1.5;
}

.review-chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform var(--t-fast);
  flex-shrink: 0;
}

.review-item.open .review-chevron { transform: rotate(180deg); }

.review-item-body {
  padding: 0 18px 14px;
  display: none;
  border-top: 1px solid var(--border);
}
.review-item.open .review-item-body { display: block; padding-top: 14px; }

.review-your-ans, .review-correct-ans {
  font-size: 0.83rem;
  margin-bottom: 8px;
}
.review-your-ans span, .review-correct-ans span {
  font-weight: 700;
}
.review-your-ans .wrong-ans-label  { color: var(--incorrect); }
.review-correct-ans .correct-label { color: var(--correct); }

.review-exp-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-top: 8px;
  border-left: 3px solid var(--teal);
}

.results-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .quiz-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .sidebar-header { width: 100%; }
  .question-map   { order: 10; width: 100%; }
  .sidebar-meta   { flex: 1 1 160px; }
  .btn-full       { width: auto; }
}

@media (max-width: 600px) {
  .question-card { padding: 24px 20px; }
  .results-card  { padding: 28px 20px; }
  .results-grid  { grid-template-columns: 1fr; }
  .q-text        { font-size: 1.05rem; }
  .drop-zone     { padding: 36px 20px; }
  .hero-title    { font-size: 2rem; }
  .upload-stats  { gap: 10px; }
  .stat-pill     { padding: 16px 20px; min-width: 100px; }
  .qcard-actions { flex-direction: column-reverse; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
  .results-actions { flex-direction: column; }
}
