:root {
  --bg: #07111c;
  --panel: #0d1b2a;
  --accent: #3ddc97;
  --accent2: #ff6b6b;
  --ink: #e7eef7;
  --muted: #8aa0b8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #0e2238 0%, var(--bg) 60%, #04080d 100%);
  color: var(--ink);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow: hidden;
}

#root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

#hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(13, 27, 42, 0.65);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
}

.title {
  font-weight: 700;
  letter-spacing: 0.4em;
  font-size: 18px;
  color: var(--muted);
}

.score {
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: center;
}

#leftScore  { color: var(--accent); text-shadow: 0 0 18px rgba(61,220,151,0.35); }
#rightScore { color: var(--accent2); text-shadow: 0 0 18px rgba(255,107,107,0.35); }

#stage {
  position: relative;
  flex: 1;
  margin: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.04);
}

#video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror so movement feels natural */
  filter: brightness(0.55) saturate(0.8);
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#status {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

#footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px 14px;
}

.hint {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

#startBtn {
  background: linear-gradient(180deg, #3ddc97, #2ec57f);
  color: #042417;
  border: 0;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(61,220,151,0.25);
}

#startBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
