/* ==========================================
   FATUOR NETWORK - ANIMATIONS.CSS
   Animaciones cinematográficas y efectos visuales
   ========================================== */

/* ==========================================
   1. KEYFRAME ANIMATIONS
   ========================================== */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(34, 211, 238, 0.6);
    }
}

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

@keyframes rotateReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

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

/* Glow Animations */
@keyframes glowCyan {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(34, 211, 238, 0.9));
    }
}

@keyframes glowPurple {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(124, 58, 237, 0.9));
    }
}

@keyframes glowCherry {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(190, 18, 60, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(190, 18, 60, 0.9));
    }
}

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

/* 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;
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

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

/* Wave Animation */
@keyframes wave {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(0) translateX(10px);
    }
    75% {
        transform: translateY(10px) translateX(5px);
    }
}

/* Particle Float */
@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Scanline Animation */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

/* Flicker Animation */
@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Blink Animation */
@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.3;
    }
}

/* ==========================================
   2. HOVER ANIMATIONS
   ========================================== */

.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(34, 211, 238, 0.3);
}

.hover-glow {
    transition: filter 0.3s ease;
}

.hover-glow:hover {
    animation: glowCyan 1.5s ease-in-out infinite;
}

.hover-rotate {
    transition: transform 0.5s ease;
}

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

/* ==========================================
   3. LOADING ANIMATIONS
   ========================================== */

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(34, 211, 238, 0.2);
    border-top-color: #22D3EE;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #22D3EE;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

/* ==========================================
   4. TEXT ANIMATIONS
   ========================================== */

.text-gradient-animate {
    background: linear-gradient(90deg, #7C3AED, #22D3EE, #BE123C, #7C3AED);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

.text-flicker {
    animation: flicker 2s ease-in-out infinite;
}

/* ==========================================
   5. PARTICLE EFFECTS
   ========================================== */

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #22D3EE;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 8s linear infinite;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
}

.particle:nth-child(2n) {
    background: #7C3AED;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.8);
    animation-duration: 10s;
    animation-delay: 1s;
}

.particle:nth-child(3n) {
    background: #BE123C;
    box-shadow: 0 0 10px rgba(190, 18, 60, 0.8);
    animation-duration: 12s;
    animation-delay: 2s;
}

/* ==========================================
   6. CINEMATIC EFFECTS
   ========================================== */

.cinematic-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    opacity: 0.3;
}

.cinematic-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    pointer-events: none;
}

.cinematic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

/* ==========================================
   7. ENTRANCE ANIMATIONS (for AOS)
   ========================================== */

[data-aos="fade-up"] {
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

[data-aos="fade-down"] {
    transform: translateY(-30px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translateX(-30px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translateX(30px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
    opacity: 1;
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/* ==========================================
   8. BUTTON RIPPLE EFFECT
   ========================================== */

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ==========================================
   9. PROGRESS ANIMATIONS
   ========================================== */

@keyframes progressBar {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #7C3AED, #22D3EE);
    animation: progressBar 2s ease-out;
}

/* ==========================================
   10. REVEAL ANIMATIONS
   ========================================== */

@keyframes revealLeft {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes revealRight {
    from {
        clip-path: inset(0 0 0 100%);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes revealTop {
    from {
        clip-path: inset(0 0 100% 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes revealBottom {
    from {
        clip-path: inset(100% 0 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.reveal-left {
    animation: revealLeft 1s ease-out;
}

.reveal-right {
    animation: revealRight 1s ease-out;
}

.reveal-top {
    animation: revealTop 1s ease-out;
}

.reveal-bottom {
    animation: revealBottom 1s ease-out;
}

/* ==========================================
   11. UTILITY ANIMATION CLASSES
   ========================================== */

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

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

.animate-rotate {
    animation: rotate 20s linear infinite;
}

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

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

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

/* ==========================================
   12. DELAY CLASSES
   ========================================== */

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

/* ==========================================
   13. PERFORMANCE OPTIMIZATION
   ========================================== */

/* Enable hardware acceleration for smooth animations */
.hardware-accelerated {
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}