/**
 * quiz-dark-energy.css
 * APPLE VISIONOS & SEQUOIA 3D LIQUID GLASS MIRROR DESIGN SYSTEM
 * National Legal & Energy Knowledge Competition 2026 - Ministry of Industry & Trade
 * 
 * Aesthetic:
 * - Genuine 3D Optical Liquid Glass (Translucent crystal refraction, NOT flat white milk glass)
 * - Beveled Chamfered Mirror Edges with multi-layered specular reflections
 * - Dynamic Specular Glare & Iridescent Rim that react in real-time to pointer movement
 * - Three.js WebGL 3D Caustics layer running beneath the interface
 * - Pure White Light Header & Footer aligned with official ministerial theme
 * - Natural daylight hero banner with 3D photon vector smart grid
 */

:root {
  --arena-bg-deep: #f8fafc;
  --arena-bg-main: #ffffff;
  --arena-bg-surface: rgba(255, 255, 255, 0.35);
  --arena-bg-card: rgba(255, 255, 255, 0.38);

  --arena-emerald: #059669;
  --arena-emerald-deep: #047857;
  --arena-emerald-glow: rgba(5, 150, 105, 0.35);
  
  --arena-cyan: #0284c7;
  --arena-cyan-glow: rgba(2, 132, 199, 0.3);

  --arena-amber: #f59e0b;
  --arena-amber-glow: rgba(245, 158, 11, 0.35);

  --arena-rose: #e11d48;

  --arena-text-pure: #0f172a;
  --arena-text-bright: #1e293b;
  --arena-text-dim: #475569;
  --arena-text-muted: #64748b;

  --arena-border: rgba(255, 255, 255, 0.85);
  --arena-border-glow: rgba(5, 150, 105, 0.25);
}

/* ==========================================================================
   GLOBAL BASE & BACKGROUND
   ========================================================================== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

body.cyber-arena-quiz {
  background-color: #f1f5f9 !important;
  color: var(--arena-text-bright) !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Be Vietnam Pro', -apple-system, sans-serif !important;
  position: relative;
}

/* Fixed Natural Homepage Banner Background — NO color overlay */
.arena-banner-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.arena-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.96) contrast(1.02);
}

/* Color overlay removed entirely per request */
.arena-banner-overlay {
  display: none !important;
}

body.cyber-arena-quiz::before {
  display: none !important;
}

/* 3D Photon Vector Smart Grid Canvas */
.cyber-arena-quiz #energy-vector-canvas {
  display: block !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  opacity: 0.82 !important;
  pointer-events: none !important;
}

/* Three.js WebGL 3D Liquid Glass Caustic Layer */
#three-liquid-glass-canvas {
  display: block !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 2 !important;
  opacity: 0.88 !important;
  pointer-events: none !important;
}

.arena-viewport {
  position: relative;
  z-index: 10;
  width: 100%;
}

/* ==========================================================================
   1. STICKY HEADER (WHITE / LIGHT THEME ALIGNED WITH HOMEPAGE)
   ========================================================================== */
.arena-command-hud {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

/* Official Tạp chí Công Thương (TCCT) Logo Badge Header */
.tcct-logo-badge {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transition: transform 0.25s ease;
}

.tcct-logo-badge:hover {
  transform: translateY(-1px);
  box-shadow: none !important;
  filter: none;
}

.tcct-logo-badge img {
  height: 24px;
  width: auto;
  object-fit: contain;
  filter: none;
}

@media (min-width: 640px) {
  .tcct-logo-badge img {
    height: 28px;
  }
}

/* Energy Ring Container (Depletes over time, NO numeric text) */
.energy-ring-container {
  padding: 5px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.energy-ring-container.warning-pulse {
  border: 1px solid #fda4af !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45) !important;
  animation: ring-danger-pulse 1s infinite alternate;
}

@keyframes ring-danger-pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

/* Candidate Tactical Chip */
.candidate-tactical-chip {
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.candidate-avatar-hex {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #059669, #0d9488);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Submit Button */
.btn-arena-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-arena-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5);
  filter: brightness(1.06);
}

/* ==========================================================================
   2. GENUINE APPLE 3D LIQUID GLASS MIRROR SYSTEM (.liquid-glass-box)
   Khúc xạ quang học tráng gương 3D, vát gờ tráng bạc lỏng, bề mặt lăng kính sang trọng
   ========================================================================== */
.liquid-glass-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0.16) 45%, rgba(255, 255, 255, 0.28) 100%) !important;
  backdrop-filter: blur(48px) saturate(210%) brightness(1.06) contrast(102%) !important;
  -webkit-backdrop-filter: blur(48px) saturate(210%) brightness(1.06) contrast(102%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow: 
    0 24px 60px -12px rgba(15, 23, 42, 0.16),
    0 8px 24px -4px rgba(15, 23, 42, 0.08),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),  /* Gờ sáng tráng gương đỉnh cực sắc nét chuẩn Apple */
    inset 0 3px 10px 0 rgba(255, 255, 255, 0.40),     /* Ánh sáng tán xạ vào thân kính thủy tinh */
    inset 0 -2px 3px 0 rgba(0, 0, 0, 0.08),           /* Chiều sâu đáy gờ vát khúc xạ */
    inset 1.5px 0 2px 0 rgba(255, 255, 255, 0.50),   /* Gờ trái đón sáng */
    inset -1.5px 0 2px 0 rgba(255, 255, 255, 0.25) !important; /* Gờ phải đón sáng */
  border-radius: 32px !important;
  position: relative;
  overflow: hidden !important;
  will-change: transform;
}

/* Ánh phản chiếu tráng gương cong (Curved Specular Gloss Sheen) ở vạt trên */
.liquid-glass-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.40) 0%, rgba(255, 255, 255, 0.10) 45%, transparent 100%);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* Dynamic Specular Lens Glare (theo dõi con trỏ chuột) */
.liquid-specular-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  mix-blend-mode: overlay;
  transition: opacity 0.3s ease;
}

/* Gờ viền phân tán sắc quang học (Iridescent Prism Rim) */
.liquid-prism-rim {
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
  transition: opacity 0.3s ease;
}

/* Dynamic Silver Mirror Sheen Sweep Beam */
.liquid-mirror-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.0) 35%, rgba(255, 255, 255, 0.45) 48%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.45) 52%, rgba(255, 255, 255, 0.0) 65%, transparent 80%);
  background-size: 250% 100%;
  opacity: 0.65;
  animation: liquid-mirror-sweep 8s infinite ease-in-out;
  mix-blend-mode: overlay;
}

@keyframes liquid-mirror-sweep {
  0% { background-position: 220% 0; }
  35% { background-position: -120% 0; }
  100% { background-position: -120% 0; }
}

/* Ensure contents sit above specular reflections */
.liquid-glass-box > *:not(.liquid-specular-glare):not(.liquid-prism-rim):not(.liquid-mirror-sheen) {
  position: relative;
  z-index: 3;
}

/* ==========================================================================
   3. CENTERED PAGE TITLE BLOCK & SLIM PROGRESS BAR (LIQUID GLASS DOCK)
   ========================================================================== */
.page-title-section {
  position: relative;
  z-index: 10;
}

.liquid-glass-mirror-dock {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.40) 0%, rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0.32) 100%) !important;
  backdrop-filter: blur(48px) saturate(210%) brightness(1.06) contrast(102%) !important;
  -webkit-backdrop-filter: blur(48px) saturate(210%) brightness(1.06) contrast(102%) !important;
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  box-shadow: 
    0 20px 50px -10px rgba(15, 23, 42, 0.14),
    0 8px 20px -4px rgba(15, 23, 42, 0.06),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 3px 8px 0 rgba(255, 255, 255, 0.40),
    inset 0 -2px 3px 0 rgba(0, 0, 0, 0.06),
    inset 1.5px 0 2px 0 rgba(255, 255, 255, 0.50),
    inset -1.5px 0 2px 0 rgba(255, 255, 255, 0.25) !important;
  border-radius: 28px !important;
  position: relative;
  overflow: hidden !important;
  will-change: transform;
}

.liquid-glass-mirror-dock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 45%, transparent 100%);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.liquid-glass-mirror-dock > *:not(.liquid-specular-glare):not(.liquid-prism-rim):not(.liquid-mirror-sheen) {
  position: relative;
  z-index: 3;
}

/* ==========================================================================
   4. TWO DISTINCT CARDS: QUESTION CARD & ANSWERS CARD
   ========================================================================== */
.quiz-feature-card {
  position: relative;
  border-radius: 22px;
  transition: all 0.3s ease;
}

/* CARD A — QUESTION CARD */
.question-card {
  padding: 26px 30px;
}

.card-accent-line {
  display: none !important;
}

.stage-index-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(236, 253, 245, 0.40) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 9999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #047857;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 1px #fff, 0 2px 8px rgba(5, 150, 105, 0.12);
}

.stage-law-badge {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 14px;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(240, 249, 255, 0.40) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 16px;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 600;
  color: #0284c7;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 1px #fff, 0 2px 8px rgba(2, 132, 199, 0.12);
}

.stage-law-badge svg,
.stage-law-badge [data-lucide] {
  flex-shrink: 0;
  margin-top: 2px;
}

.btn-stage-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(248, 250, 252, 0.40) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 1px #fff, 0 2px 8px rgba(15, 23, 42, 0.06);
}

.btn-stage-bookmark:hover {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.90) 0%, rgba(253, 230, 138, 0.70) 100%) !important;
  border-color: #f59e0b !important;
  color: #b45309 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-stage-bookmark.marked {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95) 0%, rgba(253, 230, 138, 0.85) 100%) !important;
  border-color: #f59e0b !important;
  color: #b45309 !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.30);
}

.stage-question-title {
  color: #0f172a !important;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 18px rgba(255, 255, 255, 0.85);
}

@media (min-width: 768px) {
  .stage-question-title {
    font-size: 1.55rem;
  }
}

.de-keyword-highlight {
  color: #047857 !important;
  background: rgba(5, 150, 105, 0.12);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
  border-bottom: 2px solid #059669;
}

/* Entrance Animation for Question Card */
.stage-entering {
  animation: cardEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
  0% { opacity: 0.85; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* CARD B — ANSWERS CARD */
.answers-card {
  padding: 24px 28px;
}

.card-accent-line-subtle {
  display: none !important;
}

/* 2-Column × 2-Row Interactive Answer Grid (Desktop) */
#options-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

@media (max-width: 1023px) {
  #options-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Individual Answer Tile — Apple 3D Liquid Glass Mirror Tile (Image 1 & Image 2) */
.quiz-energy-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0.20) 50%, rgba(255, 255, 255, 0.34) 100%) !important;
  backdrop-filter: blur(32px) saturate(200%) brightness(1.05) !important;
  -webkit-backdrop-filter: blur(32px) saturate(200%) brightness(1.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  border-radius: 20px !important;
  padding: 18px 20px !important;
  min-height: 80px;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 
    0 8px 24px -4px rgba(15, 23, 42, 0.08),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.95), 
    inset 0 3px 6px rgba(255, 255, 255, 0.40),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.04),
    inset 1.5px 0 2px rgba(255, 255, 255, 0.50) !important;
  overflow: hidden;
  transform-style: preserve-3d;
}

.quiz-energy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  pointer-events: none;
  z-index: 1;
}

.quiz-energy-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68) 0%, rgba(236, 253, 245, 0.48) 50%, rgba(255, 255, 255, 0.58) 100%) !important;
  border-color: rgba(5, 150, 105, 0.70) !important;
  box-shadow: 
    0 14px 32px -4px rgba(5, 150, 105, 0.28), 
    inset 0 2px 2px rgba(255, 255, 255, 1),
    inset 0 -1.5px 2px rgba(5, 150, 105, 0.15) !important;
  transform: translateY(-2px) scale(1.008);
}

.quiz-energy-card:hover .quiz-terminal-badge {
  background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%) !important;
  border-color: #10b981 !important;
  color: #047857 !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
}

.quiz-energy-card:hover .quiz-option-text {
  color: #0f172a !important;
  font-weight: 700;
}

.quiz-energy-card.selected {
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.85) 0%, rgba(167, 243, 208, 0.65) 50%, rgba(209, 250, 229, 0.80) 100%) !important;
  border: 2px solid #059669 !important;
  box-shadow: 
    0 16px 36px -4px rgba(5, 150, 105, 0.35), 
    inset 0 2px 2.5px rgba(255, 255, 255, 1),
    inset 0 -2px 3px rgba(5, 150, 105, 0.2) !important;
}

.quiz-energy-card.selected .quiz-terminal-badge {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.45);
}

.quiz-energy-card.selected .quiz-option-text {
  color: #064e3b !important;
  font-weight: 700;
}

.quiz-energy-card.selected .quiz-status-led {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.5);
}

/* Terminal Letter Beacon (A, B, C, D) — iOS Glass Coin */
.quiz-terminal-badge {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.90) 0%, rgba(241, 245, 249, 0.70) 100%);
  border: 1.5px solid rgba(255, 255, 255, 1);
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  z-index: 3;
  box-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.08),
    inset 0 1.5px 1.5px #ffffff,
    inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}

.quiz-option-text {
  color: #0f172a;
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 600;
  position: relative;
  z-index: 3;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.90), 0 0 14px rgba(255, 255, 255, 0.75);
}

.quiz-status-led {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  z-index: 3;
}

/* Card B Nav Buttons */
.btn-arena-prev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(246, 250, 254, 0.40) 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1.5px 1.5px #fff, 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-arena-prev:hover:not(:disabled) {
  background: #ffffff;
  color: #0f172a;
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.btn-arena-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-arena-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-radius: 12px;
  border: none;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
  transition: all 0.2s ease;
}

@media (max-width: 639px) {
  .btn-arena-prev,
  .btn-arena-next {
    padding: 8px 14px;
    font-size: 0.75rem;
    gap: 6px;
  }
}

.btn-arena-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(5, 150, 105, 0.5);
  filter: brightness(1.06);
}

.arena-kbd-hint {
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.arena-kbd-key {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   5. DESKTOP RIGHT SIDEBAR: QUESTION NAVIGATOR & RULES (LIQUID GLASS)
   ========================================================================== */
.intel-card {
  padding: 20px;
}

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

.intel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0f172a !important;
  text-transform: uppercase;
}

.intel-title span {
  color: #0f172a !important;
}

/* 5 cols x 4 rows Navigator Grid */
#question-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.relay-nav-btn {
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.50) 0%, rgba(255, 255, 255, 0.25) 100%) !important;
  backdrop-filter: blur(20px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 2px 8px rgba(15, 23, 42, 0.06),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.95),
    inset 0 -1px 1.5px rgba(0, 0, 0, 0.05);
}

.relay-nav-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.80) 0%, rgba(236, 253, 245, 0.60) 100%) !important;
  color: #059669;
  border-color: #059669 !important;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.relay-nav-btn.current {
  background: linear-gradient(135deg, #059669 0%, #0284c7 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.90) !important;
  color: #ffffff !important;
  font-weight: 900;
  box-shadow: 0 4px 18px rgba(5, 150, 105, 0.55), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.80) !important;
  transform: scale(1.10);
  z-index: 2;
}

.relay-nav-btn.answered {
  background: linear-gradient(180deg, rgba(209, 250, 229, 0.70) 0%, rgba(167, 243, 208, 0.50) 100%) !important;
  border: 1.5px solid rgba(5, 150, 105, 0.60) !important;
  color: #065f46 !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15), inset 0 1px 1.5px #fff !important;
}

.relay-marked-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

/* Legend items */
.intel-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 0.75rem;
  color: #334155;
}

.intel-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-weight: 500;
}

.intel-legend-item span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* Rules Accordion */
.intel-rules-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.intel-rules-content {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.8125rem;
  color: #1e293b;
  line-height: 1.55;
}

.rule-point {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #1e293b;
}

.rule-bullet {
  color: #059669;
  font-size: 0.625rem;
  margin-top: 3px;
}

/* ==========================================================================
   6. MOBILE FLOATING BOTTOM DOCK
   ========================================================================== */
.mobile-glass-dock {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0.45) 100%) !important;
  backdrop-filter: blur(32px) saturate(210%) brightness(1.06) !important;
  -webkit-backdrop-filter: blur(32px) saturate(210%) brightness(1.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  border-radius: 20px !important;
  box-shadow: 
    0 16px 40px -8px rgba(15, 23, 42, 0.20),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#mobile-dock-strip {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  display: flex !important;
}

.dock-nav-btn {
  cursor: pointer;
  user-select: none;
}

.dock-q-pill {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 100%);
  border: 1px solid rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dock-q-pill.active {
  background: linear-gradient(135deg, #059669, #0284c7) !important;
  border: 1px solid #059669 !important;
  color: #ffffff !important;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.45);
  transform: scale(1.1);
  z-index: 2;
}

.dock-q-pill.answered {
  background: linear-gradient(180deg, rgba(209, 250, 229, 0.85) 0%, rgba(167, 243, 208, 0.65) 100%) !important;
  border: 1px solid #6ee7b7 !important;
  color: #065f46 !important;
}

.dock-q-pill.marked::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

/* ==========================================================================
   7. RESPONSIVE REFINEMENTS
   ========================================================================== */
@media (max-width: 639px) {
  .page-title-section {
    padding-top: 0.65rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .liquid-glass-mirror-dock {
    padding: 10px 12px !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-title-section h1 {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
  }

  .arena-command-hud img {
    max-width: 100px !important;
    height: 20px !important;
  }

  .question-card {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .answers-card {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .stage-question-title {
    font-size: 1.125rem !important;
    line-height: 1.45 !important;
  }

  .quiz-energy-card {
    padding: 12px 14px !important;
    min-height: 64px !important;
    gap: 10px !important;
  }

  .quiz-terminal-badge {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8125rem !important;
  }

  .quiz-option-text {
    font-size: 0.875rem !important;
  }

  .tcct-logo-badge {
    padding: 0 !important;
  }

  .tcct-logo-badge img {
    height: 19px !important;
  }

  .btn-arena-submit {
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
    gap: 4px !important;
  }

  .btn-arena-submit span {
    display: none !important;
  }

  .energy-ring-container {
    padding: 2px 6px !important;
  }

  .arena-viewport {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

/* ==========================================================================
   8. FOOTER (WHITE / LIGHT THEME ALIGNED WITH HOMEPAGE)
   ========================================================================== */
.arena-footer {
  background: #ffffff !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
  color: #475569 !important;
  position: relative;
  z-index: 10;
  box-shadow: 0 -4px 20px -2px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   9. PC KEYBOARD-ONLY MODE & ANTI-AGENT CHEAT GUARD
   ========================================================================== */
.question-body, .stage-question-title, #options-container {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@keyframes cardMicroShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.card-micro-shake {
  animation: cardMicroShake 0.35s ease-in-out !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45) !important;
}

.pc-keyboard-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pc-keyboard-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.pc-keyboard-toast-inner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.90) 100%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.40), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.pc-keyboard-toast-key {
  background: linear-gradient(135deg, #059669, #0284c7);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   10. ANTI-CHEAT MODAL & SPEED TOAST SYSTEM
   ========================================================================== */
.ac-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ac-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.ac-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
  border: 1.5px solid rgba(255, 255, 255, 1);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 
    0 30px 70px -15px rgba(0, 0, 0, 0.45),
    0 10px 25px -5px rgba(0, 0, 0, 0.2),
    inset 0 2px 3px #ffffff,
    inset 0 -2px 3px rgba(0, 0, 0, 0.04);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.ac-modal-backdrop.active .ac-modal-card {
  transform: translateY(0) scale(1);
}

.ac-icon-halo {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ac-icon-halo.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.12) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.25), inset 0 1px 1px #fff;
  color: #d97706;
}

.ac-icon-halo.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(185, 28, 28, 0.12) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3), inset 0 1px 1px #fff;
  color: #dc2626;
  animation: pulse 1.5s infinite;
}

.ac-violation-meter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0;
}

.ac-meter-pip {
  width: 28px;
  height: 8px;
  border-radius: 9999px;
  background: #e2e8f0;
  transition: all 0.3s ease;
}

.ac-meter-pip.active-warning {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.ac-meter-pip.active-danger {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

.ac-btn-ack {
  width: 100%;
  padding: 14px 24px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 24px -4px rgba(5, 150, 105, 0.45), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ac-btn-ack:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 28px -4px rgba(5, 150, 105, 0.55), inset 0 1px 1.5px rgba(255, 255, 255, 0.5);
}

.speed-warning-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.speed-warning-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.speed-warning-toast-inner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.92) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 36px -6px rgba(217, 119, 6, 0.45), inset 0 1px 1px #fff;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

