@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');

body {
  margin: 0;
  padding: 0;
  background-color: #212121;
  font-family: 'Montserrat', sans-serif;
}

/* CONTENEDOR UNITY */
#unity-container {
  position: absolute;
  margin-top: 0px;
}
#unity-container.unity-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
#unity-container.unity-mobile {
  position: fixed;
  width: 100%;
  height: 100%;
}
#unity-canvas {
  background: #000000;
  position: relative;
  border-radius: 10px;
}
.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%;
}

/* LOADING BAR + FONDO + CONTENIDO */
#unity-loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #000000;
}

/* CONTENIDO CENTRADO */
#loading-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: clamp(15px, 3vw, 30px);
  box-sizing: border-box;
  gap: clamp(8px, 1.5vh, 15px); /* Reducido para juntar más los elementos */
}

#bundle-logo {
  height: clamp(80px, 15vh, 160px); /* Responsive entre 80px y 160px */
  width: auto;
  max-width: 90%;
  object-fit: contain;
  margin: 0;
}

/* Ocultar completamente el texto del porcentaje */
#unity-text {
  display: none !important;
}

/* BARRA DE CARGA */
#unity-progress-bar-empty {
  width: clamp(250px, 65%, 450px); /* Aumentado el ancho mínimo y máximo */
  height: clamp(12px, 2vh, 20px); /* Responsive entre 12px y 20px */
  background: transparent;
  border: 2px solid white;
  border-radius: 40.122px;
  overflow: hidden;
  margin-top: clamp(8px, 2vh, 15px);
  box-sizing: border-box;
  padding: 2px;
}
#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(91deg, #049DD9 0.57%, #56CEFD 99.21%);
  transition: width 0.3s ease;
  border-radius: 40.122px;
}

/* TEXTO DESCRIPTIVO DEL BUNDLE */
#bundle-text {
  color: white;
  font-size: clamp(13px, 1.8vw, 16px); /* Reducido el tamaño del texto */
  line-height: 1.5;
  max-width: min(550px, 80%); /* Aumentado de 500px y 80% */
  text-align: center;
  margin-top: clamp(15px, 2.5vh, 25px); /* Reducido el margen superior */
  padding: 0 clamp(10px, 3vw, 30px);
}

/* VIDEO DE FONDO */
#bundle-video {
  position: absolute;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  border-radius: 10px;
  z-index: 1;
}

/* GRADIENTE + BLUR */
#bundle-overlay {
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.69) 35.21%, rgba(0, 0, 0, 0.00) 110.61%);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
}

/* RUEDA DE CARGA */
#loadingWheel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 2s linear infinite;
}
#loadingWheel img {
  width: 50px;
  height: 50px;
}
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* FOOTER */
#unity-footer {
  position: fixed;
  bottom: 0;
  right: 0;
}
.unity-mobile #unity-footer {
  display: none;
}

/* OTROS */
#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
}
#unity-webgl-logo {
  float: left;
  width: 204px;
  height: 38px;
  background: url('webgl-logo.png') no-repeat center;
}
#unity-build-title {
  float: right;
  margin-right: 10px;
  line-height: 38px;
  font-family: arial;
  font-size: 18px;
}
#unity-fullscreen-button {
  cursor: pointer;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 45px;
  height: 45px;
  background: url('fullscreen-button.png') no-repeat center;
  padding-right: 10px;
  padding-bottom: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  margin-right: 10px;
  border-color: white;
}

/* HEADER OPCIONAL */
header {
  padding: 20px;
}
header img {
  height: 10vh;
}

#button-container {
  margin-top: 1vh;
  display: flex;
  justify-content: center;
}

#entervr:enabled { display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  float: none; width: 10vw; height: 9vh; background-color: #ffff; border: 0; color: #212121;
  text-align: center;
  font-family: Montserrat;
  font-size: 17px;
  font-style: normal;
  font-weight: 600;
  line-height: 76%;
  border-radius: 13px;}
#enterar:enabled { float: none; width: 38px; height: 38px; background-color: #1eaed3; display: inline-block; border: 0; }
#entervr:disabled { 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  float: none; width: 10vw; height: 9vh; background-color: #dddddd; border: 0; color: #5a5858;
  text-align: center;
  font-family: Montserrat;
  font-size: 17px;
  font-style: normal;
  font-weight: 600;
  line-height: 76%;
  border-radius: 13px;}
#enterar:disabled { float: none; width: 38px; height: 38px; background-color: #dddddd; display: inline-block; border: 0; }
#entervr img {
  width: 50%;  /* Ajusta el ancho de la imagen */
  height: 50%; /* Ajusta la altura de la imagen */
}
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.hidden {
  display: none !important;
}

#vr-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 66.66vw;
  height: 76.66vh;
  background: rgba(0, 0, 0, 0.80);
  color: #FFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;  
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 9999;
  pointer-events: none; 
}

.vr-overlay-content {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  border-radius: 10px;
}

/* Para dispositivos móviles en vertical */
@media (max-aspect-ratio: 1/1) {
  #bundle-logo {
    height: clamp(60px, 12vh, 120px); /* Ligeramente más pequeño en vertical */
  }

  #unity-progress-bar-empty {
    width: clamp(200px, 85%, 400px); /* Ajustado para móvil */
  }

  #bundle-text {
    max-width: 92%;
    font-size: clamp(11px, 2.8vw, 15px); /* Reducido para móvil */
  }
}
