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

html, body {
  height: 100%;
  background: #050208;
  color: #f0e6ff;
  font-family: "Cinzel", "Times New Roman", Georgia, 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(150, 60, 220, 0.30), transparent 55%),
    radial-gradient(ellipse at 18% 90%, rgba(90, 30, 160, 0.20), transparent 50%),
    radial-gradient(ellipse at 82% 90%, rgba(90, 30, 160, 0.20), transparent 50%),
    linear-gradient(180deg, #1a0a2e 0%, #0a0314 50%, #050108 100%);
  border: 2px solid #2a1144;
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.85),
    inset 0 0 90px rgba(0,0,0,0.55),
    inset 0 0 140px rgba(80, 20, 130, 0.18);
  overflow: hidden;
}

/* Cobweb overlay — faint diagonals in the corners */
#stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 0% 0%,
      transparent 60px,
      rgba(220, 200, 255, 0.04) 60px,
      rgba(220, 200, 255, 0.04) 61px,
      transparent 62px,
      transparent 78px,
      rgba(220, 200, 255, 0.03) 78px,
      rgba(220, 200, 255, 0.03) 79px,
      transparent 80px),
    radial-gradient(circle at 100% 0%,
      transparent 60px,
      rgba(220, 200, 255, 0.04) 60px,
      rgba(220, 200, 255, 0.04) 61px,
      transparent 62px,
      transparent 78px,
      rgba(220, 200, 255, 0.03) 78px,
      rgba(220, 200, 255, 0.03) 79px,
      transparent 80px);
  background-size: 200px 200px, 200px 200px;
  background-repeat: no-repeat;
  z-index: 2;
}

#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.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: 5px;
  opacity: 0.85;
}

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

/* WRAITH (red slot) — sickly bone-white with cyan undertones */
.team.red .label, .team.red .score {
  color: #d8f2ff;
  text-shadow:
    0 0 14px rgba(120, 220, 255, 0.85),
    0 0 26px rgba(60, 180, 255, 0.55),
    0 0 2px rgba(255, 255, 255, 0.9);
}

/* PHANTOM (blue slot) — violet spirit glow */
.team.blue .label, .team.blue .score {
  color: #e9c8ff;
  text-shadow:
    0 0 14px rgba(180, 110, 255, 0.85),
    0 0 26px rgba(140, 60, 220, 0.55),
    0 0 2px rgba(255, 255, 255, 0.9);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 7px;
  opacity: 0.92;
  color: #d6b8ff;
  text-shadow: 0 0 10px rgba(160, 80, 230, 0.7), 0 0 2px rgba(255,255,255,0.4);
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 4px;
  opacity: 0.55;
  margin-top: 4px;
  color: #b699e0;
  font-style: italic;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
}

.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;
  color: #c4a8e8;
  pointer-events: none;
  z-index: 3;
}

/* "Ghost sweep" replaces the earthquake animation — gentler, drifting */
@keyframes ghostsweep {
  0%   { transform: translate(0, 0); filter: hue-rotate(0deg); }
  20%  { transform: translate(-2px, 1px); filter: hue-rotate(-8deg); }
  40%  { transform: translate(2px, -1px); filter: hue-rotate(6deg); }
  60%  { transform: translate(-1px, 2px); filter: hue-rotate(-4deg); }
  80%  { transform: translate(2px, 0); filter: hue-rotate(4deg); }
  100% { transform: translate(0, 0); filter: hue-rotate(0deg); }
}

#stage.shaking {
  animation: ghostsweep 1.6s ease-in-out infinite;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.85),
    inset 0 0 90px rgba(0,0,0,0.55),
    inset 0 0 160px rgba(180, 80, 255, 0.45),
    0 0 60px rgba(160, 60, 230, 0.6);
}
