/* ================================================
   WAR NODES - Animations
   Advanced Animation Library
   ================================================ */

/* === Fade Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === Scale Animations === */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleDown {
    from {
        opacity: 0;
        transform: scale(1.1);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === Rotation Animations === */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }

    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* === Glow Animations === */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(108, 92, 231, 0.2),
            0 0 10px rgba(108, 92, 231, 0.2),
            0 0 15px rgba(108, 92, 231, 0.2);
    }

    50% {
        box-shadow: 0 0 10px rgba(108, 92, 231, 0.4),
            0 0 20px rgba(108, 92, 231, 0.4),
            0 0 30px rgba(108, 92, 231, 0.4);
    }
}

@keyframes glowPulseCyan {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 209, 255, 0.2),
            0 0 10px rgba(0, 209, 255, 0.2),
            0 0 15px rgba(0, 209, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 10px rgba(0, 209, 255, 0.4),
            0 0 20px rgba(0, 209, 255, 0.4),
            0 0 30px rgba(0, 209, 255, 0.4);
    }
}

@keyframes glowPulseGreen {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(46, 229, 157, 0.2),
            0 0 10px rgba(46, 229, 157, 0.2),
            0 0 15px rgba(46, 229, 157, 0.2);
    }

    50% {
        box-shadow: 0 0 10px rgba(46, 229, 157, 0.4),
            0 0 20px rgba(46, 229, 157, 0.4),
            0 0 30px rgba(46, 229, 157, 0.4);
    }
}

/* === Background Animations === */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* === Float Animation === */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* === Bounce Animations === */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* === 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(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === Wiggle & Shake === */
@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-3deg);
    }

    75% {
        transform: rotate(3deg);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* === Ripple Effect === */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* === Progress Animations === */
@keyframes progressBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

@keyframes loadingDots {

    0%,
    20% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* === Particle Animations === */
@keyframes particle {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* === Typing Effect === */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* === Utility Animation Classes === */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-down {
    animation: fadeDown 0.6s ease-out forwards;
}

.animate-fade-left {
    animation: fadeLeft 0.6s ease-out forwards;
}

.animate-fade-right {
    animation: fadeRight 0.6s ease-out forwards;
}

.animate-scale-up {
    animation: scaleUp 0.6s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

/* === AOS (Animate On Scroll) Alternatives === */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"].aos-animate {
    animation: fadeUp 0.6s ease-out forwards;
}

[data-aos="fade-down"].aos-animate {
    animation: fadeDown 0.6s ease-out forwards;
}

[data-aos="fade-left"].aos-animate {
    animation: fadeLeft 0.6s ease-out forwards;
}

[data-aos="fade-right"].aos-animate {
    animation: fadeRight 0.6s ease-out forwards;
}

[data-aos="zoom-in"].aos-animate {
    animation: scaleUp 0.6s ease-out forwards;
}

[data-aos="zoom-out"].aos-animate {
    animation: scaleDown 0.6s ease-out forwards;
}

/* === Loading Spinner === */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(108, 92, 231, 0.1);
    border-top-color: var(--color-accent-purple);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.spinner-cyan {
    border-top-color: var(--color-accent-cyan);
}

.spinner-green {
    border-top-color: var(--color-accent-green);
}

/* === Pulsating Dot === */
.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-accent-green);
    animation: pulse 2s ease-in-out infinite;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    animation: ripple 2s ease-out infinite;
}

/* === Gradient Animation === */
.gradient-animated {
    background: linear-gradient(270deg,
            var(--color-accent-purple),
            var(--color-accent-cyan),
            var(--color-accent-green));
    background-size: 600% 600%;
    animation: gradientShift 3s ease infinite;
}

/* === Shimmer Effect === */
.shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* === Card Hover Effects === */
.card-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.3);
}

.card-hover-glow {
    transition: all 0.3s ease;
}

.card-hover-glow:hover {
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.5),
        0 0 40px rgba(108, 92, 231, 0.3),
        0 0 60px rgba(108, 92, 231, 0.1);
}

/* === Text Animations === */
.text-glow {
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.5),
        0 0 20px rgba(108, 92, 231, 0.3),
        0 0 30px rgba(108, 92, 231, 0.1);
    animation: glowPulse 2s ease-in-out infinite;
}

.text-gradient-animated {
    background: linear-gradient(270deg,
            var(--color-accent-purple),
            var(--color-accent-cyan),
            var(--color-accent-green),
            var(--color-accent-purple));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* === Button Ripple Effect === */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* === Skeleton Loading === */
@keyframes skeleton {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

/* === Parallax Layers === */
.parallax-layer {
    transition: transform 0.3s ease-out;
}

/* === Notification Animations === */
@keyframes slideInNotification {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutNotification {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-enter {
    animation: slideInNotification 0.3s ease-out forwards;
}

.notification-exit {
    animation: slideOutNotification 0.3s ease-out forwards;
}

/* === Number Counter Animation === */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: countUp 0.6s ease-out forwards;
}

/* === Interactive Hover States === */
.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-shrink {
    transition: transform 0.3s ease;
}

.hover-shrink:hover {
    transform: scale(0.95);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* === Loading Bar === */
@keyframes loadingBar {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.loading-bar {
    position: relative;
    overflow: hidden;
    background: rgba(108, 92, 231, 0.1);
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            var(--color-accent-purple),
            transparent);
    animation: loadingBar 1.5s infinite;
}

/* === Stagger Animation Delays === */
[data-aos-delay="100"] {
    animation-delay: 0.1s;
}

[data-aos-delay="200"] {
    animation-delay: 0.2s;
}

[data-aos-delay="300"] {
    animation-delay: 0.3s;
}

[data-aos-delay="400"] {
    animation-delay: 0.4s;
}

[data-aos-delay="500"] {
    animation-delay: 0.5s;
}

/* === Smooth Page Animations === */
.plan-card,
.vps-plan-card,
.feature-card,
.lang-item,
.banner-feature {
    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

/* Smooth image hover - subtle scale only */
.mob-image,
.ore-icon img,
.rank-icon img {
    transition: transform 0.3s ease;
}

/* Button hover - clean and simple */
.deploy-btn,
.plan-cta,
.btn-primary,
.btn-secondary {
    transition: all 0.25s ease;
}

/* === Skeleton Loading === */
.skeleton-wrap {
    position: relative;
    min-height: 280px;
}
.skeleton-wrap.loaded .skeleton-grid { display: none !important; }
.skeleton-wrap.loaded .plans-content { opacity: 1; position: relative; }
.skeleton-wrap:not(.loaded) .plans-content { opacity: 0; pointer-events: none; position: absolute; left: 0; right: 0; top: 0; }
.skeleton-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.skeleton-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}
.skeleton-line.wide { width: 80%; }
.skeleton-line.short { width: 40%; height: 24px; }
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === Accessibility: Respect Reduced Motion === */
@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;
    }
}