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

html, body {
  height: 100%;
  background: #100621;
  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 8% 22%, rgba(255, 178, 76, 0.22), transparent 35%),
    radial-gradient(ellipse at 92% 22%, rgba(255, 178, 76, 0.22), transparent 35%),
    radial-gradient(ellipse at 8% 78%, rgba(255, 178, 76, 0.18), transparent 32%),
    radial-gradient(ellipse at 92% 78%, rgba(255, 178, 76, 0.18), transparent 32%),
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 80, 0.20), transparent 55%),
    linear-gradient(180deg, #3a1268 0%, #1a0633 50%, #0a0418 100%);
  border: 3px solid #d4a02a;
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(0,0,0,0.55),
    inset 0 0 24px rgba(212, 160, 42, 0.25),
    0 0 30px rgba(212, 160, 42, 0.35);
  overflow: hidden;
}

/* Wrought-iron New Orleans balcony border filigree (top + bottom decorative bands) */
#stage::before, #stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  pointer-events: none;
  z-index: 9;
  background:
    repeating-linear-gradient(90deg,
      rgba(212, 160, 42, 0.85) 0 2px,
      transparent 2px 10px,
      rgba(212, 160, 42, 0.55) 10px 11px,
      transparent 11px 18px),
    linear-gradient(180deg, rgba(50, 20, 0, 0.45), transparent);
}
#stage::before { top: 84px; border-bottom: 1px solid rgba(212,160,42,0.55); }
#stage::after  { bottom: 0;  border-top:    1px solid rgba(212,160,42,0.55); transform: scaleY(-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(10, 4, 24, 0.85), rgba(10, 4, 24, 0));
  z-index: 10;
  pointer-events: none;
  border-bottom: 2px solid rgba(212, 160, 42, 0.6);
}

.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;
  font-family: "Didot", "Bodoni 72", Georgia, serif;
}

.team .score {
  font-family: "Didot", "Bodoni 72", Georgia, serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

.team.red .label, .team.red .score {
  color: #6b2dc1;
  text-shadow: 0 0 14px rgba(150, 80, 220, 0.85), 0 0 2px rgba(180, 110, 255, 0.95);
}

.team.blue .label, .team.blue .score {
  color: #2bbf6f;
  text-shadow: 0 0 14px rgba(60, 220, 130, 0.85), 0 0 2px rgba(120, 240, 170, 0.95);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 6px;
  opacity: 0.95;
  color: #f0c757;
  text-shadow: 0 0 12px rgba(240, 199, 87, 0.7);
  font-family: "Didot", "Bodoni 72", Georgia, serif;
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.6;
  margin-top: 4px;
  color: #f0c757;
  font-family: "Didot", "Bodoni 72", Georgia, serif;
}

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

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "Didot", "Bodoni 72", Georgia, serif;
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.6;
  color: #f0c757;
  pointer-events: none;
  z-index: 11;
}

@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,0,0,0.55),
              0 0 50px rgba(240, 199, 87, 0.9);
}

/* Doubloon Jackpot ambient pulse */
@keyframes jackpotPulse {
  0%, 100% { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 80px rgba(0,0,0,0.55), 0 0 30px rgba(240, 199, 87, 0.35); }
  50%      { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 100px rgba(255, 200, 70, 0.4), 0 0 60px rgba(240, 199, 87, 1.0); }
}
#stage.jackpot {
  animation: jackpotPulse 0.7s ease-in-out infinite;
}
