/* ── Variables ─────────────────────────────────────────────── */
:root {
  --dk-red: #C60C30;
  --dk-red-dark: #a00a27;
  --dk-white: #ffffff;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
}

body { background-color: var(--bg); }

/* ── Navbar ────────────────────────────────────────────────── */
.bg-dk-red { background-color: var(--dk-red) !important; }
.text-dk-red { color: var(--dk-red) !important; }
.btn-dk-red {
  background-color: var(--dk-red);
  color: white;
  border: none;
}
.btn-dk-red:hover, .btn-dk-red:focus {
  background-color: var(--dk-red-dark);
  color: white;
}

/* ── Index page ─────────────────────────────────────────────── */
.dk-flag-hero { font-size: 4rem; }
.stat-pill {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ── Exam cards ─────────────────────────────────────────────── */
.exam-card {
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.exam-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12) !important;
}

/* ── Test page ──────────────────────────────────────────────── */
.test-header { z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

.timer-display {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--dk-red);
  background: #fff0f3;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #ffccd5;
}

.question-card {
  transition: box-shadow .15s;
}
.question-card:target, .question-card.active {
  box-shadow: 0 0 0 3px var(--dk-red) !important;
}
.question-card.answered {
  border-left: 4px solid #198754 !important;
}

.question-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--dk-red);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: .85rem;
  flex-shrink: 0;
}

.question-text { font-size: 1.05rem; color: #1a1a1a; }

.option-label {
  cursor: pointer;
  border: 2px solid #e9ecef;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.option-label:hover {
  border-color: var(--dk-red);
  background: #fff5f7;
}
.option-label:has(input:checked) {
  border-color: var(--dk-red);
  background: #fff0f3;
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e9ecef;
  border-radius: 50%;
  font-weight: bold;
  font-size: .8rem;
  flex-shrink: 0;
}
.option-label:has(input:checked) .option-letter {
  background: var(--dk-red);
  color: white;
}

/* ── Results page ───────────────────────────────────────────── */
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 6px solid #dee2e6;
}
.score-circle.passed { border-color: #198754; background: #d1e7dd; }
.score-circle.failed { border-color: #dc3545; background: #f8d7da; }
.score-num { font-size: 1.6rem; font-weight: bold; line-height: 1; }
.score-pct { font-size: .9rem; color: #666; }

.result-row.correct { border-left: 4px solid #198754 !important; }
.result-row.wrong   { border-left: 4px solid #dc3545 !important; }

/* ── Stats page ─────────────────────────────────────────────── */
.stat-card {
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ── Pending answer (countdown running) ────────────────────── */
.question-card.pending {
  border-left: 4px solid #ffc107 !important;
}

/* ── Locked answer ──────────────────────────────────────────── */
.question-card.locked .option-label {
  cursor: not-allowed;
  pointer-events: none;
}
.question-card.locked .option-label:not(:has(input:checked)) {
  opacity: 0.45;
}
.question-card.locked .option-label:has(input:checked) {
  border-color: var(--dk-red);
  background: #fff0f3;
  box-shadow: 0 0 0 2px rgba(198,12,48,.25);
}
.question-card.locked .option-label:has(input:checked) .option-letter {
  background: var(--dk-red);
  color: white;
}

/* ── Help context ───────────────────────────────────────────── */
.help-context .bg-warning { border-radius: 8px; }

/* ── Footer ─────────────────────────────────────────────────── */
footer { margin-top: auto; }
