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

html, body {
  height: 100%;
  background: #0a0506;
  color: #fff;
  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% 100%, rgba(255, 110, 30, 0.35), transparent 55%),
    radial-gradient(ellipse at 50% 0%, rgba(180, 40, 10, 0.30), transparent 60%),
    linear-gradient(180deg, #2a0a06 0%, #100403 55%, #1f0604 100%);
  border: 1px solid #4a1a0c;
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 100px rgba(80, 12, 0, 0.55),
    inset 0 0 24px rgba(255, 100, 30, 0.18);
  overflow: hidden;
}

/* Obsidian rock-wall texture overlay — dark craquelure pocks */
#stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(0,0,0,0.45) 0 12px, transparent 14px),
    radial-gradient(circle at 78% 38%, rgba(0,0,0,0.40) 0 18px, transparent 20px),
    radial-gradient(circle at 32% 64%, rgba(0,0,0,0.40) 0 22px, transparent 24px),
    radial-gradient(circle at 84% 82%, rgba(0,0,0,0.45) 0 14px, transparent 16px),
    radial-gradient(circle at 10% 88%, rgba(0,0,0,0.40) 0 16px, transparent 18px);
  mix-blend-mode: multiply;
  opacity: 0.7;
  z-index: 1;
}

#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.65), 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;
}

.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;
}

/* LAVA = bright molten orange */
.team.red .label, .team.red .score {
  color: #ff7a18;
  text-shadow:
    0 0 16px rgba(255, 122, 24, 0.85),
    0 0 4px rgba(255, 200, 80, 0.95);
}

/* EMBER = deeper crimson */
.team.blue .label, .team.blue .score {
  color: #ff3a2a;
  text-shadow:
    0 0 16px rgba(255, 58, 42, 0.80),
    0 0 4px rgba(255, 150, 90, 0.90);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 6px;
  opacity: 0.95;
  color: #ffb14a;
  text-shadow: 0 0 10px rgba(255, 110, 30, 0.75);
}

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

#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.55;
  color: #ffb070;
  z-index: 11;
  pointer-events: none;
}

@keyframes quake {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-4px, 3px) rotate(0.3deg); }
  20%  { transform: translate(5px, -4px) rotate(-0.35deg); }
  30%  { transform: translate(-5px, 2px) rotate(0.25deg); }
  40%  { transform: translate(4px, -3px) rotate(-0.3deg); }
  50%  { transform: translate(-3px, 4px) rotate(0.35deg); }
  60%  { transform: translate(4px, -2px) rotate(-0.25deg); }
  70%  { transform: translate(-4px, -3px) rotate(0.2deg); }
  80%  { transform: translate(5px, 3px) rotate(-0.2deg); }
  90%  { transform: translate(-3px, -2px) rotate(0.25deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: quake 0.28s linear infinite;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 100px rgba(120, 20, 0, 0.65),
    inset 0 0 32px rgba(255, 140, 30, 0.35),
    0 0 56px rgba(255, 90, 20, 0.85);
}

/* Eruption-vent flash on stage edges when a vent fires */
@keyframes vent-pulse {
  0%, 100% { opacity: 0.18; }
  50%      { opacity: 0.55; }
}
#stage.venting::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 140, 30, 0.55) 0%, transparent 14%, transparent 86%, rgba(255, 140, 30, 0.55) 100%);
  animation: vent-pulse 0.35s ease-in-out infinite;
  z-index: 9;
}
