/* BibleQuiz.biz — Premium App Styles
   Theme: Sacred Scrolls — no external framework dependency */

/* === CSS Variables === */
:root {
  --bq-gold:        #c9922a;
  --bq-gold-light:  #e5b84a;
  --bq-gold-dark:   #a07018;
  --bq-navy:        #12172b;
  --bq-navy-mid:    #1a2040;
  --bq-parchment:   #f9f5ed;
  --bq-cream:       #f0e8d4;
  --bq-dark:        #1a1510;
  --bq-text:        #2c2416;
  --bq-muted:       #7a6a58;
  --bq-border:      #e0d4bc;
  --bq-correct:     #146b3a;
  --bq-wrong:       #9b1c2a;
  --font-display:   'Cinzel', Georgia, serif;
  --font-body:      'Lora', Georgia, serif;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bq-parchment);
  color: var(--bq-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  font-size: 16px;
}

main { flex: 1; }
a    { color: inherit; text-decoration: none; }
img  { max-width: 100%; display: block; }
ul   { list-style: none; }

/* === Bootstrap compatibility layer (quiz.js uses these) === */
.d-none { display: none !important; }

.d-lg-block { display: none !important; }
@media (min-width: 1024px) { .d-lg-block { display: block !important; } }

.d-md-table-cell { display: none !important; }
@media (min-width: 768px)  { .d-md-table-cell { display: table-cell !important; } }

.d-lg-table-cell { display: none !important; }
@media (min-width: 1024px) { .d-lg-table-cell { display: table-cell !important; } }

.d-xl-table-cell { display: none !important; }
@media (min-width: 1280px) { .d-xl-table-cell { display: table-cell !important; } }

.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 0.75rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* === Spinner (quiz.js injects these into button HTML) === */
.spinner-border {
  display: inline-block;
  width: 1rem; height: 1rem;
  vertical-align: -0.125em;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bq-spin 0.75s linear infinite;
}
.spinner-border-sm { width: 0.75rem; height: 0.75rem; border-width: 0.15em; }
@keyframes bq-spin { to { transform: rotate(360deg); } }

/* === Alert (quiz.js & PHP) === */
.alert {
  position: relative;
  padding: 0.9rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  line-height: 1.5;
}
.alert-success  { background: #d4edda; border-color: #b8dac5; color: #0f4c28; }
.alert-danger   { background: #fde8e8; border-color: #f5c6c6; color: #7a1c1c; }
.alert-warning  { background: #fff8e1; border-color: #ffe082; color: #6b4c00; }
.alert-dismissible { padding-right: 3.25rem; }
.btn-close {
  position: absolute; top: 0.7rem; right: 0.85rem;
  background: none; border: none; font-size: 1.3rem; line-height: 1;
  cursor: pointer; color: currentColor; opacity: 0.55; padding: 0;
}
.btn-close::before { content: '\00D7'; }
.btn-close:hover { opacity: 1; }
.fade { opacity: 1; }

/* ============================================================
   LAYOUT
   ============================================================ */

/* Container sizes */
.bq-container    { max-width: 1152px; margin: 0 auto; padding: 0 1rem; }
.bq-container-md { max-width: 720px;  margin: 0 auto; padding: 0 1rem; }
.bq-container-sm { max-width: 576px;  margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) {
  .bq-container, .bq-container-md, .bq-container-sm { padding: 0 1.5rem; }
}

/* === HEADER === */
.site-header { background: var(--bq-navy); color: #fff; }

.bq-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1rem;
  max-width: 1152px;
  margin: 0 auto;
}
@media (min-width: 640px) { .bq-header-inner { padding: 1rem 1.5rem; } }

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  line-height: 1;
}
.site-logo .logo-bible { color: var(--bq-gold); }
.site-logo .logo-rest  { color: #fff; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
}
@media (max-width: 480px) { .site-nav { gap: 1rem; } }

.site-header .nav-link {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-header .nav-link:hover { color: var(--bq-gold-light); border-bottom-color: var(--bq-gold-light); }

/* Gold accent lines */
.bq-gold-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--bq-gold), transparent);
  opacity: 0.7;
}
.bq-gold-line-thin {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bq-gold-dark), transparent);
  opacity: 0.3;
}

/* === HERO === */
.bq-hero {
  background: var(--bq-navy);
  position: relative;
  overflow: hidden;
}
.bq-hero-cross-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 28rem;
  color: rgba(255,255,255,0.025);
  font-family: serif;
  line-height: 1;
  user-select: none;
}
.bq-hero-inner {
  position: relative;
  text-align: center;
  padding: 4rem 1rem 4.5rem;
  max-width: 1152px;
  margin: 0 auto;
}
@media (min-width: 640px) { .bq-hero-inner { padding: 5rem 1.5rem 5.5rem; } }

.bq-hero-eyebrow {
  font-family: var(--font-display);
  color: rgba(201,146,42,0.7);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.bq-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.bq-hero-tagline {
  color: rgba(255,255,255,0.65);
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}
.bq-hero-quote {
  max-width: 30rem;
  margin: 0 auto 2rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  text-align: left;
}
.bq-hero-quote p {
  color: rgba(255,255,255,0.75);
  font-style: italic;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.75;
  margin-bottom: 0.35rem;
}
.bq-hero-quote cite {
  color: rgba(201,146,42,0.7);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-style: normal;
}
.bq-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  font-family: var(--font-display);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  letter-spacing: 0.08em;
  margin-top: 1.25rem;
}

/* === MINI HERO (inner pages) === */
.bq-mini-hero { background: var(--bq-navy); padding: 2.5rem 1rem; text-align: center; }
.bq-mini-hero-eyebrow {
  font-family: var(--font-display);
  color: rgba(201,146,42,0.6);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.bq-mini-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.bq-mini-hero-sub { color: rgba(255,255,255,0.5); font-family: var(--font-body); font-size: 0.875rem; }

/* === PAGE SECTION WRAPPERS === */
.bq-page-section       { padding: 2.5rem 0; }
.bq-page-section-inner { padding: 2rem 0; }

/* === HOME PAGE GRID === */
.bq-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
}
@media (min-width: 1024px) {
  .bq-home-grid { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
}
.bq-col-main { display: flex; flex-direction: column; gap: 2rem; }
.bq-col-side { display: flex; flex-direction: column; gap: 1.5rem; }

/* === FOOTER === */
.bq-footer { background: var(--bq-navy); color: rgba(255,255,255,0.6); padding: 2.5rem 1rem; margin-top: auto; }
.bq-footer-inner { max-width: 1152px; margin: 0 auto; text-align: center; }
.bq-footer-cross { color: rgba(201,146,42,0.4); font-size: 1.1rem; letter-spacing: 0.5em; margin-bottom: 1rem; }
.bq-footer p { font-family: var(--font-body); font-size: 0.875rem; margin-bottom: 0.75rem; color: rgba(255,255,255,0.75); }
.bq-footer a { color: rgba(201,146,42,0.6); text-decoration: none; font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.2s; margin: 0 0.75rem; }
.bq-footer a:hover { color: var(--bq-gold); }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* === Buttons === */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--bq-gold) 0%, var(--bq-gold-dark) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 2.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  box-shadow: 0 4px 18px rgba(201,146,42,0.38);
}
.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(201,146,42,0.52);
  color: #fff;
  filter: brightness(1.05);
}
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled { opacity: 0.6; cursor: default; }

.btn-gold-sm { padding: 0.5rem 1.25rem; font-size: 0.75rem; letter-spacing: 0.08em; }

.btn-outline-navy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--bq-navy);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.25rem;
  border-radius: 50px;
  border: 2px solid var(--bq-navy);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-outline-navy:hover { background: var(--bq-navy); color: #fff; }

/* === Card === */
.bq-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--bq-border);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(20,15,8,0.07);
}
.bq-card-header {
  background: var(--bq-navy);
  color: #fff;
  padding: 0.9rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.bq-card-header-left { display: flex; align-items: center; gap: 0.5rem; }
.bq-card-header-icon { color: var(--bq-gold-light); }
.bq-card-header-link {
  font-size: 0.72rem;
  color: rgba(229,184,74,0.8);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}
.bq-card-header-link:hover { color: var(--bq-gold-light); }
.bq-card-body { padding: 1.25rem; }
.bq-card-body-flush { padding: 0; }

/* === Bible Quote === */
.bible-quote {
  background: linear-gradient(135deg, #fdfaf2, var(--bq-cream));
  border-left: 3px solid var(--bq-gold);
  padding: 1.25rem 1.5rem;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #6b5840;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  line-height: 1.75;
}
.bible-quote p { margin: 0 0 0.4rem; font-size: 0.95rem; }
.bible-quote small {
  color: var(--bq-gold-dark);
  font-weight: 600;
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* === Last player notification === */
.last-player-bar {
  background: #fff;
  border: 1px solid var(--bq-border);
  border-left: 4px solid var(--bq-gold);
  border-radius: 0 8px 8px 0;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.last-player-dot {
  width: 10px; height: 10px;
  background: var(--bq-gold);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(201,146,42,0.25);
  animation: bq-pulse 2s ease-in-out infinite;
}
@keyframes bq-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(201,146,42,0.25); }
  50%      { box-shadow: 0 0 0 6px rgba(201,146,42,0.1); }
}
.last-player-text { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.35rem; }
.last-player-name { font-weight: 700; color: var(--bq-navy); }
.last-player-score { font-weight: 700; color: var(--bq-gold-dark); }
.last-player-time { color: #aaa; font-size: 0.78rem; }

/* Last player CTA — hidden on mobile */
.last-player-cta { display: none; }
@media (min-width: 640px) { .last-player-cta { display: inline-flex; margin-left: auto; } }

/* === Stat counter === */
.stat-counter { text-align: center; padding: 1.25rem 0.5rem; }
.stat-counter .number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--bq-gold);
  line-height: 1;
  display: block;
}
.stat-counter .label {
  font-size: 0.72rem;
  color: var(--bq-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.3rem;
  display: block;
}

/* === Top 3 table === */
.top3-table { width: 100%; border-collapse: collapse; }
.top3-table tr { border-bottom: 1px solid #f0ebe0; }
.top3-table tr:last-child { border-bottom: none; }
.top3-table td { padding: 0.875rem 1rem; vertical-align: middle; }
.top3-table .td-rank { width: 52px; padding-left: 1.25rem; }
.top3-table .td-score { text-align: right; padding-right: 1.25rem; white-space: nowrap; }
.top3-player { font-family: var(--font-body); font-weight: 600; color: var(--bq-dark); }
.top3-country { color: var(--bq-muted); font-size: 0.8rem; }
.top3-score { font-family: var(--font-display); font-weight: 700; color: var(--bq-gold-dark); }
.top3-pts { color: var(--bq-muted); font-size: 0.75rem; margin-left: 2px; }

/* === How it works === */
.how-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .how-steps-grid { grid-template-columns: repeat(4, 1fr); } }

.how-step { text-align: center; padding: 1rem 0.5rem; }
.how-step-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--bq-gold) 0%, var(--bq-gold-dark) 100%);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 3px 12px rgba(201,146,42,0.3);
}
.how-step-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--bq-dark);
}
.how-step-text { font-size: 0.82rem; color: var(--bq-muted); line-height: 1.5; }

.how-divider { height: 1px; background: var(--bq-border); margin: 1rem 0; }

.how-tips { padding-left: 1.25rem; list-style: disc; }
.how-tips li { font-size: 0.875rem; color: var(--bq-muted); margin-bottom: 0.35rem; font-family: var(--font-body); }
.how-tips strong { color: var(--bq-text); }

/* === Prize items === */
.prize-item {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid #f0ebe0;
  align-items: flex-start;
}
.prize-item:last-child { border-bottom: none; padding-bottom: 0; }
.prize-rank { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--bq-gold); flex-shrink: 0; line-height: 1; min-width: 28px; padding-top: 0.1rem; }
.prize-img  { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.prize-title { font-weight: 600; color: var(--bq-dark); margin-bottom: 0.2rem; font-size: 0.95rem; }
.prize-desc  { font-size: 0.82rem; color: var(--bq-muted); line-height: 1.5; }

/* === Gold divider === */
.gold-line { height: 1px; background: linear-gradient(90deg, transparent, var(--bq-gold), transparent); border: none; margin: 0; opacity: 0.4; }

/* === Rank badges === */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg,#FFD700,#E0A500); color:#3a2800; box-shadow:0 2px 8px rgba(255,200,0,0.4); }
.rank-2 { background: linear-gradient(135deg,#D0D0D0,#A8A8A8); color:#2a2a2a; }
.rank-3 { background: linear-gradient(135deg,#D4914A,#A0602A); color:#fff; }
.rank-n { background:#e8e0d4; color:#6b5840; }

/* === Flag images === */
.flag-img { width:20px; height:14px; object-fit:cover; border:1px solid #ccc; vertical-align:middle; margin-right:4px; border-radius:2px; display:inline; }

/* === Leaderboard === */
.lb-view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  background: var(--bq-parchment);
  border: 1px solid var(--bq-border);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
}
.lb-view-tab {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bq-muted);
  text-decoration: none;
  padding: 0.45rem 1.35rem;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}
.lb-view-tab:hover:not(.lb-view-tab-active) {
  color: var(--bq-dark);
}
.lb-view-tab-active {
  color: var(--bq-gold-dark);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.bq-lb-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.bq-lb-selectors { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.bq-lb-select-group { display: flex; align-items: center; gap: 0.5rem; }
.bq-lb-select-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bq-muted);
  white-space: nowrap;
}

.toplist-table { width: 100%; border-collapse: collapse; }
.toplist-table thead th {
  background: var(--bq-navy);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.875rem 1rem;
  white-space: nowrap;
}
.toplist-table tbody tr { border-bottom: 1px solid #f0ebe0; transition: background 0.12s; }
.toplist-table tbody tr:hover { background: #fdf8ef !important; }
.toplist-table tbody td { padding: 0.75rem 1rem; vertical-align: middle; font-size: 0.9rem; }
.toplist-table tbody tr:nth-child(1) td { background: rgba(255,215,0,0.07); }
.toplist-table tbody tr:nth-child(2) td { background: rgba(200,200,200,0.07); }
.toplist-table tbody tr:nth-child(3) td { background: rgba(205,127,50,0.07); }

/* === Quiz progress bar === */
.quiz-progress-wrap { background: var(--bq-cream); border-radius: 50px; height: 6px; overflow: hidden; margin-top: 0.5rem; }
#quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bq-gold-dark) 0%, var(--bq-gold-light) 100%);
  border-radius: 50px;
  transition: width 0.4s ease;
  width: 0%;
}

/* === Quiz header bar (progress + timer + lifeline) === */
.quiz-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.quiz-progress-text {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--bq-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.quiz-timer {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bq-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.quiz-timer.warning { color: var(--bq-wrong); }

/* === Quiz question card === */
#question-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--bq-border);
  box-shadow: 0 4px 28px rgba(20,15,8,0.1);
}
.question-card-body { padding: 1.5rem; }
@media (min-width: 640px) { .question-card-body { padding: 2rem; } }

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--bq-dark);
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
}

/* === Answer buttons === */
.answer-btn {
  text-align: left;
  border-radius: 10px;
  border: 2px solid var(--bq-border);
  background: #fdfaf5;
  color: var(--bq-text);
  font-size: 0.93rem;
  font-family: var(--font-body);
  padding: 0.875rem 1.2rem;
  width: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  margin-bottom: 0.6rem;
}
.answer-btn:hover:not(:disabled) { border-color: var(--bq-gold); background: #fff9f0; transform: translateX(4px); }
.answer-btn .pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bq-gold);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-right: 0.9rem;
  transition: background 0.15s;
}
.answer-btn:hover:not(:disabled) .pos-badge { background: var(--bq-gold-dark); }
.answer-btn.correct { border-color: var(--bq-correct); background: #d4edda; color: #0a3622; }
.answer-btn.correct .pos-badge { background: var(--bq-correct); }
.answer-btn.wrong   { border-color: var(--bq-wrong); background: #fde8e8; color: #5a0f0f; }
.answer-btn.wrong .pos-badge   { background: var(--bq-wrong); }
.answer-btn.eliminated { opacity: 0.28; pointer-events: none; }
.answer-btn:disabled   { cursor: default; }

/* === Lifeline button === */
#lifeline-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--bq-gold);
  color: var(--bq-gold-dark);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
#lifeline-btn:hover:not(:disabled) { background: var(--bq-gold); color: #fff; }
#lifeline-btn:disabled { opacity: 0.35; cursor: default; }

/* === Feedback bar === */
#feedback-bar { border-radius: 8px; font-weight: 500; padding: 0.75rem 1rem; font-size: 0.9rem; }

/* === Quiz spinner === */
.quiz-spinner { display: flex; justify-content: center; align-items: center; padding: 4rem; }
.bq-spinner-ring {
  width: 44px; height: 44px;
  border: 3px solid var(--bq-cream);
  border-top-color: var(--bq-gold);
  border-radius: 50%;
  animation: bq-spin 0.85s linear infinite;
}

/* === Score card === */
.score-card {
  background: linear-gradient(145deg, var(--bq-navy) 0%, var(--bq-navy-mid) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 40px rgba(18,23,43,0.25);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.score-card::before {
  content: '✝';
  position: absolute;
  font-size: 9rem;
  color: rgba(255,255,255,0.025);
  top: -0.5rem; right: 0.5rem;
  line-height: 1;
  pointer-events: none;
  font-family: serif;
}
.score-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.5rem;
}
.score-points {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--bq-gold-light);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.score-pts-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.4; margin-bottom: 1.25rem; }

.score-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (min-width: 480px) { .score-stats-grid { grid-template-columns: repeat(4, 1fr); } }

.score-stat {
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.875rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.06);
}
.score-stat .stat-v { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; display: block; color: #fff; }
.score-stat .stat-l { font-size: 0.68rem; opacity: 0.6; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-top: 0.2rem; }

/* === Form elements === */
.bq-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bq-text);
  margin-bottom: 0.4rem;
}
.bq-label-sub { font-family: var(--font-body); font-size: 0.78rem; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--bq-muted); }
.bq-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--bq-border);
  border-radius: 8px;
  font-size: 0.93rem;
  font-family: var(--font-body);
  background: #fdfaf5;
  color: var(--bq-text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  appearance: none;
}
.bq-input:focus { outline: none; border-color: var(--bq-gold); box-shadow: 0 0 0 3px rgba(201,146,42,0.18); background: #fff; }
.bq-input::placeholder { color: #b0a090; }
.bq-input-hint { font-family: var(--font-body); font-size: 0.78rem; color: var(--bq-muted); margin-top: 0.3rem; }

.bq-form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .bq-form-row { grid-template-columns: 1fr 1fr; } }

.bq-checkbox-row { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.bq-checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--bq-gold); cursor: pointer; flex-shrink: 0; }
.bq-checkbox-label { font-size: 0.875rem; font-family: var(--font-body); color: var(--bq-text); }

.bq-btn-submit { width: 100%; justify-content: center; padding: 1rem; font-size: 0.95rem; }

/* === Answer option rows (submit question form) === */
.answer-option-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.answer-option-radio { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; cursor: pointer; }
.answer-option-radio input[type=radio] { width: 16px; height: 16px; accent-color: var(--bq-gold); cursor: pointer; }
.answer-letter-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bq-cream);
  color: var(--bq-muted);
  flex-shrink: 0;
}

/* === Info page feature cards === */
.info-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
@media (min-width: 480px) { .info-feature-grid { grid-template-columns: repeat(4, 1fr); } }
.info-feature-box { text-align: center; padding: 1rem 0.75rem; background: var(--bq-cream); border-radius: 12px; }
.info-feature-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.info-feature-title { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bq-gold-dark); margin-bottom: 0.3rem; }
.info-feature-text  { font-size: 0.78rem; color: var(--bq-muted); line-height: 1.4; }

.info-formula-box { background: var(--bq-navy); border-radius: 12px; padding: 1.25rem; }
.info-formula-label { font-family: var(--font-display); color: rgba(201,146,42,0.7); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.75rem; }
.info-formula-code { color: rgba(255,255,255,0.8); font-family: monospace; font-size: 0.8rem; line-height: 1.8; }
.info-tip-box { padding: 0.875rem 1rem 0.875rem 1.25rem; border-left: 4px solid var(--bq-gold); background: var(--bq-cream); border-radius: 0 8px 8px 0; margin-top: 1rem; font-size: 0.875rem; font-family: var(--font-body); color: var(--bq-muted); }
.info-tip-box strong { color: var(--bq-dark); }

.info-check-list { list-style: none; padding: 0; }
.info-check-list li { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.6rem; font-family: var(--font-body); font-size: 0.875rem; color: var(--bq-text); line-height: 1.5; }
.info-check-list .icon-check { color: var(--bq-gold); flex-shrink: 0; margin-top: 0.15rem; }
.info-check-list .icon-lock  { color: var(--bq-gold); flex-shrink: 0; margin-top: 0.15rem; }

/* === Previous answer feedback bar === */
#prev-answer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.875rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  flex-wrap: wrap;
}
#prev-answer-bar.pab-correct { background:#f0fdf4; border:1px solid #86efac; color:#15803d; }
#prev-answer-bar.pab-wrong   { background:#fef2f2; border:1px solid #fca5a5; color:#b91c1c; }
.pab-left { display:flex; align-items:center; flex-wrap:wrap; gap:0.4rem; min-width:0; }
.pab-icon { font-size:1rem; flex-shrink:0; }
.pab-verdict { font-weight:700; flex-shrink:0; }
.pab-correct-ans { opacity:0.8; font-style:italic; }
.pab-correct-ans::before { content:'— '; }
.pab-ref { font-family:var(--font-display); font-size:0.75rem; letter-spacing:0.03em; opacity:0.75; white-space:nowrap; }
.pab-ref::before { content:'\2022\00a0'; }
.pab-stats { display:flex; align-items:center; gap:0.5rem; font-family:var(--font-display); font-size:0.78rem; white-space:nowrap; flex-shrink:0; }
.pab-stat-correct { color:#15803d; }
.pab-stat-wrong   { color:#b91c1c; }

/* === Answers review section === */
.review-item {
  padding: 0.875rem 1.25rem;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--bq-border);
}
.review-item:last-child { border-bottom: none; }
.review-correct { border-left-color: #22c55e; background: #f0fdf4; }
.review-wrong   { border-left-color: #ef4444; background: #fef2f2; }
.review-item-hd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.review-num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  background: rgba(0,0,0,0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  color: var(--bq-dark);
}
.review-verdict {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
}
.review-correct .review-verdict { color: #15803d; }
.review-wrong   .review-verdict { color: #b91c1c; }
.review-ref {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--bq-muted);
  margin-left: auto;
}
.review-q {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--bq-dark);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
.review-answers {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.review-ans {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--bq-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0;
}
.review-ans-correct {
  color: #15803d;
  font-weight: 600;
}
.review-ans-wrong {
  color: #b91c1c;
  text-decoration: line-through;
  opacity: 0.8;
}
.review-pos {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  flex-shrink: 0;
}

/* === Quiz start screen === */
.quiz-start { text-align: center; padding: 3rem 1rem; }
.quiz-start-cross { color: rgba(201,146,42,0.35); font-size: 3rem; margin-bottom: 1.5rem; font-family: serif; }
.quiz-start-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--bq-navy); margin-bottom: 0.75rem; letter-spacing: 0.05em; }
.quiz-start-sub { color: var(--bq-muted); font-family: var(--font-body); margin-bottom: 2rem; line-height: 1.65; }
.quiz-start-note { font-size: 0.8rem; color: var(--bq-muted); margin-top: 1.25rem; font-family: var(--font-body); }

/* === Section heading === */
.section-heading {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bq-gold-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-heading::after { content:''; flex:1; height:1px; background:var(--bq-border); }

/* === Result form === */
.result-form-links { text-align: center; margin-top: 1.25rem; display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: 0.875rem; }
.result-form-links a { color: var(--bq-muted); text-decoration: none; font-family: var(--font-body); transition: color 0.15s; }
.result-form-links a:hover { color: var(--bq-gold-dark); }
.result-form-links .sep { color: var(--bq-border); }

/* === Success screen (submit question) === */
.success-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--bq-gold), var(--bq-gold-dark)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.75rem; margin: 0 auto 1.5rem; box-shadow: 0 4px 16px rgba(201,146,42,0.35); }
.success-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--bq-navy); letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.success-text { color: var(--bq-muted); font-family: var(--font-body); margin-bottom: 1.75rem; line-height: 1.65; max-width: 24rem; margin-left: auto; margin-right: auto; }
.success-actions { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* === Ads === */
.ad-container { text-align: center; margin: 1.25rem 0; }

/* === Pagination === */
.bq-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.bq-page-btn {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--bq-muted);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--bq-border);
  border-radius: 5px;
  background: #fff;
  min-width: 36px;
  text-align: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.bq-page-btn:hover:not(.bq-page-active):not(.bq-page-disabled) {
  color: var(--bq-gold-dark);
  border-color: var(--bq-gold);
  background: var(--bq-parchment);
}
.bq-page-active {
  color: var(--bq-gold-dark);
  border-color: var(--bq-gold);
  background: var(--bq-parchment);
  font-weight: 600;
  pointer-events: none;
}
.bq-page-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.bq-page-ellipsis {
  color: var(--bq-muted);
  padding: 0.4rem 0.25rem;
  font-size: 0.85rem;
  line-height: 1;
}
.bq-pagination-info {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--bq-muted);
  text-align: center;
  margin-top: 0.6rem;
}

/* === Empty leaderboard state === */
.lb-empty { text-align: center; padding: 3rem 1rem; }
.lb-empty-cross { font-size: 2.5rem; color: var(--bq-border); margin-bottom: 0.75rem; }
.lb-empty-text { color: var(--bq-muted); font-family: var(--font-body); margin-bottom: 1rem; }

/* === Responsive === */
@media (max-width: 480px) {
  .question-text { font-size: 1rem; }
  .score-points  { font-size: 2.5rem; }
  .btn-gold { padding: 0.75rem 1.75rem; font-size: 0.85rem; }
  .bq-card-body { padding: 1rem; }
}
