/* Eureka BLNST Mock Test — brand-adjacent styling */
:root {
  --eureka-primary: #0d5b8e;          /* deep teal-blue from logo */
  --eureka-primary-dark: #094370;
  --eureka-primary-light: #e7f1f8;
  --eureka-accent: #f39c1f;           /* warm amber accent */
  --eureka-accent-dark: #d4860d;
  --eureka-success: #22a06b;
  --eureka-danger: #d64545;
  --eureka-ink: #1a2633;
  --eureka-ink-soft: #4a5a6b;
  --eureka-muted: #8595a6;
  --eureka-bg: #f7f9fc;
  --eureka-surface: #ffffff;
  --eureka-border: #e3e8ef;
  --eureka-border-strong: #cfd6df;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 64, 0.06);
  --shadow: 0 4px 16px rgba(16, 40, 64, 0.08);
  --shadow-lg: 0 12px 40px rgba(16, 40, 64, 0.12);
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Montserrat', var(--font-body);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--eureka-bg);
  color: var(--eureka-ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: transparent;
  position: relative;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
}
.logo { height: 60px; width: auto; display: block; }
.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a {
  color: var(--eureka-ink-soft); text-decoration: none; font-weight: 600; font-size: 14px;
  font-family: var(--font-head); letter-spacing: 0.02em;
}
.site-nav a:hover { color: var(--eureka-primary); }
.lang-toggle {
  background: var(--eureka-primary); color: #fff; border: none;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  letter-spacing: 0.04em; transition: background 0.15s;
}
.lang-toggle:hover { background: var(--eureka-primary-dark); }
.lang-toggle:focus-visible { outline: 2px solid var(--eureka-accent); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--eureka-primary); color: #fff; padding: 10px 16px;
  font-weight: 700; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Typography */
h1, h2, h3 { font-family: var(--font-head); color: var(--eureka-ink); line-height: 1.25; }
h1 { font-size: 42px; font-weight: 800; margin: 8px 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 26px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.lead { font-size: 18px; color: var(--eureka-ink-soft); max-width: 680px; }
.muted { color: var(--eureka-muted); }
.small { font-size: 13px; }
.eyebrow {
  display: inline-block; background: var(--eureka-primary-light); color: var(--eureka-primary);
  padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 700;
  font-family: var(--font-head); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 16px;
}

/* Screens */
.screen { display: none; padding: 40px 0 80px; }
.screen.active { display: block; }
@media (max-width: 700px) {
  .screen { padding: 24px 0 60px; }
  h1 { font-size: 30px; }
  .lead { font-size: 16px; }
}

/* Start screen */
.hero { max-width: 760px; }
.rules-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 28px 0 32px;
}
@media (max-width: 700px) { .rules-grid { grid-template-columns: repeat(2, 1fr); } }
.rule-card {
  background: var(--eureka-surface); border: 1px solid var(--eureka-border);
  border-radius: var(--radius); padding: 18px 14px; text-align: center; box-shadow: var(--shadow-sm);
}
.rule-num {
  font-family: var(--font-head); font-weight: 800; font-size: 36px;
  color: var(--eureka-primary); line-height: 1;
}
.rule-num .unit { font-size: 18px; margin-left: 2px; }
.rule-label { font-size: 13px; color: var(--eureka-ink-soft); margin-top: 6px; font-weight: 600; }

.instructions {
  background: var(--eureka-primary-light); border-left: 4px solid var(--eureka-primary);
  padding: 18px 22px; border-radius: var(--radius); margin-bottom: 28px;
}
.instructions h3 { color: var(--eureka-primary); margin-top: 0; }
.instructions ul { margin: 0; padding-left: 20px; }
.instructions li { margin-bottom: 6px; color: var(--eureka-ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius); font-family: var(--font-head);
  font-weight: 700; font-size: 15px; cursor: pointer; border: 2px solid transparent;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-decoration: none; letter-spacing: 0.02em; line-height: 1;
}
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-primary { background: var(--eureka-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--eureka-primary-dark); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--eureka-primary); border-color: var(--eureka-border-strong); }
.btn-ghost:hover { border-color: var(--eureka-primary); background: var(--eureka-primary-light); }
.btn-submit { background: var(--eureka-accent); color: #fff; }
.btn-submit:hover { background: var(--eureka-accent-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Quiz top bar */
.quiz-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.progress-wrap { flex: 1; min-width: 240px; }
.progress-text { font-size: 14px; color: var(--eureka-ink-soft); margin-bottom: 6px; font-weight: 600; }
.progress-text .muted { font-weight: 400; }
.progress-bar {
  height: 8px; background: var(--eureka-border); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--eureka-primary), var(--eureka-accent));
  width: 0%; transition: width 0.3s ease; border-radius: 99px;
}
.timer-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--eureka-surface); border: 1px solid var(--eureka-border);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 700;
  font-family: var(--font-head); color: var(--eureka-ink);
  font-variant-numeric: tabular-nums;
}
.timer-icon { width: 18px; height: 18px; color: var(--eureka-primary); }
.timer-wrap.warn { color: var(--eureka-accent-dark); border-color: var(--eureka-accent); background: #fff7eb; }
.timer-wrap.warn .timer-icon { color: var(--eureka-accent-dark); }
.timer-wrap.danger { color: var(--eureka-danger); border-color: var(--eureka-danger); background: #fdecec; animation: pulse 1s ease-in-out infinite; }
.timer-wrap.danger .timer-icon { color: var(--eureka-danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Question card */
.question-card {
  background: var(--eureka-surface); border: 1px solid var(--eureka-border);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow);
  margin-bottom: 20px;
}
@media (max-width: 700px) { .question-card { padding: 22px; } }
.category-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 99px;
  background: var(--eureka-primary-light); color: var(--eureka-primary);
  margin-bottom: 14px; font-family: var(--font-head);
}
.category-tag.nsl { background: #fff1e5; color: var(--eureka-accent-dark); }
.question-text { font-size: 22px; font-weight: 600; line-height: 1.4; margin-bottom: 24px; }
@media (max-width: 700px) { .question-text { font-size: 18px; } }

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px;
  background: var(--eureka-surface); border: 2px solid var(--eureka-border);
  border-radius: var(--radius); cursor: pointer; transition: all 0.12s ease;
  font-size: 16px; line-height: 1.5; text-align: left; width: 100%;
  font-family: inherit; color: var(--eureka-ink);
}
.option:hover { border-color: var(--eureka-primary); background: var(--eureka-primary-light); }
.option.selected { border-color: var(--eureka-primary); background: var(--eureka-primary-light); box-shadow: 0 0 0 3px rgba(13, 91, 142, 0.12); }
.option-letter {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--eureka-bg); color: var(--eureka-ink-soft);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-family: var(--font-head); font-size: 14px;
}
.option.selected .option-letter { background: var(--eureka-primary); color: #fff; }
.option-text { flex: 1; }

/* Quiz nav */
.quiz-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.nav-spacer { flex: 1; }

/* Results */
.result-hero { text-align: center; padding: 30px 20px 40px; }
.result-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 180px; height: 180px; border-radius: 50%; margin-bottom: 20px;
  background: var(--eureka-surface); border: 6px solid var(--eureka-primary);
  box-shadow: var(--shadow-lg);
}
.result-badge.pass { border-color: var(--eureka-success); }
.result-badge.fail { border-color: var(--eureka-danger); }
.result-score { font-family: var(--font-head); font-weight: 800; font-size: 56px; color: var(--eureka-primary); line-height: 1; }
.result-badge.pass .result-score { color: var(--eureka-success); }
.result-badge.fail .result-score { color: var(--eureka-danger); }
.result-fraction { font-size: 16px; color: var(--eureka-ink-soft); font-weight: 600; margin-top: 4px; }

.breakdown { background: var(--eureka-surface); border: 1px solid var(--eureka-border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }
.breakdown-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.breakdown-row:last-child { margin-bottom: 0; }
.breakdown-label { flex: 0 0 160px; font-weight: 600; color: var(--eureka-ink); font-size: 14px; }
.breakdown-bar-wrap { flex: 1; height: 12px; background: var(--eureka-border); border-radius: 99px; overflow: hidden; }
.breakdown-bar { height: 100%; background: var(--eureka-primary); border-radius: 99px; transition: width 0.6s ease; }
.breakdown-score { flex: 0 0 60px; text-align: right; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--eureka-ink-soft); }
@media (max-width: 600px) {
  .breakdown-row { flex-wrap: wrap; }
  .breakdown-label { flex-basis: 100%; margin-bottom: 4px; }
  .breakdown-score { flex-basis: 60px; }
}

.review-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; flex-wrap: wrap; gap: 10px; }
.review-filters { display: flex; gap: 6px; }
.filter-btn {
  background: var(--eureka-surface); border: 1.5px solid var(--eureka-border);
  padding: 6px 14px; border-radius: 99px; font-family: var(--font-head);
  font-weight: 600; font-size: 13px; color: var(--eureka-ink-soft); cursor: pointer;
}
.filter-btn:hover { border-color: var(--eureka-primary); color: var(--eureka-primary); }
.filter-btn.active { background: var(--eureka-primary); color: #fff; border-color: var(--eureka-primary); }

.review-item {
  background: var(--eureka-surface); border: 1px solid var(--eureka-border);
  border-left: 4px solid var(--eureka-border-strong);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px;
}
.review-item.correct { border-left-color: var(--eureka-success); }
.review-item.incorrect { border-left-color: var(--eureka-danger); }
.review-item.skipped { border-left-color: var(--eureka-muted); }
.review-q { font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.review-q-num { color: var(--eureka-muted); font-weight: 700; margin-right: 8px; }
.review-options { list-style: none; padding: 0; margin: 0 0 12px; }
.review-options li {
  padding: 8px 12px; border-radius: 6px; font-size: 14px; margin-bottom: 4px; display: flex; gap: 8px;
}
.review-options li.correct-ans { background: #e8f7ef; color: var(--eureka-success); font-weight: 600; }
.review-options li.user-wrong { background: #fdecec; color: var(--eureka-danger); text-decoration: line-through; }
.review-options li .letter { font-weight: 700; font-family: var(--font-head); flex-shrink: 0; }
.review-status {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  font-family: var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px;
}
.review-status.correct { background: #e8f7ef; color: var(--eureka-success); }
.review-status.incorrect { background: #fdecec; color: var(--eureka-danger); }
.review-status.skipped { background: var(--eureka-bg); color: var(--eureka-muted); }
.review-explanation {
  background: var(--eureka-primary-light); border-radius: 8px; padding: 12px 16px;
  font-size: 14px; color: var(--eureka-ink); border-left: 3px solid var(--eureka-primary);
}
.review-explanation strong { color: var(--eureka-primary); font-family: var(--font-head); }

.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

/* Footer */
.site-footer {
  background: var(--eureka-ink); color: #c7d1db; padding: 28px 0; margin-top: 60px;
  font-size: 14px;
}
.site-footer a { color: var(--eureka-accent); }
.site-footer p { margin: 4px 0; }

/* Confirm modal */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(16, 40, 64, 0.55);
  backdrop-filter: blur(2px);
  animation: modalFade 160ms ease-out;
}
.modal-panel {
  position: relative;
  background: var(--eureka-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 420px; width: 100%;
  padding: 28px 24px 22px;
  animation: modalPop 180ms ease-out;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 700;
  color: var(--eureka-ink);
  margin: 0 0 10px;
}
.modal-message {
  color: var(--eureka-ink-soft);
  margin: 0 0 22px;
  font-size: 15px; line-height: 1.55;
}
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
}
.modal-actions .btn { min-width: 110px; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 480px) {
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}
