/* ==========================================================================
   Modern Test & Exam Preparation Platform Design System
   Sleek Ed-Tech & Interactive Test Experience
   ========================================================================== */

:root {
  /* Brand & Theme Colors (Modern Indigo & Tech Palette) */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-ring: rgba(79, 70, 229, 0.25);
  
  --secondary: #6366f1;
  --accent: #0284c7;
  --accent-light: #e0f2fe;

  /* State Colors */
  --success: #10b981;
  --success-hover: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;

  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --info: #0ea5e9;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --info-text: #0369a1;

  /* Neutral Surface & Text */
  --dark: #0f172a;
  --slate: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --card-bg: #ffffff;
  --bg: #f8fafc;
  --surface-alt: #f1f5f9;

  /* Geometry & Elevation */
  --radius-xl: 18px;
  --radius: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgb(15 23 42 / 0.04);
  --shadow-sm: 0 1px 3px 0 rgb(15 23 42 / 0.08), 0 1px 2px -1px rgb(15 23 42 / 0.08);
  --shadow: 0 4px 6px -1px rgb(15 23 42 / 0.07), 0 2px 4px -2px rgb(15 23 42 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.04);
  --shadow-lg: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.06);

  /* Modern Font Stacks */
  --font-ui: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
  --font: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
}

/* Dark Mode Ready / Contrast Fixes */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg);
  color: var(--dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
  font-size: 16px;
}

/* Container */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.9;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
  flex-shrink: 0;
}

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

.nav-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

/* Audio & Tool Buttons */
.sound-toggle-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--slate);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.sound-toggle-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: white;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #3730a3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-outline {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--slate);
}
.btn-outline:hover {
  background: var(--surface-alt);
  color: var(--dark);
  border-color: var(--muted);
}

.btn-danger-outline {
  background: transparent;
  border-color: var(--danger-border);
  color: var(--danger);
}
.btn-danger-outline:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* ==========================================================================
   Hero Section (Index)
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e293b 100%);
  color: #ffffff;
  padding: 56px 0 48px;
  margin-bottom: 36px;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero p {
  color: #c7d2fe;
  font-size: 1.05rem;
  max-width: 680px;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s ease;
}

.stat-box:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.stat-box .number {
  font-size: 1.8rem;
  font-weight: 800;
  display: block;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.stat-box .label {
  font-size: 0.76rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================================================
   Topics Grid & Cards
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.topic-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  position: relative;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

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

.topic-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.topic-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-pink { background: #fce7f3; color: #be185d; }

.topic-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
  letter-spacing: -0.2px;
}

.topic-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-grow: 1;
  line-height: 1.55;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 16px;
  font-weight: 600;
}

.progress-wrapper {
  margin-bottom: 18px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.progress-bar-bg {
  height: 8px;
  background: var(--surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Topic Page Header & Navigation Tabs
   ========================================================================== */
.topic-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 20px;
  margin-bottom: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.topic-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.topic-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.4px;
}

.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -4px;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--dark);
  background: var(--surface-alt);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

.tab-content {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-content.active {
  display: block;
}

/* ==========================================================================
   High Quality Lecture Content (Konu Anlatımı)
   ========================================================================== */
.lecture-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.lecture-block {
  margin-bottom: 40px;
  position: relative;
}

.lecture-block:last-child {
  margin-bottom: 0;
}

.lecture-block h2 {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.lecture-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate);
  margin: 22px 0 10px;
  letter-spacing: -0.2px;
}

.lecture-block p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 14px;
  color: var(--slate);
}

/* Pedagogical Boxes: Formula, Tip, Alert, Algorithm */
.formula-box {
  background: linear-gradient(135deg, #f8fafc 0%, var(--primary-light) 100%);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 18px 0;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: #1e1b4b;
  font-weight: 600;
  line-height: 1.75;
  box-shadow: var(--shadow-xs);
}

.tip-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 0.95rem;
  color: #78350f;
  line-height: 1.65;
}

.tip-box strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.98rem;
  color: #92400e;
}

.alert-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 0.95rem;
  color: #991b1b;
  line-height: 1.65;
}

.alert-box strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.98rem;
  color: #b91c1c;
}

/* Soru Çözüm Algoritması Kartı */
.algorithm-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
}

.algorithm-box h4 {
  color: #166534;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.algorithm-steps {
  list-style: none;
  counter-reset: step-counter;
}

.algorithm-steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 32px;
  margin-bottom: 8px;
  color: #14532d;
  font-size: 0.93rem;
  line-height: 1.5;
}

.algorithm-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Karşılaştırmalı Hata Analizi Tablosu (Do / Don't) */
.comparison-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.comparison-table th {
  padding: 12px 16px;
  background: var(--surface-alt);
  color: var(--dark);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.5;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.wrong-item {
  color: var(--danger-text);
  background: rgba(239, 68, 68, 0.04);
}

.correct-item {
  color: var(--success-text);
  background: rgba(16, 185, 129, 0.04);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--dark);
}

.data-table tr:nth-child(even) {
  background: #fcfcfd;
}

/* Example Lists */
.example-list {
  list-style: none;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-list li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color 0.2s;
}

.example-list li:hover {
  border-color: #cbd5e1;
}

.example-en {
  display: block;
  font-weight: 700;
  color: var(--dark);
  font-size: 0.96rem;
  margin-bottom: 4px;
}

.example-tr {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.example-note {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* ==========================================================================
   TEST EXPERIENCE & TESTVARI UI (Exam HUD, Question Palette & Scoreboard)
   ========================================================================== */

/* Top Interactive Sticky HUD (Test Kontrol Paneli) */
.test-hud {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 76px;
  z-index: 80;
}

.test-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.test-hud-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hud-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-alt);
  color: var(--slate);
  border: 1px solid var(--border);
}

.hud-stat-pill.correct {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}

.hud-stat-pill.wrong {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.hud-stat-pill.accuracy {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(79, 70, 229, 0.2);
}

.test-hud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Question Filter Buttons */
.test-hud-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--slate);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--muted);
  color: var(--dark);
}

.filter-btn.active {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

/* Soru Navigasyon Matrisi (Question Palette Grid) */
.palette-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.palette-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding: 4px 0;
}

.palette-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--slate);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.palette-btn:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  color: var(--primary);
}

.palette-btn.correct {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.palette-btn.wrong {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.palette-btn.current {
  box-shadow: 0 0 0 2px var(--primary);
}

/* Question Card Highlight on Jump */
@keyframes pulseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.q-jump-active {
  animation: pulseHighlight 1.5s ease-out;
  border-color: var(--primary) !important;
}

/* ==========================================================================
   Question Cards & Options
   ========================================================================== */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.question-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  scroll-margin-top: 140px;
}

.question-card.answered-correct {
  border-color: var(--success);
}

.question-card.answered-incorrect {
  border-color: var(--danger);
}

.q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.q-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-num {
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--dark);
  color: white;
  padding: 4px 11px;
  border-radius: 6px;
  letter-spacing: -0.2px;
}

.q-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--slate);
}

.q-tag.past-exam {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.q-tag.practice {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.q-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-hint-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.q-hint-toggle-btn:hover {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.q-hint-drawer {
  display: none;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

.q-hint-drawer.open {
  display: block;
}

.q-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 22px;
  line-height: 1.6;
  letter-spacing: -0.2px;
}

.q-text .blank {
  display: inline-block;
  min-width: 68px;
  border-bottom: 2.5px dashed var(--primary);
  text-align: center;
  color: var(--primary);
  font-weight: 800;
  padding: 0 6px;
  margin: 0 4px;
}

/* Options Grid */
.q-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .q-options {
    grid-template-columns: 1fr 1fr;
  }
}

.option-btn {
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  position: relative;
}

.option-btn:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.option-left-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--slate);
  flex-shrink: 0;
  transition: all 0.15s;
}

.option-btn:hover:not(:disabled) .option-letter {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Option Strike-through (Eleme) Button */
.option-eliminate-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.option-eliminate-btn:hover {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fecaca;
}

/* Eliminated State */
.option-btn.eliminated {
  opacity: 0.38;
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  text-decoration: line-through;
}

.option-btn.eliminated .option-letter {
  background: #cbd5e1;
  color: #64748b;
  border-color: #94a3b8;
}

/* Option States on Answer */
.option-btn.correct {
  background: var(--success-bg) !important;
  border-color: var(--success) !important;
  color: var(--success-text) !important;
  font-weight: 700;
}

.option-btn.correct .option-letter {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.option-btn.wrong {
  background: var(--danger-bg) !important;
  border-color: var(--danger) !important;
  color: var(--danger-text) !important;
}

.option-btn.wrong .option-letter {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.option-btn:disabled {
  cursor: default;
}

/* Question Action Footer (Retry) */
.q-footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.q-retry-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--slate);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.q-retry-btn:hover {
  background: var(--card-bg);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   Question Explanation Box (Çözüm Analizi)
   ========================================================================== */
.q-explanation {
  background: #ffffff;
  border: 1px solid var(--success-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-top: 18px;
  animation: fadeIn 0.25s ease;
  box-shadow: var(--shadow-xs);
}

.q-explanation.wrong-exp {
  border-color: #fed7aa;
  background: #fffdfa;
}

.exp-header {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.exp-header.wrong-title {
  color: #d97706;
}

.exp-body {
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.7;
}

.exp-body p {
  margin-bottom: 10px;
}

.exp-translation {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: #1e293b;
  margin-top: 12px;
  border-left: 3.5px solid var(--primary);
  font-weight: 500;
}

/* Sınav Karnesi / Sonuç Kartı Modalı */
.exam-summary-card {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: white;
  border-radius: var(--radius-xl);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.exam-summary-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.summary-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.summary-score-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.summary-score-item .num {
  font-size: 1.75rem;
  font-weight: 800;
  display: block;
}

.summary-score-item .lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #cbd5e1;
  font-weight: 700;
}

/* ==========================================================================
   Modals & Toast
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  max-width: 440px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dark);
}

.modal-body {
  font-size: 0.94rem;
  color: var(--slate);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #0f172a;
  color: white;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 64px;
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
}

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

@media (max-width: 640px) {
  .test-hud {
    position: static;
  }
  .lecture-container {
    padding: 24px 20px;
  }
  .question-card {
    padding: 20px 18px;
  }
  .hero h1 {
    font-size: 1.7rem;
  }
}