/* Modern Stats Styles */
:root {
    --primary: #4a6cf7;
    --primary-dark: #3a5bd9;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --gradient-primary: linear-gradient(135deg, #4a6cf7 0%, #3a5bd9 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #218838 100%);
    --gradient-warning: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    --gradient-danger: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Stats Section */
.stats {
    padding: 5rem 0;
    position: relative;
    background: #031640;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.stats-header {
    text-align: center;
    margin-bottom: 4rem;
}

.stats-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4a6cf7, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Stat Card */
.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    background: var(--gradient-primary);
    box-shadow: 0 10px 20px rgba(74, 108, 247, 0.3);
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--gradient-success);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.stat-card:nth-child(3) .stat-icon {
    background: var(--gradient-warning);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.3);
}

.stat-card:nth-child(4) .stat-icon {
    background: var(--gradient-danger);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* School Performance */
.school-performance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.performance-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.performance-card.champion {
    background: linear-gradient(319deg, #f97316, #ef4444);
    color: var(--white);
}

.performance-card.attention {
    background: linear-gradient(178deg, #071024, #1f2937);
    color: var(--white);
}

.performance-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.performance-badge {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.performance-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    color: inherit;
}

.performance-info p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

.school-name-display {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.metric-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.2rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: var(--white);
}

.metric-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .school-performance {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats {
        padding: 3rem 0;
    }
    
    .stats-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .performance-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .stats-header {
        margin-bottom: 2.5rem;
    }
    
    .stats-title {
        font-size: 1.8rem;
    }
    
    .stats-subtitle {
        font-size: 1rem;
    }
    
    .performance-header {
        flex-direction: column;
        text-align: center;
    }
    
    .performance-badge {
        margin: 0 auto 1rem;
    }
    
    .performance-metrics {
        grid-template-columns: 1fr;
    }
}

/* Animation for counters */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.animated {
    animation: countUp 0.6s ease-out;
}

/* Loading state */
.stat-number.loading {
    background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    color: transparent;
    border-radius: 4px;
    width: 60%;
    margin: 0 auto;
    height: 2.5rem;
}

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

/* Additional school info styling */
.additional-info {
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border-left: 3px solid var(--warning);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.additional-info i {
    color: var(--warning);
    font-size: 0.9rem;
}

/* Schools list styling */
.schools-list-container {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    padding: 1rem 0;
}

.school-list-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--warning);
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--white);
}

.school-list-item:last-child {
    margin-bottom: 0;
}

.school-list-item i {
    color: var(--warning);
    margin-right: 0.8rem;
    font-size: 0.8rem;
    width: 12px;
}

.no-schools-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    font-style: italic;
}