body, html {
  margin: 0;
  padding: 0;
  background: black;
  overflow: hidden;
  touch-action: none;
}

canvas {
  display: block;
  width: 100vw;
  height: var(--vh);
}

#controls {
  position: absolute;
  bottom: 5%;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 1s;
  pointer-events: none; /* disabled when hidden */
  z-index: 10;          /* sit above the canvas */
}

#controls.visible {
  opacity: 1;
  pointer-events: auto; /* enabled when visible */
}

#controls button {
  background: transparent;
  border: 1px solid white;
  color: white;
  font-family: monospace;
  padding: 0.6em 1.2em;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s, color 0.3s;
}

#controls button:hover {
  background: white;
  color: black;
}

@media (max-width: 600px) {
  #controls button {
    font-size: 1.2rem;
    padding: 0.8em 1.4em;
  }
}
