:root {
  --bg: #05070d;
  --fg: #e8eefc;
  --muted: #8ea0c0;
  --accent: #35e0c8;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: radial-gradient(120% 90% at 50% 0%, #101a33 0%, #05070d 62%);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#app {
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 12px;
}

.stage {
  position: relative;
  width: min(100%, calc((100dvh - 24px) * 9 / 16));
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .07);
  touch-action: none;
}

.cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hud {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 18px 0;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  z-index: 2;
  opacity: 0;
  transition: opacity .2s ease;
}

.hud.on { opacity: 1; }

.hud .score {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .8);
}

.hud .best {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  padding-top: 8px;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  z-index: 3;
  background: radial-gradient(80% 60% at 50% 45%, rgba(8, 12, 24, .55) 0%, rgba(5, 7, 13, .92) 100%);
  backdrop-filter: blur(3px);
  transition: opacity .18s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.panel {
  width: 100%;
  text-align: center;
}

.panel h1 {
  margin: 0;
  font-size: clamp(30px, 9vw, 46px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.tagline {
  margin: 12px 0 30px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.hint {
  margin: 22px 0 0;
  font-size: 12px;
  color: #63748f;
  letter-spacing: .02em;
}

.btn {
  display: inline-block;
  min-width: 160px;
  padding: 15px 30px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease, filter .15s ease;
}

.btn:active { transform: scale(.96); }

.btn.primary {
  background: var(--accent);
  color: #04120f;
  box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn.primary:hover { filter: brightness(1.08); }

.btn.ghost {
  margin-top: 12px;
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, .18);
}

.kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--muted);
}

.bigscore {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.bestline {
  margin: 0 0 30px;
  font-size: 14px;
  color: var(--muted);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px;
  z-index: 5;
  pointer-events: none;
  animation: toast-in .2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
}
