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

/* --- CUSTOM PROPERTIES (THEMING) --- */
:root {
  /* Dark Theme (Default) */
  --bg-color: #08111e;
  --bg-gradient: radial-gradient(circle at top right, #0d203d, #060b13);
  --panel-bg: rgba(13, 27, 49, 0.65);
  --panel-border: rgba(100, 210, 255, 0.12);
  --panel-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary-color: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --accent-color: #00f5d4;
  
  --correct: #10b981;
  --correct-bg: rgba(16, 185, 129, 0.1);
  --correct-border: rgba(16, 185, 129, 0.3);
  
  --incorrect: #ef4444;
  --incorrect-bg: rgba(239, 68, 68, 0.1);
  --incorrect-border: rgba(239, 68, 68, 0.3);
  
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.3);
  
  --option-hover: rgba(56, 189, 248, 0.08);
  --option-selected: rgba(56, 189, 248, 0.18);
  --option-selected-border: #38bdf8;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --header-height: 70px;
  --card-radius: 16px;
}

[data-theme="light"] {
  /* Light Theme */
  --bg-color: #f1f5f9;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --panel-bg: rgba(255, 255, 255, 0.85);
  --panel-border: rgba(203, 213, 225, 0.8);
  --panel-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary-color: #0284c7;
  --primary-glow: rgba(2, 132, 199, 0.15);
  --accent-color: #0d9488;
  
  --correct: #059669;
  --correct-bg: rgba(5, 150, 105, 0.08);
  --correct-border: rgba(5, 150, 105, 0.25);
  
  --incorrect: #dc2626;
  --incorrect-bg: rgba(220, 38, 38, 0.08);
  --incorrect-border: rgba(220, 38, 38, 0.25);
  
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --warning-border: rgba(217, 119, 6, 0.25);
  
  --option-hover: rgba(2, 132, 199, 0.05);
  --option-selected: rgba(2, 132, 199, 0.1);
  --option-selected-border: #0284c7;
}

/* --- RESET & GENERAL --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  line-height: 1.25;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* --- GLASS CONTAINER LAYOUT --- */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--card-radius);
  box-shadow: var(--panel-shadow);
  padding: 24px;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

/* --- HEADER BAR --- */
header {
  height: var(--header-height);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(13, 27, 49, 0.4);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: 8px;
  color: #08111e;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 0 15px var(--primary-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
}

.btn-danger {
  background: var(--incorrect);
  color: white;
}
.btn-danger:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

/* --- CHIPS / BADGES --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-per { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-per-pnb { background: rgba(236, 72, 153, 0.15); color: #ec4899; border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-pnb { background: rgba(20, 184, 166, 0.15); color: #14b8a6; border: 1px solid rgba(20, 184, 166, 0.3); }
.badge-py { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-cy { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* --- MAIN CONTAINER --- */
main {
  flex: 1;
  padding: 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* --- VIEW CONTROLLER --- */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
  display: block;
}

/* --- DASHBOARD VIEW --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.welcome-banner {
  background: linear-gradient(135deg, rgba(13, 27, 49, 0.8) 0%, rgba(6, 40, 85, 0.6) 100%);
  border-radius: var(--card-radius);
  padding: 30px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--panel-border);
}

.welcome-info h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}
.welcome-info p {
  color: var(--text-secondary);
}

.compass-container {
  width: 100px;
  height: 100px;
  animation: spinSlow 30s linear infinite;
  opacity: 0.8;
}

/* Stats panel */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  text-align: center;
  padding: 20px;
}
.stat-card .value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
  font-family: 'Outfit', sans-serif;
  margin: 8px 0;
}
.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filters and Exam Cards */
.filters-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.select-input, .search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  min-width: 150px;
  transition: var(--transition-smooth);
}
.select-input:focus, .search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}
.search-input {
  flex: 1;
}

.exams-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.exam-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.exam-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.exam-card-meta {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exam-card-footer {
  margin-top: auto;
  display: flex;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
}

.exam-card-footer .btn {
  flex: 1;
}

/* History list */
.history-section {
  max-height: 600px;
  display: flex;
  flex-direction: column;
}
.history-title {
  font-size: 1.3rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
}

.history-item {
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}
.history-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.history-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-title-lbl {
  font-weight: 600;
  font-size: 0.95rem;
}
.history-time-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-score {
  text-align: right;
}
.score-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.score-passed { color: var(--correct); }
.score-failed { color: var(--incorrect); }

.history-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 2px;
}

/* --- EXAM INTRO VIEW --- */
.intro-container {
  max-width: 700px;
  margin: 0 auto;
}
.intro-header {
  text-align: center;
  margin-bottom: 30px;
}
.intro-header h2 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.rule-icon {
  color: var(--primary-color);
  font-size: 1.2rem;
  line-height: 1.2;
}

.mode-selector-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

@media (max-width: 600px) {
  .mode-selector-group {
    grid-template-columns: 1fr;
  }
}

.mode-card {
  padding: 24px;
  border-radius: 12px;
  border: 2px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.mode-card:hover {
  border-color: var(--primary-color);
  background: rgba(56, 189, 248, 0.04);
}
.mode-card.selected {
  border-color: var(--primary-color);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 15px var(--primary-glow);
}
.mode-card h3 {
  margin: 12px 0 8px 0;
  font-size: 1.15rem;
}
.mode-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.mode-icon {
  font-size: 2rem;
}

.intro-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

/* --- QUIZ PLAYER VIEW --- */
.quiz-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}

@media (max-width: 1024px) {
  .quiz-grid {
    grid-template-columns: 1fr;
  }
}

.quiz-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.exam-info-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
}
.timer-warn {
  color: var(--incorrect);
  animation: pulseTimer 1s infinite alternate;
}

.quiz-main-card {
  margin-bottom: 20px;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 24px;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition-smooth);
  outline: none;
}
.option-btn:hover {
  background: var(--option-hover);
  border-color: rgba(56, 189, 248, 0.4);
}
.option-btn.selected {
  background: var(--option-selected);
  border-color: var(--option-selected-border);
  box-shadow: 0 0 10px var(--primary-glow);
}

.option-marker {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
  border: 1px solid var(--panel-border);
  transition: var(--transition-smooth);
}
.option-btn.selected .option-marker {
  background: var(--primary-color);
  color: #08111e;
  border-color: var(--primary-color);
}

/* Practice feedback */
.option-btn.correct {
  background: var(--correct-bg);
  border-color: var(--correct);
}
.option-btn.correct .option-marker {
  background: var(--correct);
  color: #08111e;
  border-color: var(--correct);
}
.option-btn.incorrect {
  background: var(--incorrect-bg);
  border-color: var(--incorrect);
}
.option-btn.incorrect .option-marker {
  background: var(--incorrect);
  color: #ffffff;
  border-color: var(--incorrect);
}

.feedback-panel {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  display: none;
  animation: slideUp 0.3s ease-out;
}
.feedback-panel.active {
  display: block;
}
.feedback-panel.correct-fb {
  background: var(--correct-bg);
  border: 1px solid var(--correct-border);
}
.feedback-panel.incorrect-fb {
  background: var(--incorrect-bg);
  border: 1px solid var(--incorrect-border);
}
.feedback-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feedback-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quiz-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

/* Quiz Sidebar Navigator */
.quiz-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-grid-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nav-grid-title {
  font-size: 1.1rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-num-btn {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-num-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.nav-num-btn.active {
  border-color: var(--primary-color);
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
}
.nav-num-btn.answered {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.nav-num-btn.flagged {
  border-color: var(--warning);
}
.nav-num-btn.flagged::after {
  content: '🚩';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.65rem;
}
.nav-num-btn.correct {
  background: var(--correct-bg);
  border-color: var(--correct);
  color: var(--correct);
}
.nav-num-btn.incorrect {
  background: var(--incorrect-bg);
  border-color: var(--incorrect);
  color: var(--incorrect);
}

.flag-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}
.flag-btn.flagged {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning);
}

.submit-exam-box {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}
.submit-exam-box .btn {
  width: 100%;
}

/* --- RESULTS VIEW --- */
.results-container {
  max-width: 900px;
  margin: 0 auto;
}

.results-header-panel {
  text-align: center;
  padding: 40px;
  margin-bottom: 30px;
}

.results-badge-indicator {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.results-passed-badge {
  background: var(--correct-bg);
  color: var(--correct);
  border: 1px solid var(--correct-border);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}
.results-failed-badge {
  background: var(--incorrect-bg);
  color: var(--incorrect);
  border: 1px solid var(--incorrect-border);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.results-reason-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.circular-gauge-container {
  width: 160px;
  height: 160px;
  margin: 0 auto 20px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 10;
}

.gauge-progress {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440; /* 2 * pi * r = 2 * 3.14 * 70 = 440 */
  transition: stroke-dashoffset 1.5s ease-out;
}

.gauge-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gauge-score {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
}
.gauge-pct {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Results overview metrics */
.results-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .results-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.metric-box {
  text-align: center;
  padding: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.metric-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.metric-lbl {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Section checklist */
.sections-results-panel {
  margin-bottom: 30px;
}
.sections-results-title {
  font-size: 1.3rem;
  margin-bottom: 16px;
  font-weight: 600;
}
.sections-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-check-item {
  padding: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-check-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.section-check-name {
  font-weight: 600;
}
.section-check-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.section-check-status {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-check-stats {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}
.check-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.check-badge-ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--correct);
}
.check-badge-fail {
  background: rgba(239, 68, 68, 0.15);
  color: var(--incorrect);
}

/* Review details */
.review-exam-panel {
  margin-top: 30px;
}
.review-exam-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.review-questions-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-q-card {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.01);
}
.review-q-card.correct-q {
  border-left: 4px solid var(--correct);
}
.review-q-card.incorrect-q {
  border-left: 4px solid var(--incorrect);
}
.review-q-card.unanswered-q {
  border-left: 4px solid var(--warning);
}

.review-q-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 600;
}

.review-q-text {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 16px;
}

.review-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.review-opt {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-opt-marker {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.review-opt.selected-incorrect {
  background: var(--incorrect-bg);
  border-color: var(--incorrect);
}
.review-opt.selected-incorrect .review-opt-marker {
  background: var(--incorrect);
  color: white;
  border-color: var(--incorrect);
}
.review-opt.correct-opt {
  background: var(--correct-bg);
  border-color: var(--correct);
}
.review-opt.correct-opt .review-opt-marker {
  background: var(--correct);
  color: #08111e;
  border-color: var(--correct);
}

.review-explanation {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px dashed var(--panel-border);
  padding-top: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.review-explanation-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.results-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseTimer {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); text-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
}

@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toggle Switch */
.theme-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.theme-switch-icon {
  font-size: 1.2rem;
}

/* Exam Completion Badges & Cards */
.badge-passed {
  background: var(--correct-bg);
  color: var(--correct);
  border: 1px solid var(--correct-border);
}
.badge-failed {
  background: var(--incorrect-bg);
  color: var(--incorrect);
  border: 1px solid var(--incorrect-border);
}
.completed-exam-card {
  border-color: rgba(16, 185, 129, 0.25) !important;
}
.completed-exam-card:hover {
  border-color: var(--correct) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.08) !important;
}

/* --- PAGINATION CONTROLS --- */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-btn.active {
  background: var(--primary-color);
  color: #08111e;
  border-color: var(--primary-color);
  box-shadow: 0 0 12px var(--primary-glow);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 10px;
}
