.stats {
    padding: 4rem 2rem;
    text-align: center;
}

.stats h2 {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 3rem 4rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    width: 300px;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.stat-card p {
    color: var(--primary-light);
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Loading animation */
.stat-card p:not(.loaded):not(.error) {
    position: relative;
    color: var(--primary-color);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.stat-card p.loaded {
    opacity: 1;
    animation: countUp 0.5s ease-out;
}

.stat-card p.error {
    color: var(--danger-color);
    font-size: 1.2rem;
    opacity: 1;
}

@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}