/* Plantilla web de Zodiac Galaxy: el lienzo a toda la ventana y la carga con los colores del
   juego (el azul noche de sus chapas, #0B1826 a #173F73, y el cian de sus barras). */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0B1826;
}

#unity-container {
  position: fixed;
  inset: 0;
}

/* Como mucho 2.4 veces mas ancho que alto (el teléfono mas alargado mide 2.2), centrado. En el
   Safari de un iPhone apaisado sus barras dejan 874x276 pt, 3.2:1, y la interfaz, que se reparte
   por el alto, no cabia: se monta en 662x276 y quedan dos franjas a los lados. */
#unity-canvas {
  width: min(100%, 240vh);
  width: min(100%, 240dvh);
  height: 100%;
  margin: 0 auto;
  display: block;
  background: #0B1826;
}

#zg-carga {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: radial-gradient(ellipse at 50% 45%, #173F73 0%, #0B1826 70%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#zg-logo {
  width: min(56vw, 420px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

#zg-barra {
  width: min(60vw, 360px);
  height: 14px;
  border-radius: 7px;
  background: #06121E;
  border: 2px solid #1E4A6E;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(47, 169, 230, 0.25);
}

#zg-lleno {
  width: 0;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(180deg, #8FE0FF 0%, #2FA9E6 55%, #1F86F0 100%);
  transition: width 0.2s ease-out;
}

#zg-texto {
  color: #C8E8FF;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  display: none;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  z-index: 10;
}

/* El aviso de girar el telefono. */
#zg-gira { display: none; position: fixed; inset: 0; z-index: 20; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; background: #0B1826; color: #EAF4FF; text-align: center;
  font: 700 18px/1.35 -apple-system, "Segoe UI", Roboto, sans-serif; padding: 24px; }
#zg-gira p { margin: 0; }
#zg-gira p[lang="en"] { color: #A9C2DC; font-size: 15px; font-weight: 600; }
#zg-telefono { width: 44px; height: 74px; border: 4px solid #8FE0FF; border-radius: 10px; margin-bottom: 18px;
  animation: zg-girar 2.2s ease-in-out infinite; }
@keyframes zg-girar { 0%, 25% { transform: rotate(0deg); } 55%, 100% { transform: rotate(-90deg); } }
/* Siempre que la pantalla este en vertical: el juego es apaisado, y en vertical su interfaz se
   monta encima de si misma. En un ordenador (raton) no hay telefono que girar: ensanchar la ventana. */
@media (orientation: portrait) { #zg-gira { display: flex; } }
#zg-gira .zg-ventana { display: none; }
@media (hover: hover) and (pointer: fine) {
  #zg-gira .zg-movil, #zg-telefono { display: none; }
  #zg-gira .zg-ventana { display: block; }
}
@media (prefers-reduced-motion: reduce) { #zg-telefono { animation: none; transform: rotate(-90deg); } }

/* El consejo de la carga en el iPhone: Safari no deja poner una pagina a pantalla completa; desde
   la pantalla de inicio se abre sin sus barras. Lo enseña el script de index.html. */
#zg-consejo { display: none; max-width: min(86vw, 520px); margin: 0; color: #C8E8FF; text-align: center;
  font-size: 14px; line-height: 1.4; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
#zg-consejo b { color: #FFE27A; }
#zg-consejo span[lang="en"] { display: block; color: #A9C2DC; font-size: 13px; margin-top: 4px; }
