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

html, body {
  height: 100%;
  background: #050505;
  color: #fff;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(255, 176, 74, 0.22), transparent 58%),
    radial-gradient(ellipse at 50% 0%, rgba(120, 80, 40, 0.18), transparent 55%),
    linear-gradient(180deg, #141210 0%, #0a0908 55%, #060504 100%);
  border: 1px solid #2a2118;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.75), inset 0 0 80px rgba(0,0,0,0.55);
  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(0,0,0,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: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  opacity: 0.9;
}

.team .score {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

.team.red .label, .team.red .score {
  color: #e8554e;
  text-shadow: 0 0 14px rgba(232, 85, 78, 0.6), 0 0 2px rgba(232, 85, 78, 0.9);
}

.team.blue .label, .team.blue .score {
  color: #6aa6d8;
  text-shadow: 0 0 14px rgba(106, 166, 216, 0.6), 0 0 2px rgba(106, 166, 216, 0.9);
}

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

.meta {
  text-align: center;
}

.meta .title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #f0d8a8;
  opacity: 0.92;
  text-shadow: 0 0 12px rgba(255, 176, 74, 0.45);
}

.meta .subtitle {
  font-family: "SF Mono", "Menlo", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.5;
  margin-top: 4px;
}

/* ===== Kata Combo HUD (top-right) ===== */
#combo-hud {
  position: absolute;
  top: 90px;
  right: 16px;
  text-align: right;
  z-index: 11;
  pointer-events: none;
}

.combo-label {
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: #f0d8a8;
  opacity: 0.7;
}

.combo-count {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  color: #ffd27a;
  text-shadow: 0 0 18px rgba(255, 176, 74, 0.7);
  transition: transform 0.12s ease, color 0.2s ease;
}

.combo-count.pop { transform: scale(1.4); color: #fff0c8; }

.combo-perfect {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  opacity: 0;
  transform: rotate(-8deg) scale(0.6);
  text-shadow: 0 0 22px rgba(255, 80, 60, 0.9);
}

.combo-perfect.fire {
  animation: stamp 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

@keyframes stamp {
  0%   { opacity: 0; transform: rotate(-8deg) scale(2.2); }
  35%  { opacity: 1; transform: rotate(-8deg) scale(0.92); }
  100% { opacity: 0.95; transform: rotate(-8deg) scale(1); }
}

#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.4;
  pointer-events: none;
}

/* Perfect-form screen flash: a clean white blade-flash, not a quake */
@keyframes bladeflash {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(2px, -1px); }
  80%  { transform: translate(-1px, 1px); }
  100% { transform: translate(0,0); }
}

#stage.perfect {
  animation: bladeflash 0.4s ease-out;
  box-shadow: 0 30px 80px rgba(0,0,0,0.75),
              inset 0 0 80px rgba(0,0,0,0.55),
              0 0 60px rgba(255, 210, 122, 0.7);
}
