/* ================================================================
   THE PAGE AROUND THE GAME
   The world is drawn by the graphics card into one canvas, and the
   crosshair and the block bar go on a second canvas on top of it.
   ================================================================ */

body {
  margin: 0;
  min-height: 100vh;
  padding: 18px 12px 40px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  background: #0d1218;
  color: #cfe4f0;
  font-family: system-ui, sans-serif;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #ffd166;
}

/* The two canvases sit exactly on top of one another. */
#stack {
  position: relative;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #2c4059;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

#game, #hud {
  display: block;
  touch-action: none;
}

#hud {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;   /* clicks go through to the 3D canvas underneath */
}

/* Only shows up if the 3D bit refuses to start. */
#oops {
  display: none;
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  padding: 40px;
  background: #2a1418;
  color: #ffc4b8;
  font-size: 16px;
  line-height: 1.6;
}

#controls {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

#how-to {
  max-width: 430px;
  font-size: 14px;
  line-height: 1.5;
  color: #93b0c4;
}

#how-to p { margin: 0 0 6px; }
#how-to b { color: #ffd166; }

footer {
  font-size: 12px;
  color: #4f6b80;
}
