html, body {
  width: 100%;
  height: 100%;
  margin: 0;
}

.main-container {
  display: flex;
  justify-content: center; /* Centrado horizontal */
  align-items: center;     /* Centrado vertical */
  min-height: 100vh;       /* Altura de toda la pantalla */
  background-color: #2c3e50; /* Color fuera de la casa */
  margin: 0;
}

#escena {
  align-items: center;
  position: relative;
  width: 100vw;
  overflow-x: hidden;
  height: 100vh;
}

#escena img {
  position: absolute;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#fondo {
  position: absolute;
  z-index: 0;
  width: 100%;
  height: 100%;
  bottom: 0;
  background-image: linear-gradient(#78A7FF, #78A7FF);
}

#interior {
  z-index: 3;
  bottom: 128px;
  left: 50%;
  height: 128px;
  transform: translateX(-50%);
}

.interior-casa {
  z-index: 3;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 448px;
  height: 128px;
  bottom: 0;
}

#cama {
  height: 36px;
  z-index: 4;
  bottom: 128px;
  left: 64px;
  transform: translateX(-50%);
}

#horno {
  height: 64px;
  z-index: 4;
  bottom: 128px;
  left: 256px;
  cursor: pointer;
}

#lampara {
  height: 64px;
  z-index: 4;
  bottom: 192px;
  left: 142px;
  cursor: pointer;
  transform: translateX(-50%);
}

#mesa {
  height: 64px;
  z-index: 4;
  bottom: 128px;
  left: 352px;
  transform: translateX(-50%);
}

#caldero {
  height: 64px;
  z-index: 4;
  bottom: 128px;
  left: 416px;
  transform: translateX(-50%);
}

#casa {
  bottom: 128px;
  left: 50%;
  height: 192px;
  z-index: 2;
  transform: translateX(-50%);
}

#stickman {
  bottom: 0;
  left: 50%;
  height: 300px;
  transform: translateX(-50%);
}

#puerta {
  z-index: 4;
  height: 128px;
  bottom: 128px;
  left: 50%;
  cursor: pointer;
  transition: bottom 0.6s ease-in-out, opacity 0.5s ease;
  transform: translateX(-50%);
}

#tierra {
  bottom: 0;
  left: 50%;
  height: 128px;
  z-index: 2;
  overflow-x: hidden;
  transform: translateX(-50%);
}

#clouds-group {
  position: absolute;
  top: 20%;
  display: flex;
  width: 200%;
  animation: desplazar 60s linear infinite;
}

#nube1 {
  position: absolute;
  height: 128px;
}

#nube2 {
  position: absolute;
  height: 128px;
  transform: translateX(102%);
}

@keyframes desplazar {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-50%);
  }
}

body.clear #clouds-group {
  display: none;
}

#pared {
  z-index: 4;
  left: 50%;
  height: 128px;
  bottom: 128px;
  cursor: pointer;
  transition: bottom 0.6s ease-in-out, opacity 0.5s ease;
  transform: translateX(-50%);
}

#oscurecer {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
  background-color: black;
  opacity: 0;
  transition: opacity 1s ease;
  left: 50%;
  transform: translateX(-50%);
}

#reloj-contenedor {
  z-index: 7;
  position: fixed;
  top: 40px;
  right: 60px;

  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: white;
  user-select: none;
  text-align: right;

  text-shadow: 0 0 14px rgba(0,0,0,0.45);
}

#reloj-hora {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: 1px;
}

#reloj-fecha {
  margin-top: 6px;
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 400;
  opacity: 0.85;
}

#temp-contenedor {
  z-index: 7;
  position: fixed;
  top: 40px;
  left: 60px;

  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: white;
  user-select: none;
  text-align: right;

  text-shadow: 0 0 14px rgba(0,0,0,0.45);
}

#temperatura {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: 1px;
  height: fit-content;
}

#temperatura img {
  width: 50px;
  height: 50px;
}

#clima {
  margin-top: 0px;
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 400;
  opacity: 0.85;
  text-align: center;
}

/* 📱 Tablets y celulares */
@media (max-width: 768px) {
  #reloj-contenedor {
    top: 30px;
    right: 30px;
  }
  #temp-contenedor {
    top: 30px;
    left: 30px;
  }
}
