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

html, body {
  height: 100%;
  background: #050a14;
  color: #e8f4ff;
  font-family: "Avenir Next", "Helvetica Neue", "Inter", Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  letter-spacing: 0.02em;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    /* aurora shimmer across top third */
    radial-gradient(ellipse at 20% 8%, rgba(120, 255, 200, 0.32), transparent 55%),
    radial-gradient(ellipse at 70% 4%, rgba(170, 130, 255, 0.28), transparent 60%),
    radial-gradient(ellipse at 50% 22%, rgba(110, 200, 255, 0.20), transparent 65%),
    /* base sky → tundra gradient */
    linear-gradient(180deg, #0c2440 0%, #16385e 28%, #1d4a78 55%, #0a1a2a 100%);
  border: 1px solid #4a7aa8;
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0, 30, 60, 0.6),
    inset 0 0 60px rgba(180, 220, 255, 0.05),
    inset 0 0 120px rgba(0, 30, 60, 0.4);
  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(5, 15, 28, 0.6), 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: 11px;
  font-weight: 700;
  letter-spacing: 5px;
  opacity: 0.9;
}

.team .score {
  font-family: "Avenir Next Condensed", "Helvetica Neue", "Inter", sans-serif;
  font-size: 42px;
  font-weight: 200;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
  letter-spacing: 1px;
}

.team.red .label, .team.red .score {
  color: #ffb0b8;
  text-shadow:
    0 0 14px rgba(255, 140, 160, 0.7),
    0 0 2px rgba(255, 200, 210, 0.95);
}

.team.blue .label, .team.blue .score {
  color: #b8e0ff;
  text-shadow:
    0 0 14px rgba(180, 220, 255, 0.7),
    0 0 2px rgba(220, 240, 255, 0.95);
}

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

.meta { text-align: center; }

.meta .title {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 7px;
  opacity: 0.95;
  color: #d8eeff;
  text-shadow: 0 0 10px rgba(180, 220, 255, 0.55);
}

.meta .subtitle {
  font-size: 10px;
  letter-spacing: 4px;
  opacity: 0.55;
  margin-top: 5px;
  color: #b8d4ee;
}

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

/* ---- Wind vane HUD (top-right under scoreboard) ---- */
#wind-hud {
  position: absolute;
  top: 92px;
  right: 12px;
  width: 78px;
  z-index: 9;
  pointer-events: none;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 50, 90, 0.55), rgba(10, 25, 45, 0.35));
  border: 1px solid rgba(180, 220, 255, 0.18);
  border-radius: 10px;
  padding: 4px 2px 6px 2px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.wind-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #b8e0ff;
  opacity: 0.85;
  margin-bottom: 1px;
}

#wind-vane {
  display: block;
  margin: 0 auto;
}

.wind-meta {
  margin-top: 2px;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 10px;
  color: #d8eeff;
}

#wind-dir {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
}

#wind-int {
  font-size: 9px;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

/* ---- Cold streak HUD (top-left under scoreboard) ---- */
#cold-hud {
  position: absolute;
  top: 92px;
  left: 12px;
  width: 110px;
  z-index: 9;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 50, 90, 0.55), rgba(10, 25, 45, 0.35));
  border: 1px solid rgba(180, 220, 255, 0.18);
  border-radius: 10px;
  padding: 6px 6px 7px 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cold-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #b8e0ff;
  opacity: 0.85;
  text-align: center;
  margin-bottom: 4px;
}

.cold-dots {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.cold-dots span {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(180, 220, 255, 0.12);
  border: 1px solid rgba(180, 220, 255, 0.3);
  transition: all 0.2s ease;
}

.cold-dots span.lit {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #b8e0ff 40%, #4a90d8 100%);
  border-color: #e8f6ff;
  box-shadow:
    0 0 10px rgba(180, 220, 255, 0.85),
    inset 0 0 4px rgba(255, 255, 255, 0.55);
}

.cold-status {
  text-align: center;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #d8eeff;
  opacity: 0.7;
  margin-top: 5px;
}

#cold-hud.avalanche {
  border-color: #ffffff;
  background: linear-gradient(180deg, rgba(120, 180, 240, 0.55), rgba(60, 110, 180, 0.45));
  box-shadow: 0 0 22px rgba(220, 240, 255, 0.6);
}

#cold-hud.avalanche .cold-label {
  color: #ffffff;
  letter-spacing: 4px;
}

/* ---- Ticker ---- */
.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "SF Mono", "Menlo", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.45;
  color: #d8eeff;
  pointer-events: none;
}

/* ---- Blizzard shake (mapped from quake → 'gust' below) ---- */
@keyframes gust {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-4px, 1px); }
  20%  { transform: translate(5px, -1px); }
  30%  { transform: translate(-5px, 0px); }
  40%  { transform: translate(4px, -1px); }
  50%  { transform: translate(-3px, 1px); }
  60%  { transform: translate(4px, 0px); }
  70%  { transform: translate(-4px, -1px); }
  80%  { transform: translate(5px, 1px); }
  90%  { transform: translate(-3px, 0px); }
  100% { transform: translate(0, 0); }
}

#stage.gusting {
  animation: gust 0.28s linear infinite;
  box-shadow:
    0 30px 80px rgba(0, 30, 60, 0.6),
    inset 0 0 60px rgba(180, 220, 255, 0.05),
    inset 0 0 120px rgba(0, 30, 60, 0.4),
    0 0 40px rgba(220, 240, 255, 0.55);
}

@keyframes avalanchePulse {
  0%, 100% { box-shadow: 0 0 30px rgba(220, 240, 255, 0.45); }
  50%      { box-shadow: 0 0 50px rgba(220, 240, 255, 0.95); }
}

#stage.avalanche {
  animation: avalanchePulse 0.8s ease-in-out infinite;
}
