/* ============================================
   InfoNCE TUTORIAL - ANIMATIONS
   Contrastive learning animations
   ============================================ */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pull Animation (Positive Pair) */
@keyframes pull {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-10px);
    }
}

/* Push Animation (Negative Pair) */
@keyframes push {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(10px);
    }
}

/* Glow Positive */
@keyframes glowPositive {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
    }
}

/* Glow Negative */
@keyframes glowNegative {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    }
}

/* Pulse */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Similarity Flow */
@keyframes similarityFlow {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scaleX(1);
    }
}

/* Temperature Change */
@keyframes temperatureChange {
    from {
        background: rgba(59, 130, 246, 0.3);
    }

    to {
        background: rgba(245, 158, 11, 0.3);
    }
}

/* Matrix Highlight */
@keyframes matrixHighlight {

    0%,
    100% {
        background: rgba(16, 185, 129, 0.3);
    }

    50% {
        background: rgba(16, 185, 129, 0.6);
    }
}

/* Bounce */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Scale Up */
@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply Animations to Elements */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.pull {
    animation: pull 2s ease-in-out infinite;
}

.push {
    animation: push 2s ease-in-out infinite;
}

.glow-positive {
    animation: glowPositive 1.5s ease-in-out infinite;
}

.glow-negative {
    animation: glowNegative 1.5s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.scale-up {
    animation: scaleUp 0.4s ease-out;
}

.bounce {
    animation: bounce 1s ease-in-out;
}

.rotate {
    animation: rotate 2s linear infinite;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}