<style>
/* Statistics Section Styles */
.statistics-section {
    position: relative;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    overflow: hidden;
    padding: 5rem 0;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Stats Container */
#stats-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Animated Grid Pattern */
.stats-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse-dot 4s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

/* Stat Item */
.stat-item {
    text-align: center;
    position: relative;
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.stat-item:first-child::before {
    display: none;
}

.stat-item:hover {
    transform: translateY(-10px);
}

/* Counter Number */
.stat-item [data-count] {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: inline-block;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.stat-item:hover [data-count] {
    transform: scale(1.1) rotateY(360deg);
    transition: transform 0.6s ease;
}

/* Counter Glow Effect */
.stat-item [data-count]::after {
    content: attr(data-count);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
}

/* Counter Description */
.stat-item .text-primary-200 {
    font-size: 1rem;
    color: rgba(219, 234, 254, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Plus Sign for Large Numbers */
.stat-item [data-count]::before {
    content: '+';
    position: absolute;
    top: 0;
    right: -1.5rem;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item [data-count].completed::before {
    opacity: 1;
}

/* Ripple Effect Container */
.stat-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.stat-ripple::before,
.stat-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ripple-out 2s ease-out infinite;
}

.stat-ripple::after {
    animation-delay: 1s;
}

@keyframes ripple-out {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* Wave Animation */
.statistics-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="rgba(255,255,255,0.1)"></path></svg>') repeat-x;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-1200px);
    }
}

/* Animated Background Lines */
.stats-bg-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.1;
}

.stats-bg-line {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, white, transparent);
    animation: line-move 8s linear infinite;
}

@keyframes line-move {
    0% {
        transform: translateX(-100vw);
    }
    100% {
        transform: translateX(100vw);
    }
}

/* Milestone Animation */
@keyframes milestone-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.stat-item.milestone {
    animation: milestone-pop 0.6s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .statistics-section {
        padding: 3rem 0;
    }
    
    .stat-item [data-count] {
        font-size: 2.5rem;
    }
    
    .stat-item::before {
        display: none;
    }
    
    .stat-item {
        padding: 1.5rem 0.5rem;
    }
    
    .stat-item .text-primary-200 {
        font-size: 0.875rem;
    }
}

@media (min-width: 768px) {
    .statistics-section .grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Accessibility Mode */
body.accessibility-mode .stat-item {
    animation: none;
    transition: none;
}

body.accessibility-mode .stat-item:hover {
    transform: none;
}

body.accessibility-mode .stat-item [data-count] {
    animation: none;
    background: none;
    -webkit-text-fill-color: white;
    text-fill-color: white;
}

body.accessibility-mode .stat-item [data-count]::after,
body.accessibility-mode .stat-ripple,
body.accessibility-mode .statistics-wave,
body.accessibility-mode #stats-bg-animation {
    display: none;
}

body.high-contrast .statistics-section {
    background: #000;
    border: 2px solid #fff;
}

body.high-contrast .stat-item [data-count] {
    background: none;
    -webkit-text-fill-color: #fff;
    text-fill-color: #fff;
}

body.high-contrast .stat-item .text-primary-200 {
    color: #fff !important;
}

/* Loading State */
.stats-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.stats-loading .loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Celebration Effect */
.celebration-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.celebration-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    animation: celebrate 3s ease-out forwards;
}

@keyframes celebrate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}
</style>