/* ✅ Styles généraux */
body {
    font-family: 'Arial', sans-serif;
    background-color: #13181d;
    color: #ffffff;
    /* Texte blanc */
    text-align: center;
    padding: 20px;
}

.home-button {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 22px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    z-index: 1000;
    overflow: hidden;
    display: inline-block;
    background: none;
    border: none;
    padding: 10px 0;
    cursor: pointer;
}

.home-button::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200%;
    height: 36px;
    background: url("data:image/svg+xml,%3Csvg width='400' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q 50 50 100 20 T 200 20 T 300 20 T 400 20 V60 H0 Z' fill='rgba(63,89,149,0.6)' stroke='rgba(0,0,0,0.4)' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: cover;
    animation: waveMotion 4s linear infinite;
    z-index: -1;
    transition: transform 0.4s ease;
}

.home-button:hover::after {
    transform: translateY(-10px);
    opacity: 1;
}

@keyframes waveMotion {
    0% {
        background-position-x: 0%;
    }

    100% {
        background-position-x: -200px;
    }
}


.ranking-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #1e1e1e;
    /* Fond légèrement plus clair pour le conteneur */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    /* Ombre subtile */
}

/* ✅ Titre du classement */
h1 {
    color: #ffffff;
    /* Texte blanc */
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: bold;
}


#records-restants {
    font-size: 22px;
    font-weight: 500;
    color: #ffdb4d;
    margin-top: 10px;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
    /* un peu moins d'espacement */
    font-family: 'Rubik', sans-serif;
    text-shadow: none;
}


/* ✅ Styles du tableau */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    /* Supprime les espaces entre les cellules */
    margin-top: 20px;
    background: #2a2a2a;
    /* Fond des tableaux */
    border-radius: 8px;
    overflow: hidden;
}

/* ✅ Bordures fines sur les en-têtes */
.ranking-table th {
    background-color: #333333;
    /* Fond des en-têtes */
    color: #ffffff;
    /* Texte blanc pour les en-têtes */
    font-size: 18px;
    font-weight: bold;
    padding: 15px 12px;
    /* Ajuste la hauteur */
    border-bottom: 1.5px solid black;
    /* ✅ Bordure noire fine sous les en-têtes */
}

/* ✅ Ajustement des cellules */
.ranking-table td {
    padding: 15px 12px;
    /* ✅ Augmente la hauteur des cellules */
    text-align: center;
    vertical-align: middle;
    color: #dddddd;
    /* Texte légèrement gris */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    /* ✅ Lignes horizontales fines gris/blanc */
}

/* ✅ Ajustement des avatars */
.ranking-table td img {
    width: 60px;
    /* ✅ Agrandit légèrement la taille */
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* ✅ Alternance des couleurs pour les lignes */
.ranking-table tbody tr:nth-child(odd) {
    background-color: #2a2a2a;
}

.ranking-table tbody tr:nth-child(even) {
    background-color: #242424;
}

.ranking-table tbody tr:hover {
    background-color: #333333;
    /* Couleur au survol */
}

/* ✅ Liens vers les stats des joueurs */
.ranking-table a {
    color: #1e90ff;
    /* Bleu pour les liens */
    text-decoration: none;
}

.ranking-table a:hover {
    color: #63b8ff;
    /* Bleu clair au survol */
    text-decoration: underline;
}

/* ✅ Style du bouton retour */
.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #444444;
    /* Fond du bouton */
    color: #ffffff;
    /* Texte du bouton */
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #555555;
    /* Fond du bouton au survol */
    color: #ffffff;
}


/* ✅ Media Query pour les téléphones portables */
@media all and (max-width: 800px) {

    a.home-button {
        display: none;
    }

    /* ✅ Réduire la largeur totale du conteneur */
    .ranking-container {
        max-width: 95%;
        padding: 10px;
        overflow-x: auto;
        /* ✅ Permet de scroller horizontalement si nécessaire */
    }

    /* ✅ Tableau réduit avec colonnes principales uniquement */
    .ranking-table {
        width: 100%;
        border-collapse: collapse;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 8px 6px;
        font-size: 14px;
        text-align: center;
    }

    /* ✅ Masquer toutes les colonnes sauf Rang, Avatar, Record */
    .ranking-table th:nth-child(1),
    /* Rang */
    .ranking-table th:nth-child(2),
    /* Avatar */
    .ranking-table th:nth-child(3),
    /* Record */
    .ranking-table td:nth-child(1),
    .ranking-table td:nth-child(2),
    .ranking-table td:nth-child(3) {
        display: table-cell;
    }

    .ranking-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)),
    .ranking-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)) {
        display: none;
    }

    /* ✅ Réduire la taille des avatars */
    .ranking-table td img {
        width: 35px;
        height: 35px;
        border-radius: 50%;
    }

    /* ✅ Style du titre réduit */
    h1 {
        font-size: 20px;
    }

    #records-restants {
        font-size: 17px;
    }
}