/* ============================================
   Lumixsa AI - Animations Stylesheet
   ============================================ */

/* Keyframes */
@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);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5),
                    0 0 10px rgba(99, 102, 241, 0.3),
                    0 0 15px rgba(99, 102, 241, 0.1);
    }
    50% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.8),
                    0 0 20px rgba(99, 102, 241, 0.5),
                    0 0 30px rgba(99, 102, 241, 0.3);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-5px);
    }
    75% {
        transform: translateY(5px);
    }
}

/* Animation Classes */
.animate {
    opacity: 0;
}

.animate.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate.fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

.animate.fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

.animate.fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

.animate.scale-in {
    animation: scaleIn 0.6s ease forwards;
}

.animate.delay-1 { animation-delay: 0.1s; }
.animate.delay-2 { animation-delay: 0.2s; }
.animate.delay-3 { animation-delay: 0.3s; }
.animate.delay-4 { animation-delay: 0.4s; }
.animate.delay-5 { animation-delay: 0.5s; }
.animate.delay-6 { animation-delay: 0.6s; }

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.active > *:nth-child(1) { animation: fadeInUp 0.5s ease 0.1s forwards; }
.stagger-children.active > *:nth-child(2) { animation: fadeInUp 0.5s ease 0.2s forwards; }
.stagger-children.active > *:nth-child(3) { animation: fadeInUp 0.5s ease 0.3s forwards; }
.stagger-children.active > *:nth-child(4) { animation: fadeInUp 0.5s ease 0.4s forwards; }
.stagger-children.active > *:nth-child(5) { animation: fadeInUp 0.5s ease 0.5s forwards; }
.stagger-children.active > *:nth-child(6) { animation: fadeInUp 0.5s ease 0.6s forwards; }
.stagger-children.active > *:nth-child(7) { animation: fadeInUp 0.5s ease 0.7s forwards; }
.stagger-children.active > *:nth-child(8) { animation: fadeInUp 0.5s ease 0.8s forwards; }
.stagger-children.active > *:nth-child(9) { animation: fadeInUp 0.5s ease 0.9s forwards; }
.stagger-children.active > *:nth-child(10) { animation: fadeInUp 0.5s ease 1s forwards; }

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform var(--transition-base);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Link hover effect */
.link-hover {
    position: relative;
}

.link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.link-hover:hover::after {
    width: 100%;
}

/* Button hover animations */
.btn-animated {
    position: relative;
    overflow: hidden;
}

.btn-animated::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 ease, height 0.6s ease;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

/* Card hover effects */
.card-hover {
    transition: all var(--transition-base);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-hover:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-icon {
    transition: transform var(--transition-base);
}

/* Image hover effects */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform var(--transition-slow);
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface) 25%,
        var(--surface-light) 50%,
        var(--surface) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* Pulse animation for live indicators */
.pulse-live {
    animation: pulse 2s ease-in-out infinite;
}

/* Floating animation */
.floating {
    animation: float 3s ease-in-out infinite;
}

/* Gradient text animation */
.gradient-text-animated {
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary),
        var(--accent),
        var(--primary)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

/* Glow effect */
.glow-effect {
    animation: glow 2s ease-in-out infinite;
}

/* Typing effect */
.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary);
    animation: 
        typing 3s steps(40, end),
        blink 0.75s step-end infinite;
}

/* Wave animation for multiple elements */
.wave-container > *:nth-child(1) { animation: wave 1s ease-in-out infinite 0s; }
.wave-container > *:nth-child(2) { animation: wave 1s ease-in-out infinite 0.1s; }
.wave-container > *:nth-child(3) { animation: wave 1s ease-in-out infinite 0.2s; }
.wave-container > *:nth-child(4) { animation: wave 1s ease-in-out infinite 0.3s; }
.wave-container > *:nth-child(5) { animation: wave 1s ease-in-out infinite 0.4s; }

/* Hero background animation */
.hero-animated-bg {
    position: relative;
    overflow: hidden;
}

.hero-animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(99, 102, 241, 0.1) 0%,
        transparent 50%
    );
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Particle effect placeholder */
.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: float-particle 10s infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Smooth scroll indicator */
.scroll-indicator {
    animation: bounce 2s infinite;
}

/* Page transition */
.page-transition {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* Modal animation */
.modal-enter {
    animation: fadeIn 0.3s ease forwards;
}

.modal-content-enter {
    animation: scaleIn 0.3s ease forwards;
}

/* Toast notification */
.toast-enter {
    animation: slideInUp 0.3s ease forwards;
}

.toast-exit {
    animation: fadeInDown 0.3s ease forwards reverse;
}

/* Progress bar animation */
.progress-animate {
    transition: width 1s ease;
}

/* Counter animation */
.counter {
    font-variant-numeric: tabular-nums;
}
