/* =========================================================================
   style.css — Montana Goldrush retro arcade styling
   ========================================================================= */

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: monospace;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;               /* prevent browser gestures on canvas */
  -webkit-user-select: none;
  user-select: none;
}

/* ── Game container ─────────────────────────────────────────────────────── */
#game-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* ── Canvas ─────────────────────────────────────────────────────────────── */
#gameCanvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  /* Size is set dynamically by JS; we add a subtle arcade glow */
  border: 2px solid #1a1a3e;
  border-radius: 4px;
}

/* ── CRT overlay (scan lines + vignette) ────────────────────────────────── */
#crt-overlay {
  display: none;                     /* shown only when body.crt is active */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

body.crt #crt-overlay {
  display: block;
  background:
    /* scan lines */
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.12) 0px,
      rgba(0, 0, 0, 0.12) 1px,
      transparent 1px,
      transparent 3px
    );
}

body.crt #gameCanvas {
  filter: brightness(1.05) contrast(1.08);
  box-shadow:
    0 0 50px rgba(0, 255, 200, 0.08),
    0 0 120px rgba(0, 0, 0, 0.5),
    inset 0 0 80px rgba(0, 0, 0, 0.15);
  border-color: #2a2a5e;
}

/* ── Vignette (always on, subtle) ───────────────────────────────────────── */
body.crt #game-container::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.45) 100%);
  z-index: 101;
}

/* ── Prevent pull-to-refresh & overscroll on mobile ─────────────────────── */
body {
  overscroll-behavior: none;
}

/* ── Hide scrollbars everywhere ─────────────────────────────────────────── */
::-webkit-scrollbar { display: none; }
