body {
    font-family: 'Arial', sans-serif;
    background-color: #1e1e2f;
    color: #fff;
    margin: 0;
    padding: 20px;
    text-align: center;
}

.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;
    }
}


.stats-wrapper {
    max-width: 800px;
    margin: auto;
    background: linear-gradient(145deg, #242628, #1e2022, #161718);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

table.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

/* ✅ Modifier le contour du tableau */
.stats-table th {
    background-color: #3a3a3d;
    /* Gris foncé légèrement bleuté */
    color: #f8f8f6;
    /* Jaune doré pour le texte */
    padding: 12px;
    border: 1px solid #8a8887;
    /* ✅ Contour doré pour le style */
    text-transform: uppercase;
    /* Met en majuscules */
    text-align: center;
}

/* ✅ Ajouter un effet au survol pour les titres */
.stats-table th:hover {
    transition: 0.3s ease-in-out;
}

.stats-table td {
    padding: 10px;
    border-bottom: 1px solid #444;
    text-align: center;
}

/* ✅ Styles de la barre de recherche */
#searchBar {
    width: 80%;
    /* Augmenter la largeur */
    max-width: 600px;
    /* Largeur max pour éviter qu'il soit trop grand */
    padding: 10px;
    /* Espacement intérieur pour un meilleur confort */
    font-size: 20px;
    /* Agrandir le texte */
    border: 2px solid #646463;
    /* Bordure dorée */
    border-radius: 8px;
    /* Coins arrondis */
    outline: none;
    background-color: #ececf1;
    /* Fond gris foncé */
    color: rgb(12, 12, 12);
    /* Texte noir */
    display: block;
    margin: 10px auto;
    /* Centrage du champ */
    text-align: center;
    /* Centrer le texte */
}

/* ✅ Style du bouton de suppression en petit carré */
.delete-btn {
    background-color: transparent;
    color: #ff4d4d;
    /* Rouge vif */
    border: 1px solid #ff4d4d;
    width: 24px;
    /* Taille réduite */
    height: 24px;
    font-size: 15px;
    margin-left: 42px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ✅ Style pour les liens YouTube */
.stats-table td a {
    color: #ff0000;
    text-decoration: none;
}

.stats-table td a:hover {
    text-decoration: underline;
}


/* ✅ Effet au survol */
.delete-btn:hover {
    color: white;
}

/* ✅ Effet au clic */
.delete-btn:active {
    transform: scale(0.9);
}

/* ✅ Centrage du bouton dans la colonne */
.stats-table td:last-child {
    text-align: center;
}

/* ✅ Overlay en fond sombre */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Fond semi-transparent */
    display: none;
    /* Caché par défaut */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* ✅ Style de la boîte */
.dialog-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
}



/* ✅ Réduire la largeur des colonnes pour les appareils mobiles */
@media all and (max-width: 800px) {

    a.home-button {
        display: none;
    }

    .stats-wrapper {
        max-width: 100%;
        padding: 10px;
    }

    .stats-table th,
    .stats-table td {
        padding: 8px;
        font-size: 14px;
    }

    .stats-table th {
        white-space: nowrap;
    }

    #searchBar {
        width: 90%;
        font-size: 16px;
    }

    .delete-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .dialog-box {
        max-width: 250px;
    }

    /* ✅ Cacher la colonne Supprimer et YouTube en mobile */
    .stats-table th:nth-child(4),
    /* YouTube */
    .stats-table td:nth-child(4),
    .stats-table th:nth-child(5),
    /* Supprimer */
    .stats-table td:nth-child(5) {
        display: none;
    }
}