/* ===== Mood Animation Particles (Epic 9) ===== */
/* GPU-composited: only transform + opacity. No layout-triggering properties. */

.mood-animation-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.mood-particle {
    position: absolute;
    font-size: 1.4rem;
    will-change: transform, opacity;
    pointer-events: none;
    user-select: none;
}

/* Float up (happy) */
.particle-float-up {
    bottom: 10%;
    animation: floatUp 3.5s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-200px) scale(0.6) rotate(15deg);
        opacity: 0;
    }
}

/* Fall down (sad) */
.particle-fall-down {
    top: 0;
    animation: fallDown 3.5s ease-in forwards;
}

@keyframes fallDown {
    0% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(300px) scale(0.5);
        opacity: 0;
    }
}

/* Shake (angry) */
.particle-shake {
    top: 40%;
    animation: shakeParticle 2.5s ease-out forwards;
}

@keyframes shakeParticle {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    10% {
        transform: scale(1.3);
        opacity: 1;
    }
    20% { transform: translateX(-8px) scale(1); }
    30% { transform: translateX(8px) scale(1.1); }
    40% { transform: translateX(-6px) scale(1); }
    50% { transform: translateX(6px) scale(1); }
    60% { transform: translateX(-4px) scale(0.9); }
    100% {
        transform: translateX(0) scale(0);
        opacity: 0;
    }
}

/* Burst (excited) */
.particle-burst {
    top: 50%;
    left: 50%;
    animation: burstOut 3s ease-out forwards;
}

@keyframes burstOut {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(-50% + var(--burst-x, 0px)),
            calc(-50% + var(--burst-y, 0px))
        ) scale(0.3) rotate(180deg);
        opacity: 0;
    }
}

.particle-burst:nth-child(1) { --burst-x: -60px; --burst-y: -80px; }
.particle-burst:nth-child(2) { --burst-x: 70px; --burst-y: -60px; }
.particle-burst:nth-child(3) { --burst-x: -80px; --burst-y: 40px; }
.particle-burst:nth-child(4) { --burst-x: 50px; --burst-y: 70px; }
.particle-burst:nth-child(5) { --burst-x: 0px; --burst-y: -100px; }
.particle-burst:nth-child(6) { --burst-x: -40px; --burst-y: 90px; }

/* Bounce (playful) */
.particle-bounce {
    bottom: 20%;
    animation: bounceUp 3s ease-out forwards;
}

@keyframes bounceUp {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    10% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    30% {
        transform: translateY(-80px) scale(1.1);
    }
    45% {
        transform: translateY(-20px) scale(0.95);
    }
    60% {
        transform: translateY(-60px) scale(1.05);
    }
    75% {
        transform: translateY(-30px) scale(0.9);
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

/* Drift (tired) */
.particle-drift {
    top: 30%;
    animation: driftSlow 4s ease-in-out forwards;
}

@keyframes driftSlow {
    0% {
        transform: translateX(0) translateY(0) scale(0.5);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
        transform: translateX(5px) translateY(-5px) scale(1);
    }
    50% {
        transform: translateX(-15px) translateY(-20px) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translateX(20px) translateY(-40px) scale(0.3);
        opacity: 0;
    }
}

/* Flicker (anxious) */
.particle-flicker {
    top: 45%;
    animation: flickerFade 2.5s ease-in-out forwards;
}

@keyframes flickerFade {
    0% { transform: scale(0); opacity: 0; }
    10% { transform: scale(1); opacity: 0.8; }
    20% { opacity: 0.2; }
    30% { opacity: 0.9; }
    40% { opacity: 0.3; }
    50% { opacity: 0.7; }
    60% { opacity: 0.1; }
    70% { opacity: 0.6; }
    100% { transform: scale(0.5); opacity: 0; }
}
