/* Contenedor de pantalla completa para el susto */
.jumpscare-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000; /* Fondo negro inicial */
  z-index: 999999; /* Por encima de absolutamente todo */
  display: none; /* Se activa por JS */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Contenedor del contenido interno */
.jumpscare-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Imagen responsive que cubre la pantalla sin deformarse */
.jumpscare-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ajuste perfecto en móviles y PC */
  animation: shake 0.2s infinite; /* Efecto temblor terrorífico */
}

/* Botón inferior */
.btn-revivir {
  position: absolute;
  bottom: 10%;
  z-index: 9999999 !important; /* Asegura que se sitúe por encima de la imagen del susto */
  cursor: pointer !important;  /* Forza a que mantenga un cursor interactivo */
  padding: 15px 40px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  background-color: #ff6600; /* Naranja Halloween */
  border: 3px solid #fff;
  border-radius: 5px;
  box-shadow: 0 0 15px #ff6600;
  animation: pulse 1.5s infinite;
}

/* Efecto fundido a blanco para "Revivir" */
.jumpscare-overlay.fade-to-white {
  background-color: #fff !important; 
  opacity: 0 !important;
  transition: background-color 0.8s ease, opacity 1.2s ease;
}

/* Animaciones visuales */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}