:root {
  color-scheme: dark;
  --bg: #030305;
  --panel: rgba(10, 7, 10, 0.7);
  --ink: #fff7f7;
  --muted: #b6a8ad;
  --blood: #e32139;
  --ember: #ff7a1a;
  --sick: #9dff6a;
  --bone: #f4ead7;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 18%, rgba(227, 33, 57, 0.16), transparent 22rem),
    radial-gradient(circle at 12% 80%, rgba(157, 255, 106, 0.08), transparent 20rem),
    linear-gradient(135deg, #030305, #10060a 52%, #040404);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
}

.game-wrap {
  position: relative;
  width: min(100%, 1120px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #030305;
  box-shadow: 0 30px 95px rgba(0, 0, 0, 0.72), 0 0 70px rgba(227, 33, 57, 0.13);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  position: absolute;
  inset: 14px 14px auto 14px;
  display: flex;
  gap: 10px;
  pointer-events: none;
}

.hud div {
  min-width: 90px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 4px;
  color: var(--bone);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1;
  text-shadow: 0 0 18px rgba(227, 33, 57, 0.35);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(3, 3, 5, 0.18), rgba(3, 3, 5, 0.91)),
    radial-gradient(circle at 50% 38%, rgba(227, 33, 57, 0.15), transparent 18rem);
}

.overlay.is-hidden {
  display: none;
}

.overlay h1 {
  margin: 0;
  color: #fff1e7;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.94;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(227, 33, 57, 0.66), 0 5px 0 rgba(0, 0, 0, 0.55);
}

.overlay p {
  max-width: 650px;
  margin: 0 auto;
  color: #e7d7d2;
  font-size: clamp(15px, 2.2vw, 20px);
}

.overlay span {
  color: var(--muted);
  font-size: 14px;
}

button {
  justify-self: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--blood), var(--ember));
  color: #fff8ee;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(227, 33, 57, 0.34);
}

button:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  .shell {
    padding: 0;
  }

  .game-wrap {
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
    aspect-ratio: auto;
  }

  .hud {
    inset: 10px 10px auto 10px;
    gap: 6px;
  }

  .hud div {
    min-width: 68px;
    padding: 8px 9px;
  }
}
