/* ===========================================
   AdGen AI - Animations & Transitions
   =========================================== */

/* ========== Advanced Animations ========== */
@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);
    }
}

/* Stagger animation utilities */
[data-aos] {
    transition-duration: 0.6s;
}

[data-aos='fade-up'] {
    animation: fadeInUp 0.8s ease-out;
}

[data-aos='fade-down'] {
    animation: fadeInDown 0.8s ease-out;
}

[data-aos='fade-left'] {
    animation: fadeInLeft 0.8s ease-out;
}

[data-aos='fade-right'] {
    animation: fadeInRight 0.8s ease-out;
}

[data-aos='scale-in'] {
    animation: scaleIn 0.8s ease-out;
}

/* ========== Loading States ========== */
.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: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========== Hover Effects ========== */
.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

/* ========== Smooth Page Transitions ========== */
.page-transition {
    animation: pageLoad 0.6s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Reveal Animations ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Gradient Animation ========== */
.gradient-animated {
    background: linear-gradient(270deg, #667eea, #764ba2, #667eea);
    background-size: 600% 600%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ========== Text Animations ========== */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    animation: textSlideUp 0.6s ease-out;
}

@keyframes textSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========== Ripple Effect ========== */
.ripple {
    position: relative;
    overflow: hidden;
}

.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;
}

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

/* ========== Parallax Layers ========== */
.parallax {
    will-change: transform;
}