/* Ajuste para celulares: o jogo ocupa a largura da tela, mantendo a proporção 16:10 */
#unity-container:not(.unity-mobile) {
  width: 100% !important;
  max-width: 960px !important;
  height: auto !important;
}
#unity-container:not(.unity-mobile) #unity-fullscreen-container {
  width: 100% !important;
  height: auto !important;
}
#unity-container:not(.unity-mobile) #unity-canvas {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 960 / 600;
}

/* Aviso para girar o celular: aparece só em tela de celular em pé */
#girar-aviso {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b0f1e;
  color: #e8f7fb;
  font-family: Arial, sans-serif;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
#girar-aviso .icone { font-size: 72px; color: #33e6ff; animation: girar 2.4s ease-in-out infinite; }
#girar-aviso p { font-size: 22px; font-weight: bold; margin: 12px 0 0; }
#girar-aviso .sub { font-size: 15px; font-weight: normal; color: #9fb4c4; }
@keyframes girar { 0% { transform: rotate(0deg); } 50% { transform: rotate(90deg); } 100% { transform: rotate(90deg); } }
@media (orientation: portrait) and (max-width: 900px) {
  #girar-aviso { display: flex; }
}

/* Tela cheia: o jogo ocupa a tela inteira, sem a proporção 16:10 que cortaria a parte de baixo */
html:has(:fullscreen) #unity-container:not(.unity-mobile) {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}
html:has(:fullscreen) #unity-container:not(.unity-mobile) #unity-canvas {
  aspect-ratio: auto !important;
  width: 100% !important;
  height: 100% !important;
}

/* Convite para instalar o jogo no celular */
#instalar-app[hidden] { display: none; }
#instalar-app {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-width: 420px;
  margin: 0 auto;
  z-index: 10000;
  background: #0b0f1e;
  color: #e8f7fb;
  border: 1px solid #33e6ff;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
#instalar-app p { margin: 0 0 10px; }
#instalar-app .acoes { display: flex; gap: 8px; justify-content: flex-end; }
#instalar-app button {
  font: inherit;
  font-weight: bold;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}
#btn-instalar { background: #33e6ff; color: #0b0f1e; }
#btn-fechar { background: #1f2740; color: #e8f7fb; }
