/* ========================================================
   AAOIFI MOCK EXAM SYSTEM — STYLESHEET
   Islamic Finance Certification Hub & Exam Simulator
   ======================================================== */

:root {
  --exam-primary: #05aa44;
  --exam-primary-dark: #03752e;
  --exam-primary-light: #ecfdf5;
  --exam-gold: #d97706;
  --exam-gold-light: #fef3c7;
  --exam-dark: #0f172a;
  --exam-dark-soft: #1e293b;
  --exam-text: #334155;
  --exam-text-muted: #64748b;
  --exam-bg-card: #ffffff;
  --exam-border: #e2e8f0;
  --exam-danger: #ef4444;
  --exam-danger-light: #fee2e2;
  --exam-radius: 16px;
  --exam-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --exam-shadow-lg: 0 20px 40px -10px rgba(5, 170, 68, 0.15);
}

/* ----------------------------------------------------
   1. HERO BANNER & CATALOG (aaoifi_index)
   ---------------------------------------------------- */
.exam-hero-section {
  background: linear-gradient(135deg, #071a27 0%, #0d2c40 50%, #082218 100%);
  color: #ffffff;
  padding: 65px 0 55px;
  position: relative;
  overflow: hidden;
}

.exam-hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(5, 170, 68, 0.22) 0%, rgba(5, 170, 68, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.exam-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 18px;
}

.exam-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #ffffff;
}

.exam-hero-title span {
  background: linear-gradient(90deg, #34d399, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.exam-hero-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.exam-hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 25px;
}

.exam-stat-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.exam-stat-chip i {
  font-size: 24px;
  color: #34d399;
}

.exam-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.exam-stat-lbl {
  font-size: 12px;
  color: #94a3b8;
}

/* ----------------------------------------------------
   2. CATEGORY TABS & EXAM CARDS
   ---------------------------------------------------- */
.exam-catalog-section {
  padding: 45px 0 70px;
  background: transparent !important;
}

.exam-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.exam-pill-btn {
  background: #ffffff;
  border: 1px solid var(--exam-border);
  color: var(--exam-text);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.exam-pill-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--exam-primary);
}

.exam-pill-btn.active {
  background: var(--exam-primary);
  border-color: var(--exam-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 170, 68, 0.35);
}

.exam-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.exam-card {
  background: #ffffff;
  border-radius: var(--exam-radius);
  border: 1px solid var(--exam-border);
  box-shadow: var(--exam-shadow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.exam-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--exam-shadow-lg);
  border-color: #86efac;
}

.exam-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.exam-card-badge {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-free {
  background: #ecfdf5;
  color: #05aa44;
  border: 1px solid #a7f3d0;
}

.badge-category {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
}

.exam-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--exam-dark);
  line-height: 1.35;
  margin-bottom: 10px;
}

.exam-card-desc {
  font-size: 13.5px;
  color: var(--exam-text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exam-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px dashed var(--exam-border);
  border-bottom: 1px dashed var(--exam-border);
  margin-bottom: 18px;
}

.exam-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--exam-text);
}

.exam-meta-item i {
  color: var(--exam-primary);
  font-size: 15px;
}

.exam-card-actions {
  display: flex;
  gap: 10px;
}

.btn-exam-start {
  flex: 1;
  background: linear-gradient(135deg, #05aa44 0%, #048b37 100%);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(5, 170, 68, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-exam-start:hover {
  background: linear-gradient(135deg, #048b37 0%, #036928 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(5, 170, 68, 0.35);
  transform: translateY(-1px);
}

/* ----------------------------------------------------
   3. EXAM ROOM & ANTI-CHEAT PROTECTION (aaoifi_take)
   ---------------------------------------------------- */
.exam-room-body {
  background: #f1f5f9;
  min-height: 100vh;
  position: relative;
}

/* Anti-copy & select prevention */
.exam-secure-protected {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* Watermark Overlay across entire test */
.exam-watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  opacity: 0.045;
  background-repeat: repeat;
  background-position: center;
}

/* Print protection */
@media print {
  body {
    display: none !important;
  }
}

/* Clean Exam Room — Hide site navbar, ticker, footer, mobile drawer and other distractions */
body.hide-site-nav .header-wrapper,
body.hide-site-footer .footer,
body.hide-site-footer .mobile-drawer,
body.hide-site-footer .mobile-drawer-backdrop,
body.page-aaoifi_take .header-wrapper,
body.page-aaoifi_take .footer,
body.page-aaoifi_take .mobile-drawer,
body.page-aaoifi_take .mobile-drawer-backdrop {
  display: none !important;
}

/* Exam Top Bar */
.exam-header-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--exam-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.exam-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
  min-width: 0;
}

.exam-header-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.exam-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--exam-dark);
  margin: 0;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.exam-header-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--exam-text-muted);
  white-space: nowrap;
}

/* Exam Header Controls (Fullscreen, Timer, Finish) */
.exam-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  row-gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-header-back, .btn-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1.5px solid var(--exam-border);
  border-radius: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-header-back:hover, .btn-header-action:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.badge-exam-mode {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-exam-mode.practice {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.badge-exam-mode.simulator {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Live Countdown Timer */
.exam-timer-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  padding: 8px 16px;
  border-radius: 10px;
  color: #dc2626;
  font-weight: 700;
  font-size: 15px;
  font-family: monospace, sans-serif;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.exam-timer-box.practice-mode {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #05aa44;
}

/* Exam Progress Bar */
.exam-progress-wrap {
  height: 4px;
  background: #e2e8f0;
  width: 100%;
}

.exam-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #05aa44, #10b981);
  width: 0%;
  transition: width 0.3s ease;
}

/* Exam Room Layout */
.exam-workspace {
  padding: 25px 0 50px;
}

.exam-grid-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 25px;
  align-items: start;
}

.exam-main-card {
  background: #ffffff;
  border-radius: var(--exam-radius);
  border: 1px solid var(--exam-border);
  box-shadow: var(--exam-shadow);
  padding: 32px;
}

.exam-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.exam-q-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--exam-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exam-standard-tag {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Scenario Box */
.exam-scenario-box {
  background: #f8fafc;
  border-left: 4px solid #05aa44;
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 18px;
  font-size: 14px;
  color: #475569;
  font-style: italic;
}

.exam-q-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--exam-dark);
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Radio Options Container */
.exam-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.exam-option-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exam-option-card:hover {
  border-color: #86efac;
  background: #f0fdf4;
}

.exam-option-card.selected {
  border-color: #05aa44;
  background: #ecfdf5;
  box-shadow: 0 4px 12px rgba(5, 170, 68, 0.15);
}

.exam-option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.exam-option-card.selected .exam-option-letter {
  background: #05aa44;
  color: #ffffff;
}

.exam-option-card.correct {
  border-color: #10b981 !important;
  background: #ecfdf5 !important;
}

.exam-option-card.correct .exam-option-letter {
  background: #10b981 !important;
  color: #ffffff !important;
}

.exam-option-card.wrong {
  border-color: #ef4444 !important;
  background: #fee2e2 !important;
}

.exam-option-card.wrong .exam-option-letter {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.exam-option-text {
  font-size: 15px;
  color: var(--exam-dark);
  line-height: 1.5;
  padding-top: 4px;
  flex: 1;
}

/* Practice Mode Explanation Box */
.practice-explanation-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 20px;
  margin-top: 25px;
  display: none;
}

.practice-explanation-box.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.practice-exp-title {
  font-weight: 700;
  font-size: 14px;
  color: #15803d;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.practice-exp-body {
  font-size: 13.5px;
  color: #166534;
  line-height: 1.6;
}

/* Bottom Navigation Controls */
.exam-q-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.btn-exam-nav {
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--exam-border);
  background: #ffffff;
  color: var(--exam-text);
}

.btn-exam-nav:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-exam-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-exam-primary {
  background: #05aa44;
  border-color: #05aa44;
  color: #ffffff;
}

.btn-exam-primary:hover:not(:disabled) {
  background: #048b37;
  border-color: #048b37;
  color: #ffffff;
}

.btn-exam-finish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border: 1.5px solid #dc2626;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-exam-finish:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
}

.btn-exam-nav-finish {
  background: linear-gradient(135deg, #05aa44 0%, #048b37 100%) !important;
  border: 1.5px solid #05aa44 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(5, 170, 68, 0.35) !important;
  animation: pulseFinishSuccess 2s infinite ease-in-out;
  padding: 10px 22px !important;
  border-radius: 10px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-exam-nav-finish:hover {
  background: linear-gradient(135deg, #06bc4c 0%, #05aa44 100%) !important;
  box-shadow: 0 6px 20px rgba(5, 170, 68, 0.55) !important;
  transform: translateY(-1px);
}

@keyframes pulseFinishSuccess {
  0% { transform: scale(1); box-shadow: 0 4px 14px rgba(5, 170, 68, 0.35); }
  50% { transform: scale(1.03); box-shadow: 0 6px 20px rgba(5, 170, 68, 0.55); }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(5, 170, 68, 0.35); }
}

/* ========================================================
   FULLSCREEN MODAL OVERLAYS (Security Warning & Finish Modal)
   ======================================================== */
.exam-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: rgba(11, 23, 38, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeInModal 0.25s ease forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.exam-modal-box {
  width: 100%;
  max-width: 480px;
  border-radius: 22px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  animation: scaleUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUpModal {
  from { transform: scale(0.92) translateY(12px); }
  to { transform: scale(1) translateY(0); }
}

.exam-modal-warning-box {
  background: #0f172a;
  border: 2px solid #ef4444;
  padding: 34px 28px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(239, 68, 68, 0.25);
}

.exam-modal-finish-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
}

/* Sidebar Question Palette */
.exam-palette-card {
  background: #ffffff;
  border-radius: var(--exam-radius);
  border: 1px solid var(--exam-border);
  box-shadow: var(--exam-shadow);
  padding: 22px;
  position: sticky;
  top: 85px;
}

.exam-palette-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--exam-dark);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exam-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.exam-palette-btn {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--exam-border);
  background: #f8fafc;
  color: var(--exam-text);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exam-palette-btn:hover {
  border-color: var(--exam-primary);
  color: var(--exam-primary);
}

.exam-palette-btn.current {
  border-color: #05aa44;
  background: #ecfdf5;
  color: #05aa44;
  font-weight: 700;
  outline: 2px solid #05aa44;
}

.exam-palette-btn.answered {
  background: #05aa44;
  border-color: #05aa44;
  color: #ffffff;
}

.exam-palette-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--exam-text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ----------------------------------------------------
   4. RESULTS SCREEN (aaoifi_result)
   ---------------------------------------------------- */
.exam-result-hero {
  background: #ffffff;
  border-radius: var(--exam-radius);
  border: 1px solid var(--exam-border);
  box-shadow: var(--exam-shadow);
  padding: 40px;
  text-align: center;
  margin-bottom: 30px;
}

.result-circle-badge {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.result-circle-badge.passed {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 4px solid #05aa44;
  color: #05aa44;
}

.result-circle-badge.failed {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 4px solid #f43f5e;
  color: #e11d48;
}

.result-score-percent {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.result-score-lbl {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.result-status-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.result-status-title.passed {
  color: #05aa44;
}

.result-status-title.failed {
  color: #e11d48;
}

.result-summary-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 25px 0 30px;
}

.res-stat-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 22px;
  min-width: 140px;
}

.res-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--exam-dark);
}

.res-stat-lbl {
  font-size: 12px;
  color: var(--exam-text-muted);
}

/* Topic Breakdown Progress */
.topic-breakdown-card {
  background: #ffffff;
  border-radius: var(--exam-radius);
  border: 1px solid var(--exam-border);
  box-shadow: var(--exam-shadow);
  padding: 28px;
  margin-bottom: 30px;
}

.topic-item {
  margin-bottom: 16px;
}

.topic-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.topic-bar-bg {
  height: 8px;
  background: #f1f5f9;
  border-radius: 50px;
  overflow: hidden;
}

.topic-bar-fill {
  height: 100%;
  border-radius: 50px;
  background: #05aa44;
}

/* Questions Review Accordion */
.review-q-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--exam-border);
  padding: 20px;
  margin-bottom: 16px;
}

.review-q-card.correct {
  border-left: 4px solid #05aa44;
}

.review-q-card.wrong {
  border-left: 4px solid #ef4444;
}

.review-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .exam-grid-layout {
    grid-template-columns: 1fr;
  }
  .exam-palette-card {
    position: static;
  }
  .exam-hero-title {
    font-size: 2rem;
  }
  .exam-header-inner {
    flex-wrap: wrap;
    gap: 14px;
  }
  .exam-header-title-box {
    flex: 1 1 100%;
    min-width: 0;
  }
  .exam-header-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    row-gap: 12px;
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .exam-main-card {
    padding: 20px 14px;
  }
  .exam-hero-section {
    padding: 40px 0 35px;
  }
  .exam-hero-title {
    font-size: 1.6rem;
  }
  .exam-hero-stats-row {
    gap: 10px;
  }
  .exam-stat-chip {
    padding: 8px 12px;
    width: 100%;
  }
  .exam-cards-grid {
    grid-template-columns: 1fr;
  }
  .exam-header-controls {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    row-gap: 12px;
    margin-left: 0;
  }
  .exam-timer-box {
    padding: 7px 12px;
    font-size: 13.5px;
  }
  .btn-exam-finish {
    padding: 7px 14px;
    font-size: 13px;
  }
  .exam-q-nav-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .exam-q-nav-bar .btn-exam-nav {
    width: 100%;
    justify-content: center;
  }
}
