/* La pagina ya no es de pantalla fija: el juego ocupa la vista inicial (100dvh menos la franja legal) y debajo hay un texto sobre el juego.
   La barra de desplazamiento se oculta (el desplazamiento sigue funcionando) para que no reste ancho al lienzo; teclas y rueda no mueven
   la pagina mientras se juega (escuchadores en index.html) y en tactil el lienzo no desplaza (touch-action). */
html { margin: 0; padding: 0; background: #1c1c1c; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; padding: 0; background: #1c1c1c; overscroll-behavior: none; }
/* El juego ocupa todo salvo una franja inferior con los enlaces legales (en pantalla completa, solo el juego) */
#game { position: relative; height: calc(100vh - 26px); height: calc(100dvh - 26px); background: #1c1c1c; touch-action: none; }
#game:fullscreen { height: 100%; }
#game:-webkit-full-screen { height: 100%; }
#unity-canvas { width: 100%; height: 100%; display: block; background: #1c1c1c; outline: none; touch-action: none; }

/* Carga: logo de RetryOne Games centrado y barra naranja fina */
#loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
           background: #1c1c1c; transition: opacity 0.4s ease; }
#loading.done { opacity: 0; pointer-events: none; }
#logo { width: min(42vw, 360px); height: auto; user-select: none; -webkit-user-drag: none; }
#bar { width: min(42vw, 360px); height: 6px; margin-top: 4vh; border-radius: 3px; background: #2e2e2e; overflow: hidden; }
#fill { width: 0; height: 100%; background: #ff6a00; border-radius: 3px; transition: width 0.15s linear; }

#message { display: none; position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); max-width: 80%;
           padding: 10px 16px; border-radius: 6px; background: #8b1d1d; color: #fff; font: 15px sans-serif; text-align: center; }

/* Enlaces legales */
#legal { position: relative; height: 26px; display: flex; align-items: center; justify-content: center;
         gap: 18px; background: #161616; font: 12px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; white-space: nowrap; overflow: hidden; }
#legal a { color: #8f8f8f; text-decoration: none; }
#legal a:hover { color: #ff6a00; }
#legal .home { color: #ff6a00; }

/* Texto sobre el juego (debajo de la franja legal: se llega con el enlace "Sobre el juego" o desplazando fuera del lienzo) */
#sobre-el-juego { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; color: #d6d6d6; font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#sobre-el-juego h1 { margin: 0 0 14px; font-size: 1.7rem; line-height: 1.25; color: #fff; }
#sobre-el-juego h2 { margin: 30px 0 8px; font-size: 1.2rem; color: #ff6a00; }
#sobre-el-juego p, #sobre-el-juego ul { margin: 0 0 12px; }
#sobre-el-juego ul { padding-left: 1.3em; }
#sobre-el-juego li { margin-bottom: 6px; }
#sobre-el-juego a { color: #ff6a00; }
#sobre-el-juego .en { margin-top: 40px; padding-top: 8px; border-top: 1px solid #333; }
#sobre-el-juego .back { display: inline-block; margin-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Ventana previa de los anuncios con recompensa (dentro de #game: tambien se ve en pantalla completa). Dos botones iguales: mismo tamano,
   mismo borde y mismo peso visual (VER ANUNCIO / NO, GRACIAS). Objetivos tactiles >= 48 px; cabe en 667x375. */
#ad-offer { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 8px; box-sizing: border-box;
            background: rgba(10, 10, 14, 0.78); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: none; }
#ad-offer[hidden] { display: none; }
#ad-offer-panel { box-sizing: border-box; width: min(100%, 560px); max-height: 100%; overflow-y: auto; padding: clamp(10px, 3vmin, 22px) clamp(12px, 3.4vmin, 26px);
                  color: #fff; text-align: center; background: linear-gradient(#34373d, #26282c); border: 4px solid #6b7078; border-radius: 12px;
                  box-shadow: 0 0 0 2px #121316, 0 10px 30px rgba(0, 0, 0, 0.6); outline: none; }
#ad-offer-title { margin: 0 0 clamp(6px, 1.6vmin, 12px); font-size: clamp(17px, 4.6vmin, 28px); line-height: 1.2; font-weight: 800; letter-spacing: 0.02em; color: #ff8a2a; text-transform: uppercase; }
#ad-offer-body { margin: 0 0 clamp(10px, 2.6vmin, 18px); font-size: clamp(14px, 3.4vmin, 19px); line-height: 1.35; color: #e6e6e6; }
.ad-offer-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ad-offer-btn { flex: 1 1 180px; min-height: 52px; padding: 8px 14px; box-sizing: border-box; cursor: pointer; font: inherit; font-weight: 800; letter-spacing: 0.03em;
                font-size: clamp(15px, 3.6vmin, 20px); line-height: 1.15; text-transform: uppercase; color: #fff; background: linear-gradient(#4a4e55, #33363b);
                border: 3px solid #ff6a00; border-radius: 10px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ad-offer-btn:hover { background: linear-gradient(#5a5f67, #3c4046); }
.ad-offer-btn:active { transform: translateY(1px); }
.ad-offer-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#ad-notice { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); z-index: 21; max-width: 86%; padding: 10px 18px; box-sizing: border-box; border-radius: 8px;
             background: rgba(20, 20, 24, 0.92); border: 2px solid #ff6a00; color: #fff; font: 700 clamp(14px, 3.4vmin, 18px)/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
             text-align: center; pointer-events: none; }
#ad-notice[hidden] { display: none; }
@media (max-height: 420px) { #ad-offer-panel { padding: 10px 14px; } .ad-offer-btn { min-height: 48px; } }
