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

html, body {
  height: 100%;
  background: #02060d;
  color: #e8f7ff;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(60, 200, 220, 0.18), transparent 55%),
    radial-gradient(ellipse at 30% 85%, rgba(0, 120, 140, 0.22), transparent 60%),
    linear-gradient(180deg, #0a2840 0%, #061829 35%, #020812 100%);
  border: 1px solid #0e2a44;
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(0, 20, 40, 0.7),
    inset 0 0 140px rgba(0, 80, 100, 0.18);
  overflow: hidden;
}

/* Animated caustics — soft moving light bands, like sun rippling through water */
#stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 25% 0%, rgba(120, 230, 255, 0.10), transparent 40%),
    radial-gradient(ellipse at 75% 0%, rgba(80, 200, 220, 0.08), transparent 45%);
  filter: blur(2px);
  animation: caustics 11s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes caustics {
  0%   { transform: translate(0, 0); opacity: 0.55; }
  50%  { transform: translate(40px, 30px); opacity: 0.9; }
  100% { transform: translate(-30px, 60px); opacity: 0.6; }
}

#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,8,16,0.7), 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.9;
}

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

/* GLOW team (was RED) — warm coral bioluminescence */
.team.red .label, .team.red .score {
  color: #ff8eb2;
  text-shadow: 0 0 16px rgba(255, 142, 178, 0.8), 0 0 3px rgba(255, 200, 220, 0.9);
}

/* TIDE team (was BLUE) — cool cyan bioluminescence */
.team.blue .label, .team.blue .score {
  color: #5fffe8;
  text-shadow: 0 0 18px rgba(95, 255, 232, 0.85), 0 0 3px rgba(180, 255, 240, 0.95);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 6px;
  opacity: 0.9;
  color: #cfeefa;
  text-shadow: 0 0 10px rgba(80, 200, 220, 0.5);
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.55;
  margin-top: 4px;
  color: #8bc7d8;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "SF Mono", "Menlo", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.5;
  pointer-events: none;
  color: #aedff0;
  z-index: 5;
}

/* The earthquake here becomes a "ROGUE CURRENT" — the same shake but tinted teal */
@keyframes quake {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-3px, 2px) rotate(0.25deg); }
  20%  { transform: translate(4px, -3px) rotate(-0.3deg); }
  30%  { transform: translate(-4px, 1px) rotate(0.2deg); }
  40%  { transform: translate(3px, -2px) rotate(-0.25deg); }
  50%  { transform: translate(-2px, 3px) rotate(0.3deg); }
  60%  { transform: translate(3px, -1px) rotate(-0.2deg); }
  70%  { transform: translate(-3px, -2px) rotate(0.15deg); }
  80%  { transform: translate(4px, 2px) rotate(-0.15deg); }
  90%  { transform: translate(-2px, -1px) rotate(0.2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: quake 0.32s linear infinite;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(0, 20, 40, 0.7),
    0 0 50px rgba(60, 220, 240, 0.55);
}
