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

/* ── F1 LIGHT PANEL (light theme) ── */
.f1-panel {
  border-radius: 22px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  padding: 40px 24px;
}

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

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

.f1-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ── BULBS (bigger, cuter) ── */
.f1-bulb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 3px solid #d1d5db;
}

.f1-col.lit .f1-bulb {
  background: #ef4444;
  border-color: #dc2626;
  box-shadow: 0 0 16px rgba(239,68,68,0.5), 0 0 32px rgba(239,68,68,0.2);
}

/* Lights-out state */
.f1-panel[data-state="go"] .f1-bulb {
  background: #e5e7eb;
  border-color: #d1d5db;
  box-shadow: none;
}

/* Hit state — green */
.f1-panel[data-state="hit"] .f1-bulb {
  background: #34d399;
  border-color: #10b981;
  box-shadow: 0 0 14px rgba(52,211,153,0.45);
}

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

.f1-status {
  font-family: 'Manrope', sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: #1a2e3b;
  line-height: 1;
  min-height: 40px;
}

.f1-panel[data-state="go"] .f1-status    { color: #059669; font-size: 48px; }
.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: 14px;
  font-weight: 500;
  color: #9ca3af;
  min-height: 18px;
}

.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: 14px;
  background: #fef2f2;
  border: 2px dashed #fecaca;
  border-radius: 18px;
  padding: 28px 36px;
  margin-bottom: 24px;
}

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

.f1-intro-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #fecaca;
}

.f1-intro-bulb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 2px solid #d1d5db;
}

.f1-intro-bulb.on {
  background: #ef4444;
  border-color: #dc2626;
  box-shadow: 0 0 8px rgba(239,68,68,0.4);
}

.f1-intro-caption {
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
}

/* ── TRIAL BARS ── */
.rt-trial-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 70px;
  margin-top: 10px;
}
.rt-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.rt-bar {
  width: 100%;
  border-radius: 5px 5px 0 0;
  min-height: 4px;
}
.rt-bar.ok    { background: var(--test-accent); opacity: 0.85; }
.rt-bar.best  { background: #2ecc71; }
.rt-bar.worst { background: #e74c3c; opacity: 0.7; }
.rt-bar.error { background: #e0eaee; }
.rt-bar-val {
  font-family: 'Lexend', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #9eb0bc;
  white-space: nowrap;
}

/* ── SCORE RANGE TABLE ── */
.rt-range-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.rt-range-row {
  display: grid;
  grid-template-columns: 10px 80px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
}
.rt-range-dot { width: 10px; height: 10px; border-radius: 50%; }
.rt-range-label { font-weight: 700; color: #1a2e3b; }
.rt-range-val   { color: #5a7285; }
.rt-range-pct   { font-weight: 700; text-align: right; }

.rt-range-row.elite  { background: #f0fdf4; } .rt-range-row.elite  .rt-range-dot { background: #2ecc71; } .rt-range-row.elite  .rt-range-pct { color: #2ecc71; }
.rt-range-row.fast   { background: #f0f9ff; } .rt-range-row.fast   .rt-range-dot { background: #0ea5e9; } .rt-range-row.fast   .rt-range-pct { color: #0ea5e9; }
.rt-range-row.avg    { background: #fafafa; } .rt-range-row.avg    .rt-range-dot { background: #f5a623; } .rt-range-row.avg    .rt-range-pct { color: #f5a623; }
.rt-range-row.slow   { background: #fef2f1; } .rt-range-row.slow   .rt-range-dot { background: #e74c3c; } .rt-range-row.slow   .rt-range-pct { color: #e74c3c; }

.rt-hint {
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #b0c0ca;
  text-align: center;
  margin-top: -8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .f1-gantry { gap: 8px; }
  .f1-col { padding: 8px; gap: 8px; }
  .f1-bulb { width: 30px; height: 30px; }
  .f1-status { font-size: 32px; }
  .f1-panel { min-height: 280px; padding: 28px 16px; }
  .f1-intro-visual { padding: 20px 16px; }
  .f1-intro-lights { gap: 6px; }
  .f1-intro-col { padding: 6px; }
  .f1-intro-bulb { width: 16px; height: 16px; }
}

@media (max-width: 360px) {
  .f1-gantry { gap: 5px; }
  .f1-col { padding: 6px; gap: 6px; }
  .f1-bulb { width: 24px; height: 24px; border-width: 2px; }
  .f1-status { font-size: 26px; }
  .f1-panel { min-height: 240px; padding: 20px 12px; gap: 20px; }
}
