/* Creepster Font Face */
@font-face {
    font-family: 'Creepster';
    src: url('Creepster-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Halloween Theme for Hero Title */
.hero-title.halloween {
    font-family: 'Creepster', cursive !important;
    color: #8B0000 !important;
    text-shadow: 
        0 0 10px #FF0000,
        0 0 20px #FF0000,
        0 0 30px #FF0000,
        0 0 40px #FF0000,
        2px 2px 0px #660000,
        4px 4px 0px #440000,
        6px 6px 0px #220000;
    animation: 
        flicker 2s infinite alternate,
        glow 3s ease-in-out infinite alternate;
    font-size: 3.5rem !important;
    font-weight: normal !important;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    pointer-events: none; /* Allow clicks to pass through */
}

/* Blood Rain Droplets - Random sizes and contained */
.hero-title.halloween::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 35%;
    right: 35%;
    height: 120px;
    background: 
        /* Completely random sizes - no two the same */
        radial-gradient(ellipse 1px 3px at 8% 0%, #660000 0%, #660000 85%, transparent 85%),
        radial-gradient(ellipse 7px 16px at 18% 0%, #8b0000 0%, #8b0000 42%, transparent 42%),
        radial-gradient(ellipse 2px 5px at 28% 0%, #660000 0%, #660000 75%, transparent 75%),
        radial-gradient(ellipse 11px 24px at 38% 0%, #8b0000 0%, #8b0000 38%, transparent 38%),
        radial-gradient(ellipse 4px 9px at 48% 0%, #660000 0%, #660000 65%, transparent 65%),
        radial-gradient(ellipse 19px 41px at 58% 0%, #8b0000 0%, #8b0000 26%, transparent 26%),
        radial-gradient(ellipse 6px 13px at 68% 0%, #660000 0%, #660000 48%, transparent 48%),
        radial-gradient(ellipse 13px 29px at 78% 0%, #8b0000 0%, #8b0000 34%, transparent 34%),
        radial-gradient(ellipse 3px 7px at 88% 0%, #660000 0%, #660000 68%, transparent 68%),
        radial-gradient(ellipse 16px 36px at 95% 0%, #8b0000 0%, #8b0000 28%, transparent 28%);
    background-size: 100% 120px;
    animation: bloodRain1 3.2s ease-in-out infinite;
    z-index: 1;
    opacity: 0.9;
    pointer-events: none; /* Allow clicks to pass through */
}

/* Blood Rain Droplets - Layer 2 - More random sizes */
.hero-title.halloween::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 35%;
    right: 35%;
    height: 100px;
    background: 
        /* Completely random sizes - no two the same */
        radial-gradient(ellipse 5px 11px at 12% 0%, #660000 0%, #660000 58%, transparent 58%),
        radial-gradient(ellipse 9px 20px at 22% 0%, #8b0000 0%, #8b0000 45%, transparent 45%),
        radial-gradient(ellipse 1px 4px at 32% 0%, #660000 0%, #660000 80%, transparent 80%),
        radial-gradient(ellipse 14px 31px at 42% 0%, #8b0000 0%, #8b0000 32%, transparent 32%),
        radial-gradient(ellipse 8px 17px at 52% 0%, #660000 0%, #660000 41%, transparent 41%),
        radial-gradient(ellipse 17px 38px at 62% 0%, #8b0000 0%, #8b0000 27%, transparent 27%),
        radial-gradient(ellipse 3px 8px at 72% 0%, #660000 0%, #660000 62%, transparent 62%),
        radial-gradient(ellipse 12px 26px at 82% 0%, #8b0000 0%, #8b0000 37%, transparent 37%),
        radial-gradient(ellipse 6px 14px at 92% 0%, #660000 0%, #660000 46%, transparent 46%);
    background-size: 100% 100px;
    animation: bloodRain2 2.4s ease-in-out infinite;
    z-index: 1;
    opacity: 0.8;
    pointer-events: none; /* Allow clicks to pass through */
}

/* Animation delays for randomization */
.hero-title.halloween::after {
    animation-delay: 0s;
}

.hero-title.halloween::before {
    animation-delay: 1.1s;
}

/* Flicker Animation */
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 10px #FF0000,
            0 0 20px #FF0000,
            0 0 30px #FF0000,
            0 0 40px #FF0000,
            2px 2px 0px #660000,
            4px 4px 0px #440000,
            6px 6px 0px #220000;
    }
    20%, 24%, 55% {
        text-shadow: 
            0 0 5px #FF0000,
            0 0 10px #FF0000,
            0 0 15px #FF0000,
            0 0 20px #FF0000,
            2px 2px 0px #660000,
            4px 4px 0px #440000,
            6px 6px 0px #220000;
    }
}

/* Glow Animation */
@keyframes glow {
    from {
        text-shadow: 
            0 0 10px #FF0000,
            0 0 20px #FF0000,
            0 0 30px #FF0000,
            0 0 40px #FF0000,
            2px 2px 0px #660000,
            4px 4px 0px #440000,
            6px 6px 0px #220000;
    }
    to {
        text-shadow: 
            0 0 20px #FF0000,
            0 0 30px #FF0000,
            0 0 40px #FF0000,
            0 0 50px #FF0000,
            2px 2px 0px #660000,
            4px 4px 0px #440000,
            6px 6px 0px #220000;
    }
}

/* Shake Animation */
@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(3px, 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(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Blood Rain Animation 1 - Random timing */
@keyframes bloodRain1 {
    0% {
        transform: translateY(0px) scaleY(1);
        opacity: 0.9;
    }
    15% {
        transform: translateY(18px) scaleY(1.1);
        opacity: 0.8;
    }
    35% {
        transform: translateY(42px) scaleY(1.4);
        opacity: 0.6;
    }
    60% {
        transform: translateY(68px) scaleY(1.7);
        opacity: 0.4;
    }
    85% {
        transform: translateY(95px) scaleY(2.1);
        opacity: 0.2;
    }
    100% {
        transform: translateY(120px) scaleY(2.5);
        opacity: 0;
    }
}

/* Blood Rain Animation 2 - Different random timing */
@keyframes bloodRain2 {
    0% {
        transform: translateY(0px) scaleY(1);
        opacity: 0.8;
    }
    20% {
        transform: translateY(25px) scaleY(1.2);
        opacity: 0.7;
    }
    45% {
        transform: translateY(55px) scaleY(1.5);
        opacity: 0.5;
    }
    70% {
        transform: translateY(80px) scaleY(1.8);
        opacity: 0.3;
    }
    100% {
        transform: translateY(100px) scaleY(2.2);
        opacity: 0;
    }
}

/* Mobile Optimizations for Halloween Text Effects */
@media screen and (max-width: 768px) {
    /* Reduce text shadow complexity on mobile for better performance but keep red glow */
    .hero-title.halloween {
        text-shadow: 
            0 0 5px #FF0000,
            0 0 10px #FF0000,
            0 0 15px #FF0000,
            0 0 20px #FF0000,
            0 0 25px #FF0000,
            0 0 30px #FF0000,
            2px 2px 0px #660000,
            4px 4px 0px #440000;
        animation: flickerMobile 3s ease-in-out infinite, glowMobile 4s ease-in-out infinite;
    }
    
    /* Simplified flicker animation for mobile */
    @keyframes flickerMobile {
        0%, 18%, 22%, 25%, 53%, 57%, 100% {
            text-shadow: 
                0 0 5px #FF0000,
                0 0 10px #FF0000,
                0 0 15px #FF0000,
                0 0 20px #FF0000,
                0 0 25px #FF0000,
                0 0 30px #FF0000,
                2px 2px 0px #660000,
                4px 4px 0px #440000;
        }
        20%, 24%, 55% {        
            text-shadow: none;
        }
    }
    
    /* Enhanced glow animation for mobile */
    @keyframes glowMobile {
        0%, 100% {
            text-shadow: 
                0 0 10px #FF0000,
                0 0 20px #FF0000,
                0 0 30px #FF0000,
                0 0 40px #FF0000,
                0 0 50px #FF0000,
                0 0 60px #FF0000,
                2px 2px 0px #660000,
                4px 4px 0px #440000;
        }
        50% {
            text-shadow: 
                0 0 5px #FF0000,
                0 0 10px #FF0000,
                0 0 15px #FF0000,
                0 0 20px #FF0000,
                0 0 25px #FF0000,
                0 0 30px #FF0000,
                2px 2px 0px #660000,
                4px 4px 0px #440000;
        }
    }
    
    /* Optimized blood droplets for mobile - fewer gradients for better performance */
    .hero-title.halloween::after {
        background: 
            radial-gradient(ellipse 1px 3px at 8% 0%, #660000 0%, #660000 85%, transparent 85%),
            radial-gradient(ellipse 7px 16px at 18% 0%, #8b0000 0%, #8b0000 42%, transparent 42%),
            radial-gradient(ellipse 2px 5px at 28% 0%, #660000 0%, #660000 75%, transparent 75%),
            radial-gradient(ellipse 11px 24px at 38% 0%, #8b0000 0%, #8b0000 38%, transparent 38%),
            radial-gradient(ellipse 4px 9px at 48% 0%, #660000 0%, #660000 65%, transparent 65%),
            radial-gradient(ellipse 19px 41px at 58% 0%, #8b0000 0%, #8b0000 26%, transparent 26%),
            radial-gradient(ellipse 6px 13px at 68% 0%, #660000 0%, #660000 48%, transparent 48%),
            radial-gradient(ellipse 13px 29px at 78% 0%, #8b0000 0%, #8b0000 34%, transparent 34%);
        animation: bloodRain1Mobile 2.8s ease-in-out infinite;
    }
    
    .hero-title.halloween::before {
        background: 
            radial-gradient(ellipse 5px 11px at 12% 0%, #660000 0%, #660000 58%, transparent 58%),
            radial-gradient(ellipse 9px 20px at 22% 0%, #8b0000 0%, #8b0000 45%, transparent 45%),
            radial-gradient(ellipse 1px 4px at 32% 0%, #660000 0%, #660000 80%, transparent 80%),
            radial-gradient(ellipse 14px 31px at 42% 0%, #8b0000 0%, #8b0000 32%, transparent 32%),
            radial-gradient(ellipse 8px 17px at 52% 0%, #660000 0%, #660000 41%, transparent 41%),
            radial-gradient(ellipse 17px 38px at 62% 0%, #8b0000 0%, #8b0000 27%, transparent 27%),
            radial-gradient(ellipse 3px 8px at 72% 0%, #660000 0%, #660000 62%, transparent 62%),
            radial-gradient(ellipse 12px 26px at 82% 0%, #8b0000 0%, #8b0000 37%, transparent 37%);
        animation: bloodRain2Mobile 2.2s ease-in-out infinite;
    }
    
    /* Optimized blood rain animations for mobile */
    @keyframes bloodRain1Mobile {
        0% {
            transform: translateY(0px) scaleY(1);
            opacity: 0.9;
        }
        20% {
            transform: translateY(20px) scaleY(1.2);
            opacity: 0.7;
        }
        50% {
            transform: translateY(50px) scaleY(1.6);
            opacity: 0.4;
        }
        80% {
            transform: translateY(90px) scaleY(2.0);
            opacity: 0.2;
        }
        100% {
            transform: translateY(120px) scaleY(2.4);
            opacity: 0;
        }
    }
    
    @keyframes bloodRain2Mobile {
        0% {
            transform: translateY(0px) scaleY(1);
            opacity: 0.8;
        }
        25% {
            transform: translateY(30px) scaleY(1.3);
            opacity: 0.6;
        }
        60% {
            transform: translateY(70px) scaleY(1.8);
            opacity: 0.3;
        }
        100% {
            transform: translateY(100px) scaleY(2.2);
            opacity: 0;
        }
    }
}

/* Small mobile devices (phones) */
@media screen and (max-width: 480px) {
    .hero-title.halloween {
        font-size: 1.8rem !important;
        line-height: 1.2;
        text-shadow: 
            0 0 3px #FF0000,
            0 0 6px #FF0000,
            0 0 9px #FF0000,
            0 0 12px #FF0000,
            0 0 15px #FF0000,
            2px 2px 0px #660000;
        animation: flickerSmall 4s ease-in-out infinite, glowSmall 5s ease-in-out infinite;
    }
    
    @keyframes flickerSmall {
        0%, 20%, 40%, 60%, 80%, 100% {
            text-shadow: 
                0 0 3px #FF0000,
                0 0 6px #FF0000,
                0 0 9px #FF0000,
                0 0 12px #FF0000,
                0 0 15px #FF0000,
                2px 2px 0px #660000;
        }
        10%, 30%, 50%, 70%, 90% {        
            text-shadow: none;
        }
    }
    
    @keyframes glowSmall {
        0%, 100% {
            text-shadow: 
                0 0 5px #FF0000,
                0 0 10px #FF0000,
                0 0 15px #FF0000,
                0 0 20px #FF0000,
                0 0 25px #FF0000,
                2px 2px 0px #660000;
        }
        50% {
            text-shadow: 
                0 0 3px #FF0000,
                0 0 6px #FF0000,
                0 0 9px #FF0000,
                0 0 12px #FF0000,
                0 0 15px #FF0000,
                2px 2px 0px #660000;
        }
    }
    
    /* Even simpler blood droplets for small screens */
    .hero-title.halloween::after {
        background: 
            radial-gradient(ellipse 2px 5px at 15% 0%, #660000 0%, #660000 75%, transparent 75%),
            radial-gradient(ellipse 8px 18px at 35% 0%, #8b0000 0%, #8b0000 40%, transparent 40%),
            radial-gradient(ellipse 5px 12px at 55% 0%, #660000 0%, #660000 60%, transparent 60%),
            radial-gradient(ellipse 12px 25px at 75% 0%, #8b0000 0%, #8b0000 35%, transparent 35%);
        animation: bloodRain1Small 2.5s ease-in-out infinite;
    }
    
    .hero-title.halloween::before {
        background: 
            radial-gradient(ellipse 6px 14px at 25% 0%, #660000 0%, #660000 50%, transparent 50%),
            radial-gradient(ellipse 10px 22px at 45% 0%, #8b0000 0%, #8b0000 38%, transparent 38%),
            radial-gradient(ellipse 4px 10px at 65% 0%, #660000 0%, #660000 65%, transparent 65%),
            radial-gradient(ellipse 9px 20px at 85% 0%, #8b0000 0%, #8b0000 45%, transparent 45%);
        animation: bloodRain2Small 2.0s ease-in-out infinite;
    }
    
    @keyframes bloodRain1Small {
        0% {
            transform: translateY(0px) scaleY(1);
            opacity: 0.8;
        }
        30% {
            transform: translateY(25px) scaleY(1.3);
            opacity: 0.6;
        }
        70% {
            transform: translateY(60px) scaleY(1.8);
            opacity: 0.3;
        }
        100% {
            transform: translateY(80px) scaleY(2.2);
            opacity: 0;
        }
    }
    
    @keyframes bloodRain2Small {
        0% {
            transform: translateY(0px) scaleY(1);
            opacity: 0.7;
        }
        40% {
            transform: translateY(35px) scaleY(1.4);
            opacity: 0.5;
        }
        100% {
            transform: translateY(70px) scaleY(2.0);
            opacity: 0;
        }
    }
}