/**
 * Galactic EA AI - Animation Styles
 * Transitions, animations, and effects
 */

/* ================================================================
   BASIC ANIMATIONS
   ================================================================ */

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Slide In */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Glow */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
    }
}

.glow {
    animation: glow 2s infinite;
}

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

.spin {
    animation: spin 1s linear infinite;
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

/* ================================================================
   GRADIENT ANIMATIONS
   ================================================================ */

/* Gradient Shift Animation for Galactic Theme */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

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

/* ================================================================
   HOVER EFFECTS
   ================================================================ */

.transition-all {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* ================================================================
   LOADING & PROGRESS
   ================================================================ */

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Progress Animation */
@keyframes progress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

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

/* ================================================================
   ADVANCED ANIMATIONS
   ================================================================ */

/* Rotating Globe Animation */
@keyframes rotateGlobe {
    0% { 
        transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg);
        background: radial-gradient(circle, rgba(255, 119, 198, 0.4) 0%, rgba(123, 119, 198, 0.2) 50%, transparent 70%);
    }
    25% { 
        transform: translate(-50%, -50%) rotateX(90deg) rotateY(90deg);
        background: radial-gradient(circle, rgba(123, 119, 198, 0.4) 0%, rgba(0, 212, 255, 0.2) 50%, transparent 70%);
    }
    50% { 
        transform: translate(-50%, -50%) rotateX(180deg) rotateY(180deg);
        background: radial-gradient(circle, rgba(0, 212, 255, 0.4) 0%, rgba(255, 119, 198, 0.2) 50%, transparent 70%);
    }
    75% { 
        transform: translate(-50%, -50%) rotateX(270deg) rotateY(270deg);
        background: radial-gradient(circle, rgba(123, 119, 198, 0.4) 0%, rgba(255, 119, 198, 0.2) 50%, transparent 70%);
    }
    100% { 
        transform: translate(-50%, -50%) rotateX(360deg) rotateY(360deg);
        background: radial-gradient(circle, rgba(255, 119, 198, 0.4) 0%, rgba(123, 119, 198, 0.2) 50%, transparent 70%);
    }
}

/* Icon Pulse Animation */
@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(255, 119, 198, 0.8));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px rgba(255, 119, 198, 1));
    }
}

/* Nebula Pulse Animation */
@keyframes nebulaPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.1) rotate(180deg);
        opacity: 0.8;
    }
}

/* Galaxy Float Animation */
@keyframes galaxyFloat {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

/* Pulse Glow Animation */
@keyframes pulseGlow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
}

/* Galaxy Fade In Animation */
@keyframes galaxyFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.98);
        filter: blur(5px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Stars Animation */
@keyframes stars {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

/* Rotate Animation */
@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* ================================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================================ */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* GPU Acceleration */
.gpu-accelerated {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ================================================================
   UTILITY ANIMATION CLASSES
   ================================================================ */

.animate-fast {
    animation-duration: 0.3s !important;
}

.animate-slow {
    animation-duration: 1s !important;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-once {
    animation-iteration-count: 1;
}

.animate-infinite {
    animation-iteration-count: infinite;
}
