*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #0f0f1a;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #fff;
  touch-action: none; /* prevent browser scroll/zoom during gameplay */
}

/* ── Start screen ──────────────────────────────────────────────────────────── */

#start-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0f1a 0%, #1e1b4b 100%);
  z-index: 100;
}

#start-screen.hidden {
  display: none;
}

.start-content {
  text-align: center;
  max-width: 520px;
  padding: 2rem 1.5rem;
  width: 100%;
}

.start-content h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  background: linear-gradient(90deg, #00d4ff, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.subtitle {
  color: #94a3b8;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.instructions {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.instructions h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.instructions ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.instructions ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.controls-row {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: #475569;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

#btn-start {
  background: linear-gradient(90deg, #00d4ff, #22c55e);
  color: #0f0f1a;
  border: none;
  border-radius: 50px;
  padding: 1rem 3.5rem;
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: transform 0.12s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
}

#btn-start:hover {
  transform: scale(1.06);
  box-shadow: 0 0 36px rgba(0, 212, 255, 0.45);
}

#btn-start:active {
  transform: scale(0.96);
}

/* ── Game container ────────────────────────────────────────────────────────── */

#game-container {
  display: none;
  width: 100vw;
  height: 100vh;
}

#game-container.active {
  display: block;
}

#game-container canvas {
  display: block;
}
