/* ============================================================
   Chemistry Made Easy — Exam Mode Styles
   ============================================================ */

/* ── Exam Practice Hub — CTA Card ────────────────────────────── */

.exam-mode-card {
  background: var(--color-glass-card-bg, rgba(255,255,255,0.7));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-glass-card-border, rgba(255,255,255,0.3));
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.exam-mode-card::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(20,184,166,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.exam-mode-card::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.exam-mode-card__icon {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.exam-mode-card__title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--color-navy, #0f172a);
  letter-spacing: -0.02em;
}

.exam-mode-card__desc {
  color: #64748b;
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.exam-mode-card__subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0.75rem auto 0;
  text-align: center;
  letter-spacing: 0.02em;
}

.exam-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  border: none;
  padding: 0.9rem 2.2rem;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(20,184,166,0.35);
  font-family: inherit;
}

.exam-mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(20,184,166,0.45);
}

.exam-mode-btn svg {
  width: 18px;
  height: 18px;
}


/* ── Exam Practice Hub — Sticky Nav Tabs ─────────────────────── */

.exam-hub-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  position: sticky;
  top: 5rem;
  z-index: 50;
  padding: 0.5rem;
  background: rgba(241,245,249,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 2.5rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(15,23,42,0.06);
}

.exam-hub-tab {
  padding: 0.65rem 1.5rem;
  border-radius: 2rem;
  background: transparent;
  border: none;
  color: #64748b;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.exam-hub-tab:hover {
  color: var(--color-navy, #0f172a);
  background: rgba(255,255,255,0.6);
}

.exam-hub-tab.active {
  background: var(--color-navy, #0f172a);
  color: #fff;
  box-shadow: 0 2px 10px rgba(15,23,42,0.2);
}


/* ── Exam Practice Hub — Section Headers ─────────────────────── */

.exam-section-header {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.exam-section-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 4px;
  border-radius: 2px;
}

.exam-section-header--aqa::before {
  background: var(--color-blue, #3b82f6);
}

.exam-section-header--ib::before {
  background: var(--color-purple, #8b5cf6);
}

.exam-section-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.04);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.5rem;
}

.ib-sub-header {
  display: inline-block;
  background: rgba(139,92,246,0.1);
  color: #7c3aed;
  padding: 0.25rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ── Exam Practice Hub — Topic Cards ─────────────────────────── */

.exam-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.exam-topic-card {
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: var(--radius-lg, 1rem);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.exam-topic-card:hover {
  border-color: var(--color-teal, #14b8a6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.exam-topic-card::after {
  content: '\2192';
  position: absolute;
  right: 1rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s;
  color: var(--color-teal, #14b8a6);
  font-weight: bold;
}

.exam-topic-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.exam-topic-card:hover .exam-topic-text {
  transform: translateX(-5px);
}

.exam-topic-text {
  transition: transform 0.2s;
  flex: 1;
}

.exam-topic-number {
  font-weight: 800;
  color: var(--color-teal, #14b8a6);
  font-size: 1.15rem;
  width: 2.2rem;
  flex-shrink: 0;
}

.exam-topic-title {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
}

.exam-topic-title strong {
  color: var(--color-navy, #0f172a);
}

.exam-topic-count {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
  margin-top: 0.25rem;
}


/* ── Exam Practice Hub — Back to Top ─────────────────────────── */

.exam-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-navy, #0f172a);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 40;
}

.exam-back-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.exam-back-top:hover {
  background: var(--color-teal, #14b8a6);
  transform: translateY(-2px);
}


/* ── Exam Practice Hub — Dark Mode ───────────────────────────── */

[data-theme="dark"] .exam-mode-card {
  background: rgba(30,41,59,0.6);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

[data-theme="dark"] .exam-mode-card__title {
  color: #e2e8f0;
}

[data-theme="dark"] .exam-mode-card__desc {
  color: #94a3b8;
}

[data-theme="dark"] .exam-hub-nav {
  background: rgba(15,23,42,0.85);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .exam-hub-tab {
  color: #94a3b8;
}

[data-theme="dark"] .exam-hub-tab:hover {
  color: #e2e8f0;
  background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .exam-hub-tab.active {
  background: #38bdf8;
  color: #0f172a;
}

[data-theme="dark"] .exam-section-meta {
  background: rgba(255,255,255,0.05);
  color: #94a3b8;
}

[data-theme="dark"] .ib-sub-header {
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
}

[data-theme="dark"] .exam-topic-card {
  background: rgba(30,41,59,0.6);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .exam-topic-card:hover {
  border-color: rgba(45,212,191,0.5);
  background: rgba(30,41,59,0.8);
}

[data-theme="dark"] .exam-topic-title strong {
  color: #e2e8f0;
}

/* ── Start Banner ────────────────────────────────────────────── */

.exam-mode-start {
  max-width: 680px;
  margin: 1.5rem auto;
  background: var(--color-glass-card-bg, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-glass-card-border, rgba(255, 255, 255, 0.3));
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.exam-mode-start__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exam-mode-start__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(13, 148, 136, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #14b8a6;
  flex-shrink: 0;
}

.exam-mode-start__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.exam-mode-start__text strong {
  font-size: 1.05rem;
  color: var(--color-navy, #0f172a);
}

.exam-mode-start__text span {
  font-size: 0.82rem;
  color: var(--color-text-muted, #64748b);
}

.exam-mode-start__auth {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f59e0b;
  margin-top: 0.15rem;
}

.exam-mode-start__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  padding: 0.65rem 1.35rem;
  border-radius: 0.6rem;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
  transition: all 0.25s;
  white-space: nowrap;
  flex-shrink: 0;
}

.exam-mode-start__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(20, 184, 166, 0.4);
}

@media (max-width: 580px) {
  .exam-mode-start__inner { flex-wrap: wrap; }
  .exam-mode-start__btn { width: 100%; justify-content: center; }
}


/* ── Timer Bar (sticky top) ──────────────────────────────────── */

.exam-mode-timer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: linear-gradient(135deg, #0c1929, #0f2942);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.exam-mode-timer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.exam-mode-timer__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.exam-mode-timer__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exam-mode-timer__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.exam-mode-timer__time {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #5eead4;
  letter-spacing: 0.02em;
}

.exam-mode-timer__marks {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.exam-mode-timer__submit {
  background: #14b8a6;
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.exam-mode-timer__submit:hover {
  background: #0d9488;
  transform: scale(1.03);
}

/* Timer progress bar */
.exam-mode-timer__progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.exam-mode-timer__bar {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #5eead4);
  width: 0%;
  transition: width 1s linear;
}

/* Warning state (5 min left) */
.exam-mode-timer--warning .exam-mode-timer__time {
  color: #fbbf24;
}

.exam-mode-timer--warning .exam-mode-timer__bar {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Danger state (1 min left) */
.exam-mode-timer--danger .exam-mode-timer__time {
  color: #f87171;
  animation: examTimerPulse 1s ease-in-out infinite;
}

.exam-mode-timer--danger .exam-mode-timer__bar {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

@keyframes examTimerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Grading state — sits below navbar so nav stays interactive */
.exam-mode-timer--grading {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  top: var(--nav-height, 60px);
  z-index: 1050;
}

.exam-mode-timer__spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #818cf8;
  border-radius: 50%;
  animation: examSpin 0.8s linear infinite;
  display: inline-block;
}

@keyframes examSpin {
  to { transform: rotate(360deg); }
}

/* Results state — sits below navbar so nav is fully interactive */
.exam-mode-timer--results {
  background: linear-gradient(135deg, #0c1929, #0f2942);
  top: var(--nav-height, 60px);
  z-index: 1050;
}


/* ── Results scores in timer bar ─────────────────────────────── */

.exam-mode-results__score {
  font-size: 1.4rem;
  font-weight: 800;
}

.exam-mode-results__score--excellent { color: #10b981; }
.exam-mode-results__score--good      { color: #14b8a6; }
.exam-mode-results__score--needs-work { color: #fbbf24; }
.exam-mode-results__score--retry     { color: #f87171; }

.exam-mode-results__grade {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
}

.exam-mode-results__grade--excellent { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.exam-mode-results__grade--good      { background: rgba(20, 184, 166, 0.15); color: #5eead4; }
.exam-mode-results__grade--needs-work { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.exam-mode-results__grade--retry     { background: rgba(248, 113, 113, 0.15); color: #f87171; }


/* ── Answer textareas (injected during exam) ─────────────────── */

.exam-mode-answer {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--color-border, #e2e8f0);
  border-radius: 0.6rem;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.6;
  resize: vertical;
  margin: 0.75rem 0;
  background: var(--color-surface-raised, #fff);
  color: var(--color-navy, #0f172a);
  transition: border-color 0.25s;
}

.exam-mode-answer:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.exam-mode-answer--locked {
  background: var(--color-surface-sunken, #f1f5f9);
  opacity: 0.7;
  cursor: not-allowed;
}


/* ── Per-question feedback (after grading) ───────────────────── */

.exam-mode-feedback {
  margin: 0.5rem 0 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 0.6rem;
  border-left: 4px solid #94a3b8;
  background: var(--color-surface-sunken, #f8fafc);
}

.exam-mode-feedback__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.exam-mode-feedback__score {
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
}

.exam-mode-feedback__text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text, #334155);
}

.exam-mode-feedback__text strong {
  color: var(--color-navy, #0f172a);
}

/* Grade colours */
.exam-mode-feedback--great {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}
.exam-mode-feedback--great .exam-mode-feedback__score {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.exam-mode-feedback--ok {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}
.exam-mode-feedback--ok .exam-mode-feedback__score {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.exam-mode-feedback--poor {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
.exam-mode-feedback--poor .exam-mode-feedback__score {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}


/* ── Body class adjustments ──────────────────────────────────── */

/* Push content down when timer is visible */
.exam-mode-active {
  padding-top: 60px !important;
}

.exam-mode-active .navbar {
  top: 55px;
}

/* Hide answer lines during exam mode (replaced by textareas) */
.exam-mode-active .ib-exam-q__answer-lines,
.exam-mode-active .aqa-exam-q__answer-lines {
  display: none;
}

/* Results state: push content below both navbar + results bar */
.exam-mode-results-active {
  padding-top: 120px !important;
}

/* ── MCQ selection during exam (no correct/incorrect reveal) ── */

.exam-mode-mcq--selected {
  border-color: #14b8a6 !important;
  background: rgba(20, 184, 166, 0.08) !important;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.25);
  color: var(--color-navy, #0f172a) !important;
}

/* Locked MCQ: greyed out, no pointer */
.exam-mode-mcq--locked {
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none;
}

.exam-mode-mcq--locked.exam-mode-mcq--selected {
  opacity: 1;
}

/* Lock indicator tag */
.exam-mode-lock-tag {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #14b8a6;
  margin-top: 0.5rem;
  padding: 0.3rem 0.6rem;
  background: rgba(20, 184, 166, 0.06);
  border-radius: 6px;
  width: fit-content;
}

/* ── Answer wrapper ──────────────────────────────────────────── */

.exam-mode-answer-wrap {
  margin: 0.75rem 0;
}

.exam-mode-answer-wrap .exam-mode-answer {
  margin: 0 0 0.5rem;
}

/* ── Lock Answer button ──────────────────────────────────────── */

.exam-mode-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-surface-raised, #fff);
  color: var(--color-text-muted, #64748b);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.exam-mode-lock-btn:hover {
  border-color: #14b8a6;
  color: #14b8a6;
  background: rgba(20, 184, 166, 0.04);
}

.exam-mode-lock-btn--done {
  background: rgba(20, 184, 166, 0.08) !important;
  border-color: #14b8a6 !important;
  color: #0d9488 !important;
  cursor: default !important;
  pointer-events: none;
}

/* ── Results breakdown text ──────────────────────────────────── */

.exam-mode-results__breakdown {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 0.75rem;
  margin-left: 0.25rem;
}


/* ── Dark mode ───────────────────────────────────────────────── */

[data-theme="dark"] .exam-mode-start {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .exam-mode-start__text strong {
  color: #e2e8f0;
}

[data-theme="dark"] .exam-mode-answer {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .exam-mode-feedback {
  background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .exam-mode-feedback__text {
  color: #cbd5e1;
}

[data-theme="dark"] .exam-mode-feedback__text strong {
  color: #e2e8f0;
}


/* ── Submit Confirmation Modal ───────────────────────────────── */

.exam-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.exam-modal-overlay--visible {
  opacity: 1;
}

.exam-modal {
  background: var(--color-glass-card-bg, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-glass-card-border, rgba(255, 255, 255, 0.3));
  border-radius: 1.25rem;
  padding: 2rem 2.25rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.95) translateY(8px);
  transition: transform 0.2s ease;
}

.exam-modal-overlay--visible .exam-modal {
  transform: scale(1) translateY(0);
}

.exam-modal__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 88, 12, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #f59e0b;
}

.exam-modal__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-navy, #0f172a);
  margin: 0 0 0.5rem;
}

.exam-modal__text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-text-muted, #64748b);
  margin: 0 0 1.5rem;
}

.exam-modal__text strong {
  color: var(--color-navy, #0f172a);
}

.exam-modal__actions {
  display: flex;
  gap: 0.75rem;
}

.exam-modal__btn {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.exam-modal__btn--cancel {
  background: var(--color-surface-sunken, #f1f5f9);
  color: var(--color-text-muted, #64748b);
  border: 1px solid var(--color-border, #e2e8f0);
}

.exam-modal__btn--cancel:hover {
  background: var(--color-surface-raised, #e2e8f0);
  color: var(--color-navy, #0f172a);
}

.exam-modal__btn--submit {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.exam-modal__btn--submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

/* Dark mode */
[data-theme="dark"] .exam-modal {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .exam-modal__title {
  color: #e2e8f0;
}

[data-theme="dark"] .exam-modal__text strong {
  color: #e2e8f0;
}

[data-theme="dark"] .exam-modal__btn--cancel {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}


/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 640px) {
  .exam-mode-timer__inner {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .exam-mode-timer__time {
    font-size: 1.2rem;
  }

  .exam-mode-timer__marks {
    display: none;
  }

  .exam-mode-results__score {
    font-size: 1.15rem;
  }

  .exam-mode-active,
  .exam-mode-results-active {
    padding-top: 100px !important;
  }

  .exam-modal {
    padding: 1.5rem;
  }

  .exam-modal__actions {
    flex-direction: column;
  }

  /* Hub responsive */
  .exam-mode-card {
    padding: 2rem 1.5rem;
  }

  .exam-mode-card__title {
    font-size: 1.4rem;
  }

  .exam-hub-nav {
    display: none;
  }

  .exam-topic-grid {
    grid-template-columns: 1fr;
  }
}
