/* Optimized GPU-Accelerated Animations for Website99 */
/* Reduced file size with better performance */

/* Base GPU acceleration classes */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

/* Smooth transitions */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optimized 3D card effects */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

/* 3D transform on hover */
.glass-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.glass-3d:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg);
}

/* Neon text effects */
.neon-text {
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Floating animation */
.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Glow pulse effect */
.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
    }
}

/* Morphing button effect */
.morph-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.morph-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.morph-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Holographic effect */
.holographic {
    background: linear-gradient(45deg, 
        #ff0080, #ff8c00, #40e0d0, #ff0080);
    background-size: 400% 400%;
    animation: holographicShift 3s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes holographicShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particle field effect (optimized) */
.particle-field {
    position: relative;
    overflow: hidden;
}

.particle-field::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent);
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes particleFloat {
    from { transform: translateY(0px); }
    to { transform: translateY(-200px); }
}

/* Optimized scroll animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Performance optimizations */
.reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* GPU acceleration for specific elements */
.nav-item, .btn, .card, .project-item {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimized hover states */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Responsive animation adjustments */
@media (max-width: 768px) {
    .floating, .glow-pulse, .neon-text {
        animation-duration: 3s;
    }
    
    .glass-3d:hover {
        transform: translateY(-4px) rotateX(2deg) rotateY(2deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
