/* NCA Evolution - Animations */

/* Spin (loader) */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Vote pulse on cell */
@keyframes vote-pulse {
    0% {
        box-shadow: 0 0 0 0 var(--success-glow);
    }
    100% {
        box-shadow:
            0 0 30px var(--success-glow),
            inset 0 0 25px var(--success-glow);
    }
}

.nca-cell.voting {
    animation: vote-pulse 0.25s ease-out;
}

/* Toast animations */
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

.toast {
    animation: toast-in 0.3s ease-out;
}

.toast.fade-out {
    animation: toast-out 0.3s ease-out forwards;
}

/* Floating Text (Score/Feedback) */
.floating-text {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(0,0,0,0.8), 0 0 20px var(--gold-glow);
    animation: float-text-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    white-space: nowrap;
}

@keyframes float-text-up {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60px) scale(1);
    }
}

/* Score bump */
@keyframes bump {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.4); filter: brightness(1.5); color: #fff; }
    100% { transform: scale(1); filter: brightness(1); }
}

.nca-votes.vote-bump {
    animation: bump 0.2s ease-out;
}

.score-value.score-bump {
    animation: bump 0.3s ease-out;
}

/* Fade in/out */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-out {
    to { opacity: 0; }
}

/* Pulse text (for evolving label) */
@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Glow pulse (for active elements) */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 10px var(--primary-glow);
    }
    50% {
        box-shadow: 0 0 25px var(--primary-glow), 0 0 40px var(--primary-dim);
    }
}

/* Breathing effect for cells */
@keyframes breathe {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px var(--primary-dim);
    }
}

/* Subtle pulse for consulting button */
@keyframes subtle-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        opacity: 0.95;
        box-shadow:
            0 4px 16px rgba(96, 165, 250, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}
