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

@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Zhi+Mang+Xing&display=swap');

html, body {
  height: 100%;
  background: #0e1410;
  color: #f3f6f1;
  font-family: -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(ellipse at 50% 4%, rgba(180, 220, 190, 0.20), transparent 55%),
    linear-gradient(180deg, #1d3026 0%, #16241c 55%, #e8efe6 100%);
  border: 1px solid #2c4536;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 0 70px rgba(10,20,14,0.45);
  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(8,16,11,0.6), rgba(8,16,11,0));
  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: 800;
  letter-spacing: 4px;
  opacity: 0.9;
}

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

/* "red" = JADE (bamboo green), "blue" = INK (charcoal) — keeps internal team keys,
   re-skinned to the jade / misty-white / ink-black palette. */
.team.red .label, .team.red .score {
  color: #6fd49a;
  text-shadow: 0 0 14px rgba(111, 212, 154, 0.6), 0 0 2px rgba(111, 212, 154, 0.9);
}

.team.blue .label, .team.blue .score {
  color: #e8efe6;
  text-shadow: 0 0 14px rgba(40, 60, 48, 0.8), 0 0 2px rgba(20, 30, 24, 0.95);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-family: "Ma Shan Zheng", "SF Mono", cursive;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 4px;
  opacity: 0.92;
  color: #d7e7da;
  text-shadow: 0 0 12px rgba(120, 180, 140, 0.4);
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.55;
  margin-top: 4px;
}

#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;
  letter-spacing: 2px;
  opacity: 0.45;
  color: #2a3d31;
  pointer-events: none;
}

/* Reframed as a "gust through the grove" — gentler sway than a quake. */
@keyframes quake {
  0%   { transform: translate(0, 0) rotate(0); }
  15%  { transform: translate(-2px, 1px) rotate(0.18deg); }
  30%  { transform: translate(3px, -2px) rotate(-0.2deg); }
  45%  { transform: translate(-3px, 1px) rotate(0.16deg); }
  60%  { transform: translate(2px, -1px) rotate(-0.18deg); }
  75%  { transform: translate(-2px, 2px) rotate(0.2deg); }
  90%  { transform: translate(2px, -1px) rotate(-0.12deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: quake 0.4s linear infinite;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55),
              inset 0 0 70px rgba(10,20,14,0.45),
              0 0 40px rgba(120, 200, 150, 0.5);
}
