/* style.css — Consola Arcadia: pantalla completa, sin scroll, sin zoom ni rebote */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;                   /* sin gestos del navegador (zoom, scroll) */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;          /* sin menú al mantener presionado en iOS */
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: none;
}

body {
  position: fixed;                      /* evita el rebote elástico de iOS */
  inset: 0;
}

#pantalla {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  /* Escalado nítido de pixel art: el canvas tiene resolución lógica baja */
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  touch-action: none;
  outline: none;                        /* el canvas recibe foco (necesario para el control en iOS) */
}

/* Sonda para leer las safe areas del iPhone desde JS */
#safe-probe {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  visibility: hidden;
  pointer-events: none;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}

/* Aviso "Gira tu teléfono" (solo en dispositivos táctiles en vertical) */
#girar {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000;
  color: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: ui-monospace, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

#girar p {
  margin: 0;
  font-size: 20px;
  color: #ffe14a;
}

#girar small {
  font-size: 11px;
  color: #8a93a6;
}

#girar svg {
  animation: girar 2s ease-in-out infinite;
}

@keyframes girar {
  0%, 30% { transform: rotate(0deg); }
  60%, 100% { transform: rotate(-90deg); }
}

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