* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #000000;
  color: #ffffff;
  font-family: "Press Start 2P", "Courier New", "SF Mono", monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background: #000000;
  border: 2px solid #ff00cc;
  border-radius: 6px;
  box-shadow:
    0 0 30px rgba(255, 0, 204, 0.55),
    0 0 80px rgba(0, 220, 255, 0.25),
    inset 0 0 60px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0));
  z-index: 10;
  pointer-events: none;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
}

.team .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 4px;
  opacity: 0.95;
  font-family: "Courier New", monospace;
}

.team .score {
  font-family: "Courier New", monospace;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-top: 4px;
  transition: transform 0.15s ease;
}

/* P1 — hot pink/magenta neon */
.team.red .label, .team.red .score {
  color: #ff2eb8;
  text-shadow:
    -1.5px 0 0 rgba(255, 0, 100, 0.9),
    1.5px 0 0 rgba(0, 220, 255, 0.9),
    0 0 10px rgba(255, 46, 184, 0.9),
    0 0 22px rgba(255, 46, 184, 0.5);
}

/* P2 — cyan/electric blue neon */
.team.blue .label, .team.blue .score {
  color: #00f0ff;
  text-shadow:
    -1.5px 0 0 rgba(255, 0, 100, 0.9),
    1.5px 0 0 rgba(0, 220, 255, 0.9),
    0 0 10px rgba(0, 240, 255, 0.9),
    0 0 22px rgba(0, 240, 255, 0.5);
}

.score.bump { transform: scale(1.35); }

.meta {
  text-align: center;
}

.meta .title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #ffe600;
  text-shadow:
    0 0 8px rgba(255, 230, 0, 0.9),
    0 0 20px rgba(255, 200, 0, 0.55),
    -1.2px 0 0 rgba(255, 0, 80, 0.7),
    1.2px 0 0 rgba(0, 220, 255, 0.7);
  font-family: "Courier New", monospace;
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-top: 4px;
  color: #b8ffd0;
  font-family: "Courier New", monospace;
}

/* Combo HUD — prominent streak counter */
#combo-hud {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  pointer-events: none;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #00ffaa;
  padding: 6px 16px;
  border-radius: 4px;
  box-shadow:
    0 0 12px rgba(0, 255, 170, 0.55),
    inset 0 0 8px rgba(0, 255, 170, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#combo-hud.pop {
  transform: translateX(-50%) scale(1.12);
  box-shadow:
    0 0 30px rgba(255, 230, 0, 0.95),
    inset 0 0 14px rgba(255, 230, 0, 0.35);
}

#combo-hud.break {
  box-shadow:
    0 0 20px rgba(255, 60, 60, 0.85),
    inset 0 0 12px rgba(255, 60, 60, 0.3);
  border-color: #ff3a3a;
}

.combo-label {
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 3px;
  color: #00ffaa;
  text-shadow: 0 0 8px rgba(0, 255, 170, 0.8);
  margin-bottom: 3px;
}

.combo-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: "Courier New", monospace;
  font-weight: 900;
}

.combo-bucket {
  font-size: 14px;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
  min-width: 38px;
}

.combo-streak {
  font-size: 22px;
  color: #ffe600;
  text-shadow: 0 0 10px rgba(255, 230, 0, 0.95);
}

.combo-mult {
  font-size: 28px;
  color: #ff2eb8;
  text-shadow:
    0 0 10px rgba(255, 46, 184, 0.95),
    -1.2px 0 0 rgba(0, 220, 255, 0.8),
    1.2px 0 0 rgba(255, 230, 0, 0.6);
  min-width: 56px;
  text-align: left;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  /* faint chromatic aberration via composite blur — keep mild */
  filter: contrast(1.05) saturate(1.15);
}

/* CRT scanline overlay */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.28) 3px,
      rgba(0, 0, 0, 0.28) 4px
    );
  mix-blend-mode: multiply;
  opacity: 0.9;
  animation: scanShift 8s linear infinite;
}

@keyframes scanShift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

/* Soft CRT vignette */
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 21;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.75) 100%);
}

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.7;
  color: #00ffaa;
  text-shadow: 0 0 6px rgba(0, 255, 170, 0.8);
  pointer-events: none;
  z-index: 12;
}

/* Glitch shake on combo break (renamed from quake; arcade flavor) */
@keyframes quake {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-3px, 2px); }
  20%  { transform: translate(4px, -3px); }
  30%  { transform: translate(-4px, 1px); }
  40%  { transform: translate(3px, -2px); }
  50%  { transform: translate(-2px, 3px); }
  60%  { transform: translate(3px, -1px); }
  70%  { transform: translate(-3px, -2px); }
  80%  { transform: translate(4px, 2px); }
  90%  { transform: translate(-2px, -1px); }
  100% { transform: translate(0, 0); }
}

#stage.shaking {
  animation: quake 0.32s linear infinite;
  box-shadow:
    0 0 40px rgba(255, 230, 0, 0.85),
    0 0 80px rgba(255, 0, 204, 0.5),
    inset 0 0 60px rgba(0, 0, 0, 0.9);
}
