/* Backseat Adventures — shell styling.
   The game itself is drawn entirely on the canvas; this file only handles
   letterboxing the 16:9 canvas and killing browser gestures on touch. */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0c0f;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #16191f 0%, #06070a 100%);
}

#game {
  display: block;
  width: 100%;
  height: auto;
  max-width: calc(100vh * 16 / 9);
  max-height: 100vh;
  aspect-ratio: 16 / 9;
  image-rendering: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

/* Nudge phones into landscape — the composition is a car side window.
 *
 * This is a HINT, never a blocker. It used to be an opaque full-screen panel
 * shown at any width under 900px, which meant a merely narrow desktop window
 * hid the game completely and swallowed every click. Now it:
 *   - only appears on real touch devices (pointer: coarse)
 *   - never receives pointer events, so it cannot block play
 *   - sits at the top as a translucent strip, leaving the game visible
 */
#rotate-hint {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  background: rgba(10, 12, 15, 0.82);
  color: #ffd166;
  font-size: clamp(14px, 3.4vw, 24px);
  font-weight: bold;
  text-align: center;
  padding: 0.9em 1em;
  z-index: 10;
  pointer-events: none;
}

@media (orientation: portrait) and (pointer: coarse) {
  #rotate-hint { display: flex; }
}

/* Boot / failure message. Removed by main.js as soon as the game starts,
   so if you can still read it, the scripts never ran. */
#boot-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 6vw;
  color: #e8e6e0;
  background: #0d0f13;
  z-index: 20;
}

#boot-msg h1 {
  font-size: clamp(28px, 5vw, 54px);
  color: #ffd23f;
  letter-spacing: 1px;
}

#boot-msg p { font-size: clamp(15px, 2vw, 21px); }

#boot-msg .hint {
  color: #93a0ad;
  font-size: clamp(13px, 1.6vw, 17px);
  line-height: 1.7;
  max-width: 34em;
}
