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

html, body {
  height: 100%;
  background: #f5efe4;
  color: #111;
  font-family: "Bebas Neue", "Oswald", -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: #fafafa;
  border: 4px solid #111;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(40, 0, 40, 0.45),
              inset 0 0 0 2px rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 96px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.55));
  border-bottom: 3px solid #111;
  z-index: 10;
  pointer-events: none;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team .label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #111;
  background: #fff;
  padding: 2px 6px;
  border: 2px solid #111;
  border-radius: 3px;
}

.team .score {
  font-family: "Bebas Neue", "Impact", "Arial Black", sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  margin-top: 4px;
  text-shadow: 2px 2px 0 #111;
  transition: transform 0.15s ease;
}

.team.magenta .score { color: #ff1f8f; }
.team.cyan    .score { color: #00c8ff; }
.team.yellow  .score { color: #ffd400; }
.team.magenta .label { box-shadow: 0 3px 0 #ff1f8f; }
.team.cyan    .label { box-shadow: 0 3px 0 #00c8ff; }
.team.yellow  .label { box-shadow: 0 3px 0 #ffd400; }

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #111;
  text-transform: uppercase;
  font-family: "Bebas Neue", "Impact", sans-serif;
  -webkit-text-stroke: 0.5px #111;
}

.meta .subtitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-top: 2px;
  color: #111;
}

.meta .streak {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-top: 3px;
  color: #fff;
  background: #111;
  padding: 2px 8px;
  display: inline-block;
  border-radius: 2px;
}

#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: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #111;
  background: rgba(255,255,255,0.7);
  padding: 4px 0;
  pointer-events: none;
}

@keyframes powderburst {
  0%   { transform: translate(0, 0) rotate(0) scale(1); }
  15%  { transform: translate(-5px, 3px) rotate(-0.4deg) scale(1.01); }
  30%  { transform: translate(6px, -4px) rotate(0.5deg) scale(1.015); }
  45%  { transform: translate(-4px, 2px) rotate(-0.3deg) scale(1.005); }
  60%  { transform: translate(4px, -3px) rotate(0.35deg) scale(1.01); }
  75%  { transform: translate(-3px, 3px) rotate(-0.2deg) scale(1); }
  90%  { transform: translate(2px, -1px) rotate(0.15deg) scale(1); }
  100% { transform: translate(0, 0) rotate(0) scale(1); }
}

#stage.shaking {
  animation: powderburst 0.42s ease-in-out infinite;
  box-shadow: 0 30px 80px rgba(80, 0, 80, 0.6),
              inset 0 0 0 2px rgba(255, 255, 255, 0.9),
              0 0 60px rgba(255, 31, 143, 0.55);
}
