/* Performance Section Styles */
.performance-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.performance-dashboard {
    margin: 50px 0;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.school-performance-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.school-performance-card.clickable {
    cursor: pointer;
}

.school-performance-card.clickable .school-name-perf:hover {
    color: #667eea;
}

.school-performance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.school-performance-card:hover::before {
    transform: scaleX(1);
}

.school-performance-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.school-performance-card.rank-1 {
    border: 3px solid #FFD700;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFFFF 100%);
}

.school-performance-card.rank-2 {
    border: 3px solid #C0C0C0;
}

.school-performance-card.rank-3 {
    border: 3px solid #CD7F32;
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.school-name-perf {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    flex: 1;
}

.rank-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B4513;
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #999999 100%);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.total-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
}

.total-score .score-value {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.total-score .score-label {
    font-size: 1rem;
    opacity: 0.9;
}

.progress-bars {
    margin-top: 20px;
}

.progress-item {
    margin-bottom: 15px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.progress-bar-container {
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 1s ease;
}

/* Metrics Info */
.metrics-info {
    background: white;
    padding: 40px;
    border-radius: 20px;
    margin: 50px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.metrics-info h3 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    background: #667eea;
    color: white;
    transform: translateY(-5px);
}

.metric-card:hover .metric-icon {
    transform: scale(1.2) rotate(10deg);
}

.metric-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.metric-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.metric-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Leaderboard */
.leaderboard {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.leaderboard h3 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.leaderboard-table {
    width: 100%;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
    transition: all 0.3s ease;
}

.leaderboard-row:hover {
    background: #f8f9fa;
    transform: translateX(10px);
}

.leaderboard-row.header {
    background: #667eea;
    color: white;
    font-weight: 700;
    border-radius: 10px;
    margin-bottom: 10px;
}

.leaderboard-row.header:hover {
    transform: none;
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.leaderboard-rank.gold {
    color: #FFD700;
}

.leaderboard-rank.silver {
    color: #C0C0C0;
}

.leaderboard-rank.bronze {
    color: #CD7F32;
}

.leaderboard-school {
    font-weight: 600;
}

.leaderboard-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    text-align: center;
}

.leaderboard-badge {
    text-align: center;
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .performance-grid {
        grid-template-columns: 1fr;
    }

    .performance-stats {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .leaderboard-row {
        grid-template-columns: 60px 1fr 100px;
    }

    .leaderboard-badge {
        display: none;
    }
}
