:root {
  --bg: #0f1222;
  --fg: #ffffff;
  --accent: #6be675;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  place-items: center;
  background: radial-gradient(1000px 600px at 50% 20%, #1b1f3a, var(--bg));
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* canvas scales to screen; internal pixels handled in JS */
#game {
  width: min(92vw, 900px);
  aspect-ratio: 3 / 2;           /* keeps a good game aspect on phones */
  background: linear-gradient(180deg, #131735, #0c0f24 60%);
  border: 2px solid #2a2e57;
  border-radius: 10px;
  display: block;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  touch-action: none;            /* prevent page scrolling while dragging */
}

.wrap { position: relative; }

#hud {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
  font-weight: 600;
  font-size: clamp(12px, 2.2vw, 16px);
}

#ui {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(2px);
  padding: 12px;
}

#ui h1 { margin: 0 0 8px; font-size: clamp(20px, 6vw, 32px); }
#ui p { margin: 6px 0 14px; opacity: .85; font-size: clamp(12px, 3.5vw, 16px); }

#start {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #05240b;
  font-weight: 700;
  cursor: pointer;
}
#start:active { transform: translateY(1px); }
