/* 🖱️ Tracking Stability Test Stylesheet (style.css) */

:root {
  --test-accent: #00ff88;
  --test-accent-soft: rgba(0, 255, 136, 0.12);
  --test-accent-border: rgba(0, 255, 136, 0.3);
  --arena-bg: #060912;
  --arena-border: rgba(0, 255, 136, 0.2);
}

html.light {
  --arena-bg: #060912;
  --arena-border: rgba(0, 255, 136, 0.3);
}

/* ── HIGH-CONTRAST BOLD FPS PLUS CROSSHAIR COMPONENT ── */
.tracking-arena,
.tracking-arena canvas,
.tracking-arena *,
body:has(#panelTask.active),
body:has(#panelTask.active) * {
  cursor: var(--cursor-fps-crosshair) !important;
}

.top-header .restart-pill,
.top-header button {
  cursor: pointer !important;
}

/* ── FULLSCREEN FIT-TO-SCREEN ARENA DURING GAMEPLAY ── */
body:has(#panelTask.active) {
  overflow: hidden !important;
}

body:has(#panelTask.active) header.panda-header,
body:has(#panelTask.active) .panda-nav,
body:has(#panelTask.active) footer.panda-footer,
body:has(#panelTask.active) .t-ambient-glow,
body:has(#panelTask.active) .t-seo-container,
body:has(#panelTask.active) .t-nav {
  display: none !important;
}

body:has(#panelTask.active) .t-shell {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body:has(#panelTask.active) .t-card {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #060912 !important;
  box-shadow: none !important;
  z-index: 9999 !important;
  overflow: hidden !important;
}

body:has(#panelTask.active) #panelTask,
body:has(#panelTask.active) .t-task {
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
}

/* Arena Container - Fills Entire Viewport */
.tracking-arena {
  position: absolute;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background-color: #060912;
  box-shadow: none !important;
  overflow: hidden;
  user-select: none;
}

/* Subtle Vignette Overlay */
.tracking-arena::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(4, 7, 13, 0.75) 100%);
  pointer-events: none;
  z-index: 2;
}

#webgl-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#webgl-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── MINIMALIST TOP HUD: CURRENT PHASE, TIME & RESTART ONLY ── */
.top-header {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
  font-family: var(--font-m, 'JetBrains Mono', monospace);
}

.top-header .round-pill,
.top-header .header-actions,
.top-header .restart-pill {
  pointer-events: auto;
}

.round-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(13, 18, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--test-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--test-accent);
  animation: pulseDot 1.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
}

#level {
  margin: 0;
  font-family: var(--font-m, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.restart-pill {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(12px);
  transition: all 0.15s ease;
}

.restart-pill:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

/* ── CENTER HOVER START HINT ── */
.start-hint {
  position: absolute;
  top: calc(50% - 62px);
  left: 50%;
  transform: translate(-50%, -50%);
  color: #00ff88;
  font-family: var(--font-m, monospace);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 25;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.7), 0 2px 8px rgba(0, 0, 0, 0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.start-hint.hidden {
  opacity: 0;
  transform: translate(-50%, -75px);
}

/* ── PROXIMITY ENERGY GAUGE ── */
.proximity-bar-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.proximity-bar-fill {
  height: 100%;
  width: 0%;
  background: #00ff88;
  border-radius: 999px;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 12px #00ff88;
}

/* ── BALANCED 4-METRIC TELEMETRY GRID ON RESULTS SCREEN ── */
.t-stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px !important;
}

@media (max-width: 680px) {
  .t-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── VISUAL PREVIEW BOX IN INTRO PANEL ── */
.tracking-preview-box {
  width: 100%;
  max-width: 320px;
  height: 150px;
  background: #060912;
  border: 1px solid var(--test-accent-border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  margin: 16px auto 8px;
  box-shadow: inset 0 0 24px rgba(0, 255, 136, 0.08);
}

.tracking-preview-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 64px;
  border: 1.5px dashed rgba(0, 240, 255, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tracking-preview-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #00f0ff 65%, #007799 100%);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.95);
  animation: orbitMove 5s linear infinite;
}

.tracking-preview-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.95));
  animation: orbitMove 5s linear infinite;
  animation-delay: -0.04s;
}

@keyframes orbitMove {
  0%   { transform: translate(90px, 0px); }
  6.25% { transform: translate(83.1px, 12.2px); }
  12.5% { transform: translate(63.6px, 22.6px); }
  18.75% { transform: translate(34.4px, 29.6px); }
  25%  { transform: translate(0px, 32.0px); }
  31.25% { transform: translate(-34.4px, 29.6px); }
  37.5% { transform: translate(-63.6px, 22.6px); }
  43.75% { transform: translate(-83.1px, 12.2px); }
  50%  { transform: translate(-90px, 0px); }
  56.25% { transform: translate(-83.1px, -12.2px); }
  62.5% { transform: translate(-63.6px, -22.6px); }
  68.75% { transform: translate(-34.4px, -29.6px); }
  75%  { transform: translate(0px, -32.0px); }
  81.25% { transform: translate(34.4px, -29.6px); }
  87.5% { transform: translate(63.6px, -22.6px); }
  93.75% { transform: translate(83.1px, -12.2px); }
  100% { transform: translate(90px, 0px); }
}

.tracking-preview-caption {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  text-align: center;
  margin-bottom: 16px;
}
