/**
 * home-eggs-particles.css - Particle Effects
 *
 * Poop rain, fart clouds, confetti (defined in modes),
 * and all particle @keyframes. Note: confetti keyframes
 * and the .confetti class are in home-eggs-modes.css
 * as they are tied to body mode states.
 */

/* ========================================
   KEYFRAME ANIMATIONS — Particles
   ======================================== */

@keyframes poopFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(calc(100vh + 100px)) rotate(360deg); opacity: 0.8; }
}

@keyframes fartFloat {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2) translateY(-50px); opacity: 0; }
}

/* ========================================
   PARTICLE ELEMENTS
   ======================================== */

/* Poop emoji falling */
.poop {
    position: fixed;
    top: -50px;
    font-size: 2rem;
    z-index: var(--z-modal);
    animation: poopFall 2s linear forwards;
    pointer-events: none;
}

/* Fart cloud floating */
.fart-cloud {
    position: fixed;
    font-size: 3rem;
    z-index: var(--z-popover);
    animation: fartFloat 1.5s ease forwards;
    pointer-events: none;
}

/* ========================================
   RAINBOW FART TRANSITION (to unicorn.html)
   ======================================== */

.rainbow-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: var(--z-modal);
    pointer-events: none;
    animation: rainbowBgFade 2s ease forwards;
    overflow: hidden;
}

.rainbow-cloud {
    position: absolute;
    font-size: 3rem;
    animation: cloudToVortex 2s ease-in forwards;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

@keyframes rainbowBgFade {
    0% {
        background: rgba(0, 0, 0, 0);
    }
    50% {
        background: linear-gradient(135deg,
            rgba(255, 107, 107, 0.3),
            rgba(107, 203, 119, 0.3),
            rgba(168, 85, 247, 0.3));
    }
    100% {
        background: linear-gradient(135deg,
            rgba(255, 107, 107, 0.8),
            rgba(255, 217, 61, 0.8),
            rgba(107, 203, 119, 0.8),
            rgba(77, 150, 255, 0.8),
            rgba(168, 85, 247, 0.8));
    }
}

@keyframes cloudToVortex {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    70% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.3) rotate(540deg) translate(-50%, -50%);
        opacity: 0.5;
        left: 50%;
        top: 50%;
    }
}
