/* ==========================================
   BIMA HALLOWEEN
   ========================================== */


/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */

.bima-halloween-decoracion {

    position: fixed;

    inset: 0;

    pointer-events: none;

    z-index: 999999;

    overflow: hidden;

}


/* ==========================================
   CALABAZA
   ========================================== */

.bima-pumpkin {

    position: fixed;

    right: 30px;

    bottom: 25px;

    font-size: 55px;

    animation:
        bima-pumpkin-float
        3s
        ease-in-out
        infinite;

}


@keyframes bima-pumpkin-float {

    0%,
    100% {

        transform:
            translateY(0);

    }

    50% {

        transform:
            translateY(-12px);

    }

}


/* ==========================================
   MURCIÉLAGOS
   ========================================== */

.bima-bat {

    position: fixed;

    font-size: 35px;

    animation:
        bima-bat-fly
        12s
        linear
        infinite;

}


.bat-1 {

    top: 20%;

    left: -50px;

    animation-delay: 0s;

}


.bat-2 {

    top: 40%;

    left: -50px;

    animation-delay: 4s;

}


.bat-3 {

    top: 65%;

    left: -50px;

    animation-delay: 8s;

}


@keyframes bima-bat-fly {

    0% {

        transform:
            translateX(-100px)
            translateY(0)
            rotate(0deg);

    }

    50% {

        transform:
            translateX(50vw)
            translateY(-80px)
            rotate(-10deg);

    }

    100% {

        transform:
            translateX(110vw)
            translateY(20px)
            rotate(10deg);

    }

}


/* ==========================================
   LLUVIA
   ========================================== */

.bima-lluvia {

    position: fixed;

    inset: 0;

    width: 100%;

    height: 100%;

    pointer-events: none;

    overflow: hidden;

    z-index: 999998;

}


.bima-gota {

    position: absolute;

    top: -30px;

    width: 1px;

    height: 25px;

    background:
        rgba(255, 255, 255, 0.45);

    animation-name:
        bima-lluvia-caer;

    animation-timing-function:
        linear;

    animation-iteration-count:
        infinite;

}


@keyframes bima-lluvia-caer {

    0% {

        transform:
            translateY(-30px);

    }

    100% {

        transform:
            translateY(110vh);

    }

}


/* ==========================================
   RELÁMPAGO CINEMATOGRÁFICO
   ========================================== */

.bima-relampago {

    position: fixed;

    top: 0;

    left: 0;

    width: 100vw;

    height: 100vh;

    pointer-events: none;

    z-index: 2147483647;

    opacity: 0;

    background:
        rgba(255, 255, 255, 0);

}


.bima-relampago-activo {

    animation:
        bima-flash
        0.45s
        ease-out;

}


@keyframes bima-flash {

    0% {

        opacity: 0;

        background:
            rgba(255, 255, 255, 0);

    }

    8% {

        opacity: 0.9;

        background:

            radial-gradient(
                ellipse at 50% 10%,

                rgba(255,255,255,0.95),

                rgba(170,190,255,0.45) 35%,

                rgba(80,90,130,0.15) 65%,

                transparent 100%
            );

    }

    18% {

        opacity: 0.1;

    }

    28% {

        opacity: 0.65;

        background:

            radial-gradient(
                ellipse at 65% 15%,

                rgba(255,255,255,0.8),

                rgba(150,170,230,0.3) 40%,

                transparent 75%
            );

    }

    40% {

        opacity: 0.05;

    }

    100% {

        opacity: 0;

        background:
            transparent;

    }

}


/* ==========================================
   OSCURIDAD / VIÑETA
   ========================================== */

.bima-oscuridad {

    position: fixed;

    inset: 0;

    width: 100vw;

    height: 100vh;

    pointer-events: none;

    z-index: 999996;

    background:

        radial-gradient(
            ellipse at center,

            rgba(0, 0, 0, 0) 35%,

            rgba(0, 0, 0, 0.10) 60%,

            rgba(0, 0, 0, 0.45) 100%
        );

}


/* ==========================================
   NIEBLA CINEMATOGRÁFICA
   ========================================== */

#bima-niebla {

    position: fixed;

    left: -10%;

    bottom: 0;

    width: 120%;

    height: 45vh;

    pointer-events: none;

    overflow: hidden;

    z-index: 2147483640;

}


#bima-niebla .bima-niebla-capa {

    position: absolute;

    left: -20%;

    bottom: -100px;

    width: 140%;

    height: 350px;

    border-radius: 50%;

    background:

        radial-gradient(
            ellipse at center,

            rgba(240, 240, 240, 0.24) 0%,

            rgba(220, 220, 220, 0.18) 20%,

            rgba(190, 190, 190, 0.12) 40%,

            rgba(120, 120, 120, 0.06) 60%,

            transparent 78%
        );

    filter:
        blur(30px);

    transform:
        translateX(-10%);

    animation:

        bima-niebla-movimiento

        20s

        ease-in-out

        infinite alternate;

}


@keyframes bima-niebla-movimiento {

    0% {

        transform:
            translateX(-10%)
            scale(1);

    }

    50% {

        transform:
            translateX(8%)
            scale(1.15);

    }

    100% {

        transform:
            translateX(-4%)
            scale(1.08);

    }

}


/* ==========================================
   APARICIÓN DE TERROR
   ========================================== */

.bima-aparicion-terror {

    position: fixed;

    inset: 0;

    width: 100vw;

    height: 100vh;

    pointer-events: none;

    z-index: 2147483646;

    opacity: 0;

}
/* ==========================================
   SILUETA DE TERROR
   ========================================== */

.bima-aparicion-sombra {

    position: absolute;

    top: 50%;

    left: 50%;

    width: 280px;

    height: 350px;

    transform:
        translate(-50%, -50%);

    border-radius:
        50% 50% 45% 45%;

    background:

        radial-gradient(
            ellipse at center,

            rgba(0, 0, 0, 0.95) 0%,

            rgba(0, 0, 0, 0.85) 45%,

            rgba(0, 0, 0, 0.55) 70%,

            transparent 100%
        );

    filter:
        blur(8px);

    opacity: 0.95;

    box-shadow:

        0 0 40px
        rgba(0, 0, 0, 0.8),

        0 0 100px
        rgba(0, 0, 0, 0.6);

}


/* ==========================================
   FORMA IRREGULAR DE LA CABEZA
   ========================================== */

.bima-aparicion-sombra::before {

    content: "";

    position: absolute;

    top: -35px;

    left: 50%;

    width: 190px;

    height: 110px;

    transform:
        translateX(-50%);

    border-radius:
        50% 50% 40% 40%;

    background:
        rgba(0, 0, 0, 0.9);

    filter:
        blur(10px);

}


/* ==========================================
   CUERPO / SOMBRA INFERIOR
   ========================================== */

.bima-aparicion-sombra::after {

    content: "";

    position: absolute;

    bottom: -120px;

    left: 50%;

    width: 360px;

    height: 220px;

    transform:
        translateX(-50%);

    border-radius:
        50% 50% 0 0;

    background:

        radial-gradient(
            ellipse at center,

            rgba(0, 0, 0, 0.85),

            transparent 70%
        );

    filter:
        blur(15px);

}


/* ==========================================
   OJOS
   ========================================== */

.bima-aparicion-ojos {

    position: absolute;

    top: 38%;

    left: 50%;

    transform:
        translate(-50%, -50%);

    display: flex;

    gap: 45px;

}


/* ==========================================
   OJOS INDIVIDUALES
   ========================================== */

.bima-aparicion-ojos span {

    display: block;

    width: 22px;

    height: 11px;

    background:
        rgba(255, 255, 255, 1);

    border-radius:
        50% 50% 45% 45%;

    box-shadow:

        0 0 8px
        rgba(255,255,255,1),

        0 0 20px
        rgba(255,255,255,0.85),

        0 0 40px
        rgba(255,255,255,0.45);

    transform:
        rotate(-4deg);

}


/* ==========================================
   OJO DERECHO — LIGERAMENTE DIFERENTE
   ========================================== */

.bima-aparicion-ojos span:nth-child(2) {

    transform:
        rotate(5deg)
        translateY(3px);

}


/* ==========================================
   ACTIVACIÓN DE LA APARICIÓN
   ========================================== */

.bima-aparicion-terror-activa {

    opacity: 1 !important;

   animation:
    bima-aparicion
    0.32s
    ease-out
    forwards;

}


@keyframes bima-aparicion {

    0% {

        opacity: 0;

        transform:
            scale(1.18);

    }

    10% {

        opacity: 0.95;

        transform:
            scale(1);

    }

    25% {

        opacity: 0.8;

    }

    45% {

        opacity: 0.35;

    }

    100% {

        opacity: 0;

        transform:
            scale(0.97);

    }

}