/* Keyframe Animations */
@keyframes logoGlow {
    0% {
        box-shadow: 
            0 0 30px rgba(255, 0, 102, 0.8),
            0 0 60px rgba(255, 0, 102, 0.4),
            inset 0 0 30px rgba(255, 0, 102, 0.2);
    }
    100% {
        box-shadow: 
            0 0 40px rgba(255, 0, 102, 1),
            0 0 80px rgba(255, 0, 102, 0.6),
            inset 0 0 40px rgba(255, 0, 102, 0.3);
    }
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 0, 102, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 0, 102, 1));
    }
}

@keyframes socialPulse {
    0% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.5);
        filter: drop-shadow(0 0 20px rgba(255, 0, 102, 1));
    }
    100% {
        transform: scale(1.3);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 102, 0);
    }
}

@keyframes neonGlow {
    0%, 100% {
        text-shadow: 
            0 0 5px rgba(255, 0, 102, 0.8),
            0 0 10px rgba(255, 0, 102, 0.8),
            0 0 15px rgba(255, 0, 102, 0.8);
    }
    50% {
        text-shadow: 
            0 0 10px rgba(255, 0, 102, 1),
            0 0 20px rgba(255, 0, 102, 1),
            0 0 30px rgba(255, 0, 102, 1);
    }
}

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

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Sparkle Effect for Buttons */
.sparkles::before,
.sparkles::after {
    content: '✨';
    position: absolute;
    font-size: 1rem;
    animation: sparkle 1.5s infinite;
    pointer-events: none;
}

.sparkles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.sparkles::after {
    bottom: 20%;
    right: 20%;
    animation-delay: 0.7s;
}

/* Page Load Animations - Only for homepage */
@keyframes pageLoadFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navbarSlideDown {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

/* Only apply page load animations on homepage (pages with .hero section) */
body:has(.hero) .hero-content {
    animation: pageLoadFadeIn 1s ease 0.2s both;
}

body:has(.hero) .navbar {
    animation: navbarSlideDown 0.8s ease both;
}

/* Floating Animation for Hero Elements */
.hero-logo {
    animation: float 3s ease-in-out infinite, logoGlow 2s ease-in-out infinite alternate;
}

/* Neon Text Effect */
.neon-text {
    animation: neonGlow 2s ease-in-out infinite alternate;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

@keyframes successCheckmark {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
}

.success-checkmark {
    display: inline-block;
    animation: successCheckmark 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    color: #00ff66;
    font-size: 2rem;
    text-shadow: 0 0 15px rgba(0, 255, 102, 0.8);
}

@keyframes starburstEffect {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(2) rotate(360deg);
    }
}

.starburst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    pointer-events: none;
    animation: starburstEffect 0.8s ease-out;
}

/* Button Hover Effects */
.glow-button {
    position: relative;
    overflow: hidden;
}

.glow-button::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.5s;
}

.glow-button:hover::before {
    left: 100%;
}

/* Particle Effects */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff0066;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 3s linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 0, 102, 0.3);
    border-top: 4px solid #ff0066;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Cart Animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

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

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 
            0 8px 25px rgba(255, 0, 102, 0.4),
            0 0 30px rgba(255, 0, 102, 0.6),
            0 0 50px rgba(0, 102, 255, 0.3),
            inset 0 0 20px rgba(255, 0, 102, 0.15);
    }
    100% {
        box-shadow: 
            0 8px 25px rgba(255, 0, 102, 0.6),
            0 0 40px rgba(255, 0, 102, 0.8),
            0 0 70px rgba(0, 102, 255, 0.5),
            inset 0 0 30px rgba(255, 0, 102, 0.25);
    }
}