:root {
  color-scheme: dark;
  --panel: rgba(4, 12, 18, 0.66);
  --line: rgba(151, 234, 255, 0.24);
  --text: #f4fbff;
  --muted: #a7c5ca;
  --cyan: #67e7ff;
  --green: #77ff9d;
  --amber: #ffb25a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #02060a;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(12, 30, 38, 0.78);
  font: inherit;
}

.shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(119, 255, 157, 0.09), transparent 24%),
    radial-gradient(circle at 88% 74%, rgba(255, 178, 90, 0.10), transparent 28%),
    linear-gradient(160deg, #02060a 0%, #06121a 48%, #10100d 100%);
}

#game {
  width: 100vw;
  height: 100vh;
  display: block;
  image-rendering: auto;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(1, 5, 8, 0.18), rgba(1, 5, 8, 0.84));
}

.overlay.hidden {
  display: none;
}

.brand {
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 0 36px rgba(103, 231, 255, 0.45);
}

p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.45;
}

#startButton {
  min-width: 160px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(103, 231, 255, 0.95), rgba(119, 255, 157, 0.90));
  color: #031116;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(103, 231, 255, 0.36);
  cursor: pointer;
}

.hud {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.hud > div {
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 3px;
  font-size: clamp(15px, 2vw, 22px);
  line-height: 1.1;
}

.touch {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: none;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.touch-left,
.touch-right {
  display: flex;
  gap: 10px;
}

.touch button {
  width: 68px;
  height: 60px;
  border-radius: 8px;
  font-weight: 900;
  pointer-events: auto;
  touch-action: none;
}

.touch button:active {
  transform: translateY(1px);
  background: rgba(103, 231, 255, 0.28);
}

@media (hover: none), (pointer: coarse) {
  .touch {
    display: flex;
  }
}

@media (max-width: 680px) {
  .hud {
    grid-template-columns: 1fr;
    right: auto;
    width: min(240px, calc(100vw - 28px));
  }

  .hud > div {
    min-height: 44px;
  }
}
