/* Animations CSS for Lunar Vibes */

/* Background Animation */
@keyframes move-twink-back {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -10000px 5000px;
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.3s;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
}

/* Pulse Animation for Buttons */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(106, 13, 173, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(106, 13, 173, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(106, 13, 173, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Float Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float {
    animation: float 4s ease-in-out infinite;
}

/* Quote Transition */
@keyframes quoteChange {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    20% {
        opacity: 0;
        transform: translateY(-20px);
    }
    80% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.quote-change {
    animation: quoteChange 1.5s ease-in-out;
}

/* Glow Effect */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(177, 156, 217, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(177, 156, 217, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(177, 156, 217, 0.5);
    }
}

.glow {
    animation: glow 3s infinite;
}

/* Scroll-triggered animations */
.reveal {
    position: relative;
    opacity: 0;
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
}

.active.fade-bottom {
    animation: fadeInUp 1s ease-in-out;
}

.active.fade-left {
    animation: fadeInLeft 1s ease-in-out;
}

.active.fade-right {
    animation: fadeInRight 1s ease-in-out;
}

@keyframes fadeInUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInLeft {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInRight {
    0% {
        transform: translateX(50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

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

.hover-glow:hover {
    box-shadow: 0 0 15px rgba(177, 156, 217, 0.7);
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

/* Intersection Observer for Scroll Animations */
.scroll-watch {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-watch.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Delays */
.stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger > *:nth-child(1) { transition-delay: 0.1s; }
.stagger > *:nth-child(2) { transition-delay: 0.2s; }
.stagger > *:nth-child(3) { transition-delay: 0.3s; }
.stagger > *:nth-child(4) { transition-delay: 0.4s; }
.stagger > *:nth-child(5) { transition-delay: 0.5s; }

.stagger.in-view > * {
    opacity: 1;
    transform: translateY(0);
}