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

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

/* Deep indigo night-sky stage with a soft moon glow behind the play area */
#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    radial-gradient(ellipse at 50% 6%, rgba(255, 215, 140, 0.18), transparent 55%),
    radial-gradient(ellipse at 50% 80%, rgba(180, 60, 60, 0.10), transparent 60%),
    linear-gradient(180deg, #0a0a30 0%, #050218 55%, #110316 100%);
  border: 1px solid #1a1846;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 80px rgba(0,0,0,0.55);
  overflow: hidden;
}

/* Cherry blossom petal haze — slow drifting overlay made of CSS gradients */
.petal-haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(2px 4px at 12% 18%, rgba(255, 190, 210, 0.45), transparent 60%),
    radial-gradient(3px 5px at 78% 28%, rgba(255, 200, 220, 0.40), transparent 60%),
    radial-gradient(2px 4px at 42% 62%, rgba(255, 210, 225, 0.35), transparent 60%),
    radial-gradient(3px 5px at 88% 76%, rgba(255, 185, 205, 0.40), transparent 60%),
    radial-gradient(2px 3px at 20% 88%, rgba(255, 195, 215, 0.35), transparent 60%);
  opacity: 0.55;
  animation: petalDrift 22s linear infinite;
  z-index: 6;
}

@keyframes petalDrift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(-10px, 18px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Soft indigo vignette to deepen the corners and frame the lanterns */
.indigo-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(8, 4, 30, 0.85) 100%);
  z-index: 7;
}

#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(5, 3, 25, 0.75), rgba(5, 3, 25, 0));
  z-index: 11;
  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: 6px;
  opacity: 0.9;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.team .score {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "SF Mono", serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

/* AKA (red) team — warm amber-red lantern glow */
.team.red .label, .team.red .score {
  color: #ff8a4c;
  text-shadow: 0 0 14px rgba(255, 110, 60, 0.85), 0 0 2px rgba(255, 200, 120, 0.95);
}

/* AO (blue) team — soft moonlit indigo-white */
.team.blue .label, .team.blue .score {
  color: #c9b8ff;
  text-shadow: 0 0 14px rgba(160, 130, 255, 0.75), 0 0 2px rgba(220, 210, 255, 0.95);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 8px;
  color: #ffd58a;
  text-shadow: 0 0 10px rgba(255, 180, 100, 0.55);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.55;
  margin-top: 4px;
}

/* Wish-multiplier HUD strip just under the scoreboard */
#wish-hud {
  position: absolute;
  top: 86px;
  left: 0; right: 0;
  z-index: 10;
  pointer-events: none;
  text-align: center;
  padding: 4px 18px;
}

.wish-label {
  font-size: 9px;
  letter-spacing: 4px;
  opacity: 0.55;
  color: #ffd58a;
  font-family: "Hiragino Mincho ProN", serif;
}

.wish-row {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.wish-cell {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(40, 14, 60, 0.55);
  color: #ffd58a;
  border: 1px solid rgba(255, 180, 100, 0.35);
  text-shadow: 0 0 6px rgba(255, 180, 100, 0.55);
}
.wish-cell[data-mult="4"] {
  background: rgba(200, 50, 50, 0.45);
  border-color: rgba(255, 220, 130, 0.7);
  color: #ffe9b8;
}

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

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.55;
  color: #ffd58a;
  pointer-events: none;
  z-index: 8;
  text-shadow: 0 0 6px rgba(255, 160, 90, 0.45);
}

/* Repurposed earthquake -> "FIREWORK BURST" sky flash */
@keyframes fireworkPulse {
  0%   { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 80px rgba(0,0,0,0.55), inset 0 0 0px rgba(255, 220, 130, 0); }
  20%  { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 80px rgba(0,0,0,0.55), inset 0 0 120px rgba(255, 220, 130, 0.45); }
  60%  { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 80px rgba(0,0,0,0.55), inset 0 0 70px  rgba(255, 160, 120, 0.30); }
  100% { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 80px rgba(0,0,0,0.55), inset 0 0 0px   rgba(255, 220, 130, 0); }
}

#stage.shaking {
  animation: fireworkPulse 2.5s ease-out;
}
