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

html, body {
  height: 100%;
  background: #0a0306;
  color: #fff;
  font-family: "Cooper Black", "Georgia", "Times New Roman", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 70, 140, 0.35), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 200, 60, 0.18), transparent 50%),
    linear-gradient(180deg, #4a0820 0%, #6d0a26 40%, #2b0411 100%);
  border: 3px solid #ffd24a;
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(140, 10, 50, 0.55),
    0 0 30px rgba(255, 210, 74, 0.35);
  overflow: hidden;
}

#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(40, 0, 15, 0.85), rgba(40, 0, 15, 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: 900;
  letter-spacing: 5px;
  opacity: 0.95;
  text-transform: uppercase;
}

.team .score {
  font-family: "Cooper Black", "Georgia", "Times New Roman", serif;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

.team.red .label, .team.red .score {
  color: #ff3ea0;
  text-shadow:
    0 0 14px rgba(255, 62, 160, 0.85),
    0 0 4px rgba(255, 200, 230, 0.9),
    2px 2px 0 #5a0028;
}

.team.blue .label, .team.blue .score {
  color: #ffd24a;
  text-shadow:
    0 0 14px rgba(255, 210, 74, 0.85),
    0 0 4px rgba(255, 240, 180, 0.9),
    2px 2px 0 #5a3a00;
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 7px;
  color: #fff1c4;
  text-shadow:
    0 0 14px rgba(255, 230, 130, 0.7),
    2px 2px 0 #5a0028;
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.75;
  color: #ffd9a8;
  margin-top: 4px;
}

#clave {
  position: absolute;
  top: 92px;
  left: 16px;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(40, 0, 15, 0.85), rgba(80, 4, 30, 0.55));
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 210, 74, 0.55);
  box-shadow: 0 4px 14px rgba(0,0,0,0.55);
}

.clave-label {
  font-size: 9px;
  letter-spacing: 3px;
  color: #ffd24a;
  font-weight: 900;
  text-align: center;
}

.beats {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

.beat {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 210, 74, 0.4);
  background: rgba(40, 0, 15, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease;
}

.beat span {
  font-size: 11px;
  font-weight: 900;
  color: rgba(255, 230, 200, 0.55);
}

.beat.active {
  background: #ff3ea0;
  border-color: #fff1c4;
  transform: scale(1.18);
  box-shadow: 0 0 14px rgba(255, 62, 160, 0.9), 0 0 4px #fff;
}

.beat.active span { color: #fff; }

.beat.downbeat.active {
  background: #ffd24a;
  box-shadow: 0 0 16px rgba(255, 210, 74, 1), 0 0 4px #fff;
}

#passista {
  position: absolute;
  top: 92px;
  right: 16px;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(40, 0, 15, 0.85), rgba(80, 4, 30, 0.55));
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 210, 74, 0.55);
  box-shadow: 0 4px 14px rgba(0,0,0,0.55);
  min-width: 158px;
}

.passista-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  color: #ffd24a;
  font-weight: 900;
  text-align: center;
}

.passista-meter {
  display: flex;
  gap: 2px;
  margin-top: 5px;
  justify-content: center;
}

.pip {
  width: 9px;
  height: 14px;
  background: rgba(255, 240, 200, 0.12);
  border: 1px solid rgba(255, 210, 74, 0.35);
  border-radius: 2px;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pip.lit {
  background: linear-gradient(180deg, #ffea88, #ff3ea0);
  border-color: #fff1c4;
  box-shadow: 0 0 10px rgba(255, 62, 160, 0.85);
}

.pip.queen {
  background: linear-gradient(180deg, #fff7c4, #ffd24a);
  border-color: #fff;
  box-shadow: 0 0 14px rgba(255, 230, 130, 1);
  transform: scaleY(1.18);
}

.passista-value {
  font-size: 10px;
  letter-spacing: 2px;
  color: #fff1c4;
  text-align: center;
  margin-top: 3px;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 210, 74, 0.7);
}

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

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "Cooper Black", "Georgia", serif;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.55;
  color: #ffe9b3;
  pointer-events: none;
}

@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(255, 70, 140, 0.55),
    0 0 50px rgba(255, 62, 160, 0.85);
}

@keyframes queenPulse {
  0%, 100% { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 100px rgba(255, 210, 74, 0.7), 0 0 60px rgba(255, 210, 74, 0.9); }
  50%      { box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 120px rgba(255, 62, 160, 0.85), 0 0 80px rgba(255, 62, 160, 1); }
}

#stage.queen-bonus {
  animation: queenPulse 0.45s ease-in-out infinite;
}
