/*
  Basic styling for the Blinkert runner game. The canvas fills the entire
  viewport and all UI overlays are positioned on top. A dark translucent
  overlay is used to display start and game‑over messages.
*/
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #f2f2f2;
  font-family: sans-serif;
}

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

canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* The canvas background is transparent since the sky image is drawn in
     the script. */
  background: transparent;
}

/* Overlay used for start and game‑over states */
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  z-index: 2;
}

/* Hide overlay when not needed */
#overlay.hidden {
  display: none;
}

#overlay h1 {
  margin: 0.5rem 0;
  font-size: 2rem;
  line-height: 1.2;
}

#overlay p {
  margin: 0.5rem 0;
  font-size: 1rem;
  line-height: 1.4;
}