:root {
  --bg: #070812;
  --panel: rgba(10, 14, 32, 0.82);
  --line: rgba(120, 240, 255, 0.28);
  --cyan: #5cf6ff;
  --pink: #ff4fd8;
  --text: #eef8ff;
  --muted: #8aa0b8;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(92, 246, 255, 0.16), transparent 32%),
    radial-gradient(circle at 85% 90%, rgba(255, 79, 216, 0.14), transparent 36%),
    var(--bg);
  overflow: hidden;
}

.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 32px;
  gap: 18px;
}

.hud {
  width: min(520px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 0 24px rgba(92, 246, 255, 0.45);
}

h1 {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand p,
.hint,
.score-card span,
.kicker {
  color: var(--muted);
  font-size: 12px;
}

.scores {
  display: flex;
  gap: 8px;
}

.score-card {
  min-width: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: right;
}

.score-card strong {
  display: block;
  font-size: 18px;
  color: var(--cyan);
}

.stage {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #05060f;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 0 80px rgba(92, 246, 255, 0.05);
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 6, 16, 0.62);
  backdrop-filter: blur(6px);
  border-radius: 20px;
}

.overlay.hidden {
  display: none;
}

.panel {
  width: min(360px, 86%);
  padding: 28px 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 22, 48, 0.95), rgba(8, 10, 24, 0.95));
  text-align: center;
}

.kicker {
  letter-spacing: 0.28em;
  margin-bottom: 8px;
}

.panel h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.panel p {
  line-height: 1.6;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 12px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), #9d7bff);
  cursor: pointer;
  box-shadow: 0 0 24px rgba(92, 246, 255, 0.35);
}

button.ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.hidden {
  display: none;
}

@media (max-width: 560px) {
  .hud {
    flex-direction: column;
    align-items: flex-start;
  }

  .scores {
    width: 100%;
  }

  .score-card {
    flex: 1;
  }
}
