/* Лидерборд - Специальные стили */

.leaderboard-page {
    background: #e8ecef;
    min-height: 100vh;
    padding: 2rem 0;
}

.leaderboard-header {
    text-align: center;
    color: #212529;
    margin-bottom: 5rem;
    padding: 0 20px;
}

.leaderboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.leaderboard-header-actions {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.leaderboard-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 20px;
}

.leaderboard-date {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.leaderboard-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Пьедестал */
.podium-container {
    margin-bottom: 1rem;
}

.podium-footer {
    text-align: center;
    margin-bottom: 2rem;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 250px;
    position: relative;
}

.podium-photo {
    position: absolute;
    top: -60px;
    z-index: 10;
}

.class-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.class-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    border: 5px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Разные размеры фотографий в зависимости от места */
.podium-place.first .class-photo,
.podium-place.first .class-photo-placeholder {
    width: 150px;
    height: 150px;
    border: 6px solid white;
    font-size: 4rem;
}

.podium-place.second .class-photo,
.podium-place.second .class-photo-placeholder {
    width: 120px;
    height: 120px;
    border: 5px solid white;
    font-size: 3rem;
}

.podium-place.third .class-photo,
.podium-place.third .class-photo-placeholder {
    width: 100px;
    height: 100px;
    border: 4px solid white;
    font-size: 2.5rem;
}

/* Корректировка позиции фотографий в зависимости от размера */
.podium-place.first .podium-photo {
    top: -75px;
}

.podium-place.second .podium-photo {
    top: -60px;
}

.podium-place.third .podium-photo {
    top: -50px;
}

.podium-place.first {
    order: 2;
}

.podium-place.second {
    order: 1;
}

.podium-place.third {
    order: 3;
}

.podium-base {
    width: 100%;
    border-radius: 8px 8px 0 0;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podium-place.first .podium-base {
    min-height: 250px;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.podium-place.second .podium-base {
    min-height: 200px;
    box-shadow: 0 5px 20px rgba(192, 192, 192, 0.4);
}

.podium-place.third .podium-base {
    min-height: 150px;
    box-shadow: 0 5px 20px rgba(205, 127, 50, 0.4);
}

.podium-number {
    font-size: 4rem;
    font-weight: 700;
    color: rgba(0,0,0,0.3);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.podium-class {
    margin-top: 1.5rem;
    text-align: center;
}

.podium-class .class-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.podium-class .class-stats {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.95rem;
    color: #495057;
}

.podium-class .stat {
    font-weight: 600;
}

/* Остальные места */
.others-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #dee2e6;
    margin-top: 2rem;
}

.others-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.other-place {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    width: 100%;
    transition: all 0.2s;
}

.other-photo {
    flex-shrink: 0;
}

.class-photo-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.class-photo-placeholder-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #dee2e6;
}

.other-place:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.other-rank {
    font-size: 2rem;
    font-weight: 700;
    color: #ced4da;
    min-width: 50px;
    text-align: center;
}

.other-info {
    flex: 1;
}

.other-class-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.other-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.other-stats span {
    font-weight: 500;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
    background: white;
    border-radius: 8px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .leaderboard-page {
        padding: 1rem 0;
    }
    
    .leaderboard-header {
        margin-bottom: 2rem;
        padding: 0 15px;
    }
    
    .leaderboard-header h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .leaderboard-container {
        padding: 0 15px;
    }
    
    .podium {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .podium-place {
        max-width: 100%;
        width: 100%;
    }
    
    /* На мобилке 1 место первым, затем 2 и 3 */
    .podium-place.first {
        order: 1;
    }
    
    .podium-place.second {
        order: 2;
    }
    
    .podium-place.third {
        order: 3;
    }
    
    .podium-base {
        min-height: 140px !important;
        padding: 1.5rem 1rem;
    }
    
    .podium-photo {
        position: relative;
        top: 0;
        margin-bottom: 0.75rem;
    }
    
    .podium-place.first .podium-photo {
        top: 0;
    }
    
    .podium-place.second .podium-photo {
        top: 0;
    }
    
    .podium-place.third .podium-photo {
        top: 0;
    }
    
    .podium-place.first .class-photo,
    .podium-place.first .class-photo-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
        border: 4px solid white;
    }
    
    .podium-place.second .class-photo,
    .podium-place.second .class-photo-placeholder {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
        border: 3px solid white;
    }
    
    .podium-place.third .class-photo,
    .podium-place.third .class-photo-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        border: 3px solid white;
    }
    
    .podium-number {
        font-size: 3rem;
    }
    
    .podium-class {
        margin-top: 1rem;
    }
    
    .podium-class .class-name {
        font-size: 1.4rem;
    }
    
    .podium-class .class-stats {
        font-size: 0.85rem;
    }
    
    .others-container {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }
    
    .other-place {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .class-photo-small,
    .class-photo-placeholder-small {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .other-rank {
        font-size: 1.5rem;
        min-width: 40px;
    }
    
    .other-class-name {
        font-size: 1.1rem;
    }
    
    .other-stats {
        flex-direction: column;
        gap: 0.3rem;
        font-size: 0.85rem;
    }
    
    .leaderboard-footer {
        padding: 1.5rem 15px;
        margin-top: 2rem;
    }
    
    .leaderboard-date {
        font-size: 0.85rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .leaderboard-header h1 {
        font-size: 1.5rem;
    }
    
    .podium {
        padding: 0.5rem;
        gap: 1rem;
    }
    
    .podium-base {
        min-height: 120px !important;
        padding: 1rem 0.75rem;
    }
    
    .podium-number {
        font-size: 2.5rem;
    }
    
    .podium-place.first .class-photo,
    .podium-place.first .class-photo-placeholder {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
    
    .podium-place.second .class-photo,
    .podium-place.second .class-photo-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .podium-place.third .class-photo,
    .podium-place.third .class-photo-placeholder {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .podium-class .class-name {
        font-size: 1.2rem;
    }
    
    .podium-class .class-stats {
        font-size: 0.8rem;
    }
    
    .others-container {
        padding: 1rem 0.75rem;
    }
    
    .other-place {
        padding: 0.6rem 0.75rem;
    }
    
    .class-photo-small,
    .class-photo-placeholder-small {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .other-rank {
        font-size: 1.3rem;
        min-width: 35px;
    }
    
    .other-class-name {
        font-size: 1rem;
    }
    
    .other-stats {
        font-size: 0.8rem;
    }
}

