/* ══════════════════════════════════════════════════════════
   WEB DEV QUIZ — PREMIUM DARK THEME
   SkillCraft Technology · Task 03
   ══════════════════════════════════════════════════════════ */

/* ── CUSTOM PROPERTIES ───────────────────────────────────── */
:root {
  /* Palette */
  --bg:           #0b0d17;
  --bg-2:         #0f1221;
  --surface:      #141828;
  --surface-2:    #1a2035;
  --border:       rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.15);

  /* Brand gradient */
  --grad:         linear-gradient(135deg, #6c63ff, #4fc3f7, #00e5ff);
  --grad-btn:     linear-gradient(135deg, #6c63ff 0%, #4fc3f7 100%);
  --grad-warm:    linear-gradient(135deg, #f64f59, #c471ed, #12c2e9);

  /* Neon accents */
  --accent:       #6c63ff;
  --accent-cyan:  #00e5ff;
  --accent-green: #00e676;
  --accent-red:   #ff5252;
  --accent-amber: #ffab40;

  /* Text */
  --text-primary:   #f0f2ff;
  --text-secondary: #8892b0;
  --text-muted:     #4a5568;

  /* Radii & shadows */
  --radius-sm:  10px;
  --radius-md:  18px;
  --radius-lg:  28px;
  --radius-xl:  40px;
  --shadow-card: 0 24px 64px rgba(0,0,0,.55), 0 4px 16px rgba(108,99,255,.15);
  --shadow-btn:  0 8px 24px rgba(108,99,255,.4);
  --shadow-glow: 0 0 40px rgba(0,229,255,.15);

  /* Transitions */
  --t-fast: .15s ease;
  --t-med:  .3s cubic-bezier(.4,0,.2,1);
  --t-slow: .5s cubic-bezier(.4,0,.2,1);
}

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

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

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

/* ── PARTICLE CANVAS ─────────────────────────────────────── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}
@keyframes float-particle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ── APP WRAPPER ─────────────────────────────────────────── */
.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

/* ── SCREENS ─────────────────────────────────────────────── */
.screen {
  display: none;
  width: 100%;
  max-width: 720px;
  animation: screen-in .45s cubic-bezier(.4,0,.2,1) both;
}
.screen.active { display: flex; flex-direction: column; align-items: center; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── CARD ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 44px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
/* subtle inner glow */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(108,99,255,.12), transparent);
  pointer-events: none;
}

/* ── WELCOME CARD ────────────────────────────────────────── */
.welcome-card {
  text-align: center;
  padding: 56px 44px 48px;
}

.badge {
  display: inline-block;
  background: rgba(108,99,255,.15);
  border: 1px solid rgba(108,99,255,.4);
  color: #a78bfa;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.logo-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  box-shadow: 0 0 40px rgba(108,99,255,.35), inset 0 0 20px rgba(108,99,255,.1);
  animation: ring-pulse 3s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%,100% { box-shadow: 0 0 40px rgba(108,99,255,.35), inset 0 0 20px rgba(108,99,255,.1); }
  50%      { box-shadow: 0 0 60px rgba(108,99,255,.55), inset 0 0 30px rgba(108,99,255,.2); }
}
.logo-icon {
  font-family: 'Fira Code', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -.02em;
}
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.welcome-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 36px;
}
.welcome-sub strong { color: var(--text-primary); }

/* Meta grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
.meta-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.meta-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.meta-icon { font-size: 1.3rem; }

.tip-text {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: .82rem;
}

/* ── QUIZ TOP BAR ────────────────────────────────────────── */
.quiz-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.question-counter {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .05em;
}
.score-live {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(108,99,255,.15);
  border: 1px solid rgba(108,99,255,.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .82rem;
  font-weight: 700;
  color: #a78bfa;
}
.score-icon { font-size: 1rem; }

/* ── PROGRESS BAR ────────────────────────────────────────── */
.progress-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.progress-track {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: var(--grad-btn);
  transition: width var(--t-slow);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(108,99,255,.8);
}
.progress-pct {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
}

/* ── QUESTION CARD ───────────────────────────────────────── */
.question-card {
  margin-bottom: 20px;
  transition: transform var(--t-fast);
}
.question-card.shake {
  animation: shake .4s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-10px); }
  40%      { transform: translateX(10px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}
@keyframes card-slide-in {
  from { opacity: 0; transform: translateX(40px) scale(.97); }
  to   { opacity: 1; transform: translateX(0)     scale(1); }
}
.question-card.slide-in { animation: card-slide-in .35s cubic-bezier(.4,0,.2,1) both; }

/* Type pill */
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  background: rgba(0,229,255,.1);
  border: 1px solid rgba(0,229,255,.3);
  color: var(--accent-cyan);
}
.type-pill.multi  { background: rgba(255,171,64,.1); border-color: rgba(255,171,64,.3); color: var(--accent-amber); }
.type-pill.fitb   { background: rgba(0,230,118,.1);  border-color: rgba(0,230,118,.3);  color: var(--accent-green); }

/* Question text */
.question-text {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.question-text code {
  font-family: 'Fira Code', monospace;
  background: rgba(108,99,255,.18);
  color: #c3b1e1;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: .92em;
}
.question-hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-style: italic;
}

/* ── OPTIONS ─────────────────────────────────────────────── */
.options-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.5;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  overflow: hidden;
  width: 100%;
}
.option-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-btn);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.option-btn:hover:not(:disabled):not(.selected):not(.correct):not(.wrong) {
  border-color: var(--accent);
  background: rgba(108,99,255,.08);
  transform: translateX(4px);
}
.option-btn:disabled { cursor: not-allowed; }

/* Option indicator (A, B, C…) */
.option-letter {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  position: relative;
  z-index: 1;
}
.option-text { flex: 1; position: relative; z-index: 1; }

/* Multi-select checkbox square */
.option-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-hover);
  position: relative;
  z-index: 1;
  transition: background var(--t-fast), border-color var(--t-fast);
  display: none;
}
.is-multi .option-check { display: block; }

/* Selected state */
.option-btn.selected {
  border-color: var(--accent);
  background: rgba(108,99,255,.12);
  transform: translateX(4px);
}
.option-btn.selected .option-letter {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.option-btn.selected .option-check {
  background: var(--accent);
  border-color: var(--accent);
}
.option-btn.selected .option-check::after {
  content: '';
  position: absolute;
  left: 3px; top: 0px;
  width: 6px; height: 11px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Correct state */
.option-btn.correct {
  border-color: var(--accent-green) !important;
  background: rgba(0,230,118,.08) !important;
}
.option-btn.correct .option-letter {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #000;
}

/* Wrong state */
.option-btn.wrong {
  border-color: var(--accent-red) !important;
  background: rgba(255,82,82,.08) !important;
}
.option-btn.wrong .option-letter {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(108,99,255,.25);
  transform: scale(0);
  animation: ripple-anim .5s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── FILL IN THE BLANK ───────────────────────────────────── */
.fitb-area { margin-top: 8px; }
.fitb-area.hidden { display: none; }
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.fitb-input {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.fitb-input::placeholder { color: var(--text-muted); }
.fitb-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,229,255,.12);
}
.fitb-input.correct-input {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0,230,118,.12);
  background: rgba(0,230,118,.05);
}
.fitb-input.wrong-input {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(255,82,82,.12);
  background: rgba(255,82,82,.05);
}

/* ── FEEDBACK BANNER ─────────────────────────────────────── */
.feedback-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.55;
  animation: fade-in .25s ease both;
}
.feedback-banner.hidden { display: none; }
.feedback-banner.correct-fb {
  background: rgba(0,230,118,.1);
  border: 1px solid rgba(0,230,118,.3);
  color: #69f0ae;
}
.feedback-banner.wrong-fb {
  background: rgba(255,82,82,.1);
  border: 1px solid rgba(255,82,82,.3);
  color: #ff8a80;
}
.feedback-banner.skip-fb {
  background: rgba(255,171,64,.08);
  border: 1px solid rgba(255,171,64,.25);
  color: var(--accent-amber);
}
.feedback-icon { font-size: 1.1rem; flex-shrink: 0; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 26px;
  transition: all var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 32px rgba(108,99,255,.55);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-hover);
  color: var(--text-primary);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: #a78bfa;
  background: rgba(108,99,255,.08);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--border);
  color: var(--text-primary);
}

.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: 100px; }
.btn-sm { padding: 8px 18px; font-size: .82rem; }

.pulse {
  animation: pulse-btn 2.5s ease-in-out infinite;
}
@keyframes pulse-btn {
  0%,100% { box-shadow: var(--shadow-btn); }
  50%      { box-shadow: 0 12px 40px rgba(108,99,255,.65); }
}

/* Quiz actions */
.quiz-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ── RESULTS CARD ────────────────────────────────────────── */
.results-card { text-align: center; padding: 48px 44px 44px; }

.trophy-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  font-size: 2.4rem;
  animation: trophy-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes trophy-pop {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0);      opacity: 1; }
}
.trophy-ring.gold   { background: rgba(255,215,0,.12);  border: 2px solid rgba(255,215,0,.4);  box-shadow: 0 0 40px rgba(255,215,0,.25); }
.trophy-ring.silver { background: rgba(192,192,192,.1); border: 2px solid rgba(192,192,192,.3); }
.trophy-ring.bronze { background: rgba(205,127,50,.1);  border: 2px solid rgba(205,127,50,.3); }
.trophy-ring.loss   { background: rgba(255,82,82,.08);  border: 2px solid rgba(255,82,82,.25); }

.results-title {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.results-sub { color: var(--text-secondary); font-size: .95rem; margin-bottom: 32px; }

/* Score dial */
.score-dial-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 32px;
}
.score-dial { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 10;
}
.dial-fill {
  fill: none;
  stroke-width: 10;
  stroke: url(#grad-dial);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1) .3s;
}
/* Gradient is defined inline via JS */
.dial-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 2px;
}
.dial-score {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.dial-total {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  align-self: flex-end;
  padding-bottom: 4px;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}
.stat-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform var(--t-fast);
}
.stat-box:hover { transform: translateY(-3px); }
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.stat-lbl { font-size: .72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.correct-box .stat-num { color: var(--accent-green); }
.wrong-box   .stat-num { color: var(--accent-red); }
.skipped-box .stat-num { color: var(--accent-amber); }
.pct-box     .stat-num { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

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

/* ── REVIEW SCREEN ───────────────────────────────────────── */
.review-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.review-title {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.review-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.review-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  animation: fade-in .3s ease both;
}
.review-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.review-item.ri-correct::before { background: var(--accent-green); }
.review-item.ri-wrong::before   { background: var(--accent-red); }
.review-item.ri-skipped::before { background: var(--accent-amber); }

.ri-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ri-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-secondary);
}
.ri-q { font-size: .92rem; font-weight: 600; line-height: 1.55; color: var(--text-primary); flex: 1; }
.ri-q code {
  font-family: 'Fira Code', monospace;
  background: rgba(108,99,255,.18);
  color: #c3b1e1;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .88em;
}
.ri-status-badge {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}
.ri-correct .ri-status-badge { background: rgba(0,230,118,.15); color: var(--accent-green); border: 1px solid rgba(0,230,118,.3); }
.ri-wrong   .ri-status-badge { background: rgba(255,82,82,.12);  color: var(--accent-red);   border: 1px solid rgba(255,82,82,.3); }
.ri-skipped .ri-status-badge { background: rgba(255,171,64,.1);  color: var(--accent-amber); border: 1px solid rgba(255,171,64,.25); }

.ri-answers { display: flex; flex-direction: column; gap: 8px; }
.ri-answer-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.ri-answer-row strong { color: var(--text-primary); }
.ri-label { font-weight: 600; min-width: 80px; }
.tag-correct { color: var(--accent-green); }
.tag-wrong   { color: var(--accent-red); }
.tag-skipped { color: var(--accent-amber); }

.review-footer { width: 100%; display: flex; justify-content: center; padding-bottom: 8px; }

/* ── UTILITIES ───────────────────────────────────────────── */
.hidden { display: none !important; }
code { font-family: 'Fira Code', monospace; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ── SVG GRADIENT FOR DIAL ───────────────────────────────── */
svg defs { display: block; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 580px) {
  .app-wrapper { padding: 16px 12px 40px; }
  .card { padding: 28px 22px; }
  .welcome-card { padding: 36px 22px 32px; }
  .results-card { padding: 32px 22px 28px; }
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .results-actions { flex-direction: column; }
  .quiz-actions { justify-content: space-between; }
  .btn-lg { width: 100%; padding: 15px; }
  .review-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ri-header { flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .question-text { font-size: .98rem; }
}

/* ══════════════════════════════════════════════════════════
   DARK GLASSMORPHISM DETAIL — extra flair
   ══════════════════════════════════════════════════════════ */

/* Subtle dot-grid background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(108,99,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Bottom ambient glow */
body::after {
  content: '';
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(108,99,255,.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

