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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050510;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #e0dce8;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

/* ─── Start Overlay ─────────────────────────────────────────────────────── */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(10, 8, 30, 0.6), rgba(5, 5, 16, 0.95));
  z-index: 10;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffeaaa;
  text-shadow:
    0 0 30px rgba(255, 200, 60, 0.5),
    0 0 80px rgba(255, 160, 30, 0.25);
  margin-bottom: 0.25em;
  animation: titlePulse 4s ease-in-out infinite;
}

.subtitle {
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  color: rgba(200, 195, 220, 0.6);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 3em;
}

#start-btn {
  position: relative;
  padding: 0.9em 3em;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffeaaa;
  background: transparent;
  border: 1px solid rgba(255, 210, 100, 0.35);
  border-radius: 60px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

#start-btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, rgba(255, 200, 60, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#start-btn:hover {
  border-color: rgba(255, 210, 100, 0.7);
  box-shadow: 0 0 40px rgba(255, 190, 50, 0.15);
}

#start-btn:hover::before {
  opacity: 1;
}

.controls-hint {
  position: absolute;
  bottom: clamp(1rem, 4vh, 2.5rem);
  font-size: 0.75rem;
  color: rgba(200, 195, 220, 0.35);
  letter-spacing: 0.1em;
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 30px rgba(255, 200, 60, 0.5), 0 0 80px rgba(255, 160, 30, 0.25); }
  50% { text-shadow: 0 0 45px rgba(255, 200, 60, 0.7), 0 0 120px rgba(255, 160, 30, 0.35); }
}

/* ─── Touch Controls ────────────────────────────────────────────────────── */
.touch-controls {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .touch-controls {
    display: block;
  }
}
