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

html, body {
  height: 100%;
  background: #03040a;
  color: #fff;
  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% 38%, rgba(70, 90, 170, 0.22), transparent 60%),
    linear-gradient(180deg, #0a0e1f 0%, #030409 100%);
  border: 1px solid #1a2240;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.65), inset 0 0 70px 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: 16px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0));
  z-index: 10;
  pointer-events: none;
}

.meta { text-align: left; }

.meta .title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 7px;
  color: #fff;
  text-shadow: 0 0 18px rgba(120, 150, 255, 0.55), 0 0 2px rgba(255,255,255,0.5);
}

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

.alive-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.alive-num {
  font-family: "SF Mono", "Menlo", "Courier New", monospace;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: #ffd86b;
  text-shadow: 0 0 18px rgba(255, 216, 107, 0.7), 0 0 3px rgba(255, 216, 107, 0.9);
  transition: transform 0.15s ease;
}

.alive-num.bump { transform: scale(1.45); }

.alive-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 3px;
  opacity: 0.6;
  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.5;
  pointer-events: none;
}

/* Screen-shake for big knock-offs / final clash. */
@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.3s linear infinite;
  box-shadow: 0 30px 80px rgba(0,0,0,0.65),
              inset 0 0 70px rgba(0,0,0,0.55),
              0 0 44px rgba(120, 160, 255, 0.5);
}
