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

html, body {
  height: 100%;
  background: #100308;
  color: #f5e6c0;
  /* Elegant italic serif typography for the Renaissance Venice palette */
  font-family: "Didot", "Bodoni 72", "Playfair Display", "Times New Roman", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  /* Deep crimson + midnight blue + gold lantern halo */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(214, 168, 73, 0.18), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(124, 16, 36, 0.35), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(34, 30, 78, 0.45), transparent 60%),
    linear-gradient(180deg, #1a0820 0%, #0c0418 55%, #15041a 100%);
  border: 1px solid #6a4a18;
  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;
}

/* ===== Baroque ornate frame border ===== */
#stage::before,
#stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 9;
}
#stage::before {
  /* Outer gold frame with inner shadow */
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 3px double #c8932a;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 2px rgba(20, 8, 4, 0.6),
    inset 0 0 24px rgba(200, 147, 42, 0.18);
}
#stage::after {
  /* Inner ornament — radial corners */
  top: 14px; left: 14px; right: 14px; bottom: 14px;
  border: 1px solid rgba(200, 147, 42, 0.45);
  border-radius: 4px;
  background:
    radial-gradient(circle at 0% 0%,   rgba(214, 168, 73, 0.45) 0 8px, transparent 9px),
    radial-gradient(circle at 100% 0%, rgba(214, 168, 73, 0.45) 0 8px, transparent 9px),
    radial-gradient(circle at 0% 100%, rgba(214, 168, 73, 0.45) 0 8px, transparent 9px),
    radial-gradient(circle at 100% 100%, rgba(214, 168, 73, 0.45) 0 8px, transparent 9px);
}

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: linear-gradient(180deg, rgba(10, 2, 8, 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: 13px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 5px;
  opacity: 0.9;
}

.team .score {
  /* Elegant italic serif numerals */
  font-family: "Didot", "Bodoni 72", "Playfair Display", "Times New Roman", serif;
  font-style: italic;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.18s ease;
}

.team.red .label, .team.red .score {
  /* Deep crimson */
  color: #d6334a;
  text-shadow:
    0 0 16px rgba(214, 51, 74, 0.7),
    0 0 2px rgba(255, 200, 200, 0.9),
    0 0 28px rgba(200, 147, 42, 0.25);
}

.team.blue .label, .team.blue .score {
  /* Midnight blue */
  color: #6b86d8;
  text-shadow:
    0 0 16px rgba(107, 134, 216, 0.7),
    0 0 2px rgba(220, 230, 255, 0.9),
    0 0 28px rgba(200, 147, 42, 0.25);
}

.score.bump { transform: scale(1.42) rotate(-2deg); }

.meta {
  text-align: center;
}

.meta .title {
  font-family: "Didot", "Bodoni 72", "Playfair Display", serif;
  font-style: italic;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #d6a849;
  text-shadow: 0 0 12px rgba(214, 168, 73, 0.7), 0 0 2px rgba(255, 230, 160, 0.8);
}

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

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

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 12px;
  text-align: center;
  font-family: "Didot", "Bodoni 72", "Playfair Display", "Times New Roman", serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 3px;
  color: #d6a849;
  opacity: 0.55;
  pointer-events: none;
  z-index: 8;
}

/* ===== Midnight bell event — gentle gold-pulse, not the original quake shake ===== */
@keyframes bell-pulse {
  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 0 0 rgba(214, 168, 73, 0.0); }
  40%  { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 120px rgba(124, 16, 36, 0.4), inset 0 0 0 8px rgba(214, 168, 73, 0.55); }
  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 0 0 rgba(214, 168, 73, 0.0); }
}

#stage.bell-tolling {
  animation: bell-pulse 1.8s ease-out;
}

/* Very subtle slow swaying — like lanterns in canal breeze */
@keyframes lantern-sway {
  0%   { transform: translate(0, 0) rotate(0); }
  50%  { transform: translate(0.4px, -0.3px) rotate(0.04deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage {
  animation: lantern-sway 6s ease-in-out infinite;
}
