/**
 * Landing Page Animations CSS
 * Social Blade-style counter animations and effects
 */

/* Error Counter Animations - Social Blade Style */
#error-counter {
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Gradient Text Styling */
.counter-gradient-text {
    background: linear-gradient(135deg, #2563eb, #9333ea, #06b6d4);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
    font-weight: 600;
}

/* Gradient Animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Loading/Animating State */
#error-counter.counter-animating {
    animation: counterPulse 2s ease-in-out infinite;
}

/* Counter Change Animation - Like Social Blade */
#error-counter.counter-changing {
    transform: scale(1.1);
    text-shadow: 
        0 0 10px rgba(59, 130, 246, 0.5),
        0 0 20px rgba(147, 51, 234, 0.3),
        0 0 30px rgba(6, 182, 212, 0.2);
    transition: all 0.15s ease-out;
}

/* Complete Animation State */
#error-counter.counter-complete {
    animation: counterComplete 0.6s ease-out;
}

/* Continuous Subtle Pulse - Social Blade Effect */
@keyframes counterPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.02);
        opacity: 0.9;
    }
}

/* Completion Animation */
@keyframes counterComplete {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
        text-shadow: 
            0 0 15px rgba(34, 197, 94, 0.6),
            0 0 25px rgba(34, 197, 94, 0.4),
            0 0 35px rgba(34, 197, 94, 0.2);
    }
    100% {
        transform: scale(1);
        text-shadow: none;
    }
}

/* Social Blade-style Number Formatting */
#error-counter::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.1),
        rgba(147, 51, 234, 0.1),
        rgba(6, 182, 212, 0.1)
    );
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

#error-counter.counter-changing::before {
    opacity: 1;
}

/* Hover Effects for Interactive Feel */
#error-counter:hover {
    transform: scale(1.05);
    cursor: default;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #error-counter {
        font-size: 2rem;
    }
    
    #error-counter.counter-changing {
        transform: scale(1.08);
    }
}

/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    #error-counter,
    #error-counter.counter-changing,
    #error-counter.counter-animating {
        animation: none;
        transform: none;
        transition: none;
    }
    
    #error-counter.counter-changing {
        text-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }
}

/* Additional Landing Page Animations */
.animate-in {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section Gradient Animations */
.gradient-orb {
    transition: all 8s ease-in-out;
}

.gradient-orb:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

/* Floating Animation for Background Elements */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(1deg);
    }
    50% { 
        transform: translateY(-15px) rotate(0deg);
    }
    75% {
        transform: translateY(-25px) rotate(-1deg);
    }
}

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

/* Social Proof Section Enhancements */
.social-proof-container {
    transition: all 0.3s ease;
}

.social-proof-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.loading-counter {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 1em;
}

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