/* ── Google Font ────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');

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

:root {
  --bg: #080b16;
  --bg2: #0f1525;
  --bg3: #1a2038;
  --border: #252d4a;
  --text: #e8ecff;
  --text2: #8090c0;
  --gold: #ffd700;
  --green: #4ade80;
  --red: #f87171;
  --purple: #c05af7;
  --blue: #4f8ef7;
  --radius: 16px;
  --radius-sm: 10px;
}

html, body { height: 100%; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overscroll-behavior: none;
  position: relative;
}

/* ── Animated starfield background ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #ffffff30 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, #ffffff25 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 10%, #ffffff20 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, #ffffff28 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 35%, #ffffff22 0%, transparent 100%),
    radial-gradient(2px 2px at 20% 85%, #4f8ef715 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 45%, #c05af715 0%, transparent 100%),
    radial-gradient(2px 2px at 90% 15%, #4ade8015 0%, transparent 100%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0%  { opacity: 0.6; }
  50% { opacity: 1; }
  100%{ opacity: 0.7; }
}

/* ── Screen Flash ───────────────────────────────────────────────────────────── */
.screen-flash {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; animation: flashFade 0.4s ease forwards;
}
.flash-correct { background: #4ade8030; }
.flash-wrong   { background: #f8717130; }
@keyframes flashFade { 0%{opacity:1} 100%{opacity:0} }

/* ── Screen Shake ───────────────────────────────────────────────────────────── */
@keyframes shake {
  0%,100%{ transform: translateX(0); }
  15%    { transform: translateX(-8px); }
  30%    { transform: translateX(8px); }
  45%    { transform: translateX(-6px); }
  60%    { transform: translateX(6px); }
  75%    { transform: translateX(-3px); }
  90%    { transform: translateX(3px); }
}
#app.shake { animation: shake 0.5s ease; }

/* ── Sound Controls ─────────────────────────────────────────────────────────── */
.sound-controls {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-bottom: 12px;
}
.sound-btn {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 999px; color: var(--text2);
  font-size: 12px; font-weight: 700; padding: 6px 12px;
  cursor: pointer; transition: all 0.2s;
}
.sound-btn:hover { border-color: var(--purple); color: var(--purple); }
.sound-btn.sound-off { opacity: 0.5; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  position: relative;
}

/* ── Home ──────────────────────────────────────────────────────────────────── */
.home-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
}

.hero-avatar {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 0 12px #4f8ef780);
  cursor: pointer;
  transition: transform 0.2s;
}
.hero-avatar:hover { transform: scale(1.1) rotate(-5deg); }

.hero-info { flex: 1; }
.hero-info h1 { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; }
.level-badge {
  font-size: 12px; color: var(--gold); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin: 4px 0;
}

.xp-bar-wrap {
  background: var(--bg3); border-radius: 999px;
  height: 8px; overflow: hidden; margin: 6px 0;
}
.xp-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #4f8ef7, #c05af7);
  transition: width 0.6s ease;
}
.xp-text { font-size: 11px; color: var(--text2); }

.streak-badge {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 12px; color: var(--gold); font-weight: 700;
}
.streak-fire { font-size: 22px; }

.date-bar {
  text-align: center; font-size: 13px; color: var(--text2);
  margin-bottom: 14px;
}

/* ── Recommended Card ──────────────────────────────────────────────────────── */
.rec-card {
  background: linear-gradient(135deg, #1a2040, #0d1528);
  border: 2px solid #4f8ef7;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px #4f8ef730;
}
.rec-card:hover { transform: translateY(-2px); box-shadow: 0 0 30px #4f8ef750; }
.rec-label { font-size: 11px; font-weight: 800; color: #4f8ef7; letter-spacing: 2px; text-transform: uppercase; }
.rec-subject { font-size: 20px; font-weight: 800; margin: 6px 0 4px; }
.rec-sub { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.btn-start {
  background: linear-gradient(90deg, #4f8ef7, #7c5af7);
  border: none; border-radius: 999px;
  color: white; font-weight: 800; font-size: 14px;
  padding: 10px 22px; cursor: pointer;
  transition: transform 0.15s;
}
.btn-start:hover { transform: scale(1.05); }

/* ── Section Title ─────────────────────────────────────────────────────────── */
.section-title {
  font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text2);
  margin: 18px 0 10px;
}

/* ── Exam Countdown ────────────────────────────────────────────────────────── */
.exam-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.exam-chip {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  min-width: 80px; text-align: center; flex-shrink: 0;
}
.exam-chip.soon { border-color: #f7a85a; background: #f7a85a10; }
.exam-chip.urgent { border-color: #f75a5a; background: #f75a5a15; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.7} }
.exam-days { font-size: 22px; font-weight: 900; color: var(--gold); }
.exam-date { font-size: 11px; color: var(--text2); margin: 2px 0; }
.exam-subs { font-size: 16px; }

/* ── Subject Grid ──────────────────────────────────────────────────────────── */
.subject-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 20px;
}
.subject-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  cursor: pointer; transition: transform 0.15s, border-color 0.15s;
  border-left: 3px solid var(--accent, #4f8ef7);
}
.subject-card:hover { transform: translateY(-2px); border-color: var(--accent, #4f8ef7); }
.sc-emoji { font-size: 26px; margin-bottom: 6px; }
.sc-name { font-size: 13px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.sc-bar-wrap { background: var(--bg3); border-radius: 999px; height: 5px; overflow: hidden; margin-bottom: 4px; }
.sc-bar { height: 100%; border-radius: 999px; transition: width 0.5s; }
.sc-meta { font-size: 11px; color: var(--text2); }

/* ── Subject View ──────────────────────────────────────────────────────────── */
.back-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; font-size: 14px;
  margin-bottom: 14px; font-weight: 600;
}
.sv-header {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid; border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.sv-emoji { font-size: 40px; }
.sv-header h2 { font-size: 20px; font-weight: 800; }
.sv-meta { font-size: 13px; color: var(--text2); margin-top: 4px; }

.btn-quick {
  width: 100%; background: linear-gradient(135deg, #4f8ef7, #7c5af7);
  border: none; border-radius: var(--radius);
  color: white; font-weight: 800; font-size: 16px;
  padding: 16px; cursor: pointer; margin-bottom: 8px;
  transition: transform 0.15s, opacity 0.15s;
}
.btn-quick:hover { transform: scale(1.02); }

.topic-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.topic-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  cursor: pointer; transition: background 0.15s;
}
.topic-row:hover { background: var(--bg3); }
.t-icon { font-size: 20px; }
.t-info { flex: 1; }
.t-name { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.t-bar-wrap { background: var(--bg3); border-radius: 999px; height: 4px; overflow: hidden; }
.t-bar { height: 100%; border-radius: 999px; transition: width 0.5s; }
.t-meta { font-size: 12px; color: var(--text2); white-space: nowrap; }

/* ── Quiz View ─────────────────────────────────────────────────────────────── */
.quiz-view { display: flex; flex-direction: column; min-height: 90vh; }

.quiz-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.back-btn-sm {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer;
  font-size: 16px; flex-shrink: 0; font-weight: 700;
}
.quiz-progress-bar {
  flex: 1; background: var(--bg3); border-radius: 999px;
  height: 8px; overflow: hidden;
}
.quiz-progress-bar div { height: 100%; border-radius: 999px; transition: width 0.4s; }
.quiz-count { font-size: 13px; color: var(--text2); white-space: nowrap; }

.combo-row {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 30px; margin-bottom: 10px;
}
.combo-badge {
  background: linear-gradient(90deg, #f75a5a, #f7a85a);
  border-radius: 999px; padding: 4px 12px;
  font-size: 13px; font-weight: 800;
  animation: comboPop 0.3s ease;
}
@keyframes comboPop { 0%{transform:scale(0.5)} 60%{transform:scale(1.15)} 100%{transform:scale(1)} }
.xp-earned { font-size: 13px; color: var(--gold); font-weight: 700; }

.question-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px;
}
.q-topic { font-size: 12px; color: var(--text2); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.q-text { font-size: 18px; font-weight: 700; line-height: 1.5; }

.options-grid { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 2px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  cursor: pointer; text-align: left; color: var(--text);
  font-size: 15px; transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.opt-btn:hover:not(:disabled) { border-color: #4f8ef7; background: #4f8ef710; }
.opt-btn:disabled { opacity: 0.6; cursor: default; }
.opt-letter {
  background: var(--bg3); border-radius: 6px;
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.opt-text { line-height: 1.4; }

/* ── Feedback Overlay ──────────────────────────────────────────────────────── */
.feedback-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: flex-end;
  z-index: 100; animation: slideUp 0.25s ease;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }

.feedback-overlay.correct { background: #4ade8015; }
.feedback-overlay.wrong { background: #f8717115; }

.feedback-content {
  width: 100%; max-width: 480px; margin: 0 auto;
  background: var(--bg2); border-top: 3px solid;
  padding: 24px 20px 32px;
}
.feedback-overlay.correct .feedback-content { border-color: var(--green); }
.feedback-overlay.wrong .feedback-content { border-color: var(--red); }

.feedback-icon { font-size: 36px; margin-bottom: 6px; }
.feedback-title { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.feedback-overlay.correct .feedback-title { color: var(--green); }
.feedback-overlay.wrong .feedback-title { color: var(--red); }
.feedback-xp { font-size: 16px; color: var(--gold); font-weight: 800; margin-bottom: 8px; }
.feedback-exp { font-size: 14px; color: var(--text2); line-height: 1.5; margin-bottom: 16px; }
.level-up-banner {
  background: linear-gradient(90deg, #ffd700, #f7a85a);
  color: #000; border-radius: var(--radius-sm);
  padding: 10px 14px; font-weight: 900; font-size: 15px;
  text-align: center; margin-bottom: 14px;
  animation: glow 0.5s ease;
}
@keyframes glow { 0%{box-shadow:0 0 0 #ffd700} 50%{box-shadow:0 0 30px #ffd700} 100%{box-shadow:0 0 0 #ffd700} }
.btn-next {
  width: 100%; background: linear-gradient(90deg, #4f8ef7, #7c5af7);
  border: none; border-radius: 999px;
  color: white; font-weight: 800; font-size: 16px;
  padding: 14px; cursor: pointer; font-family: inherit;
}

/* ── Results ───────────────────────────────────────────────────────────────── */
.results-view { display: flex; align-items: center; justify-content: center; min-height: 90vh; }
.results-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 20px;
  text-align: center; width: 100%;
}
.results-emoji { font-size: 56px; margin-bottom: 10px; }
.results-card h2 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.results-grade { font-size: 16px; color: var(--text2); margin-bottom: 18px; }
.score-ring { position: relative; width: 140px; height: 140px; margin: 0 auto 12px; }
.score-ring svg { width: 100%; height: 100%; }
.score-ring circle { transition: stroke-dashoffset 1s ease; }
.score-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900;
}
.results-xp { font-size: 18px; color: var(--gold); font-weight: 800; margin-bottom: 20px; }

.results-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.btn-retry, .btn-home, .btn-subject {
  border: none; border-radius: 999px;
  color: white; font-weight: 800; font-size: 14px;
  padding: 10px 20px; cursor: pointer; font-family: inherit;
}
.btn-retry { background: #f75a8e; }
.btn-home { background: #4f8ef7; }
.btn-subject { background: var(--bg3); border: 1px solid var(--border); }

.missed-section { border-top: 1px solid var(--border); padding-top: 16px; text-align: left; }
.missed-title { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.missed-tag {
  display: inline-block; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px; font-size: 12px; margin: 3px;
}

/* ── Star Particles ────────────────────────────────────────────────────────── */
.star-particle {
  position: fixed; font-size: 22px; pointer-events: none;
  animation: starFly 1.2s ease forwards; z-index: 200;
}
@keyframes starFly {
  0%  { transform: translateY(0) scale(1); opacity: 1; }
  100%{ transform: translateY(-120px) scale(0.3); opacity: 0; }
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Mock Exam Button ──────────────────────────────────────────────────────── */
.btn-mock-exam {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  gap: 4px; background: linear-gradient(135deg, #1a1040, #2a0d40);
  border: 2px solid #c05af7; border-radius: var(--radius);
  color: white; font-weight: 900; font-size: 17px;
  padding: 18px 16px; cursor: pointer; margin-bottom: 14px;
  font-family: inherit; letter-spacing: 0.5px;
  box-shadow: 0 0 24px #c05af730;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-mock-exam:hover { transform: translateY(-2px); box-shadow: 0 0 36px #c05af750; }
.mock-sub { font-size: 12px; color: #c5a8f7; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

/* ── Mock Exam View ────────────────────────────────────────────────────────── */
.mock-view { display: flex; flex-direction: column; min-height: 90vh; }

.mock-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.mock-title { flex: 1; text-align: center; font-size: 13px; font-weight: 800; color: #c05af7; text-transform: uppercase; letter-spacing: 2px; }
.mock-count { font-size: 13px; color: var(--text2); }

.mock-progress-wrap {
  background: var(--bg3); border-radius: 999px; height: 6px;
  overflow: hidden; margin-bottom: 14px;
}
.mock-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #c05af7, #7c5af7); transition: width 0.4s; }

.mock-section-badge {
  background: #c05af715; border: 1px solid #c05af740;
  border-radius: var(--radius-sm); padding: 8px 14px;
  font-size: 13px; font-weight: 800; color: #c5a8f7;
  margin-bottom: 12px; text-align: center;
}
.mock-question-card { border-color: #c05af740; }

/* ── Mock Exam Results ─────────────────────────────────────────────────────── */
.mock-results { padding-bottom: 32px; }

.mock-results-hero {
  text-align: center; padding: 28px 16px 20px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px;
}
.mr-icon { font-size: 56px; margin-bottom: 10px; }
.mock-results-hero h1 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.mr-grade { font-size: 16px; color: var(--text2); margin-bottom: 10px; }
.mr-score { font-size: 32px; font-weight: 900; margin-bottom: 4px; }
.mr-pct { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.mr-time { font-size: 13px; color: var(--text2); }

.mock-breakdown { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.breakdown-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
}
.br-emoji { font-size: 22px; }
.br-info { flex: 1; }
.br-name { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.br-bar-wrap { background: var(--bg3); border-radius: 999px; height: 5px; overflow: hidden; }
.br-bar { height: 100%; border-radius: 999px; transition: width 0.6s; }
.br-score { font-size: 15px; font-weight: 900; }

.mock-review-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.review-card {
  background: var(--bg2); border: 1px solid #f8717140;
  border-left: 3px solid var(--red); border-radius: var(--radius-sm);
  padding: 14px;
}
.rv-subject { font-size: 11px; color: var(--text2); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.rv-question { font-size: 14px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.rv-wrong { font-size: 13px; margin-bottom: 4px; }
.rv-wrong-text { color: var(--red); font-weight: 700; }
.rv-correct { font-size: 13px; margin-bottom: 6px; }
.rv-correct-text { color: var(--green); font-weight: 700; }
.rv-exp { font-size: 12px; color: var(--text2); line-height: 1.5; }

.mock-actions { display: flex; gap: 10px; }
.mock-btn-retry { flex:1; background: #c05af7; border:none; border-radius:999px; color:white; font-weight:800; font-size:14px; padding:14px; cursor:pointer; font-family:inherit; }
.mock-btn-home  { flex:1; background: #4f8ef7; border:none; border-radius:999px; color:white; font-weight:800; font-size:14px; padding:14px; cursor:pointer; font-family:inherit; }

/* ── Study Notes ───────────────────────────────────────────────────────────── */
.btn-study-notes {
  width: 100%; padding: 16px 20px; margin-bottom: 12px;
  background: linear-gradient(135deg, #1a2a4a 0%, #0f2240 100%);
  border: 2px solid #4f8ef7; border-radius: var(--radius);
  color: #7bb8ff; font-family: inherit; font-size: 16px; font-weight: 800;
  cursor: pointer; text-align: left; letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s ease;
}
.btn-study-notes:hover { background: linear-gradient(135deg, #1e3560 0%, #122a50 100%); border-color: #7bb8ff; color: #aad4ff; transform: translateY(-2px); }

.study-view {
  padding: 16px; max-width: 680px; margin: 0 auto;
  padding-bottom: 200px; /* room for sticky footer */
}
.study-header {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; margin-bottom: 20px;
  border: 1px solid; border-radius: var(--radius);
}
.study-header-emoji { font-size: 40px; line-height: 1; }
.study-header h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.study-subtitle { font-size: 13px; color: var(--text2); }

.study-sections { display: flex; flex-direction: column; gap: 14px; }

.study-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  animation: slideFadeIn 0.35s ease both;
}
@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.study-section-heading {
  padding: 12px 16px; font-size: 14px; font-weight: 800;
  letter-spacing: 0.3px; color: var(--text);
}
.study-points {
  list-style: none; padding: 0 16px 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.study-points li {
  font-size: 14px; color: var(--text); line-height: 1.55;
  padding-left: 18px; position: relative;
}
.study-points li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--blue); font-size: 11px; top: 3px;
}
.study-points b { color: #ffd700; font-weight: 700; }

.study-diagram {
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--border);
}
.study-diagram svg { width: 100%; height: auto; display: block; overflow: visible; }

.study-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  padding: 16px 16px 20px; text-align: center;
  z-index: 50;
}
.study-ready-text {
  font-size: 13px; color: var(--text2); margin-bottom: 10px; font-weight: 600;
}
.study-footer-btns { display: flex; gap: 10px; max-width: 680px; margin: 0 auto; }
.btn-start-quiz {
  flex: 2; padding: 15px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, #4ade80, #22c55e); color: #001a00;
  font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 16px #4ade8055;
}
.btn-start-quiz:hover { transform: translateY(-2px); box-shadow: 0 0 24px #4ade8088; }
.btn-back-topics {
  flex: 1; padding: 15px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg3); color: var(--text); font-family: inherit;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease;
}
.btn-back-topics:hover { background: var(--border); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .subject-grid { grid-template-columns: 1fr; }
  .q-text { font-size: 16px; }
}
