/* Styles pour le conteneur du classement */
.leaderboard-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Podium section */
.podium {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

/* Podium items */
.podium-item {
    text-align: center;
    position: relative;
    flex: 1;
}

/* Second user on the left, third on the right, first user in the middle */
.podium-item:nth-child(2) {
    order: 1; /* Left */
}

.podium-item.first-place {
    order: 2; /* Center */
    transform: scale(1.2); /* Slightly larger */
    top: -10px;
}

.podium-item:nth-child(3) {
    order: 3; /* Right */
}

/* Couronne au-dessus de l'avatar */
.podium-item.first-place .crown-icon {
    position: absolute;
    top: -10px; /* Keep crown closer to avatar */
    left: 50%;
    transform: translateX(-50%);
}

/* Avatars du podium */
.podium-item img {
    width: 80px; /* Reduced size for better mobile fit */
    height: 80px;
    border-radius: 50%;
    border: 4px solid transparent;
}

/* Styles pour les noms et points sous les avatars du podium */
.podium-username {
    display: block;
    font-weight: bold;
    margin-top: 10px;
}

.podium-points {
    color: gray;
    display: block;
}

/* Bordures colorées pour différencier les podiums */
.podium-item.first-place img {
    border-color: gold;
}
.podium-item:nth-child(2) img {
    border-color: silver;
}
.podium-item:nth-child(3) img {
    border-color: #cd7f32; /* Bronze */
}

/* Liste des autres utilisateurs */
.leaderboard {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    background: #f9f9f9;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Rang de classement, avatar et nom dans la même ligne */
.leaderboard-item .leaderboard-rank {
    font-weight: bold;
    margin-right: 10px;
}

.leaderboard-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.leaderboard-item .leaderboard-username {
    font-weight: bold;
    margin-right: auto;
}

.leaderboard-item .leaderboard-points {
    font-weight: bold;
    color: gray;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .podium {
        flex-direction: row; /* Maintain horizontal layout on mobile */
        justify-content: space-around; /* Spread out items on small screens */
    }

    .podium-item img {
        width: 70px; /* Slightly smaller avatars on mobile */
        height: 70px;
    }

    .podium-item.first-place {
        transform: scale(1.15); /* Smaller scale on mobile */
        top: -8px; /* Adjusted position */
    }

    .podium-item {
        margin-bottom: 10px;
    }

    .leaderboard-item {
        flex-direction: row; /* Maintain row layout on mobile */
        align-items: center;
    }

    .leaderboard-item img {
        margin-bottom: 0; /* Ensure avatar and text are aligned */
    }

    .leaderboard-item .leaderboard-points {
        text-align: right;
        width: auto;
    }
}

/* Styles pour les titres Jambar */
.jambar-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    text-transform: uppercase;
}

.jambar-title-small {
    font-size: 12px;
    margin-right: 10px;
    text-transform: uppercase;
}

/* Couleurs pour les différents niveaux */
.jambar-apprentice {
    border-left: 3px solid #6c757d;
}

.jambar-fighter {
    border-left: 3px solid #28a745;
}

.jambar-elite {
    border-left: 3px solid #007bff;
}

.jambar-master {
    border-left: 3px solid #dc3545;
}

/* Styles pour les badges du podium */
.podium-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 20px;
}

/* Messages motivants */
.leaderboard-motivation {
    text-align: center;
    margin-bottom: 20px;
}

.top-motivation, .others-motivation {
    text-align: center;
    font-style: italic;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* Bouton de partage */
.share-achievement {
    margin-top: 10px;
}

.share-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.share-button:hover {
    background-color: #45a049;
}

/* Boîte de dialogue de partage */
.share-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.share-dialog-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    width: 90%;
}

.share-links {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.share-links a {
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
    transition: opacity 0.3s;
}

.share-links a:hover {
    opacity: 0.9;
}

.twitter-share {
    background-color: #1DA1F2;
}

.facebook-share {
    background-color: #4267B2;
}

.linkedin-share {
    background-color: #0077B5;
}

.whatsapp-share {
    background-color: #25D366;
}

.close-dialog {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

/* Styles pour le bouton "Voir plus" */
.load-more-container {
    text-align: center;
    margin: 20px 0;
}

.load-more-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.load-more-button:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .load-more-button {
        width: 100%;
        padding: 12px;
    }
}
