@charset "utf-8";

/* ========================================
   Nexus Layout - Animations
   ======================================== */

/* ----------------------------------------
   Keyframe Animations
   ---------------------------------------- */

/* Fade In */
@keyframes nxFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Fade In with slide from directions */
@keyframes nxFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes nxFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes nxFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes nxFadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes nxScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce */
@keyframes nxBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Pulse */
@keyframes nxPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Glow Pulse */
@keyframes nxGlowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
    }
}

/* Float */
@keyframes nxFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Spin */
@keyframes nxSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Shimmer - Loading effect */
@keyframes nxShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Gradient Flow */
@keyframes nxGradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Wave */
@keyframes nxWave {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(2deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(5px) rotate(-2deg);
    }
}

/* Typing Cursor */
@keyframes nxTypingCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Neural Network Connection Line */
@keyframes nxConnectionPulse {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

/* Particle Float */
@keyframes nxParticleFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    25% {
        transform: translate(10px, -20px) scale(1.1);
        opacity: 1;
    }

    50% {
        transform: translate(20px, 0) scale(1);
        opacity: 0.6;
    }

    75% {
        transform: translate(10px, 20px) scale(0.9);
        opacity: 0.8;
    }
}

/* ----------------------------------------
   Animation Utility Classes
   ---------------------------------------- */

/* Base Animation Class */
[class*="nx-anim-"] {
    animation-fill-mode: both;
}

/* Fade Animations */
.nx-anim-fade-in {
    animation: nxFadeIn 0.6s ease forwards;
}

.nx-anim-fade-in-up {
    animation: nxFadeInUp 0.6s ease forwards;
}

.nx-anim-fade-in-down {
    animation: nxFadeInDown 0.6s ease forwards;
}

.nx-anim-fade-in-left {
    animation: nxFadeInLeft 0.6s ease forwards;
}

.nx-anim-fade-in-right {
    animation: nxFadeInRight 0.6s ease forwards;
}

/* Scale Animation */
.nx-anim-scale-in {
    animation: nxScaleIn 0.5s ease forwards;
}

/* Continuous Animations */
.nx-anim-bounce {
    animation: nxBounce 2s ease-in-out infinite;
}

.nx-anim-pulse {
    animation: nxPulse 2s ease-in-out infinite;
}

.nx-anim-glow-pulse {
    animation: nxGlowPulse 2s ease-in-out infinite;
}

.nx-anim-float {
    animation: nxFloat 4s ease-in-out infinite;
}

.nx-anim-spin {
    animation: nxSpin 1s linear infinite;
}

.nx-anim-wave {
    animation: nxWave 3s ease-in-out infinite;
}

/* Gradient Flow Animation */
.nx-anim-gradient-flow {
    background-size: 200% 200%;
    animation: nxGradientFlow 4s ease infinite;
}

/* ----------------------------------------
   Animation Delays
   ---------------------------------------- */
.nx-anim-delay-100 {
    animation-delay: 100ms;
}

.nx-anim-delay-200 {
    animation-delay: 200ms;
}

.nx-anim-delay-300 {
    animation-delay: 300ms;
}

.nx-anim-delay-400 {
    animation-delay: 400ms;
}

.nx-anim-delay-500 {
    animation-delay: 500ms;
}

.nx-anim-delay-600 {
    animation-delay: 600ms;
}

.nx-anim-delay-700 {
    animation-delay: 700ms;
}

.nx-anim-delay-800 {
    animation-delay: 800ms;
}

.nx-anim-delay-900 {
    animation-delay: 900ms;
}

.nx-anim-delay-1000 {
    animation-delay: 1000ms;
}

/* ----------------------------------------
   Animation Durations
   ---------------------------------------- */
.nx-anim-duration-fast {
    animation-duration: 0.3s;
}

.nx-anim-duration-normal {
    animation-duration: 0.6s;
}

.nx-anim-duration-slow {
    animation-duration: 1s;
}

.nx-anim-duration-slower {
    animation-duration: 1.5s;
}

/* ----------------------------------------
   Hover Effects
   ---------------------------------------- */

/* Lift Effect */
.nx-hover-lift {
    transition: transform var(--nx-transition-base), box-shadow var(--nx-transition-base);
}

.nx-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--nx-shadow-lg);
}

/* Scale Effect */
.nx-hover-scale {
    transition: transform var(--nx-transition-base);
}

.nx-hover-scale:hover {
    transform: scale(1.05);
}

/* Glow Effect */
.nx-hover-glow {
    transition: box-shadow var(--nx-transition-base);
}

.nx-hover-glow:hover {
    box-shadow: var(--nx-shadow-glow);
}

/* Shine Effect (requires ::before pseudo-element) */
.nx-hover-shine {
    position: relative;
    overflow: hidden;
}

.nx-hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.6s ease;
}

.nx-hover-shine:hover::before {
    left: 100%;
}

/* Border Glow Effect */
.nx-hover-border-glow {
    position: relative;
}

.nx-hover-border-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--nx-gradient-primary);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity var(--nx-transition-base);
}

.nx-hover-border-glow:hover::after {
    opacity: 1;
}

/* ----------------------------------------
   Loading Skeleton
   ---------------------------------------- */
.nx-skeleton {
    position: relative;
    background: var(--nx-bg-tertiary);
    overflow: hidden;
    border-radius: var(--nx-radius-md);
}

.nx-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    background-size: 200% 100%;
    animation: nxShimmer 1.5s infinite;
}

.nx-skeleton--text {
    height: 1em;
    margin-bottom: 0.5em;
}

.nx-skeleton--title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 0.75em;
}

.nx-skeleton--avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--nx-radius-full);
}

.nx-skeleton--image {
    aspect-ratio: 16/9;
}

.nx-skeleton--button {
    height: 40px;
    width: 120px;
}

/* ----------------------------------------
   Scroll-triggered Animations (JS required)
   ---------------------------------------- */
.nx-scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.nx-scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.nx-scroll-reveal--left {
    transform: translateX(-30px);
}

.nx-scroll-reveal--left.is-visible {
    transform: translateX(0);
}

.nx-scroll-reveal--right {
    transform: translateX(30px);
}

.nx-scroll-reveal--right.is-visible {
    transform: translateX(0);
}

.nx-scroll-reveal--scale {
    transform: scale(0.9);
}

.nx-scroll-reveal--scale.is-visible {
    transform: scale(1);
}

/* ----------------------------------------
   AI Effect Animations
   ---------------------------------------- */

/* Neural Dot Pattern */
.nx-neural-dots {
    position: relative;
}

.nx-neural-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--nx-accent-1);
    border-radius: var(--nx-radius-full);
    animation: nxParticleFloat 6s ease-in-out infinite;
}

.nx-neural-dot:nth-child(1) {
    animation-delay: 0s;
}

.nx-neural-dot:nth-child(2) {
    animation-delay: 0.5s;
}

.nx-neural-dot:nth-child(3) {
    animation-delay: 1s;
}

.nx-neural-dot:nth-child(4) {
    animation-delay: 1.5s;
}

.nx-neural-dot:nth-child(5) {
    animation-delay: 2s;
}

/* Typing Effect */
.nx-typing {
    display: inline-block;
}

.nx-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--nx-accent-1);
    margin-left: 2px;
    animation: nxTypingCursor 1s step-end infinite;
}

/* Data Flow Line */
.nx-data-flow {
    position: relative;
    overflow: hidden;
}

.nx-data-flow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--nx-accent-1), transparent);
    animation: nxShimmer 2s linear infinite;
}

/* ----------------------------------------
   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;
    }

    .nx-scroll-reveal {
        opacity: 1;
        transform: none;
    }
}