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

html, body {
  height: 100%;
  background: #87ceeb;
  color: #2a1a08;
  font-family: "Chalkduster", "Comic Sans MS", "Marker Felt", -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(circle at 82% 14%, rgba(255, 232, 130, 0.85), rgba(255, 200, 70, 0.0) 38%),
    linear-gradient(180deg, #6ec4ff 0%, #9be0ff 35%, #c2eefb 70%, #f4fbff 100%);
  border: 4px solid #3b270f;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45),
              inset 0 0 80px rgba(255,255,255,0.25);
  overflow: hidden;
}

/* Wooden plank scoreboard */
#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 12px, transparent 12px 28px),
    linear-gradient(180deg, #b6794a 0%, #8b5a35 100%);
  border-bottom: 4px solid #3b270f;
  box-shadow: inset 0 -6px 14px rgba(0,0,0,0.25);
  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: 900;
  letter-spacing: 3px;
  color: #fff6dc;
  text-shadow: 2px 2px 0 #3b270f;
}

.team .score {
  font-family: "Chalkduster", "Comic Sans MS", "Marker Felt", "SF Mono", Menlo, monospace;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

.team.red .label, .team.red .score {
  color: #ff3d3d;
  text-shadow:
    2px 2px 0 #3b270f,
    0 0 14px rgba(255, 100, 60, 0.5);
}

.team.blue .label, .team.blue .score {
  color: #2d9cff;
  text-shadow:
    2px 2px 0 #3b270f,
    0 0 14px rgba(80, 180, 255, 0.5);
}

.score.bump { transform: scale(1.4) rotate(-3deg); }

.meta {
  text-align: center;
  color: #fff6dc;
}

.meta .title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 4px;
  text-shadow: 2px 2px 0 #3b270f;
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.85;
  margin-top: 4px;
  text-shadow: 1px 1px 0 #3b270f;
}

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

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 8px;
  text-align: center;
  font-family: "Chalkduster", "Comic Sans MS", "Marker Felt", monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #2a1a08;
  text-shadow: 0 0 6px rgba(255,255,255,0.8);
  opacity: 0.85;
  pointer-events: none;
}

/* Earthquake reused for "Flock Frenzy" celebration shake */
@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.5),
              inset 0 0 80px rgba(255, 230, 100, 0.45),
              0 0 50px rgba(255, 180, 60, 0.75);
}
