/* F1 Reaction Time — test-specific overrides */
:root { --test-accent: #c92a2a; }

.t-intro-icon::before {
  content: 'sports_motorsports';
}

/* ── F1 LIGHT PANEL (light theme) ── */
.f1-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}

.f1-panel[data-state="idle"]      { background: #f5f7fa; }
.f1-panel[data-state="buildup"]   { background: #f5f7fa; }
.f1-panel[data-state="lights-on"] { background: #f5f7fa; }
.f1-panel[data-state="go"]        { background: #f5f7fa; }
.f1-panel[data-state="hit"]       { background: #f5f7fa; cursor: default; }
.f1-panel[data-state="miss"]      { background: #f5f7fa; cursor: default; }
.f1-panel[data-state="early"]     { background: #fef2f1; cursor: default; }

/* ── GANTRY (5 columns) ── */
.f1-gantry {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  position: relative;
}

.f1-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── BULBS (bigger, cuter, premium glow) ── */
.f1-bulb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 4px solid #d1d5db;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.f1-col.lit .f1-bulb {
  background: #d32f2f;
  border-color: #b71c1c;
  box-shadow: 0 0 20px rgba(211, 47, 47, 0.45), 0 0 40px rgba(211, 47, 47, 0.25), inset 0 0 12px rgba(255, 255, 255, 0.25);
}

/* Lights-out (GO!) and hit states: bulbs go completely dark, no green */

/* Eliminate transition fade delays in go/hit states for instant visual reaction */
.f1-panel[data-state="go"] .f1-bulb,
.f1-panel[data-state="hit"] .f1-bulb {
  transition: none !important;
}

/* ── STATUS TEXT ── */
.f1-status-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  min-height: 90px;
}

.f1-status {
  font-family: 'Manrope', sans-serif;
  font-size: 64px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  min-height: 64px;
}

.f1-panel[data-state="go"] .f1-status    { color: #059669; font-size: 72px; }
.f1-panel[data-state="hit"] .f1-status   { color: #059669; }
.f1-panel[data-state="miss"] .f1-status  { color: #dc2626; }
.f1-panel[data-state="early"] .f1-status { color: #e74c3c; }

.f1-sub {
  font-family: 'Lexend', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #9ca3af;
  min-height: 20px;
}

.f1-panel[data-state="go"] .f1-sub    { color: #6ee7b7; }
.f1-panel[data-state="early"] .f1-sub { color: #e74c3c; opacity: 0.8; }

/* ── INTRO VISUAL (light) ── */
.f1-intro-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--color-surface-container-low);
  border: 1px solid var(--color-outline);
  border-radius: var(--r-md, 8px);
  padding: 24px 32px;
  margin-bottom: 20px;
}

.f1-intro-lights {
  display: flex;
  gap: 10px;
}

.f1-intro-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--color-surface-container-high);
  border-radius: var(--r-sm, 4px);
  border: 1px solid var(--color-outline);
}

.f1-intro-bulb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-surface-variant);
  border: 2px solid var(--color-outline-variant);
}

.f1-intro-bulb.on {
  background: #d32f2f;
  border-color: #b71c1c;
  box-shadow: 0 0 10px rgba(211, 47, 47, 0.35), inset 0 0 4px rgba(255, 255, 255, 0.2);
}

.f1-intro-caption {
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}



.rt-hint {
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
  text-align: center;
  margin-top: -8px;
}

/* ── DARK MODE EXPLICIT GLOW OVERRIDES ── */
html.dark .f1-col.lit .f1-bulb {
  background: #d32f2f !important;
  border-color: #b71c1c !important;
  box-shadow: 0 0 24px rgba(211, 47, 47, 0.55), 0 0 48px rgba(211, 47, 47, 0.35), inset 0 0 14px rgba(255, 255, 255, 0.35) !important;
}

html.dark .f1-bulb {
  background: var(--color-surface-container-high);
  border-color: var(--color-outline);
  box-shadow: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .f1-gantry { gap: 16px; }
  .f1-col { padding: 14px; gap: 12px; border-radius: 12px; }
  .f1-bulb { width: 50px; height: 50px; border-width: 3px; }
  .f1-status { font-size: 44px; min-height: 44px; }
  .f1-panel[data-state="go"] .f1-status { font-size: 48px; }
  .f1-sub { font-size: 15px; }
  .f1-panel { gap: 24px; padding: 36px 0; }
}

@media (max-width: 480px) {
  .f1-gantry { gap: 10px; }
  .f1-col { padding: 10px; gap: 8px; border-radius: 8px; border-width: 1.5px; }
  .f1-bulb { width: 34px; height: 34px; border-width: 2px; }
  .f1-status { font-size: 32px; min-height: 32px; }
  .f1-panel[data-state="go"] .f1-status { font-size: 36px; }
  .f1-sub { font-size: 13px; }
  .f1-panel { min-height: 320px; padding: 24px 12px; gap: 20px; }
  .f1-intro-visual { padding: 16px 12px; }
  .f1-intro-lights { gap: 5px; }
  .f1-intro-col { padding: 5px; gap: 5px; }
  .f1-intro-bulb { width: 14px; height: 14px; }
}

@media (max-width: 360px) {
  .f1-gantry { gap: 6px; }
  .f1-col { padding: 8px; gap: 6px; border-radius: 6px; }
  .f1-bulb { width: 26px; height: 26px; border-width: 1.5px; }
  .f1-status { font-size: 26px; min-height: 26px; }
  .f1-panel[data-state="go"] .f1-status { font-size: 28px; }
  .f1-panel { min-height: 280px; padding: 16px 8px; gap: 16px; }
}

/* ── SCORE RANGE HIGHLIGHTING (F1 Specific) ── */
.rt-range-row {
  opacity: 0.55;
  background: var(--color-surface-container-low) !important;
  border: 1.5px solid var(--color-outline) !important;
  transform: scale(0.98);
}
.rt-range-row .rt-range-pct {
  color: var(--text-muted) !important;
}
.rt-range-dot {
  opacity: 0.5;
}

/* Active Highlighted State */
.rt-range-row.active {
  opacity: 1 !important;
  transform: scale(1.025) !important;
  border-width: 1.5px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
  font-weight: 700 !important;
}
.rt-range-row.active .rt-range-dot {
  opacity: 1 !important;
  transform: scale(1.3) !important;
}

/* Elite Active (Green) */
.rt-range-row.active.elite {
  background: color-mix(in srgb, #10b981 12%, var(--color-surface)) !important;
  border-color: #10b981 !important;
}
.rt-range-row.active.elite .rt-range-pct {
  color: #10b981 !important;
}

/* Fast Active (Blue) */
.rt-range-row.active.fast {
  background: color-mix(in srgb, #0ea5e9 12%, var(--color-surface)) !important;
  border-color: #0ea5e9 !important;
}
.rt-range-row.active.fast .rt-range-pct {
  color: #0ea5e9 !important;
}

/* Avg Active (Orange) */
.rt-range-row.active.avg {
  background: color-mix(in srgb, #f5a623 12%, var(--color-surface)) !important;
  border-color: #f5a623 !important;
}
.rt-range-row.active.avg .rt-range-pct {
  color: #f5a623 !important;
}

/* Slow Active (Red) */
.rt-range-row.active.slow {
  background: color-mix(in srgb, #ef4444 12%, var(--color-surface)) !important;
  border-color: #ef4444 !important;
}
.rt-range-row.active.slow .rt-range-pct {
  color: #ef4444 !important;
}

/* Dark Mode Overrides */
html.dark .rt-range-row.active.elite {
  background: color-mix(in srgb, #2ecc71 15%, var(--color-surface)) !important;
  border-color: #2ecc71 !important;
}
html.dark .rt-range-row.active.elite .rt-range-pct {
  color: #2ecc71 !important;
}

html.dark .rt-range-row.active.fast {
  background: color-mix(in srgb, #0ea5e9 15%, var(--color-surface)) !important;
  border-color: #0ea5e9 !important;
}
html.dark .rt-range-row.active.fast .rt-range-pct {
  color: #0ea5e9 !important;
}

html.dark .rt-range-row.active.avg {
  background: color-mix(in srgb, #f5a623 15%, var(--color-surface)) !important;
  border-color: #f5a623 !important;
}
html.dark .rt-range-row.active.avg .rt-range-pct {
  color: #f5a623 !important;
}

html.dark .rt-range-row.active.slow {
  background: color-mix(in srgb, #e74c3c 15%, var(--color-surface)) !important;
  border-color: #e74c3c !important;
}
html.dark .rt-range-row.active.slow .rt-range-pct {
  color: #e74c3c !important;
}

/* ── F1 PREVIEW ANIMATIONS ── */
.f1-preview-arena {
  position: relative;
  width: 280px;
  height: 120px;
  background: color-mix(in srgb, var(--test-accent) 2%, rgba(0,0,0,0.35));
  border: 1.5px solid var(--color-outline);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

html.light .f1-preview-arena {
  background: color-mix(in srgb, var(--test-accent) 4%, rgba(0,0,0,0.04));
}

.f1-preview-lights {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.f1-preview-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 6px;
  background: var(--color-surface-container-high);
  border-radius: 6px;
  border: 1px solid var(--color-outline);
}

html.dark .f1-preview-col {
  background: var(--color-surface-container-high) !important;
}

.f1-preview-bulb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-outline-variant);
  border: 1px solid rgba(0,0,0,0.25);
  box-sizing: border-box;
}

/* Bulbs lit states via keyframes */
.col-1 .f1-preview-bulb { animation: f1Col1Lit 5.2s infinite steps(1); }
.col-2 .f1-preview-bulb { animation: f1Col2Lit 5.2s infinite steps(1); }
.col-3 .f1-preview-bulb { animation: f1Col3Lit 5.2s infinite steps(1); }
.col-4 .f1-preview-bulb { animation: f1Col4Lit 5.2s infinite steps(1); }
.col-5 .f1-preview-bulb { animation: f1Col5Lit 5.2s infinite steps(1); }

@keyframes f1Col1Lit {
  0%, 14% { background: var(--color-outline-variant); box-shadow: none; }
  15%, 55% { background: #d32f2f; box-shadow: 0 0 6px #d32f2f; }
  56%, 100% { background: var(--color-outline-variant); box-shadow: none; }
}
@keyframes f1Col2Lit {
  0%, 19% { background: var(--color-outline-variant); box-shadow: none; }
  20%, 55% { background: #d32f2f; box-shadow: 0 0 6px #d32f2f; }
  56%, 100% { background: var(--color-outline-variant); box-shadow: none; }
}
@keyframes f1Col3Lit {
  0%, 24% { background: var(--color-outline-variant); box-shadow: none; }
  25%, 55% { background: #d32f2f; box-shadow: 0 0 6px #d32f2f; }
  56%, 100% { background: var(--color-outline-variant); box-shadow: none; }
}
@keyframes f1Col4Lit {
  0%, 29% { background: var(--color-outline-variant); box-shadow: none; }
  30%, 55% { background: #d32f2f; box-shadow: 0 0 6px #d32f2f; }
  56%, 100% { background: var(--color-outline-variant); box-shadow: none; }
}
@keyframes f1Col5Lit {
  0%, 34% { background: var(--color-outline-variant); box-shadow: none; }
  35%, 55% { background: #d32f2f; box-shadow: 0 0 6px #d32f2f; }
  56%, 100% { background: var(--color-outline-variant); box-shadow: none; }
}

.f1-preview-click {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
  z-index: 10;
  animation: f1ClickAnimate 5.2s infinite linear;
}

.f1-preview-click span {
  font-size: 20px;
  line-height: 1;
  display: block;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

@keyframes f1ClickAnimate {
  0%, 55% { opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  68% { opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  71% { opacity: 1; transform: translate(-35%, -15%) scale(1); }
  72% { opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  75% { opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  85% { opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  100% { opacity: 0; }
}

.f1-preview-score {
  position: absolute;
  bottom: 12px;
  background: #10b981;
  color: #ffffff;
  font-family: var(--font-h);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  animation: f1ScoreAnimate 5.2s infinite linear;
}

@keyframes f1ScoreAnimate {
  0%, 73% { opacity: 0; transform: scale(0.8); }
  75%, 92% { opacity: 1; transform: scale(1); }
  96%, 100% { opacity: 0; transform: scale(0.8); }
}

.f1-preview-caption {
  font-family: var(--font-b);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  line-height: 1.4;
}

.f1-preview-caption .f1-highlight {
  color: var(--test-accent);
  font-weight: 700;
}
