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

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

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  /* Deep space black with subtle horizontal ring-band gradients (purple + gold)
     spanning the board, plus a faint cosmic glow at top. */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(120, 90, 200, 0.18), transparent 55%),
    linear-gradient(180deg,
      rgba(28, 18, 48, 0.55) 0%,
      rgba(8, 4, 14, 0.92) 22%,
      rgba(72, 34, 102, 0.22) 38%,
      rgba(6, 2, 12, 0.95) 50%,
      rgba(180, 140, 60, 0.18) 64%,
      rgba(4, 2, 10, 0.95) 76%,
      rgba(80, 40, 110, 0.20) 86%,
      rgba(0, 0, 4, 1) 100%
    ),
    radial-gradient(circle at 50% 50%, rgba(30, 20, 60, 0.35), transparent 70%),
    #000004;
  border: 1px solid #1a1230;
  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 20px rgba(120, 90, 200, 0.12);
  overflow: hidden;
}

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 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: 11px;
  font-weight: 600;
  letter-spacing: 5px;
  opacity: 0.85;
}

.team .score {
  font-family: "SF Mono", "JetBrains Mono", "Menlo", "Courier New", monospace;
  font-size: 38px;
  font-weight: 200;
  line-height: 1;
  margin-top: 4px;
  transition: transform 0.15s ease;
  letter-spacing: 1px;
}

/* AURUM (gold) — formerly red */
.team.red .label, .team.red .score {
  color: #f4d27a;
  text-shadow:
    0 0 14px rgba(244, 210, 122, 0.7),
    0 0 2px rgba(255, 230, 160, 0.95);
}

/* ARGENT (silver) — formerly blue */
.team.blue .label, .team.blue .score {
  color: #d8e0f0;
  text-shadow:
    0 0 14px rgba(216, 224, 240, 0.6),
    0 0 2px rgba(255, 255, 255, 0.85);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 7px;
  opacity: 0.85;
  color: #c8b8e8;
}

.meta .subtitle {
  font-size: 10px;
  letter-spacing: 3px;
  opacity: 0.55;
  margin-top: 4px;
  color: #a8a0c0;
  font-family: "SF Mono", "Menlo", monospace;
}

.cassini-meter {
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 2px;
  font-family: "SF Mono", "Menlo", monospace;
  color: #f0d890;
  opacity: 0.8;
  padding: 2px 8px;
  border: 1px solid rgba(244, 210, 122, 0.35);
  border-radius: 3px;
  background: rgba(20, 12, 32, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: inline-block;
}

.cassini-meter.imminent {
  color: #ffe8a0;
  border-color: rgba(255, 220, 120, 0.85);
  text-shadow: 0 0 8px rgba(255, 220, 120, 0.9);
  animation: pulse 0.55s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

#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: 10px;
  letter-spacing: 2.5px;
  opacity: 0.45;
  color: #b8b0d0;
  pointer-events: none;
}

/* "Earthquake" repurposed as Cassini Division flux. Subtle violet/gold shimmer
   rather than red shake — keeps the cosmic mood. */
@keyframes cassini-flux {
  0%   { transform: translate(0, 0) rotate(0); }
  25%  { transform: translate(-2px, 1px) rotate(0.12deg); }
  50%  { transform: translate(2px, -1px) rotate(-0.12deg); }
  75%  { transform: translate(-1px, 2px) rotate(0.08deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: cassini-flux 0.5s 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),
    0 0 50px rgba(220, 180, 90, 0.55),
    inset 0 0 40px rgba(180, 130, 220, 0.25);
}
