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

:root {
  --bg: #14101f;
  --card: rgba(255, 255, 255, 0.07);
  --accent: #ff2d6f;
  --accent2: #ffd166;
}

html,
body {
  height: 100%;
}

body {
  background: radial-gradient(circle at 30% 0%, #2b1f3d 0%, #14101f 55%, #0b0810 100%);
  color: #fff;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.app {
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hud-item {
  flex: 1 1 110px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
}

.hud-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

.hud-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.hud-item:nth-child(2) .hud-value {
  color: var(--accent2);
}

.combo {
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.18s, transform 0.18s;
  white-space: nowrap;
}

.combo.on {
  opacity: 1;
  transform: scale(1);
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  background: #1b1526;
  touch-action: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 40%, rgba(60, 30, 70, 0.72), rgba(10, 6, 16, 0.92));
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.overlay h1 {
  font-size: clamp(26px, 5vw, 46px);
  letter-spacing: -0.5px;
}

.overlay p {
  max-width: 460px;
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.5;
  opacity: 0.85;
}

.overlay button {
  margin-top: 6px;
  padding: 14px 34px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 45, 111, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.overlay button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 32px rgba(255, 45, 111, 0.55);
}

.overlay button:active {
  transform: scale(0.97);
}

.hint {
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .hud-value {
    font-size: 19px;
  }
  .hint {
    font-size: 11px;
  }
}
