/* =========================================
   ANIMATIONS CSS
   NeoAI Editor Theme - Version 2.0
   ========================================= */

/* =========================
   FLOATING ANIMATIONS
   ========================= */

@keyframes floatY {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

@keyframes floatX {
    0% { transform: translateX(0); }
    50% { transform: translateX(12px); }
    100% { transform: translateX(0); }
}

@keyframes floatRotate {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* =========================
   GLOW EFFECTS
   ========================= */

@keyframes glowPulse {
    0% { box-shadow: 0 0 0 rgba(124, 58, 237, 0); }
    50% { box-shadow: 0 0 40px rgba(124, 58, 237, 0.6); }
    100% { box-shadow: 0 0 0 rgba(124, 58, 237, 0); }
}

@keyframes neonGlow {
    0% { filter: drop-shadow(0 0 5px #7C3AED); }
    50% { filter: drop-shadow(0 0 20px #00D4FF); }
    100% { filter: drop-shadow(0 0 5px #7C3AED); }
}

@keyframes borderGlow {
    0% { border-color: rgba(124, 58, 237, 0.2); }
    50% { border-color: rgba(0, 212, 255, 0.8); }
    100% { border-color: rgba(124, 58, 237, 0.2); }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(124, 58, 237, 0.4); }
    50% { text-shadow: 0 0 25px rgba(0, 212, 255, 0.8); }
    100% { text-shadow: 0 0 5px rgba(124, 58, 237, 0.4); }
}

/* =========================
   GRADIENT MOTION
   ========================= */

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================
   FADE ANIMATIONS
   ========================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================
   SCALE ANIMATIONS
   ========================= */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.7);
    }
}

@keyframes pulseScale {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* =========================
   ROTATION ANIMATIONS
   ========================= */

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================
   BLUR ANIMATIONS
   ========================= */

@keyframes blurReveal {
    from {
        opacity: 0;
        filter: blur(20px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* =========================
   SHIMMER EFFECT
   ========================= */

@keyframes shimmer {
    0% { background-position: -500px 0; }
    100% { background-position: 500px 0; }
}

/* =========================
   WAVE MOTION
   ========================= */

@keyframes waveMotion {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(20px) translateY(-10px); }
    100% { transform: translateX(0) translateY(0); }
}

/* =========================
   PARTICLE FLOAT
   ========================= */

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-25px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
}

/* =========================
   BUTTON LIGHT SWEEP
   ========================= */

@keyframes lightSweep {
    0% { left: -100%; }
    100% { left: 120%; }
}

/* =========================
   LOADER ANIMATION
   ========================= */

@keyframes loaderBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* =========================
   SCROLL LINE
   ========================= */

@keyframes scrollLine {
    0% { height: 0; }
    100% { height: 100%; }
}

/* =========================
   MARQUEE / TRACK
   ========================= */

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================
   GLASS SHINE
   ========================= */

@keyframes glassShine {
    0% { transform: translateX(-150%) skewX(-25deg); }
    100% { transform: translateX(250%) skewX(-25deg); }
}

/* =========================
   UTILITY CLASSES - ACTIVE ANIMATIONS
   ========================= */

/* Floating */
.animate-float-y {
    animation: floatY 5s ease-in-out infinite;
}

.animate-float-x {
    animation: floatX 6s ease-in-out infinite;
}

.animate-float-rotate {
    animation: floatRotate 4s ease-in-out infinite;
}

/* Glow */
.animate-glow {
    animation: glowPulse 3s infinite;
}

.animate-neon-glow {
    animation: neonGlow 3s infinite;
}

.animate-border-glow {
    animation: borderGlow 4s infinite;
}

.animate-text-glow {
    animation: textGlow 3s infinite;
}

/* Gradient */
.animate-gradient {
    background-size: 300% 300%;
    animation: gradientMove 8s ease infinite;
}

/* Fade */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-up {
    animation: fadeUp 0.8s ease forwards;
}

.animate-fade-down {
    animation: fadeDown 0.8s ease forwards;
}

.animate-fade-left {
    animation: fadeLeft 0.8s ease forwards;
}

.animate-fade-right {
    animation: fadeRight 0.8s ease forwards;
}

/* Scale */
.animate-scale-in {
    animation: scaleIn 0.8s ease forwards;
}

.animate-pulse {
    animation: pulseScale 2s ease-in-out infinite;
}

/* Rotation */
.animate-rotate {
    animation: rotate360 15s linear infinite;
}

.animate-rotate-slow {
    animation: rotateSlow 30s linear infinite;
}

/* Blur */
.animate-blur-reveal {
    animation: blurReveal 1s ease forwards;
}

/* Shimmer */
.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 500px 100%;
    animation: shimmer 3s infinite;
}

/* Wave */
.animate-wave {
    animation: waveMotion 4s ease-in-out infinite;
}

/* Particle */
.animate-particle {
    animation: particleFloat 3s ease-in-out infinite;
}

/* Marquee */
.animate-marquee {
    animation: marquee 20s linear infinite;
}

/* Delay Classes */
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.75s; }

/* Duration Classes */
.duration-fast { animation-duration: 0.4s; }
.duration-normal { animation-duration: 0.8s; }
.duration-slow { animation-duration: 1.2s; }

/* Fill Mode */
.fill-forward { animation-fill-mode: forwards; }
.fill-backwards { animation-fill-mode: backwards; }

/* Iteration Count */
.infinite { animation-iteration-count: infinite; }
.once { animation-iteration-count: 1; }

/* =========================
   HOVER EFFECTS
   ========================= */

.hover-lift {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-glow {
    transition: all 0.35s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.45);
}

.hover-scale {
    transition: all 0.35s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: all 0.35s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-bright {
    transition: all 0.35s ease;
}

.hover-bright:hover {
    filter: brightness(1.2);
}

/* =========================
   BUTTON SHINE EFFECT
   ========================= */

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    transform: skewX(-25deg);
    animation: lightSweep 4s infinite;
}

/* =========================
   PRELOADER
   ========================= */

#neoai-preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #070B14;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#neoai-preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.neoai-loader {
    display: flex;
    gap: 10px;
}

.neoai-loader span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED, #00D4FF);
    animation: loaderBounce 1.4s infinite ease-in-out both;
}

.neoai-loader span:nth-child(1) { animation-delay: -0.32s; }
.neoai-loader span:nth-child(2) { animation-delay: -0.16s; }
.neoai-loader span:nth-child(3) { animation-delay: 0s; }

/* =========================
   SCROLL REVEAL (AOS Alternative)
   ========================= */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* =========================
   SCROLL TRIGGER CLASSES
   ========================= */

.scroll-trigger {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-trigger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   SMOOTH SCROLL BEHAVIOR
   ========================= */

html {
    scroll-behavior: smooth;
}

/* =========================
   REDUCED MOTION PREFERENCE
   ========================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-float-y,
    .animate-float-x,
    .animate-float-rotate,
    .animate-glow,
    .animate-neon-glow,
    .animate-border-glow,
    .animate-text-glow,
    .animate-pulse,
    .animate-rotate,
    .animate-wave,
    .animate-particle,
    .animate-marquee {
        animation: none !important;
    }
}