
/* Additional custom styles for enhanced design */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #6d28d9);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa, #8b5cf6);
}

/* Selection color */
::selection {
    background-color: rgba(139, 92, 246, 0.3);
    color: white;
}

/* Glass morphism effect */
.glass {
    background: rgba(18, 18, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Glow effect */
.glow-purple {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.glow-purple-lg {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
}

/* Dynamic animations */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.4),
                    0 0 40px rgba(139, 92, 246, 0.2),
                    0 0 60px rgba(139, 92, 246, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.6),
                    0 0 60px rgba(139, 92, 246, 0.4),
                    0 0 90px rgba(139, 92, 246, 0.2);
    }
}

/* Interactive hover effects */
.group:hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth transitions for all interactive elements (оптимизировано) */
button, a, [class*="card"], [class*="rounded"] {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* will-change добавляется только при hover через JS */
}

/* Enhanced blur effects */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Gradient animations */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient-shift {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Particle effects */
.floating-particle {
    pointer-events: none;
    z-index: 1;
}

/* Cursor trail */
.cursor-trail {
    pointer-events: none;
    z-index: 9999;
}

/* Magnetic button effect */
button, a[href^="#"] {
    position: relative;
    overflow: hidden;
}

button::before, a[href^="#"]::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

button:hover::before, a[href^="#"]:hover::before {
    width: 300px;
    height: 300px;
}

/* Scroll reveal animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced card hover effects (оптимизировано - используем transform вместо filter) */
[class*="card"]:hover {
    transform: translate3d(0, -5px, 0) scale(1.02);
    /* filter убран для лучшей производительности */
}

/* Text glow on hover - отключено */
/* h1:hover, h2:hover, h3:hover {
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    transition: text-shadow 0.3s ease;
} */

/* Smooth page transitions (оптимизировано - только для нужных элементов) */
button, a, [class*="rounded"], [class*="card"] {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Enhanced focus states */
button:focus, a:focus {
    outline: 2px solid rgba(139, 92, 246, 0.5);
    outline-offset: 4px;
}

/* Loading animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Parallax container (оптимизировано) */
.parallax-container {
    transform-style: preserve-3d;
    perspective: 1000px;
    contain: layout style paint;
}


/* Исключения для анимаций */
.animate-gradient,
.animate-float,
.animate-pulse-glow,
.floating-particle,
.cursor-trail {
    transition: none;
}

/* Оптимизация для анимаций */
@supports (will-change: transform) {
    .animate-float,
    .animate-gradient,
    .floating-particle {
        will-change: transform;
    }
}

/* Оптимизация для карточек при hover */
.group:hover {
    contain: layout style paint;
}
