@font-face {
  font-family: "Nosifer";
  src: url(Nosifer-Regular.ttf);
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Creepster";
  src: url(Creepster-Regular.ttf);
  font-weight: normal;
  font-style: normal;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: black;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Animation BIENVENUE avec effets de scintillement */
.welcome {
  margin-bottom: 40px;
}

.welcome span {
  font-family: "Creepster", cursive;
  color: #ffffff;
  font-size: 48px;
  opacity: 0.15;
}

#I {
  opacity: 1;
  animation: flickerI 2s linear reverse infinite;
}

#I::after {
  content: "";
  width: 150%;
  box-shadow: -35px 0px 60px 8px rgba(255, 255, 255, 1);
}

#L,
#G {
  animation: flickerLG 2s linear reverse infinite;
  position: relative;
}

#L::after,
#L::before {
  content: " ";
  width: 100px;
  height: 100px;
  background: white;
  position: absolute;
  top: -50%;
  left: 100%;
  border-radius: 100%;
  opacity: 0.05;
  filter: blur(10px);
}

#L::after {
  width: 200px;
  height: 200px;
  top: -150%;
  left: -5%;
  opacity: 0.1;
  filter: blur(10px);
}

#H {
  animation: flickerH 2s linear reverse infinite;
}

#T {
  animation: flickerH 2s linear reverse infinite;
}

@keyframes flickerI {
  0% {
    opacity: 0.4;
  }
  5% {
    opacity: 0.5;
  }
  10% {
    opacity: 0.6;
  }
  15% {
    opacity: 0.85;
  }
  25% {
    opacity: 0.5;
  }
  30% {
    opacity: 1;
  }
  35% {
    opacity: 0.1;
  }
  40% {
    opacity: 0.25;
  }
  45% {
    opacity: 0.5;
  }
  60% {
    opacity: 1;
  }
  70% {
    opacity: 0.85;
  }
  80% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes flickerLG {
  0% {
    opacity: 0.19;
  }
  5% {
    opacity: 0.2;
  }
  10% {
    opacity: 0.25;
  }
  15% {
    opacity: 0.35;
  }
  25% {
    opacity: 0.2;
  }
  30% {
    opacity: 0.4;
  }
  35% {
    opacity: 0.1;
  }
  40% {
    opacity: 0.25;
  }
  45% {
    opacity: 0.2;
  }
  60% {
    opacity: 0.4;
  }
  70% {
    opacity: 0.35;
  }
  80% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.4;
  }
}

@keyframes flickerH {
  0% {
    opacity: 0.15;
  }
  5% {
    opacity: 0.2;
  }
  10% {
    opacity: 0.12;
  }
  15% {
    opacity: 0.2;
  }
  25% {
    opacity: 0.15;
  }
  30% {
    opacity: 0.4;
  }
  35% {
    opacity: 0.05;
  }
  40% {
    opacity: 0.12;
  }
  45% {
    opacity: 0.15;
  }
  60% {
    opacity: 0.3;
  }
  70% {
    opacity: 0.2;
  }
  80% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.18;
  }
  100% {
    opacity: 0.3;
  }
}

.subtitle {
  font-family: "Nosifer", cursive;
  color: #850303;
  font-size: 20px;
  text-align: center;
  margin-bottom: 50px;
}

.doors-container {
  display: flex;
  gap: 40px;
  perspective: 1000px;
  margin-bottom: 30px;
}

.door {
  width: 180px;
  height: 320px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.door:hover {
  transform: scale(1.05) translateY(-10px);
}

.door-frame {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #2a1a1a 0%, #1a0a0a 100%);
  border: 4px solid #4a2a2a;
  border-radius: 10px 10px 0 0;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
}

.door:hover .door-frame {
  border-color: #ff6b6b;
  box-shadow: 0 10px 60px rgba(255, 107, 107, 0.4);
}

.door-knob {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #8b7355 0%, #5a4a3a 100%);
  border-radius: 50%;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.door:hover .door-knob {
  background: radial-gradient(circle, #ffd700 0%, #ffaa00 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.door-number {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  color: #8b0000;
  text-shadow: 0 0 10px rgba(139, 0, 0, 0.8);
  font-family: "Nosifer", cursive;
}

.door-texture {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 200px;
  border: 2px solid #3a1a1a;
  border-radius: 5px;
  background: repeating-linear-gradient(
    90deg,
    #2a1a1a 0px,
    #2a1a1a 20px,
    #1a0a0a 20px,
    #1a0a0a 22px
  );
}

.message {
  font-family: "Creepster", cursive;
  font-size: 22px;
  color: #ff6b6b;
  text-align: center;
  min-height: 60px;
  max-width: 600px;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.message.show {
  opacity: 1;
}

#jumpscare-img {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  animation: shake 0.5s infinite;
}

#jumpscare-img.show {
  display: block;
}

@keyframes shake {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  25% {
    transform: translate(-48%, -50%) rotate(-2deg);
  }
  75% {
    transform: translate(-52%, -50%) rotate(2deg);
  }
}

.reset-btn {
  margin-top: 20px;
  padding: 12px 30px;
  background: #850303;
  color: white;
  border: 2px solid #ff6b6b;
  font-family: "Creepster", cursive;
  font-size: 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: none;
}

.reset-btn.show {
  display: inline-block;
}

.reset-btn:hover {
  background: #a00404;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
  transform: scale(1.05);
}

#bats-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.bat {
  position: absolute;
  font-size: 30px;
  animation: fly 2s ease-out forwards;
}

@keyframes fly {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(360deg);
    opacity: 0;
  }
}
#eyes-container {
  position: fixed;
  top: 10%;
  left: 50%;
  display: flex;
  gap: 70px;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  opacity: 0.85;
  animation: fadeEyes 2s ease-in-out infinite alternate;
}

@keyframes fadeEyes {
  from {
    filter: brightness(0.2);
  }
  to {
    filter: brightness(0.8);
  }
}

.eye {
  width: 80px;
  height: 80px;
  background: radial-gradient(ellipse at center, #222 40%, #000 100%);
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.4),
    inset 0 0 30px rgba(0, 255, 100, 0.3);
  overflow: hidden;
}

.pupil {
  width: 15px;
  height: 60px;
  background: radial-gradient(ellipse at center, #000 60%, #111 100%);
  border-radius: 50% / 80%;
  transform-origin: center;
  transition: transform 0.05s linear;
  box-shadow: 0 0 15px rgba(0, 255, 100, 0.7);
}
