/* ========================================
   ANIMATIONS
   All @keyframes definitions
   ======================================== */

/* === GENERAL ANIMATIONS === */
@keyframes gentle-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes breathe {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

@keyframes blurp {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    75% { transform: scale(0.95); }
}

@keyframes shake-blur {
    0%, 100% {
        transform: translate(50%, -50%) scale(1);
        filter: blur(0);
    }
    25% {
        transform: translate(52%, -50%) scale(1.1);
        filter: blur(1px);
    }
    75% {
        transform: translate(48%, -50%) scale(1.1);
        filter: blur(1px);
    }
}

/* === MENU ANIMATIONS === */
@keyframes menu-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(200, 180, 220, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 25px rgba(200, 180, 220, 0.2);
    }
}

/* === SEED ANIMATIONS === */
@keyframes seed-breathe {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 4px 12px rgba(200, 180, 220, 0.2));
    }
    25% {
        transform: scale(1.02) rotate(1deg);
        filter: drop-shadow(0 6px 16px rgba(200, 180, 220, 0.3));
    }
    50% {
        transform: scale(1.04) rotate(0deg);
        filter: drop-shadow(0 8px 20px rgba(200, 180, 220, 0.4));
    }
    75% {
        transform: scale(1.02) rotate(-1deg);
        filter: drop-shadow(0 6px 16px rgba(200, 180, 220, 0.3));
    }
}

@keyframes seed-heartbeat {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 6px 20px rgba(200, 180, 220, 0.4));
    }
    15% {
        transform: scale(1.06);
        filter: drop-shadow(0 10px 30px rgba(210, 190, 230, 0.6));
    }
    30% {
        transform: scale(1.02);
        filter: drop-shadow(0 8px 24px rgba(200, 180, 220, 0.5));
    }
    45% {
        transform: scale(1.08);
        filter: drop-shadow(0 12px 35px rgba(220, 200, 240, 0.7));
    }
    60% {
        transform: scale(1);
        filter: drop-shadow(0 6px 20px rgba(200, 180, 220, 0.4));
    }
}

/* === GLOW AWAKENING ANIMATIONS === */
@keyframes glow-core-awaken {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
}

@keyframes glow-inner-awaken {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
}

@keyframes glow-outer-awaken {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
    70% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
}

@keyframes glow-atmosphere-awaken {
    0% { transform: translate(-50%, -50%) scale(0.1); opacity: 0; }
    80% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.25; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
}

/* === GLOW BREATHING ANIMATIONS === */
@keyframes glow-core-breathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
        filter: blur(8px);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.8;
        filter: blur(10px);
    }
}

@keyframes glow-inner-breathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.55;
    }
}

@keyframes glow-outer-breathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 0.4;
    }
}

@keyframes glow-atmosphere-breathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.28;
    }
}

/* === GLOW BLOOM ANIMATIONS === */
@keyframes glow-core-bloom {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.85;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.25);
        opacity: 1;
    }
}

@keyframes glow-inner-bloom {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    30% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.75; }
    60% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.65; }
    85% { transform: translate(-50%, -50%) scale(1.18); opacity: 0.8; }
}

@keyframes glow-outer-bloom {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.45; }
    40% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.55; }
    70% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.5; }
}

@keyframes glow-atmosphere-bloom {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.4; }
}

/* === GLOW ABSORB ANIMATIONS === */
@keyframes glow-absorb-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
        filter: blur(6px);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
        filter: blur(4px);
    }
}

@keyframes glow-absorb-contract {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
}

/* === GLOW SEND ANIMATIONS (v1 send-gather) === */
@keyframes send-gather-core {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.4); filter: blur(8px) brightness(1.5); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(0.7); filter: blur(5px) brightness(1.8); }
    100% { opacity: 0; transform: translate(-50%, -250%) scale(0.3); filter: blur(15px) brightness(2); }
}

@keyframes send-gather-inner {
    0% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    35% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.3); }
    65% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 0; transform: translate(-50%, -250%) scale(0.4); }
}

@keyframes send-gather-outer {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    40% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
    70% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 0; transform: translate(-50%, -250%) scale(0.5); }
}

@keyframes send-gather-atmosphere {
    0% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
    45% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.1); }
    75% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.95); }
    100% { opacity: 0; transform: translate(-50%, -250%) scale(0.6); }
}

/* === RING ANIMATIONS === */
@keyframes ring-pulse {
    0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.3; transform: translate(-50%, -50%) scale(1.05); }
}

/* === AMBIENT PARTICLE ANIMATIONS === */
@keyframes float-ambient {
    0%, 100% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        transform: translateY(-20vh) translateX(var(--drift));
    }
}

/* Star twinkle - soft pulsing opacity */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Snowfall - gentle descent with drift */
@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(110vh) translateX(var(--drift)) rotate(180deg);
        opacity: 0;
    }
}

/* Aurora pulse - soft breathing glow for background */
@keyframes aurora-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* === POEM/BOOK ANIMATIONS === */
@keyframes book-breathe {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 4px 12px rgba(200, 180, 220, 0.2));
    }
    25% {
        transform: scale(1.02) rotate(0.5deg);
        filter: drop-shadow(0 6px 16px rgba(200, 180, 220, 0.3));
    }
    50% {
        transform: scale(1.03) rotate(0deg);
        filter: drop-shadow(0 8px 20px rgba(200, 180, 220, 0.35));
    }
    75% {
        transform: scale(1.02) rotate(-0.5deg);
        filter: drop-shadow(0 6px 16px rgba(200, 180, 220, 0.3));
    }
}

@keyframes book-open-shake {
    0% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.08) rotate(-2deg);
    }
    30% {
        transform: scale(1.12) rotate(2deg);
    }
    45% {
        transform: scale(1.08) rotate(-1deg);
    }
    60% {
        transform: scale(1.15) rotate(0deg);
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes book-close {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

@keyframes shockwave-expand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
        border-width: 3px;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
        border-width: 1px;
    }
}

@keyframes page-turn {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    50% {
        transform: perspective(1000px) rotateY(-15deg);
    }
    100% {
        transform: perspective(1000px) rotateY(0deg);
    }
}

@keyframes ink-fade-in {
    0% {
        opacity: 0;
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes pending-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 2px 8px rgba(200, 180, 220, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 12px rgba(210, 190, 230, 0.5));
    }
}

@keyframes orbit-rotate {
    0% {
        transform: translateX(-50%) rotate(0deg) translateY(-40px) rotate(0deg);
    }
    100% {
        transform: translateX(-50%) rotate(360deg) translateY(-40px) rotate(-360deg);
    }
}

@keyframes soft-wave-expand {
    0% {
        width: 40px;
        height: 40px;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@keyframes page-flip-open {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotateY(-150deg);
        opacity: 0;
    }
}
