/* Halloween Animation Effects */
/* Spooky Background */
.halloween-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
    background-size: 400% 400%;
    animation: spookyGradient 8s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes spookyGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Ghosts */
.ghost {
    position: fixed;
    width: 60px;
    height: 80px;
    background: white;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: float 6s ease-in-out infinite;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.8;
}

.ghost:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 20px;
    left: 10px;
    box-shadow: 20px 0 0 white;
}

.ghost:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #1a1a2e;
    border-radius: 50%;
    top: 25px;
    left: 15px;
    box-shadow: 20px 0 0 #1a1a2e;
}

.ghost-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.ghost-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.ghost-3 {
    top: 40%;
    left: 80%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
    75% { transform: translateY(-30px) rotate(1deg); }
}

/* Flying Bats */
.bat {
    position: fixed;
    width: 30px;
    height: 20px;
    background: #1a1a2e;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: fly 8s linear infinite;
    z-index: 1000;
    pointer-events: none;
}

.bat:before,
.bat:after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #1a1a2e;
    border-radius: 50%;
    top: 5px;
}

.bat:before {
    left: -8px;
    transform: rotate(45deg);
}

.bat:after {
    right: -8px;
    transform: rotate(-45deg);
}

.bat-1 {
    top: 15%;
    left: -50px;
    animation-delay: 0s;
}

.bat-2 {
    top: 70%;
    left: -50px;
    animation-delay: 3s;
}

.bat-3 {
    top: 30%;
    left: -50px;
    animation-delay: 6s;
}

@keyframes fly {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(25vw) translateY(-20px); }
    50% { transform: translateX(50vw) translateY(10px); }
    75% { transform: translateX(75vw) translateY(-15px); }
    100% { transform: translateX(100vw) translateY(0); }
}

/* Spooky Pumpkins */
.pumpkin {
    position: fixed;
    width: 50px;
    height: 60px;
    background: #ff6b35;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: bounce 4s ease-in-out infinite;
    z-index: 1000;
    pointer-events: none;
}

.pumpkin:before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #1a1a2e;
    border-radius: 50%;
    top: 15px;
    left: 12px;
    box-shadow: 15px 0 0 #1a1a2e, 7px 0 0 #1a1a2e;
}

.pumpkin:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 8px;
    background: #1a1a2e;
    border-radius: 0 0 50% 50%;
    top: 8px;
    left: 15px;
}

.pumpkin-1 {
    bottom: 20%;
    left: 20%;
    animation-delay: 0s;
}

.pumpkin-2 {
    bottom: 10%;
    right: 30%;
    animation-delay: 2s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Spider Web */
.spider-web {
    position: fixed;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: webPulse 3s ease-in-out infinite;
    z-index: 1000;
    pointer-events: none;
}

.spider-web:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: rotate(45deg);
}

.spider-web:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(90deg);
}

.web-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.web-2 {
    top: 50%;
    left: 5%;
    animation-delay: 1.5s;
}

@keyframes webPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Spooky Text Animation */
.halloween-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: bold;
    color: #ff6b35;
    text-shadow: 0 0 10px #ff6b35, 0 0 20px #ff6b35, 0 0 30px #ff6b35;
    animation: spookyText 2s ease-in-out infinite;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
}

@keyframes spookyText {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* Floating Candles */
.candle {
    position: fixed;
    width: 20px;
    height: 40px;
    background: #8B4513;
    border-radius: 10px;
    animation: candleFlicker 2s ease-in-out infinite;
    z-index: 1000;
    pointer-events: none;
}

.candle:before {
    content: '';
    position: absolute;
    width: 4px;
    height: 15px;
    background: #ff6b35;
    border-radius: 2px;
    top: -15px;
    left: 8px;
    animation: flame 1s ease-in-out infinite;
}

.candle-1 {
    bottom: 30%;
    left: 15%;
    animation-delay: 0s;
}

.candle-2 {
    bottom: 25%;
    right: 20%;
    animation-delay: 1s;
}

@keyframes candleFlicker {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(1deg); }
}

@keyframes flame {
    0%, 100% { transform: scaleY(1) scaleX(1); }
    50% { transform: scaleY(1.2) scaleX(0.8); }
}

/* Spooky Eyes */
.spooky-eyes {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #ff0000;
    border-radius: 50%;
    animation: blink 3s ease-in-out infinite;
    z-index: 1000;
    pointer-events: none;
}

.spooky-eyes:before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
}

.eyes-1 {
    top: 25%;
    left: 25%;
    animation-delay: 0s;
}

.eyes-2 {
    top: 25%;
    left: 35%;
    animation-delay: 0s;
}

@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

/* Halloween Particles */
.halloween-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #ff6b35;
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
    z-index: 1000;
    pointer-events: none;
}

.particle-1 { top: 10%; left: 10%; animation-delay: 0s; }
.particle-2 { top: 20%; left: 80%; animation-delay: 1s; }
.particle-3 { top: 60%; left: 20%; animation-delay: 2s; }
.particle-4 { top: 80%; left: 70%; animation-delay: 3s; }
.particle-5 { top: 40%; left: 50%; animation-delay: 4s; }

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Spooky Button Hover Effects */
.halloween-hover {
    transition: all 0.3s ease;
}

.halloween-hover:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #ff6b35;
    text-shadow: 0 0 10px #ff6b35;
}

/* Halloween Loading Animation */
.halloween-loader {
    width: 50px;
    height: 50px;
    border: 3px solid #ff6b35;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: halloweenSpin 1s linear infinite;
}

@keyframes halloweenSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ghost, .bat, .pumpkin, .spider-web {
        transform: scale(0.7);
    }
    
    .halloween-text {
        font-size: 2rem;
    }
}

/* Halloween Sound Toggle */
.halloween-sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #ff6b35;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1002;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    transition: all 0.3s ease;
}

.halloween-sound-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
}

/* Halloween Overlay */
.halloween-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(26, 26, 46, 0.3) 100%);
    z-index: 999;
    pointer-events: none;
    animation: overlayPulse 4s ease-in-out infinite;
}

@keyframes overlayPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}
