/* ============================================================================
   FLAPPY KIRK — PAGE STYLES
   The game itself is drawn on a canvas, so this file only handles the page
   around it: the backdrop, centring, and stopping mobile browsers from
   bouncing, zooming or selecting text while you play.
   ========================================================================= */

:root {
  /* Match this to CONFIG.palette.skyTop for a seamless edge. */
  --backdrop: #14162B;
  --glow: rgba(127, 227, 196, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--backdrop);
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--glow), transparent 60%),
    var(--backdrop);
}

.stage {
  position: relative;
  line-height: 0;
}

canvas {
  display: block;
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  touch-action: none;
}

/* Visible while the artwork loads. Hidden by game.js once ready. */
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #7FE3C4;
  font: 400 14px/1 "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0.04em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard players should be able to see what's focused. */
canvas:focus-visible {
  outline: 3px solid #7FE3C4;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .loading { animation: none; }
}
