@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== VARIABLES ===== */
:root {
  --bg: #07071a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-accent: rgba(139,92,246,0.45);

  --purple: #8b5cf6;
  --purple-dark: #7c3aed;
  --blue: #3b82f6;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);

  --green: #10b981;
  --green-bg: rgba(16,185,129,0.12);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,0.12);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245,158,11,0.12);

  --text: #f8fafc;
  --text-2: #cbd5e1;
  --text-3: #64748b;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0,0,0,0.55);
}

/* ===== RESET ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family:'Inter',-apple-system,sans-serif;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  line-height:1.6;
  overflow-x:hidden;
}

/* ===== ORBS ===== */
.bg-orbs {
  position:fixed; inset:0;
  pointer-events:none; overflow:hidden; z-index:0;
}
.orb {
  position:absolute; border-radius:50%;
  filter:blur(90px); opacity:0.13;
}
.orb-1 {
  width:700px; height:700px; background:#8b5cf6;
  top:-250px; left:-150px;
  animation:orbFloat 12s ease-in-out infinite;
}
.orb-2 {
  width:550px; height:550px; background:#3b82f6;
  bottom:-180px; right:-120px;
  animation:orbFloat 14s ease-in-out infinite reverse;
}
.orb-3 {
  width:350px; height:350px; background:#10b981;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  animation:orbFloat 9s ease-in-out infinite 2s;
}
@keyframes orbFloat {
  0%,100%  { transform:translate(0,0) scale(1); }
  33%      { transform:translate(30px,-25px) scale(1.04); }
  66%      { transform:translate(-20px,18px) scale(0.96); }
}

/* ===== SCREEN SYSTEM ===== */
.screen { display:none; position:relative; z-index:1; min-height:100vh; }
.screen.active { display:flex; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(28px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; } to { opacity:1; }
}
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes pulse {
  0%,100% { opacity:1; }
  50%     { opacity:0.5; }
}
@keyframes scaleIn {
  from { opacity:0; transform:scale(0.9); }
  to   { opacity:1; transform:scale(1); }
}

/* ===== TYPOGRAPHY ===== */
.gradient-text {
  background:var(--gradient);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.text-muted { color:var(--text-3); font-size:0.875rem; }

/* ===== BUTTONS ===== */
.btn-primary {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--gradient);
  color:#fff; border:none; border-radius:var(--radius-sm);
  padding:14px 28px; font-size:1rem; font-weight:600;
  cursor:pointer; transition:all 0.3s ease;
  text-decoration:none; font-family:inherit;
}
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 28px rgba(139,92,246,0.4); }
.btn-primary:active { transform:translateY(0); }

.btn-ghost {
  display:inline-flex; align-items:center; gap:8px;
  background:transparent; color:var(--text-2);
  border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:12px 20px; font-size:0.9rem; font-weight:500;
  cursor:pointer; transition:all 0.25s; text-decoration:none; font-family:inherit;
}
.btn-ghost:hover { background:var(--bg-card); border-color:var(--border-accent); color:var(--text); }

.btn-danger {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--red-bg); color:var(--red);
  border:1px solid rgba(239,68,68,0.3); border-radius:var(--radius-sm);
  padding:12px 20px; font-size:0.9rem; font-weight:500;
  cursor:pointer; transition:all 0.2s; font-family:inherit;
}
.btn-danger:hover { background:rgba(239,68,68,0.22); }

.btn-back {
  background:transparent; border:none; color:var(--text-3);
  cursor:pointer; font-size:0.9rem; font-family:inherit;
  padding:4px 0; margin-bottom:24px; transition:color 0.2s; display:inline-flex; align-items:center; gap:6px;
}
.btn-back:hover { color:var(--text); }

.btn-quit {
  background:transparent; border:1px solid var(--border); border-radius:var(--radius-sm);
  color:var(--text-3); padding:8px 14px; cursor:pointer;
  font-size:0.85rem; font-family:inherit; transition:all 0.2s;
}
.btn-quit:hover { border-color:var(--red); color:var(--red); }

/* ===== SHARED SCREEN INNER ===== */
.screen-inner {
  max-width:760px; width:100%;
  margin:0 auto; padding:40px 24px;
  animation:fadeInUp 0.5s ease;
}
.screen-inner-sm { max-width:540px; }
.screen-title { font-size:1.75rem; font-weight:800; margin-bottom:8px; }
.screen-subtitle { color:var(--text-2); margin-bottom:32px; }

/* ===========================
   WELCOME SCREEN
   =========================== */
#screen-welcome {
  flex-direction:column; align-items:center;
  justify-content:center; padding:48px 24px; text-align:center;
}
.welcome-content { max-width:680px; width:100%; animation:fadeInUp 0.6s ease; }

.logo-badge {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--bg-card); border:1px solid var(--border-accent);
  border-radius:100px; padding:8px 20px;
  font-size:0.875rem; font-weight:600; color:var(--purple);
  margin-bottom:28px; backdrop-filter:blur(12px);
}

.welcome-title {
  font-size:clamp(2rem,5vw,3.5rem);
  font-weight:800; line-height:1.15;
  margin-bottom:16px; letter-spacing:-0.02em;
}
.welcome-subtitle {
  font-size:1.1rem; color:var(--text-2);
  margin-bottom:36px; max-width:480px; margin-inline:auto;
}

.stats-row {
  display:flex; justify-content:center;
  gap:32px; margin-bottom:40px; flex-wrap:wrap;
}
.stat-item { display:flex; flex-direction:column; align-items:center; gap:4px; }
.stat-number {
  font-size:1.8rem; font-weight:800;
  background:var(--gradient); -webkit-background-clip:text;
  -webkit-text-fill-color:transparent; background-clip:text;
}
.stat-label { font-size:0.75rem; color:var(--text-3); text-transform:uppercase; letter-spacing:0.05em; }

.mode-cards { display:flex; flex-direction:column; gap:16px; margin-bottom:28px; }

.mode-card {
  display:flex; align-items:center; gap:20px;
  padding:24px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--radius);
  cursor:pointer; text-align:left; color:var(--text);
  transition:all 0.3s ease; backdrop-filter:blur(12px); width:100%;
}
.mode-card:hover {
  background:var(--bg-card-hover); border-color:var(--border-accent);
  transform:translateY(-2px); box-shadow:0 12px 32px rgba(139,92,246,0.15);
}
.mode-card-official {
  background:linear-gradient(135deg,rgba(139,92,246,0.09),rgba(59,130,246,0.09));
  border-color:var(--border-accent);
}
.mode-icon { font-size:2rem; }
.mode-info { flex:1; }
.mode-info h3 { font-size:1.1rem; font-weight:700; margin-bottom:4px; }
.mode-info p  { font-size:0.875rem; color:var(--text-2); }
.mode-arrow { font-size:1.2rem; color:var(--text-3); transition:transform 0.2s; }
.mode-card:hover .mode-arrow { transform:translateX(5px); }

.welcome-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ===========================
   DOMAIN SELECT SCREEN
   =========================== */
#screen-domain { flex-direction:column; align-items:center; justify-content:center; }

.domain-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:16px; margin-bottom:28px;
}
.domain-card {
  display:flex; flex-direction:column; align-items:center;
  gap:10px; padding:24px 16px;
  background:var(--bg-card); border:2px solid var(--border);
  border-radius:var(--radius); cursor:pointer; color:var(--text);
  transition:all 0.3s ease; font-family:inherit; text-align:center;
}
.domain-card:hover { background:var(--bg-card-hover); border-color:var(--border-accent); transform:translateY(-2px); }
.domain-card.selected {
  border-color:var(--purple);
  background:rgba(139,92,246,0.1);
  box-shadow:0 0 24px rgba(139,92,246,0.2);
}
.domain-icon  { font-size:2rem; }
.domain-name  { font-size:0.9rem; font-weight:600; }
.domain-count { font-size:0.8rem; color:var(--text-3); }

/* ===========================
   LOADING SCREEN
   =========================== */
#screen-loading {
  flex-direction:column; align-items:center;
  justify-content:center; text-align:center; gap:24px;
}
.loading-content { display:flex; flex-direction:column; align-items:center; gap:12px; }
.loading-content h3 { font-size:1.25rem; font-weight:600; }
.loading-spinner {
  width:60px; height:60px;
  border:4px solid var(--border);
  border-top-color:var(--purple);
  border-radius:50%;
  animation:spin 0.8s linear infinite;
}

/* ===========================
   QUIZ SCREEN
   =========================== */
#screen-quiz { flex-direction:column; align-items:stretch; justify-content:flex-start; padding:0; }

.quiz-layout { display:flex; flex-direction:column; min-height:100vh; }

/* Top bar */
.quiz-topbar {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 24px;
  background:rgba(7,7,26,0.85);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(16px);
  position:sticky; top:0; z-index:100;
}
.quiz-progress-info {
  display:flex; align-items:center; gap:12px; font-weight:600; font-size:0.95rem;
}
.domain-badge {
  padding:4px 12px;
  background:rgba(139,92,246,0.15);
  border:1px solid rgba(139,92,246,0.3);
  border-radius:100px; font-size:0.75rem; color:var(--purple); font-weight:600;
}

/* Timer */
.timer-display {
  display:flex; align-items:center; gap:8px;
  padding:8px 16px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--radius-sm);
  font-size:1rem; font-weight:700;
  font-variant-numeric:tabular-nums;
  transition:color 0.3s, border-color 0.3s;
}
.timer-display.warning  { color:var(--yellow); border-color:rgba(245,158,11,0.5); }
.timer-display.danger   { color:var(--red); border-color:rgba(239,68,68,0.5); animation:pulse 1s ease-in-out infinite; }
.timer-display.hidden   { display:none; }

/* Progress bar */
.quiz-progress-bar { height:3px; background:var(--border); }
.quiz-progress-fill {
  height:100%; background:var(--gradient);
  border-radius:2px; transition:width 0.5s ease; width:0%;
}

/* Body */
.quiz-body {
  display:flex; gap:20px; padding:24px;
  max-width:1160px; margin:0 auto; width:100%; flex:1;
}

/* Question card */
.question-card {
  flex:1; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--radius);
  padding:32px; backdrop-filter:blur(12px);
  animation:fadeInUp 0.4s ease;
}

.question-meta {
  display:flex; align-items:center;
  justify-content:space-between; margin-bottom:20px;
}
.q-number-badge {
  display:inline-flex; align-items:center;
  padding:6px 14px; background:rgba(139,92,246,0.1);
  border:1px solid var(--border-accent); border-radius:100px;
  font-size:0.78rem; font-weight:600; color:var(--purple);
}
.btn-mark {
  background:transparent; border:1px solid var(--border);
  border-radius:var(--radius-sm); color:var(--text-3);
  padding:6px 12px; cursor:pointer; font-size:0.8rem;
  font-family:inherit; transition:all 0.2s;
}
.btn-mark.marked {
  background:var(--yellow-bg);
  border-color:rgba(245,158,11,0.5);
  color:var(--yellow);
}

.question-text {
  font-size:1.05rem; line-height:1.75;
  margin-bottom:26px; color:var(--text);
}

.multi-hint {
  display:inline-block; margin-bottom:14px;
  padding:4px 12px; background:rgba(59,130,246,0.12);
  border:1px solid rgba(59,130,246,0.3); border-radius:100px;
  font-size:0.78rem; color:var(--blue); font-weight:600;
}

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

.option-item {
  display:flex; align-items:flex-start; gap:14px;
  padding:16px 20px; background:rgba(255,255,255,0.025);
  border:1.5px solid var(--border); border-radius:var(--radius-sm);
  cursor:pointer; transition:all 0.25s ease; user-select:none;
}
.option-item:hover { background:var(--bg-card-hover); border-color:rgba(139,92,246,0.3); transform:translateX(4px); }
.option-item.selected { background:rgba(139,92,246,0.1); border-color:var(--purple); }
.option-item.correct  { background:var(--green-bg) !important; border-color:var(--green) !important; }
.option-item.incorrect{ background:var(--red-bg) !important; border-color:var(--red) !important; }
.option-item.disabled { cursor:default; pointer-events:none; }

.option-letter {
  width:32px; height:32px; border-radius:50%;
  background:var(--border); display:flex; align-items:center;
  justify-content:center; font-size:0.8rem; font-weight:700;
  flex-shrink:0; transition:background 0.2s;
}
.option-item.selected .option-letter { background:var(--purple); color:#fff; }
.option-item.correct .option-letter  { background:var(--green); color:#fff; }
.option-item.incorrect .option-letter{ background:var(--red); color:#fff; }

.option-text {
  font-size:0.95rem; line-height:1.55;
  color:var(--text-2); transition:color 0.2s;
}
.option-item:hover .option-text,
.option-item.selected .option-text { color:var(--text); }

/* Feedback */
.feedback-box {
  padding:16px 20px; border-radius:var(--radius-sm);
  margin-top:16px; animation:fadeInUp 0.3s ease;
  line-height:1.65; font-size:0.9rem;
}
.feedback-box.correct  { background:var(--green-bg); border:1px solid rgba(16,185,129,0.3); color:#6ee7b7; }
.feedback-box.incorrect{ background:var(--red-bg); border:1px solid rgba(239,68,68,0.3); color:#fca5a5; }
.feedback-box.hidden   { display:none; }

.question-actions { margin-bottom:16px; }

.nav-actions {
  display:flex; gap:12px; margin-top:20px; justify-content:flex-end;
}

/* ===========================
   QUESTION NAV PANEL
   =========================== */
.question-nav-panel {
  width:210px; flex-shrink:0;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px;
  height:fit-content; position:sticky; top:76px;
}
.nav-panel-title {
  font-size:0.75rem; font-weight:700; color:var(--text-3);
  text-transform:uppercase; letter-spacing:0.06em; margin-bottom:14px;
}
.nav-grid {
  display:grid; grid-template-columns:repeat(5,1fr);
  gap:5px; margin-bottom:14px;
}
.nav-btn {
  width:30px; height:30px; border-radius:7px;
  background:rgba(255,255,255,0.07); border:none;
  color:var(--text-3); font-size:0.72rem; font-weight:600;
  cursor:pointer; transition:all 0.2s; font-family:inherit;
}
.nav-btn:hover   { background:var(--bg-card-hover); color:var(--text); }
.nav-btn.answered{ background:rgba(16,185,129,0.2); color:var(--green); }
.nav-btn.wrong   { background:rgba(239,68,68,0.2); color:var(--red); }
.nav-btn.marked  { background:var(--yellow-bg); color:var(--yellow); }
.nav-btn.current { background:var(--gradient); color:#fff; }

.nav-legend { display:flex; flex-direction:column; gap:6px; }
.nav-legend-item { display:flex; align-items:center; gap:7px; font-size:0.72rem; color:var(--text-3); }
.nav-dot { width:12px; height:12px; border-radius:4px; flex-shrink:0; }
.nav-dot.nd-answered { background:rgba(16,185,129,0.5); }
.nav-dot.nd-marked   { background:rgba(245,158,11,0.5); }
.nav-dot.nd-current  { background:var(--purple); }

/* ===========================
   RESULTS SCREEN
   =========================== */
#screen-results {
  flex-direction:column; align-items:center; padding:40px 24px;
}
.results-container { max-width:820px; width:100%; animation:fadeInUp 0.5s ease; }

/* Score header */
.results-header {
  display:flex; gap:32px; align-items:center;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:32px; margin-bottom:24px; flex-wrap:wrap;
}
.score-circle { position:relative; width:144px; height:144px; flex-shrink:0; }
.score-ring { width:100%; height:100%; }
.score-ring-bg  { transition:none; }
.score-ring-fill{ transition:stroke-dashoffset 1.6s cubic-bezier(0.4,0,0.2,1); }
.score-inner {
  position:absolute; inset:0; display:flex;
  flex-direction:column; align-items:center; justify-content:center;
}
.score-pct {
  font-size:1.8rem; font-weight:800;
  background:var(--gradient);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.score-label-sm { font-size:0.72rem; color:var(--text-3); }

.results-summary { flex:1; }
.results-summary h2 { font-size:1.5rem; font-weight:700; margin-bottom:12px; }

.result-badge {
  display:inline-block; padding:6px 18px;
  border-radius:100px; font-size:0.9rem; font-weight:700;
  margin-bottom:12px;
}
.result-badge.approved { background:var(--green-bg); color:var(--green); border:1px solid rgba(16,185,129,0.3); }
.result-badge.failed   { background:var(--red-bg);   color:var(--red);   border:1px solid rgba(239,68,68,0.3); }

.results-detail, .results-time { font-size:0.875rem; color:var(--text-2); margin-top:4px; }

/* Cards */
.results-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:28px; margin-bottom:24px;
}
.card-title { font-size:1.05rem; font-weight:700; margin-bottom:20px; }

/* Domain bars */
.domain-bars { display:flex; flex-direction:column; gap:18px; }
.domain-bar-item { display:flex; flex-direction:column; gap:7px; }
.domain-bar-header { display:flex; justify-content:space-between; align-items:center; }
.domain-bar-label { font-size:0.875rem; font-weight:500; }
.domain-bar-pct   { font-size:0.875rem; color:var(--text-2); }
.domain-bar-track { height:10px; background:var(--border); border-radius:100px; overflow:hidden; }
.domain-bar-fill  { height:100%; border-radius:100px; transition:width 1s ease 0.3s; }
.domain-bar-fill.low  { background:var(--red); }
.domain-bar-fill.mid  { background:var(--yellow); }
.domain-bar-fill.high { background:var(--green); }

/* Review */
.review-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:20px; flex-wrap:wrap; gap:12px;
}
.review-filters { display:flex; gap:8px; }
.filter-btn {
  padding:6px 14px; background:transparent; border:1px solid var(--border);
  border-radius:100px; color:var(--text-3); cursor:pointer;
  font-size:0.8rem; font-family:inherit; transition:all 0.2s;
}
.filter-btn.active { background:var(--gradient); border-color:transparent; color:#fff; font-weight:600; }

.review-item {
  background:rgba(255,255,255,0.02); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:16px 20px;
  margin-bottom:10px; cursor:pointer; transition:all 0.2s;
}
.review-item:hover { background:var(--bg-card-hover); }

.review-item-header { display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.review-status-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.review-status-dot.correct   { background:var(--green); }
.review-status-dot.incorrect { background:var(--red); }
.review-q-num    { font-size:0.78rem; color:var(--text-3); }
.review-q-domain {
  font-size:0.72rem; padding:2px 9px;
  background:var(--border); border-radius:100px; color:var(--text-3);
}
.review-q-text { font-size:0.9rem; color:var(--text-2); line-height:1.5; }

.review-details { display:none; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); font-size:0.875rem; }
.review-details.open { display:block; animation:fadeIn 0.25s ease; }

.review-answer { display:flex; gap:8px; margin-bottom:6px; align-items:flex-start; }
.review-answer-label { font-weight:600; flex-shrink:0; min-width:80px; }
.review-answer-val.correct-answer { color:var(--green); }
.review-answer-val.wrong-answer   { color:var(--red); }

.review-explanation {
  margin-top:10px; padding:10px 14px;
  background:rgba(139,92,246,0.08);
  border-left:3px solid var(--purple);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  color:var(--text-2); line-height:1.6;
}

.results-actions {
  display:flex; gap:12px; flex-wrap:wrap;
  justify-content:center; padding-bottom:48px;
}

/* ===========================
   HISTORY SCREEN
   =========================== */
#screen-history { flex-direction:column; align-items:center; }

.history-list { display:flex; flex-direction:column; gap:14px; }
.history-item {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px 24px;
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  animation:fadeInUp 0.4s ease;
}
.history-score {
  font-size:1.8rem; font-weight:800; min-width:68px;
  background:var(--gradient); -webkit-background-clip:text;
  -webkit-text-fill-color:transparent; background-clip:text;
}
.history-info { flex:1; }
.history-info .h-mode   { font-size:0.78rem; color:var(--purple); margin-bottom:4px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; }
.history-info .h-detail { font-size:0.875rem; color:var(--text-2); }
.history-info .h-date   { font-size:0.78rem; color:var(--text-3); margin-top:2px; }
.history-badge { padding:4px 12px; border-radius:100px; font-size:0.8rem; font-weight:600; }
.history-badge.approved { background:var(--green-bg); color:var(--green); }
.history-badge.failed   { background:var(--red-bg);   color:var(--red); }

.no-history { text-align:center; color:var(--text-3); padding:60px 0; font-size:1rem; }

/* ===========================
   MODAL
   =========================== */
.modal {
  position:fixed; inset:0;
  background:rgba(0,0,0,0.72); backdrop-filter:blur(10px);
  display:flex; align-items:center; justify-content:center;
  z-index:999; animation:fadeIn 0.2s ease;
}
.modal.hidden { display:none; }
.modal-box {
  background:#12122a; border:1px solid var(--border-accent);
  border-radius:var(--radius); padding:36px;
  max-width:380px; width:90%; text-align:center;
  animation:scaleIn 0.25s ease;
}
.modal-box h3 { font-size:1.25rem; margin-bottom:12px; }
.modal-box p  { color:var(--text-2); margin-bottom:28px; }
.modal-actions { display:flex; gap:12px; justify-content:center; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width:900px) {
  .quiz-body { flex-direction:column; padding:16px; }
  .question-nav-panel { width:100%; position:static; }
  .nav-grid { grid-template-columns:repeat(8,1fr); }
}
@media (max-width:640px) {
  .quiz-topbar { padding:12px 16px; }
  .question-card { padding:20px 16px; }
  .domain-badge  { display:none; }
  .stats-row { gap:20px; }
  .results-header { flex-direction:column; text-align:center; }
  .score-circle { margin:0 auto; }
  .welcome-actions { flex-direction:column; }
  .mode-cards { gap:12px; }
  .timer-display span:last-child { font-size:0.9rem; }
}
@media (max-width:400px) {
  .welcome-title { font-size:1.8rem; }
  .question-text { font-size:0.95rem; }
  .option-text   { font-size:0.88rem; }
  .nav-grid { grid-template-columns:repeat(6,1fr); }
}
