/* ============================================
   INFINITY OS - MOTION & ANIMATIONS
   Smooth Transitions & Effects
   ============================================ */

/* ============================================
   FADE ANIMATIONS
   ============================================ */

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

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

.fade-in {
    animation: fadeIn var(--transition-base);
}

.fade-out {
    animation: fadeOut var(--transition-base);
}

/* ============================================
   SLIDE ANIMATIONS
   ============================================ */

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

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

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft var(--transition-base);
}

.slide-in-right {
    animation: slideInRight var(--transition-base);
}

.slide-in-up {
    animation: slideInUp var(--transition-base);
}

/* ============================================
   SCALE ANIMATIONS
   ============================================ */

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

.scale-in {
    animation: scaleIn var(--transition-base);
}

/* ============================================
   GLOW PULSE ANIMATIONS
   ============================================ */

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 240, 255, 0.6);
    }
}

@keyframes glowPulseMagenta {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 170, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 0, 170, 0.6);
    }
}

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

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

/* ============================================
   SHIMMER EFFECT
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   SKELETON LOADING
   ============================================ */

.skeleton {
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-sm);
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--space-md);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

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

.hover-lift {
    transition: transform var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--glow-cyan);
}

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */

.stagger-item {
    opacity: 0;
    animation: slideInUp var(--transition-base) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   SPINNER ANIMATION
   ============================================ */

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-ring {
    position: relative;
    width: 40px;
    height: 40px;
}

.spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
}

.spinner-circle:nth-child(1) {
    border-top-color: var(--neon-cyan);
    animation: spin 1s linear infinite;
}

.spinner-circle:nth-child(2) {
    border-right-color: var(--neon-magenta);
    animation: spin 1.5s linear infinite;
}

.spinner-circle:nth-child(3) {
    border-bottom-color: var(--neon-green);
    animation: spin 2s linear infinite;
}

/* ============================================
   REDUCE MOTION (Accessibility)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
