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

html, body {
  height: 100%;
  background: #160e08;
  color: #f4d9a8;
  font-family: "Iowan Old Style", "Palatino Linotype", 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(220, 150, 70, 0.18), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(180, 100, 40, 0.16), transparent 60%),
    linear-gradient(180deg, #2a1c10 0%, #160d07 55%, #0f0904 100%);
  border: 3px solid #6b4322;
  border-radius: 14px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(20,8,2,0.7),
    inset 0 0 0 2px rgba(196, 138, 70, 0.25);
  overflow: hidden;
}

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background:
    linear-gradient(180deg, rgba(10,4,0,0.75), rgba(10,4,0,0));
  border-bottom: 1px solid rgba(196, 138, 70, 0.3);
  z-index: 10;
  pointer-events: none;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
}

.team .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 5px;
  opacity: 0.85;
  font-variant: small-caps;
}

.team .score {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  margin-top: 4px;
  transition: transform 0.15s ease;
}

.team.red .label, .team.red .score {
  color: #d8442a;
  text-shadow: 0 0 12px rgba(216, 68, 42, 0.55), 0 1px 2px rgba(80, 20, 10, 0.9);
}

.team.blue .label, .team.blue .score {
  color: #4a9bc9;
  text-shadow: 0 0 12px rgba(74, 155, 201, 0.55), 0 1px 2px rgba(10, 30, 50, 0.9);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 5px;
  color: #f0c878;
  text-shadow: 0 0 10px rgba(240, 200, 120, 0.4), 0 1px 1px rgba(0,0,0,0.7);
  font-variant: small-caps;
}

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

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

/* Steam pressure gauge — bottom-left HUD bar */
#pressure-wrap {
  position: absolute;
  left: 16px;
  bottom: 32px;
  width: 200px;
  z-index: 11;
  pointer-events: none;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

#pressure-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: #d4a060;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  font-variant: small-caps;
  font-weight: 700;
}

#pressure-bar {
  position: relative;
  height: 14px;
  background: linear-gradient(180deg, #1a0d05 0%, #2a1408 100%);
  border: 2px solid #6b4322;
  border-radius: 7px;
  overflow: hidden;
  box-shadow:
    inset 0 0 8px rgba(0,0,0,0.8),
    0 0 0 1px rgba(196, 138, 70, 0.25);
}

#pressure-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    #6a9ec8 0%,
    #c89050 30%,
    #e8a050 55%,
    #ff7030 80%,
    #ffd060 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    0 0 8px rgba(255, 130, 50, 0.55);
  transition: width 0.18s ease-out;
}

#pressure-tick {
  position: absolute;
  top: -3px;
  left: 0;
  width: 100%;
  height: 20px;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 19px,
      rgba(196, 138, 70, 0.5) 19px,
      rgba(196, 138, 70, 0.5) 20px);
}

#pressure-pct {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #f0c878;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  font-weight: 700;
}

#pressure-wrap.full #pressure-pct {
  color: #ffe080;
  animation: pulseText 0.3s ease-in-out infinite alternate;
}

@keyframes pulseText {
  from { opacity: 0.7; text-shadow: 0 0 4px rgba(255, 200, 60, 0.6); }
  to { opacity: 1; text-shadow: 0 0 14px rgba(255, 200, 60, 1); }
}

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 8px;
  text-align: center;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #b89060;
  opacity: 0.55;
  pointer-events: none;
  font-variant: small-caps;
}

@keyframes quake {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-2px, 1px) rotate(0.15deg); }
  20%  { transform: translate(3px, -2px) rotate(-0.2deg); }
  30%  { transform: translate(-3px, 1px) rotate(0.15deg); }
  40%  { transform: translate(2px, -1px) rotate(-0.15deg); }
  50%  { transform: translate(-1px, 2px) rotate(0.2deg); }
  60%  { transform: translate(2px, -1px) rotate(-0.15deg); }
  70%  { transform: translate(-2px, -1px) rotate(0.1deg); }
  80%  { transform: translate(3px, 1px) rotate(-0.1deg); }
  90%  { transform: translate(-1px, -1px) rotate(0.15deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: quake 0.36s linear infinite;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(20,8,2,0.7),
    inset 0 0 0 2px rgba(196, 138, 70, 0.25),
    0 0 40px rgba(255, 130, 50, 0.6);
}

#stage.burst {
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(20,8,2,0.7),
    inset 0 0 0 2px rgba(255, 220, 130, 0.55),
    0 0 60px rgba(255, 180, 80, 0.9);
}
