*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family: system-ui, sans-serif;
}

body{
  width:100vw;
  height:100vh;
  overflow:hidden;
  background:#000;
}

/* LOGO */
#topLogo{
  position:absolute;
  top:10px;
  left:50%;
  transform:translateX(-50%);
  z-index:20;
}
#topLogo img{
  width:250px;
  max-width:70vw;
}

/* COPYRIGHT */
#copyright{
  position:absolute;
  bottom:-30px;
  left:50%;
  transform:translateX(-50%);
  color:#fff;
  font-size:10px;
  text-align:center;
  z-index:20;
}

/* ESCENA */
#scene{
  width:100vw;
  height:100vh;
  background:url("assets/fondo.png") center/cover no-repeat;
  display:flex;
  justify-content:center;
  align-items:center;
}

/* HOTEL */
#hotel{ position:relative; }

/* GUIA */
#guide{
  height:100vh;
  max-height:100vh;
  object-fit:contain;
}

/* GRID */
#windowsGrid{
  position:absolute;
  top:18%;
  left:50%;
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:repeat(3, 90px);
  grid-template-rows:repeat(4, 90px);
  gap:8px;
}

/* WINDOWS */
.window{
  width:90px;
  height:90px;
  cursor:pointer;
  position:relative;
}
.window img{
  width:100%;
  height:100%;
}
.window::after{
  content:"";
  position:absolute;
  inset:0;
  background:url("assets/ventana.png") center/contain no-repeat;
}
.window.open::after{ display:none; }

/* OVERLAY */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.7);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:999;
}

/* POPUP */
.popup{
  background:#fff;
  padding:22px;
  border-radius:16px;
  width:320px;
  max-width:92vw;
  text-align:center;
}
.popup-logo{ width:240px; }
/* BOTONES GENERALES DEL JUEGO */
.popup button,
#startGame{
  position:relative;
  width:100%;
  padding:14px;
  margin-top:14px;
  border:none;
  border-radius:14px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.5px;
  color:#fff;
  cursor:pointer;
  background:linear-gradient(135deg,#00c853,#00e676);
  box-shadow:0 8px 18px rgba(0,200,83,.35);
  transition:all .25s ease;
}

/* EFECTO HOVER */
.popup button:hover,
#startGame:hover{
  transform:translateY(-2px) scale(1.02);
  box-shadow:0 12px 24px rgba(0,200,83,.45);
}

/* EFECTO CLICK */
.popup button:active,
#startGame:active{
  transform:scale(.97);
  box-shadow:0 6px 14px rgba(0,200,83,.35);
}

/* BOTÓN INTENTAR OTRA VEZ (PERDER) */
.popup button[onclick]{
  background:linear-gradient(135deg,#ff5252,#ff1744);
  box-shadow:0 8px 18px rgba(255,23,68,.35);
}

.popup button[onclick]:hover{
  box-shadow:0 12px 24px rgba(255,23,68,.45);
}

/* ANIMACIÓN SUAVE DE ENTRADA */
.popup{
  animation:popupIn .35s ease-out;
}

@keyframes popupIn{
  from{
    transform:scale(.85);
    opacity:0;
  }
  to{
    transform:scale(1);
    opacity:1;
  }
}


/* FORMULARIO */
.form-container{
  margin-top:15px;
  background:#f5f5f5;
  padding:15px;
  border-radius:12px;
}
.form-container h3{
  margin-bottom:10px;
  color:#2e7d32;
}
.form-container input{
  width:100%;
  padding:10px;
  margin-bottom:8px;
  border-radius:8px;
  border:1px solid #ccc;
}
.form-container button{
  width:100%;
  padding:12px;
  background:#00c853;
  border:none;
  border-radius:10px;
  color:#fff;
  font-weight:bold;
  cursor:pointer;
}
#mensaje{
  display:none;
  margin-top:10px;
  font-weight:bold;
  color:#2e7d32;
}

/* MOBILE */
@media(max-width:800px){
  #guide{ height:65vh; }
  #windowsGrid{
    grid-template-columns:repeat(3,70px);
    grid-template-rows:repeat(4,70px);
  }
  .window{ width:70px; height:70px; }
}

/* ===== FIX GUIA PEGADA ABAJO EN MOBILE ===== */

/* referencia de altura */
#hotel{
  position: relative;
  height: 80vh;
}

/* comportamiento normal (desktop intacto) */
#guide{
  height: 100vh;
  max-height: 100vh;
  object-fit: contain;
}

/* solo en celular */
@media (max-width: 500px){
  #guide{
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 65vh;
  }
}
/* ===== BAJAR VENTANAS 20% SOLO EN MOBILE ===== */
@media (max-width: 500px){
  #windowsGrid{
    top: 28%;
  }
}
