/* Анимации появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Классы анимаций */
.animate-fade-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out forwards;
    opacity: 0;
}

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

/* Задержки */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* Анимация прогресс-баров */
@keyframes progressFill {
    from {
        width: 0;
    }
    to {
        width: var(--progress-width);
    }
}

.progress-bar {
    height: 6px;
    background-color: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    animation: progressFill 1s ease-out forwards;
    width: 0;
}

/* Анимация нейронной сети */
@keyframes neuronPulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes connectionFlow {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -20;
    }
}

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

.connection {
    stroke-dasharray: 5, 5;
    animation: connectionFlow 1s linear infinite;
}

/* Градиентные анимации */
.gradient-text {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
}

.gradient-border {
    position: relative;
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
    animation: gradientShift 3s ease-in-out infinite;
}

/* Анимация скролла */
@keyframes scrollHint {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

.scroll-hint {
    animation: scrollHint 2s infinite ease-in-out;
}

/* Анимация загрузки */
@keyframes loadingSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
}

/* Параллакс эффект */
.parallax-element {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Hover эффекты */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

/* Анимация для списков */
@keyframes listItemAppear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.list-item-animate {
    animation: listItemAppear 0.5s ease-out forwards;
    opacity: 0;
}

.list-item-animate:nth-child(1) { animation-delay: 100ms; }
.list-item-animate:nth-child(2) { animation-delay: 200ms; }
.list-item-animate:nth-child(3) { animation-delay: 300ms; }
.list-item-animate:nth-child(4) { animation-delay: 400ms; }
.list-item-animate:nth-child(5) { animation-delay: 500ms; }
.list-item-animate:nth-child(6) { animation-delay: 600ms; }
.list-item-animate:nth-child(7) { animation-delay: 700ms; }
.list-item-animate:nth-child(8) { animation-delay: 800ms; }