/* Target Shooter — test-specific overrides */
:root { --test-accent: #06b6d4; }
.t-intro-icon::before {
  content: 'track_changes';
}

.t-shell { max-width: 900px; }

/* ── ARENA ── */
.ts-arena {
  position: relative;
  width: 100%;
  min-height: 480px;
  background: color-mix(in srgb, var(--test-accent) 5%, #ffffff);
  border: 1.5px solid var(--color-outline);
  border-radius: 0;
  overflow: hidden;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: background-color 0.2s, border-color 0.2s;
}

html.dark .ts-arena {
  background: color-mix(in srgb, var(--test-accent) 4%, var(--color-surface-container-low)) !important;
  border-color: var(--color-outline) !important;
  border-radius: 0 !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* ── TARGET (crosshair style like aim trainer) ── */
.ts-target {
  position: absolute;
  border-radius: 50%;
  background: transparent;
  border: 3.5px solid #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
  cursor: pointer;
  pointer-events: auto;
}

/* Crosshair vertical */
.ts-target::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 2.5px; height: 50%;
  background: #06b6d4;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  pointer-events: none;
}

/* Crosshair horizontal */
.ts-target::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 50%; height: 2.5px;
  background: #06b6d4;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  pointer-events: none;
}

.ts-target:hover {
  box-shadow: 0 0 0 5px rgba(6,182,212,0.3);
}

.ts-target.ts-hit {
  opacity: 0 !important;
  border-color: #2ecc71;
  box-shadow: 0 0 0 8px rgba(46,204,113,0.3);
  transition: opacity 0.15s, box-shadow 0.15s;
  pointer-events: none;
}

/* ── STATUS ROW ── */
.ts-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.ts-stat {
  text-align: center;
}

.ts-stat-val {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.ts-stat-lbl {
  font-family: 'Lexend', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── PROGRESS ── */
.ts-progress {
  width: 100%;
  height: 6px;
  background: #ccfbf1;
  border-radius: 3px;
  overflow: hidden;
}

.ts-progress-fill {
  height: 100%;
  background: #06b6d4;
  border-radius: 3px;
  transition: width 0.05s linear;
}

/* ── SCORE RANGE TABLE ── */

@media (max-width: 480px) {
  .ts-arena { min-height: 360px; }
}

/* ── TARGET SHOOTER PREVIEW ANIMATIONS ── */
.ts-preview-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.ts-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;
}

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

.ts-preview-target {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--test-accent);
  background: color-mix(in srgb, var(--test-accent) 8%, transparent);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.ts-preview-ring {
  position: absolute;
  inset: 2px;
  border: 1.5px solid var(--test-accent);
  border-radius: 50%;
  opacity: 0.6;
}

.ts-preview-bullseye {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--test-accent);
}

.ts-preview-target.t1 {
  left: 70px; top: 50px;
  animation: tsT1Animate 4.5s infinite linear;
}

.ts-preview-target.t2 {
  left: 210px; top: 70px;
  animation: tsT2Animate 4.5s infinite linear;
}

@keyframes tsT1Animate {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  10% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  22% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

@keyframes tsT2Animate {
  0%, 48% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  62% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

.ts-preview-hit-text {
  position: absolute;
  top: -12px;
  font-family: var(--font-h);
  font-size: 9px;
  font-weight: 800;
  color: #2ecc71;
  opacity: 0;
  white-space: nowrap;
}

.ts-preview-target.t1 .ts-preview-hit-text {
  animation: tsHit1TextAnimate 4.5s infinite linear;
}

.ts-preview-target.t2 .ts-preview-hit-text {
  animation: tsHit2TextAnimate 4.5s infinite linear;
}

@keyframes tsHit1TextAnimate {
  0%, 19% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; transform: translateY(-4px); }
  30%, 100% { opacity: 0; transform: translateY(-12px); }
}

@keyframes tsHit2TextAnimate {
  0%, 59% { opacity: 0; transform: translateY(0); }
  60% { opacity: 1; transform: translateY(-4px); }
  70%, 100% { opacity: 0; transform: translateY(-12px); }
}

.ts-preview-click {
  position: absolute;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  animation: tsClickAnimate 4.5s infinite linear;
}

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

@keyframes tsClickAnimate {
  0% { left: 140px; top: 90px; opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  4% { left: 140px; top: 90px; opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  10% { left: 70px; top: 50px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  19% { left: 70px; top: 50px; opacity: 1; transform: translate(-35%, -15%) scale(1); }
  20% { left: 70px; top: 50px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  22% { left: 70px; top: 50px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  28% { left: 140px; top: 90px; opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  
  40% { left: 140px; top: 90px; opacity: 0; }
  50% { left: 210px; top: 70px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  58% { left: 210px; top: 70px; opacity: 1; transform: translate(-35%, -15%) scale(1); }
  60% { left: 210px; top: 70px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  62% { left: 210px; top: 70px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  68% { left: 140px; top: 90px; opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  100% { left: 140px; top: 90px; opacity: 0; }
}

.ts-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;
}

.ts-preview-caption .ts-highlight-grow {
  color: #2ecc71;
  font-weight: 700;
}

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