/**
 * Advanced Animations - Space Theme
 * Very Strong & Professional Animations
 * ============================================
 */

/* ============================================
   FLOATING & MOVEMENT ANIMATIONS
   ============================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-30px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes float-fast {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(200px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(200px) rotate(-360deg);
    }
}

@keyframes orbit-reverse {
    from {
        transform: rotate(360deg) translateX(200px) rotate(-360deg);
    }
    to {
        transform: rotate(0deg) translateX(200px) rotate(0deg);
    }
}

/* ============================================
   SLIDE ANIMATIONS
   ============================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ============================================
   FADE ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   SCALE ANIMATIONS
   ============================================ */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes scaleInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* ============================================
   ROTATE ANIMATIONS
   ============================================ */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-reverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-3d {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    33% {
        transform: rotateX(120deg) rotateY(120deg) rotateZ(0deg);
    }
    66% {
        transform: rotateX(240deg) rotateY(240deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg);
    }
}

/* ============================================
   PULSE & GLOW ANIMATIONS
   ============================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes pulse-strong {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.15);
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5),
                    0 0 10px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8),
                    0 0 30px rgba(102, 126, 234, 0.6),
                    0 0 40px rgba(102, 126, 234, 0.4);
    }
}

@keyframes glow-strong {
    0%, 100% {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.8),
                    0 0 20px rgba(102, 126, 234, 0.6),
                    0 0 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 1),
                    0 0 50px rgba(102, 126, 234, 0.8),
                    0 0 70px rgba(102, 126, 234, 0.6),
                    0 0 100px rgba(102, 126, 234, 0.4);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.8));
    }
    50% {
        opacity: 0.8;
        filter: drop-shadow(0 0 20px rgba(102, 126, 234, 1));
    }
}

/* ============================================
   TWINKLE & STAR ANIMATIONS
   ============================================ */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

@keyframes twinkle-fast {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes twinkle-slow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes shooting-star {
    from {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 1;
    }
    to {
        transform: translateX(2000px) translateY(1000px) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes shooting-star-fast {
    from {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 1;
    }
    to {
        transform: translateX(3000px) translateY(1500px) rotate(-45deg);
        opacity: 0;
    }
}

/* ============================================
   WAVE & RIPPLE ANIMATIONS
   ============================================ */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes wave-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes ripple-strong {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(2);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   SHAKE & VIBRATE ANIMATIONS
   ============================================ */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes shake-strong {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-15px) rotate(-5deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(15px) rotate(5deg);
    }
}

@keyframes vibrate {
    0%, 100% {
        transform: translate(0);
    }
    10% {
        transform: translate(-2px, -2px);
    }
    20% {
        transform: translate(2px, 2px);
    }
    30% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(2px, -2px);
    }
    50% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    70% {
        transform: translate(-2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    90% {
        transform: translate(-2px, -2px);
    }
}

/* ============================================
   BOUNCE ANIMATIONS
   ============================================ */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

@keyframes bounce-strong {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-20px) scale(1.1);
    }
    50% {
        transform: translateY(-40px) scale(1.2);
    }
    75% {
        transform: translateY(-20px) scale(1.1);
    }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.9) translateY(-10px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

/* ============================================
   FLIP ANIMATIONS
   ============================================ */
@keyframes flip {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(180deg);
    }
}

@keyframes flip-horizontal {
    from {
        transform: rotateX(0deg);
    }
    to {
        transform: rotateX(180deg);
    }
}

@keyframes flip-3d {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(90deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(0deg);
    }
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradient-fast {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes shimmer-fast {
    0% {
        background-position: -300% 0;
    }
    100% {
        background-position: 300% 0;
    }
}

/* ============================================
   ELASTIC ANIMATIONS
   ============================================ */
@keyframes elastic {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    75% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes elastic-strong {
    0% {
        transform: scale(0) rotate(0deg);
    }
    25% {
        transform: scale(1.3) rotate(90deg);
    }
    50% {
        transform: scale(0.8) rotate(180deg);
    }
    75% {
        transform: scale(1.1) rotate(270deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

/* ============================================
   ROTATE & SCALE COMBINED
   ============================================ */
@keyframes rotate-scale {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes rotate-scale-in {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 4s ease-in-out infinite;
}

.animate-float-fast {
    animation: float-fast 2s ease-in-out infinite;
}

.animate-drift {
    animation: drift 20s ease-in-out infinite;
}

.animate-orbit {
    animation: orbit 20s linear infinite;
}

.animate-orbit-reverse {
    animation: orbit-reverse 20s linear infinite;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-slide-in-down {
    animation: slideInDown 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.5s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-scale-in-bounce {
    animation: scaleInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-zoom-in {
    animation: zoomIn 0.3s ease-out;
}

.animate-zoom-out {
    animation: zoomOut 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-strong {
    animation: pulse-strong 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-glow-strong {
    animation: glow-strong 2s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-twinkle {
    animation: twinkle 3s ease-in-out infinite;
}

.animate-twinkle-fast {
    animation: twinkle-fast 2s ease-in-out infinite;
}

.animate-twinkle-slow {
    animation: twinkle-slow 4s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

.animate-rotate-reverse {
    animation: rotate-reverse 2s linear infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-rotate-3d {
    animation: rotate-3d 10s linear infinite;
}

.animate-wave {
    animation: wave 2s ease-in-out infinite;
}

.animate-wave-slow {
    animation: wave-slow 3s ease-in-out infinite;
}

.animate-ripple {
    animation: ripple 0.6s ease-out;
}

.animate-ripple-strong {
    animation: ripple-strong 1s ease-out;
}

.animate-shake {
    animation: shake 0.5s;
}

.animate-shake-strong {
    animation: shake-strong 0.5s;
}

.animate-vibrate {
    animation: vibrate 0.5s;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-bounce-strong {
    animation: bounce-strong 1s ease-in-out infinite;
}

.animate-bounce-in {
    animation: bounce-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-flip {
    animation: flip 0.6s ease-in-out;
}

.animate-flip-horizontal {
    animation: flip-horizontal 0.6s ease-in-out;
}

.animate-flip-3d {
    animation: flip-3d 2s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

.animate-gradient-fast {
    background-size: 200% 200%;
    animation: gradient-fast 2s ease infinite;
}

.animate-shimmer {
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.animate-shimmer-fast {
    background-size: 200% 100%;
    animation: shimmer-fast 2s linear infinite;
}

.animate-elastic {
    animation: elastic 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-elastic-strong {
    animation: elastic-strong 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-rotate-scale {
    animation: rotate-scale 3s ease-in-out infinite;
}

.animate-rotate-scale-in {
    animation: rotate-scale-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(102, 126, 234, 0.5);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8),
                0 0 50px rgba(102, 126, 234, 0.6);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.1);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(10deg) scale(1.05);
}

.hover-pulse {
    transition: transform 0.3s ease;
}

.hover-pulse:hover {
    animation: pulse 1s ease-in-out infinite;
}

/* ============================================
   STAGGER ANIMATION DELAYS
   ============================================ */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }
.stagger-9 { animation-delay: 0.9s; }
.stagger-10 { animation-delay: 1s; }

/* ============================================
   LOADING ANIMATIONS
   ============================================ */
.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--space-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* ============================================
   PROGRESS BAR ANIMATIONS
   ============================================ */
@keyframes progress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.progress-animated {
    animation: progress 2s ease-out;
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   END OF ANIMATIONS.CSS
   ============================================ */
