:root {
  color-scheme: dark;
  font-family: "Exo 2", system-ui, sans-serif;
  background: #08111f;
  color: #f8fbff;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(36, 180, 214, 0.22), transparent 28rem),
    radial-gradient(circle at 82% 76%, rgba(255, 87, 111, 0.18), transparent 26rem),
    linear-gradient(135deg, #08111f 0%, #101725 52%, #171321 100%);
}

.shell {
  width: min(100vw, 1180px);
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(12px, 2vw, 28px);
}

.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 128px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  background: #050b14;
}

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

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

.hud div,
.hud button,
.overlay button,
.controls button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 17, 31, 0.76);
  color: #f8fbff;
  backdrop-filter: blur(16px);
}

.hud div {
  min-width: 96px;
  padding: 8px 11px;
  border-radius: 8px;
}

.hud span {
  display: block;
  color: #a8bed0;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  line-height: 1;
}

.hud button {
  margin-left: auto;
  min-width: 82px;
  min-height: 42px;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  pointer-events: auto;
  cursor: pointer;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.22), rgba(8, 17, 31, 0.72));
}

.overlay.hidden {
  display: none;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 9vw, 104px);
  line-height: 0.88;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(59, 210, 226, 0.42);
}

p {
  width: min(520px, 92%);
  margin: 0;
  color: #d9e8f3;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.35;
}

.overlay button {
  min-width: 148px;
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  background: #24b4d6;
  color: #03111a;
  box-shadow: 0 0 28px rgba(36, 180, 214, 0.38);
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, 56px);
  justify-content: center;
  gap: 10px;
}

.controls button {
  width: 56px;
  height: 48px;
  border-radius: 8px;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

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

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .shell {
    min-height: 100svh;
  }

  .game-frame {
    max-height: none;
  }

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

  .hud div {
    min-width: 76px;
    padding: 7px 9px;
  }

  .hud strong {
    font-size: 18px;
  }
}
