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

html, body {
  height: 100%;
  background: #0a0d0a;
  color: #b8ffb0;
  font-family: "Courier New", "Lucida Console", monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(50, 90, 50, 0.18), transparent 65%),
    repeating-linear-gradient(90deg, #2a2a2a 0px, #2a2a2a 22px, #232323 22px, #232323 44px),
    linear-gradient(180deg, #1a1d1a 0%, #050805 100%);
  border: 2px solid #3a4a3a;
  border-radius: 8px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.85),
    inset 0 0 120px rgba(0, 30, 0, 0.55),
    inset 0 0 60px rgba(0,0,0,0.7);
  overflow: hidden;
}

/* CRT scanline overlay */
#scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.0) 0px,
      rgba(0, 0, 0, 0.0) 2px,
      rgba(0, 0, 0, 0.22) 3px,
      rgba(0, 0, 0, 0.22) 4px
    );
  mix-blend-mode: multiply;
}
#scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* DEFCON red strobe flash overlay */
#alertFlash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  background: rgba(255, 30, 30, 0);
  transition: background 90ms linear;
  mix-blend-mode: screen;
}
#alertFlash.strobe {
  animation: alertStrobe 0.45s steps(2, end) 4;
}
@keyframes alertStrobe {
  0%, 49%   { background: rgba(255, 30, 30, 0.55); }
  50%, 100% { background: rgba(255, 30, 30, 0.0); }
}

#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,15,0,0.75), rgba(0,15,0,0));
  z-index: 10;
  pointer-events: none;
  border-bottom: 1px dashed rgba(110, 200, 110, 0.25);
}

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

.team .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 6px;
  opacity: 0.85;
  font-family: "Impact", "Stencil Std", "Courier New", monospace;
}

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

.team.red .label, .team.red .score {
  color: #ff6666;
  text-shadow: 0 0 14px rgba(255, 80, 80, 0.7), 0 0 2px rgba(255, 80, 80, 0.95);
}

.team.blue .label, .team.blue .score {
  color: #b8ffb0;
  text-shadow: 0 0 14px rgba(120, 255, 110, 0.7), 0 0 2px rgba(120, 255, 110, 0.95);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 8px;
  opacity: 0.95;
  color: #ffe066;
  font-family: "Impact", "Stencil Std", "Courier New", monospace;
  text-shadow: 0 0 10px rgba(255, 224, 102, 0.6);
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 4px;
  opacity: 0.65;
  margin-top: 4px;
  color: #b8ffb0;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  filter: contrast(1.05) brightness(1.05);
}

.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.55;
  color: #b8ffb0;
  z-index: 11;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(120, 255, 110, 0.45);
}

@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.85),
    inset 0 0 120px rgba(60, 0, 0, 0.65),
    0 0 60px rgba(255, 40, 40, 0.75);
}
