/* ============================================================
   Fondo panorámico a pantalla completa — Piratas del Tesoro
   Se enlaza desde index.html. No toca el bundle del juego.

   - bg_panoramic.jpg (2048×1152) con `cover`: llena siempre toda la
     pantalla en cualquier relación de aspecto (16:9, 21:9, 4:3, móvil).
   - El marco (#game-frame) es un WebP con canal alfa real, así que el
     paisaje se ve a través de sus huecos y NO necesita máscara alguna.
   ============================================================ */

html, body, #root {
  height: 100%;
}

body {
  margin: 0;
  background-color: #050d14;
  background-image: url('./bg_panoramic.jpg');
  background-position: center 55%;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Capa fija separada para el fondo: evita el "salto" de
   background-attachment: fixed en móviles y mantiene cover exacto */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('./bg_panoramic.jpg');
  background-position: center 55%;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Viñeta + oscurecido suave tras el marco para que los símbolos y la
   barra de control contrasten sin ocultar el paisaje */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 48%,
      rgba(3, 10, 18, 0.28) 0%,
      rgba(3, 10, 18, 0.05) 60%,
      rgba(3, 10, 18, 0) 100%),
    linear-gradient(180deg,
      rgba(3, 10, 18, 0.35) 0%,
      rgba(3, 10, 18, 0) 18%,
      rgba(3, 10, 18, 0) 78%,
      rgba(3, 10, 18, 0.55) 100%);
}

#root { position: relative; z-index: 1; }

/* Los relámpagos y truenos los gestiona el componente LightningFX (React). */
