* {
  box-sizing: border-box;
}

:root {
  --bg: #0f1220;
  --panel: #181c2e;
  --accent: #ffd23f;
  --accent-2: #4ad66d;
  --text: #eef1ff;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, #1d2444 0%, transparent 55%),
    radial-gradient(circle at 80% 90%, #16304a 0%, transparent 50%),
    var(--bg);
}

.stage {
  width: min(1020px, 100%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.hud__item {
  flex: 1;
  min-width: 110px;
  background: var(--panel);
  border: 1px solid #262c47;
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hud__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b93b8;
}

.canvas-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #2b3358;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  background: #6ec0ff;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 22, 0.78);
  backdrop-filter: blur(3px);
  text-align: center;
  padding: 20px;
}

.overlay.hidden {
  display: none;
}

.overlay__card {
  max-width: 520px;
}

.overlay__title {
  margin: 0 0 10px;
  font-size: clamp(34px, 7vw, 58px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-shadow: 0 4px 0 #b8860b, 0 10px 24px rgba(0, 0, 0, 0.6);
}

.overlay__text {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.55;
  color: #ccd3f5;
}

.overlay__btn {
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  color: #1a1400;
  background: linear-gradient(180deg, #ffe27a, var(--accent));
  border: none;
  border-radius: 999px;
  padding: 14px 44px;
  cursor: pointer;
  box-shadow: 0 6px 0 #b8860b;
  transition: transform 0.1s, box-shadow 0.1s;
}

.overlay__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #b8860b;
}

.overlay__btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #b8860b;
}

.overlay__hint {
  margin: 16px 0 0;
  font-size: 13px;
  color: #7f87ad;
}

.tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  font-size: 13px;
  color: #9aa3cc;
}

.tips span {
  background: var(--panel);
  border: 1px solid #262c47;
  border-radius: 999px;
  padding: 6px 14px;
}
