.backDoor {
  top: 100px;
  left: 1000px;
  background-color: #333;
  position: relative;
  width: 200px;
  height: 300px;
  margin: 0 auto;
  margin-top: 50px;
  border: 5px solid #666; /* Outer frame */
}

.door {
  top: -50%;
  left: 100px;
  background-color: #200f04;
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 300px;
  transform-origin: left;
  transition: all 0.5s ease-in-out;
  z-index: 8;
  border: 3px solid #444; /* Inner frame */
}

.doorOpen {
  transform: perspective(1200px) translateZ(0) translateX(0) translateY(0) rotateY(-105deg);
}

/* Add the following class for the closed door effect */
.doorClosed {
  transform: none;
}

/* Additional rectangles */
.door::before,
.door::after,
.door .rectangle-1,
.door .rectangle-2,
.door .rectangle-3,
.door .rectangle-4 {
  content: "";
  position: absolute;
  background-color: #666;
  border: 2px solid #444; /* Rectangle border */
}

/* Upper right rectangle */
.door::before {
  top: 20px;
  right: 20px;
  width: 60px;
  height: 100px;
}

/* Lower right rectangle */
.door::after {
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 100px;
}

/* New upper left rectangle */
.door .rectangle-1 {
  top: 20px;
  left: 20px;
  width: 60px;
  height: 100px;
}

/* New lower left rectangle */
.door .rectangle-2 {
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 100px;
}


#halloween-text {
  position: absolute;
  top: -25%;
  left: 2200px;
  transform: translateY(-50%) rotate(-5deg);
  font-family: 'Fruktur', cursive;
  font-size: 100px;
  color: #FF4500;
  z-index: 999;
  transition: color 0.3s ease;
  white-space: pre-wrap; /* Allow line breaks */
  overflow-wrap: break-word; /* Break long words */
  width: auto; /* Adjust width dynamically */
}

#halloween-text::after {
  content: "\a"; /* Insert a line break character */
  white-space: pre; /* Preserve whitespace */
}




#halloween-text1 {
  position: absolute;
  top: -25%;
  left: -450px;
  transform: translateY(-50%) rotate(-3deg);
  font-family: 'Fruktur', cursive;
  font-size: 100px;
  color: #FF4500;
  z-index: 999;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent line breaks */
  overflow: hidden; /* Hide overflow */
  width: auto; /* Adjust width dynamically */
}
#halloween-text2 {
  position: absolute;
  top: -45%;
  left: -450px;
  transform: translateY(-50%) rotate(5deg);
  font-family: 'Fruktur', cursive;
  font-size: 100px;
  color: #FF4500;
  z-index: 999;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent line breaks */
  overflow: hidden; /* Hide overflow */
  width: auto; /* Adjust width dynamically */
}
#halloween-text3 {
  position: absolute;
  top: -5%;
  left: -450px;
  transform: translateY(-50%) rotate(-5deg);
  font-family: 'Fruktur', cursive;
  font-size: 100px;
  color: #FF4500;
  z-index: 999;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent line breaks */
  overflow: hidden; /* Hide overflow */
  width: auto; /* Adjust width dynamically */
}



  #halloween-text:hover {
      color: #8B0000;
  }
  #halloween-text1:hover {
    color: #8B0000;
}
#halloween-text2:hover {
  color: #8B0000;
}
#halloween-text3:hover {
  color: #8B0000;
}


.btn {
margin: 0 auto;
width: 170px;
height: 60px;
padding: 6px 0 0 3px;
border: 2px solid #e6e6e6;
border-radius: 2px;
background: none;
font-size: 16px;
line-height: 54px;
color: #fff;
letter-spacing: .25em;
text-decoration: none;
font-weight: 600;
text-transform: uppercase;
vertical-align: middle;
text-align: center;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-transition: background .4s, color .4s;
transition: background .4s, color .4s;
cursor: pointer;z-index: 10000;
position: absolute;
margin: auto;
left: 0;
right: 0;
bottom: 15%;
}

.btn:hover {
background: #e6e6e6;
color: #10151B;
}

.jump {
background-size: 800px Auto;
}

.overlay {
background: url(http://il6.picdn.net/shutterstock/videos/5219735/thumb/1.jpg?i10c) center no-repeat;
position: fixed;
width: 100%;
height: 100%;
z-index: 1000;
opacity: .1;
background-size: cover;
top: 0;
left: 0;
}

.hide {
display: none;
}

.can-hide {
opacity: .1;
}

.shake {
animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
10%, 90% {
  transform: translate3d(-12px, 0, 0);
}

20%, 80% {
  transform: translate3d(13px, 0, 0);
}

30%, 50%, 70% {
  transform: translate3d(-20px, 0, 0);
}

40%, 60% {
  transform: translate3d(20px, 0, 0);
}
}
.calabaza-container {
    position: absolute;
    bottom: -50px;
    left: -10px;
    transform: scale(0.3);
    transform-origin: bottom left;
    z-index: 5;
}

.calabaza {
    width: 370px;
    height: 340px;
    position: relative;
    clip-path: ellipse(51% 53% at 50% 50%);
}

        body {
            margin: 0;
            padding: 0;
            background-color: #000000; /* Deep Black for background */
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            position: relative;
            overflow: hidden; /* Prevent scrollbars from appearing */
        }

        #central-wall {
            width: 575px;
            height: 400px;
            background-color: #1C1C1C; /* Charcoal Gray for the wall */
            position: relative;
            left: -100px;
            z-index: 1;
        }

        .spiderWeb {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0.7; /* Semi-transparent to blend with the wall */
            z-index: 2; /* Ensure the web is in front of the wall but behind the trapeziums */
        }

        canvas {
            position: absolute;
            top: -49%;
            height: 790px;
        }

        #leftTrapezium {
            left: -280px;
            width: 373px;
            z-index: 3; /* Ensure trapeziums are in front of the web */
        }

        #rightTrapezium {
          right: -700px;
          width: 700px;
            z-index: 3;
        }

        #ceiling {
            width: 100%;
            height: 300px; 
            background-color: #3C1E67; /* Creepy Purple for ceiling */
            position: absolute;
            top: 0;
            left: 0;
            z-index: 0;
        }

        #floor {
            width: 100%;
            height: 250px; 
            background-color: #271b1b; /* Blood Red for floor */
            position: absolute;
            bottom: 0;
            left: 0;
            z-index: 0;
        }

        /* Spider Animation */
        .spider {
            position: absolute;
            top: 0;
            z-index: 4; /* Spider is on top of everything */
        }

        /* Spider 1: Speed and Height */
        /* Spider 1: Slower descent to 75% */
.spider-1 {
    left: 100px;
    animation: animateSpider1 15s ease-in-out infinite; /* Slower animation */
}

@keyframes animateSpider1 {
    0%, 100% {
        transform: translateY(-500px); /* Starts and ends off-screen */
    }
    50% {
        transform: translateY(0%); /* Drops to 75% of the screen */
    }
}

/* Spider 3: Slower descent to 50% */
.spider-3 {
    left: 800px;
    animation: animateSpider3 12s ease-in-out infinite; /* Adjusted for slower descent */
}

@keyframes animateSpider3 {
    0%, 100% {
        transform: translateY(-500px); /* Starts and ends off-screen */
    }
    50% {
        transform: translateY(5%); /* Drops to 50% of the screen */
    }
}

/* General Lantern Styling */
.lantern {
	position: absolute;
	width: 60px;
	height: 100px;
	animation: floatLanterns 6s ease-in-out infinite;
}

/* Specific Styles for Lantern 1 */
.lantern1 {
	background: url('https://i.imgur.com/your-lantern1-image.png') no-repeat center/contain;
	left: 300px; /* Position adjustment */
	animation-duration: 7s; /* Slightly different duration */
    z-index: 5;
    width: 100px; /* Adjust as needed */
            height: 200px;
}

/* Specific Styles for Lantern 2 */
.lantern2 {
	background: url('https://i.imgur.com/your-lantern2-image.png') no-repeat center/contain;
	right: 50px; /* Position adjustment */
	animation-duration: 9s; /* Different float speed */
    z-index: 4;
    width: 100px; /* Adjust as needed */
            height: 200px;
}

/* Keyframes for Lantern Floating Animation */
@keyframes floatLanterns {
	0%, 100% {
		transform: translateY(20px);
	}
	50% {
		transform: translateY(-50px);
	}
}

        /* Vintage Photo Frame Styling */
        .photo-frame {
            width: 50px;
            height: 80px;
            position: absolute;
            top: 20px;
            left: 20px;
            border: 5px solid  #200f04;; /* Vintage brown for the frame */
            padding: 5px;
            background-color: #080500; /* A parchment-like color inside the frame */
            box-shadow: 0 0 10px rgba(56, 56, 56, 0.7); /* Vintage shadow effect */
            z-index: 4;
            overflow: hidden;
        }

        .photo-frame img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            transition: opacity 1s ease-in-out; /* Smooth fade transition */
        }

        /* Skeleton Image on the Left Wall */
        #left-wall {
            position: absolute;
            top: 50px;
            left: 20px;
            width: 150px; /* Adjusted for fitting the skeleton image */
            z-index: 5; /* Skeleton in front of the web and wall */
        }

        #skeleton-img {
            width: 150%;
            height: 500px;
            display: block;
        }

        /* Pumpkin Image in the Bottom-Right Corner */
        #pumpkin {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 100px; /* Adjust as needed */
            height: 200px; /* Adjust as needed */
            z-index: 8; /* In front of the wall */
        }
            /* Window Styling */
            .window {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 300px;
    background-color: #000;
    border: 15px solid #3d2b1f;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3), inset 0 0 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 4;
    animation: fadeIn 1s ease-in-out, creepyFloat 5s infinite ease-in-out;
}

.window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 45%, rgba(61, 43, 31, 0.5) 45%, rgba(61, 43, 31, 0.5) 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(61, 43, 31, 0.5) 45%, rgba(61, 43, 31, 0.5) 55%, transparent 55%);
    background-size: 30px 30px;
    pointer-events: none;
}

.window img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.5s ease-in-out;
}

.window:hover img {
    opacity: 1;
}

@keyframes creepyFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* bat-color */
        .bat-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9999;
        }
        .bat {
            animation: move 15s infinite ease-in-out;
            transform-origin: 50% 50%;
        }
        .bat1 {
            animation: move1 15s infinite ease-in-out;
            transform-origin: 50% 50%;
        }
        .bat2 {
            animation: move2 15s infinite ease-in-out;
            transform-origin: 50% 50%;
        }
        .wing {
            transform-origin: 50% 50%;
            animation: wing 1s infinite ease-in-out;
        }
        .wing1 {
            transform-origin: 50% 50%;
            animation: wing1 1s infinite ease-in-out;
        }
        .eye {
            fill: hsl(20, 70%, 40%);
        }
        @keyframes move {
            0% { transform: translate(150px, 90px) rotate(10deg); }
            25% { transform: translate(-150px, 90px) rotate(-10deg); }
            50% { transform: translate(-160px, -80px) rotate(10deg); }
            75% { transform: translate(-140px, -100px) rotate(-10deg); }
            100% { transform: translate(150px, 90px) rotate(10deg); }
        }
        @keyframes move1 {
            0% { transform: translate(-140px, -70px) rotate(-10deg); }
            25% { transform: translate(0px, -50px) rotate(10deg); }
            50% { transform: translate(150px, 50px) rotate(-10deg); }
            75% { transform: translate(-100px, 30px) rotate(10deg); }
            85% { transform: translate(-110px, 90px) rotate(10deg); }
            100% { transform: translate(-140px, -70px) rotate(-10deg); }
        }
        @keyframes move2 {
            0% { transform: translate(150px, -70px) scale(1) rotate(10deg); }
            25% { transform: translate(160px, -90px) scale(0.7) rotate(-10deg); }
            50% { transform: translate(170px, -100px) scale(0.7) rotate(10deg); }
            75% { transform: translate(105px, -80px) scale(1) rotate(-10deg); }
            100% { transform: translate(150px, -70px) scale(1) rotate(10deg); }
        }
        @keyframes wing {
            0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
            50% { transform: translate(0px, 0px) scaleX(0.5) rotate(-25deg); }
            100% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
        }
        @keyframes wing1 {
            0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
            50% { transform: translate(0px, 0px) scaleX(0.5) rotate(25deg); }
            100% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
        }
       
/*  lanterns*/
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
::after,
::before {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(67, 28, 82);
  background: radial-gradient(
    circle,
    rgba(67, 28, 82, 1) 5%,
    rgba(134, 56, 63, 1) 89%
  );
}

.calabaza {
  min-width: 370px;
  height: 340px;
  position: relative;
  clip-path: ellipse(51% 53% at 50% 50%);
}

.anterior {
  position: absolute;
  width: 100%;
  height: 100%;
  bottom: 0;
}

.posterior {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
}

.division {
  background-color: #ff8c1b;
  width: 170px;
  height: 280px;
  position: absolute;
  border: 4px solid #401b01;
}
.division--a {
  border-radius: 43% 43% 45% 45% / 45% 45% 35% 35%;
  bottom: 0;
  width: 180px;
  left: 95px;
}
.division--b {
  border-radius: 65% 35% 0% 80% / 40% 10% 30% 50%;
  bottom: 20px;
  left: 0;
}
.division--c {
  border-radius: 35% 65% 80% 0% / 10% 40% 60% 30%;
  bottom: 20px;
  right: 0px;
}
.posterior .division--b,
.posterior .division--c {
  bottom: 50px;
  width: 160px;
}
.posterior .division--a {
  top: 0;
}
.posterior .division--b {
  left: 20px;
}
.posterior .division--c {
  right: 20px;
}

.tronco {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
}
.base-tallo,
.tallo,
.fin-tallo {
  background-color: #7b8101;
  position: absolute;
  border-left: 4px solid;
  border-right: 4px solid;
  border-color: #303300;
}
.base-tallo {
  border-radius: 40% 40% 0% 0% / 60% 60% 0% 0%;
  width: 80px;
  height: 30px;
  left: calc(50% - 40px);
  top: 30px;
}
.tallo,
.fin-tallo {
  left: 160px;
  width: 50px;
  height: 20px;
}
.fin-tallo {
  border-style: solid;
  border-width: 2px;
  border-radius: 50%;
  top: 6px;
}
.tallo {
  border-width: 3px;
  top: 15px;
}

.tallo::before,
.tallo::after {
  content: "";
  position: absolute;
  top: 0;
  background-color: transparent;
  border-radius: 5px;
  height: 40px;
  width: 50px;
}
.tallo::before {
  left: -35px;
  border-right: 3px solid #303300;
}
.tallo::after {
  left: 28px;
  border-left: 3px solid #303300;
}

.base-tallo::after,
.base-tallo::before {
  content: "";
  position: absolute;
  background-color: transparent;
  height: 20px;
  width: 10px;
  top: -10px;
}
.base-tallo::before {
  border-right: 3px solid #303300;
  border-bottom-right-radius: 5px;
  right: 58px;
}
.base-tallo::after {
  border-left: 3px solid #303300;
  border-bottom-left-radius: 5px;
  left: 58px;
}
.cara {
  height: 100%;
  width: 100%;
}
.ojos {
  height: 90px;
  width: 100%;
  position: absolute;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 90px;
  bottom: 140px;
  z-index: 4;
}
.ojo-der {
  border-radius: 0% 0% 100% 0% / 0% 0% 100% 0%;
  height: 100%;
  width: 70px;
  border: 4px solid #401b01;
  background-color: #d56900;
  transform: rotate(40deg);
  z-index: 5;
}
.ojo-der::before {
  content: "";
  border-radius: 0% 0% 100% 0% / 0% 0% 100% 0%;
  height: 100%;
  width: 60px;
  border: 4px solid #401b01;
  background-color: #834100;
  position: absolute;
  top: 2px;
  left: -4px;
  transition: all 0.3s;
}
.ojo-der::after {
  content: "";
  position: absolute;
  height: 110px;
  width: 50px;
  background-color: transparent;
  border-left: 4px solid #401b01;
  border-top-left-radius: 15px;
  left: -4px;
  top: -17px;
}
.ojo-izq {
  border-radius: 0% 0% 0% 100% / 0% 0% 0% 100%;
  height: 100%;
  width: 70px;
  border: 4px solid #401b01;
  background-color: #d56900;
  transform: rotate(320deg);
}

.ojo-izq::before {
  content: "";
  border-radius: 0% 0% 0% 100% / 0% 0% 0% 100%;
  height: 100%;
  width: 60px;
  border: 4px solid #401b01;
  background-color: #834100;
  position: absolute;
  top: 2px;
  left: 6px;
  transition: all 0.3s;
}

.ojo-izq::after {
  content: "";
  position: absolute;
  height: 110px;
  width: 50px;
  background-color: transparent;
  border-right: 4px solid #401b01;
  border-top-right-radius: 15px;
  left: 16px;
  top: -17px;
}
.boca {
  height: 140px;
  width: 100%;
  position: absolute;
  bottom: 42px;
  z-index: 4;
}

.medio {
  height: 80px;
  background-color: #834100;
  border-top: 4px solid #401b01;
  border-bottom: 4px solid #401b01;
  width: 110px;
  position: absolute;
  left: 130px;
  bottom: 0;
  transition: background 0.3s;
}
.medio::before {
  content: "";
  position: absolute;
  background-color: #d56900;
  border-top: 4px solid #401b01;
  border-bottom: 4px solid #401b01;
  width: 44px;
  height: 13px;
  left: 32px;
  bottom: -4px;
}
.inf {
  height: 34px;
  width: 34px;
  background-color: #d56900;
  border: 4px solid #401b01;
  border-bottom: none;
  border-right: none;
  transform: rotate(35deg) skew(-10deg, 10deg) translate(13px, 13px);
  z-index: 1;
  position: absolute;
  top: 29px;
}
.inf:first-child {
  left: 0;
}
.inf:nth-child(2) {
  right: 0;
}

.inf::before {
  content: "";
  position: absolute;
  height: 40px;
  width: 40px;
  background-color: #ff8c1b;
  border: 4px solid #401b01;
  border-bottom: none;
  border-right: none;
  top: -1px;
  left: -1px;
  transform: skew(10deg, 10deg);
}
.der {
  border-radius: 0% 0% 100% 0% / 100% 0% 100% 0%;
  height: 74px;
  width: 90px;
  background-color: #d56900;
  border: 4px solid #401b01;
  border-left: none;
  transform: rotate(335deg) translate(4px, -18px) skew(-25deg, 5deg);
  position: absolute;
  right: 40px;
  bottom: 0;
}

.izq {
  border-radius: 0% 0% 0% 100% / 0% 0% 100% 100%;
  border: 4px solid #401b01;
  border-right: none;
  height: 74px;
  width: 90px;
  background-color: #d56900;
  transform: rotate(25deg) translate(-4px, -18px) skew(25deg, -5deg);
  position: absolute;
  left: 40px;
  bottom: 0;
}
.izq::before {
  content: "";
  position: absolute;
  border-radius: 0% 0% 0% 100% / 0% 0% 100% 100%;
  border: 4px solid #401b01;
  border-right: none;
  height: 64px;
  top: -4px;
  left: 6px;
  width: 80px;
  background-color: #834100;
  transition: background 0.3s;
}
.der::before {
  content: "";
  position: absolute;
  border-radius: 0% 0% 100% 0% / 100% 0% 100% 0%;
  height: 64px;
  width: 80px;
  background-color: #834100;
  border: 4px solid #401b01;
  border-left: none;
  top: -4px;
  left: -1px;
  transition: background 0.3s;
}
.izq::after {
  content: "";
  width: 55px;
  height: 55px;
  background-color: #ff8c1b;
  border: 4px solid #401b01;
  border-top: none;
  border-left: none;
  position: absolute;
  top: -68px;
  left: 50px;
  transform: rotate(35deg) skew(10deg, 10deg) translate(13px, 7px);
  clip-path: polygon(100% 20%, 20% 100%, 100% 100%);
}

.der::after {
  content: "";
  width: 55px;
  height: 55px;
  background-color: #ff8c1b;
  border: 4px solid #401b01;
  border-top: none;
  border-left: none;
  position: absolute;
  top: -68px;
  left: -26px;
  transform: rotate(55deg) skew(10deg, 10deg) translate(13px, 7px);
  clip-path: polygon(100% 20%, 20% 100%, 100% 100%);
}

.calabaza:hover .ojo-izq,
.calabaza:hover .ojo-der,
.calabaza:hover .der,
.calabaza:hover .izq,
.calabaza:hover .medio {
  box-shadow: 0px 0px 11px 1px rgba(255, 255, 0, 1);
}
.calabaza:hover .ojo-izq::before,
.calabaza:hover .ojo-der::before,
.calabaza:hover .izq::before,
.calabaza:hover .der::before,
.calabaza:hover .medio {
  background-color: rgba(255, 255, 0, 1);
}

.calabaza:hover .izq::after,
.calabaza:hover .der::after {
  box-shadow: inset 6px 6px 5px 8px #ffff00;
}
.calabaza:hover .inf::before {
  box-shadow: inset 6px 6px 12px -7px #ffff00;
}

.calabaza:hover .ojo-izq,
.calabaza:hover .ojo-der,
.calabaza:hover .inf,
.calabaza:hover .izq,
.calabaza:hover .der,
.calabaza:hover .medio::before {
  background-color: #ff8c1b;
}


/* book */
.book-container {
  bottom: -250px;
            width: 150px; /* Smaller width */
            height: 150px; /* Smaller height */
            transform-style: preserve-3d;
            position: relative;
            transform: perspective(1000px) rotateY(35deg) rotateX(50deg); /* Retaining the original rotation */
            z-index: 5; /* Ensure highest z-index */
        }
        .book {
            transform-style: preserve-3d;
            position: relative;
            width: 100px; /* Smaller width */
            height: 125px; /* Smaller height */
            border-radius: 5px 10px 10px 0px;
            background-color: rgb(47, 15, 1);
            z-index: 1;
            box-shadow: -20px 25px 20px #000; /* Adjusted for smaller size */
        }
        .book::before {
            content: "";
            position: absolute;
            width: 10px; /* Smaller width */
            bottom: -4px;
            left: -8px;
            height: 99%;
            z-index: -1;
            transform: skewY(-45deg);
            background-color: rgb(7, 5, 4);
            border-radius: 15px 0px 0px 0px;
            box-shadow: inset 5px 2px 5px #170a00, inset 1px 2px 25px #3c1900, inset 1px 2px 10px #3b1302;
        }
        .book::after {
            content: "";
            position: absolute;
            width: 97%;
            bottom: -10px; /* Smaller offset */
            left: -5px; /* Smaller offset */
            height: 10px;
            transform: skewX(-45deg);
            box-shadow: inset 2px 2px 1px #361c05;
            border-radius: 0px 0px 0px 10px;
            border-bottom: 2px solid #592204;
            background: linear-gradient(45deg, #1b1a1a, #6d6c6a);
        }
        .cover {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 5px 10px 10px 0px;
            background-color: #a3530d;
            z-index: 2;
            overflow: hidden;
        }
        .cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .page {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 5px 10px 10px 0px;
            background-color: #a3530d;
            box-shadow: inset 1px 1px 10px #1b0e05, inset 7px 1px 5px #231100, inset 1px 2px 25px #884a0c, inset 1px 2px 50px #150d07, inset 1px 2px 75px #060301;
            z-index: 1;
            animation: flip 1.1s ease reverse;
        }
        .page:nth-child(2) { animation-delay: 0.3s; }
        .page:nth-child(3) { animation-delay: 0.4s; }
        .page:nth-child(4) { animation-delay: 0.5s; }
        .page:nth-child(5) { animation-delay: 0.6s; }

        @keyframes flip {
            0% {
                transform: rotateY(0deg) translateY(-5px) translateX(95px) translateZ(5px);
                left: -94px;
                top: 2px;
            }
            90%, 100% {
                transform: rotateY(-180deg) translateX(95px) translateZ(0px);
                left: -94px;
                top: 2px;
            }
        }
/* blood */
    
        .blood-svg {
            width: 40vmax;
            position: absolute;
            top: 50%; 
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0;
            z-index: 8; /* Ensures the blood is on top */
          }
          
          .blood-splash-2 {
            width: 70vmax;
            z-index: 8; /* Keep the z-index consistent for layering */
          }
          
          .blood-splash-3 {
            width: 60vmax;
            z-index: 8;
          }
          
        
          
         
          
         

          .blood-splash-1 {
            top: 20%; 
            left: 40%; 
            z-index: 8; /
          }
          
          .blood-splash-2 {
            top: 50%; 
            left: 60%; 
            z-index: 8; 
          }
          
          .blood-splash-3 {
            top: 30%; 
            left: 20%; 
            z-index: 8; 
          }
          

          /* fog */
          .fogwrapper {
            pointer-events: none;
            height: 100%;
            position: relative;
            top: 0;
            width: 100%;
            -webkit-filter: blur(1px) grayscale(0.2) saturate(1.2) sepia(0.2);
            filter: blur(1px) grayscale(0.2) saturate(1.2) sepia(0.2);
            z-index: 4; /* Ensure fog is above everything */
          }
          
          #foglayer_01, #foglayer_02, #foglayer_03 {
            height: 100%;
            position: absolute;
            pointer-events: none;

            width: 200%;
            z-index: 10000; /* Ensure individual fog layers are above the wrapper */
          }
          #foglayer_01 .image01, #foglayer_01 .image02,
          #foglayer_02 .image01, #foglayer_02 .image02,
          #foglayer_03 .image01, #foglayer_03 .image02 {
            float: left;
            height: 100%;
            width: 50%;
          }
          #foglayer_01 {
            pointer-events: none;
            -webkit-animation: foglayer_01_opacity 10s linear infinite, foglayer_moveme 15s linear infinite;
            -moz-animation: foglayer_01_opacity 10s linear infinite, foglayer_moveme 15s linear infinite;
            animation: foglayer_01_opacity 10s linear infinite, foglayer_moveme 15s linear infinite;
          }
          #foglayer_02, #foglayer_03 {
            pointer-events: none;
            -webkit-animation: foglayer_02_opacity 21s linear infinite, foglayer_moveme 13s linear infinite;
            -moz-animation: foglayer_02_opacity 21s linear infinite, foglayer_moveme 13s linear infinite;
            animation: foglayer_02_opacity 21s linear infinite, foglayer_moveme 13s linear infinite;
          }
          
          /* ---------- Moving Fog ---------- */
          /*
            'size: cover' || 'size: 100%'; results remain the same
            'attachment: scroll' can be added or removed; results remain the same
            'attachment: fixed' causing unexpected results in Chrome
            'repeat-x' || 'no-repeat'; results remain the same
          */ 
          #foglayer_01 .image01, #foglayer_01 .image02 {
            background: url("https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png") center center/cover no-repeat transparent;
          }
          #foglayer_02 .image01, #foglayer_02 .image02,
          #foglayer_03 .image01, #foglayer_03 .image02{
            background: url("https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog2.png") center center/cover no-repeat transparent;
          }
          
          /* ---------- Keyframe Layer 1 ---------- */
          @-webkit-keyframes foglayer_01_opacity {
            0% { opacity: .1; }
            22% { opacity: .5; }
            40% { opacity: .28; }
            58% { opacity: .4; }
            80% { opacity: .16; }
            100% { opacity: .1; }
          }
          @-moz-keyframes foglayer_01_opacity {
            0% { opacity: .1; }
            22% { opacity: .5; }
            40% { opacity: .28; }
            58% { opacity: .4; }
            80% { opacity: .16; }
            100% { opacity: .1; }
          }
          @-o-keyframes foglayer_01_opacity {
            0% { opacity: .1; }
            22% { opacity: .5; }
            40% { opacity: .28; }
            58% { opacity: .4; }
            80% { opacity: .16; }
            100% { opacity: .1; }
          }
          @keyframes foglayer_01_opacity {
            0% { opacity: .1; }
            22% { opacity: .5; }
            40% { opacity: .28; }
            58% { opacity: .4; }
            80% { opacity: .16; }
            100% { opacity: .1; }
          }
          /* ---------- Keyframe Layer 2 ---------- */
          @-webkit-keyframes foglayer_02_opacity {
            0% { opacity: .5; }
            25% { opacity: .2; }
            50% { opacity: .1; }
            80% { opacity: .3; }
            100% { opacity: .5; }
          }
          @-moz-keyframes foglayer_02_opacity {
            0% { opacity: .5; }
            25% { opacity: .2; }
            50% { opacity: .1; }
            80% { opacity: .3; }
            100% { opacity: .5; }
          }
          @-o-keyframes foglayer_02_opacity {
            0% { opacity: .5; }
            25% { opacity: .2; }
            50% { opacity: .1; }
            80% { opacity: .3; }
            100% { opacity: .5; }
          }
          @keyframes foglayer_02_opacity {
            0% { opacity: .5; }
            25% { opacity: .2; }
            50% { opacity: .1; }
            80% { opacity: .3; }
            100% { opacity: .5; }
          }
          /* ---------- Keyframe Layer 3 ---------- */
          @-webkit-keyframes foglayer_03_opacity {
            0% { opacity: .8 }
            27% { opacity: .2; }
            52% { opacity: .6; }
            68% { opacity: .3; }
            100% { opacity: .8; }
          }
          @-moz-keyframes foglayer_03_opacity {
            0% { opacity: .8 }
            27% { opacity: .2; }
            52% { opacity: .6; }
            68% { opacity: .3; }
            100% { opacity: .8; }
          }
          @-o-keyframes foglayer_03_opacity {
            0% { opacity: .8 }
            27% { opacity: .2; }
            52% { opacity: .6; }
            68% { opacity: .3; }
            100% { opacity: .8; }
          }
          @keyframes foglayer_03_opacity {
            0% { opacity: .8; }
            27% { opacity: .2; }
            52% { opacity: .6; }
            68% { opacity: .3; }
            100% { opacity: .8; }
          }
          /* ---------- Keyframe moveMe ---------- */
          @-webkit-keyframes foglayer_moveme {
            0% { left: 0; }
            100% { left: -100%; }
          }
          @-moz-keyframes foglayer_moveme {
            0% { left: 0; }
            100% { left: -100%; }
          }
          @-o-keyframes foglayer_moveme {
            0% { left: 0; }
            100% { left: -100%; }
          }
          @keyframes foglayer_moveme {
            0% { left: 0; }
            100% { left: -100%; }
          }
          
          @media only screen
            and (min-width: 280px)
            and (max-width: 767px) {
              #foglayer_01 .image01, #foglayer_01 .image02,
              #foglayer_02 .image01, #foglayer_02 .image02,
              #foglayer_03 .image01, #foglayer_03 .image02 {
                width: 100%;
              }
            }







       /* Skull and Overlay initially hidden */
.skull.hidden, .overlay.hidden, .black-screen.hidden {
  display: none;
  pointer-events: none; /* Prevent interactions */
}

.skull {
  background: url(https://s-media-cache-ak0.pinimg.com/236x/b1/8a/30/b18a30fff5579066ad989bed52fdd51a.jpg) center no-repeat;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-size: contain;
  width: 750px;
  height: 750px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: none;
}

.skull.show {
  opacity: 1;
  display: block;
}

.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 3;
  opacity: 0.1;
  background-size: cover;
  top: 0;
  left: 0;
  pointer-events: none;
  display: none;
}

.black-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 2;
  pointer-events: none;
  display: none;
}

.black-screen.show {
  opacity: 1;
  display: block;
}

.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-50%, -50%, 0) translate3d(-12px, 0, 0); }
  20%, 80% { transform: translate3d(-50%, -50%, 0) translate3d(13px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-50%, -50%, 0) translate3d(-20px, 0, 0); }
  40%, 60% { transform: translate3d(-50%, -50%, 0) translate3d(20px, 0, 0); }
}