/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --primary: #4361ee;
  --primary-dark: #3a0ca3;
  --success: #2dc653;
  --danger: #ef233c;
  --pass-grad: linear-gradient(135deg, #0d9e6e, #07c47e);
  --fail-grad: linear-gradient(135deg, #c1121f, #ef233c);
  --exam-grad: linear-gradient(135deg, #4361ee, #3a0ca3);
}

/* ── Backgrounds ────────────────────────────────────────────────────────── */
.register-bg {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.results-bg {
  background: #f0f4f8;
}

/* ── Register card header ────────────────────────────────────────────────── */
.card-header-exam {
  background: var(--exam-grad);
}

/* ── Info badges on register page ──────────────────────────────────────── */
.info-badge {
  padding: 8px 4px;
}
.info-badge .bi {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 4px;
}

/* ── Exam button ────────────────────────────────────────────────────────── */
.btn-exam {
  background: var(--exam-grad);
  border: none;
  color: #fff;
}
.btn-exam:hover {
  background: linear-gradient(135deg, #3a0ca3, #4361ee);
  color: #fff;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.exam-topbar {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  z-index: 100;
}

/* ── Timer ──────────────────────────────────────────────────────────────── */
.timer-box {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 4px 14px;
  color: #333;
  transition: all .4s;
}
.timer-warning { border-color: #ffc107 !important; color: #856404 !important; background: #fff8e1 !important; }
.timer-danger  { border-color: #dc3545 !important; color: #dc3545 !important; background: #fff0f0 !important; animation: pulse-timer 1s infinite; }

@keyframes pulse-timer {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}

/* ── Violation badge ─────────────────────────────────────────────────────── */
#violation-badge { transition: color .3s; }
#violation-badge.has-violations { color: #dc3545 !important; font-weight: 700; }

/* ── Results cards ───────────────────────────────────────────────────────── */
.result-header-pass { background: var(--pass-grad); }
.result-header-fail { background: var(--fail-grad); }

.score-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 4px solid rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.score-number {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

/* ── Question review ─────────────────────────────────────────────────────── */
.review-correct { background: #f0fff4; border: 1px solid #b7e4c7; }
.review-wrong   { background: #fff5f5; border: 1px solid #ffb3b3; }

/* ── Print styles ────────────────────────────────────────────────────────── */
@media print {
  .btn, nav, .navbar { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { background: white !important; }
}
