/* 🎃 Halloween Updated - Images & GIFs Decorations 🎃 */
/* Magnífica Fantasias - Halloween Decorations with Real Images */

/* Container para elementos flutuantes com imagens */
.halloween-float-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px; /* Reduced height to be visible only above menu and logo */
    pointer-events: none;
    z-index: 13000; /* Increased z-index to be above moon */
    overflow: visible; /* Allow spiders to be visible */
}

/* 🦇 GIFs de morcegos substituindo CSS */
.bat-gif {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: floatImage 20s infinite linear;
    z-index: 1000;
}

.bat-gif-1 {
    width: 60px;
    height: 40px;
    background-image: url('../img/morcego.png');
    top: 15%;
    animation-delay: 0s;
}

.bat-gif-2 {
    width: 50px;
    height: 35px;
    background-image: url('../img/fantasma.png');
    top: 45%;
    animation-delay: 5s;
    animation-duration: 18s;
}

.bat-gif-3 {
    width: 55px;
    height: 38px;
    background-image: url('../img/fantasma.png');
    top: 75%;
    animation-delay: 10s;
    animation-duration: 12s;
}

/* 🎃 Abóboras flutuantes */
.pumpkin-gif {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: floatImage 22s infinite linear;
    z-index: 1001;
}

.pumpkin-gif-1 {
    width: 50px;
    height: 50px;
    background-image: url('../img/fantasma.png');
    top: 25%;
    animation-delay: 2s;
}

.pumpkin-gif-2 {
    width: 45px;
    height: 45px;
    background-image: url('../img/morcego.png');
    top: 65%;
    animation-delay: 7s;
    animation-duration: 25s;
}

/* 👻 Fantasmas com GIFs */
.ghost-gif {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: floatImage 25s infinite ease-in-out;
    z-index: 1002;
}

.ghost-gif-1 {
    width: 40px;
    height: 50px;
    background-image: url('../img/fantasma.png');
    top: 35%;
    animation-delay: 3s;
}

.ghost-gif-2 {
    width: 35px;
    height: 45px;
    background-image: url('../img/morcego.png');
    top: 55%;
    animation-delay: 8s;
    animation-duration: 28s;
}

/* Animação de flutuação para imagens/GIFs */
@keyframes floatImage {
    0% {
        left: -100px;
        opacity: 0;
        transform: scale(0.8) rotate(0deg);
    }
    10% {
        opacity: 1;
        transform: scale(1) rotate(5deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    50% {
        transform: scale(0.9) rotate(10deg);
    }
    75% {
        transform: scale(1.05) rotate(-2deg);
    }
    90% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        left: 110%;
        opacity: 0;
        transform: scale(0.8) rotate(0deg);
    }
}

/* 🌙 Lua decorativa */
.halloween-moon {
    position: absolute;
    top: 20px;
    right: 50px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #f5f5dc 0%, #e6e6fa 50%, #d3d3d3 100%);
    border-radius: 50%;
    box-shadow:
        0 0 20px rgba(245, 245, 220, 0.5),
        0 0 40px rgba(245, 245, 220, 0.3);
    animation: moonGlow 4s infinite ease-in-out;
    z-index: 996; /* Lower z-index to be below spiders */
}

@keyframes moonGlow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(245, 245, 220, 0.5),
            0 0 40px rgba(245, 245, 220, 0.3);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(245, 245, 220, 0.8),
            0 0 60px rgba(245, 245, 220, 0.5);
    }
}

/* 🌫️ Efeito de névoa */
.halloween-fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 25%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 75%,
        transparent 100%
    );
    animation: fogMove 10s infinite ease-in-out;
    z-index: 997;
}

@keyframes fogMove {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

/* Ocultar morcegos antigos */
.bat {
    display: none !important;
}

/* Mostrar novas imagens/GIFs */
.bat-gif,
.pumpkin-gif,
.ghost-gif {
    display: block !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .bat-gif,
    .pumpkin-gif,
    .ghost-gif {
        transform: scale(0.7);
    }
}

@media (max-width: 480px) {
    .bat-gif,
    .pumpkin-gif,
    .ghost-gif {
        transform: scale(0.5);
    }
}

/* Spider animation styles from animacao/style.css */

[class*="spider"] {
  position: absolute;
  height: 30px;
  width: 40px;
  border-radius: 50%;
  margin: 20px 0 0 0;
  background: #110D04;
}
[class*="spider"] *, [class*="spider"]:before, [class*="spider"]:after, [class*="spider"] :after, [class*="spider"] :before {
  position: absolute;
  content: "";
}
[class*="spider"]:before {
  width: 1px;
  background: #AAAAAA;
  left: 50%;
  top: -100px;
  height: 100px;
}
[class*="spider"] .eye {
  top: 6px;
  height: 10px;
  width: 10px;
  background: #FFFFFF;
  border-radius: 50%;
}
[class*="spider"] .eye:after {
  top: 3px;
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background: black;
}
[class*="spider"] .eye.left {
  left: 10px;
}
[class*="spider"] .eye.left:after {
  right: 2px;
}
[class*="spider"] .eye.right {
  right: 10px;
}
[class*="spider"] .eye.right:after {
  left: 2px;
}
[class*="spider"] .leg {
  top: 6px;
  height: 12px;
  width: 14px;
  border-top: 2px solid #110D04;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  z-index: -1;
}
[class*="spider"] .leg.left {
  left: -8px;
  transform-origin: top right;
  transform: rotate(36deg) skewX(-20deg);
  border-left: 2px solid #110D04;
  border-radius: 60% 0 0 0;
  animation: legs-wriggle-left 1s 0s infinite;
}
[class*="spider"] .leg.right {
  right: -8px;
  transform-origin: top left;
  transform: rotate(-36deg) skewX(20deg);
  border-right: 2px solid #110D04;
  border-radius: 0 60% 0 0;
  animation: legs-wriggle-right 1s 0.2s infinite;
}
[class*="spider"] .leg:nth-of-type(2) {
  top: 14px;
  left: -11px;
  animation: legs-wriggle-left 1s 0.8s infinite;
}
[class*="spider"] .leg:nth-of-type(3) {
  top: 22px;
  left: -12px;
  animation: legs-wriggle-left 1s 0.2s infinite;
}
[class*="spider"] .leg:nth-of-type(4) {
  top: 31px;
  left: -10px;
  animation: legs-wriggle-left 1s 0.4s infinite;
}
[class*="spider"] .leg:nth-of-type(6) {
  top: 14px;
  right: -11px;
  animation: legs-wriggle-right 1s 0.4s infinite;
}
[class*="spider"] .leg:nth-of-type(7) {
  top: 22px;
  right: -12px;
  animation: legs-wriggle-right 1s 0.7s infinite;
}
[class*="spider"] .leg:nth-of-type(8) {
  top: 31px;
  right: -10px;
  animation: legs-wriggle-right 1s 0.3s infinite;
}

.spider_0 {
  left: 5%;
  animation: spider-move-0 5s infinite;
}

.spider_1 {
  left: 20%;
  animation: spider-move-1 5s infinite;
}

.spider_2 {
  left: 35%;
  animation: spider-move-2 5s infinite;
}

.spider_3 {
  right: 35%;
  margin-top: 160px;
  animation: spider-move-3 5s infinite;
}

.spider_4 {
  right: 20%;
  margin-top: 50px;
  animation: spider-move-4 5s infinite;
}

.spider_5 {
  right: 10%;
  margin-top: 210px;
  animation: spider-move-5 5s infinite;
}

@keyframes legs-wriggle-left {
  0%, 100% {
    transform: rotate(36deg) skewX(-20deg);
  }
  25%, 75% {
    transform: rotate(15deg) skewX(-20deg);
  }
  50% {
    transform: rotate(45deg) skewX(-20deg);
  }
}

@keyframes legs-wriggle-right {
  0%, 100% {
    transform: rotate(-36deg) skewX(20deg);
  }
  25%, 75% {
    transform: rotate(-15deg) skewX(20deg);
  }
  50% {
    transform: rotate(-45deg) skewX(20deg);
  }
}

@keyframes spider-move-0 {
  0%, 100% {
    margin-top: 50px;
  }
  48% {
    margin-top: calc(50px + 30px);
  }
}

@keyframes spider-move-1 {
  0%, 100% {
    margin-top: 30px;
  }
  45% {
    margin-top: calc(30px + 40px);
  }
}

@keyframes spider-move-2 {
  0%, 100% {
    margin-top: 70px;
  }
  63% {
    margin-top: calc(70px + 50px);
  }
}

@keyframes spider-move-3 {
  0%, 100% {
    margin-top: 40px;
  }
  65% {
    margin-top: calc(40px + 35px);
  }
}

@keyframes spider-move-4 {
  0%, 100% {
    margin-top: 60px;
  }
  44% {
    margin-top: calc(60px + 45px);
  }
}

@keyframes spider-move-5 {
  0%, 100% {
    margin-top: 20px;
  }
  44% {
    margin-top: calc(20px + 25px);
  }
}

/* 🕸️ Teias de Aranha nas Laterais 🕸️ */
body::before {
    content: none !important;
}

body::after {
    content: none !important;
}

/* Responsividade para teias */
@media (max-width: 768px) {
    body::before,
    body::after {
        width: 40px;
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    body::before,
    body::after {
        width: 20px;
        opacity: 0.3;
    }
}
