body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 100vh;
    color: #fff;
    text-align: center;
    position: relative;
    animation: neonBackground 10s infinite linear;
    background: linear-gradient(-45deg, #ff00cc, #3333ff, #00ffff, #ffcc00);
    background-size: 400% 400%;
}


body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1), rgba(0,0,0,0.7));
    pointer-events: none;
    z-index: -1;
}

.player-container {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.7);
}

.player-container h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: transform 0.5s ease-in-out;
}

.player-container h1:hover {
    transform: scale(1.5);
}

@media (max-width: 768px) {
    .player-container h1:hover {
        transform: none;
    }
}

.audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.play-btn, .pause-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn svg, .pause-btn svg {
    fill: #fff;
    width: 24px;
    height: 24px;
}

.metadata {
    margin-top: 20px;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
}

.volume-control {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.volume-label {
    font-size: 16px;
}

.volume-slider {
    width: 150px;
}

/* Conteneur de l'image avec le bouton Play au centre */
.image-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Style de l'image du lecteur */
.image-container img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 1);
}

/* Style des boutons Play et Pause */
.play-btn, .pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* Icône du bouton Play */
.play-btn svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

/* Icône du bouton Pause */
.pause-btn svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

/* Réinitialisation du bouton Pause pour le cacher */
.pause-btn {
    display: none;
}

/* Position du logo en haut à gauche */
.logo-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 120px;
}

.social-icons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white; /* Assure que les icônes sont blanches */
    transition: color 0.3s ease; /* Animation pour un changement de couleur fluide */
}

/* Ajoute des styles pour un fond foncé, si besoin */
body.dark-background .social-icons a {
    color: white;
}

/* Ajoute des styles pour un fond clair, si besoin */
body.light-background .social-icons a {
    color: black;
}


.social-icons a {
    display: block;
    width: 30px;
    height: 30px;
}

.social-icons img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Nouvelle icône pour changer de flux */
.change-stream-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.change-stream-btn:hover {
    transform: scale(1.1);
}

.change-stream-btn img {
    width: 20px;
    height: 20px;
}

#clock {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 18px;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px;
    border-radius: 5px;
}

/* Style pour le footer */
.footer {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 12px;
    color: #d1d5db;
    display: flex;
    gap: 10px;
}

.footer .version,
.footer .copyright {
    margin: 0;
}

.covers {
    margin-top: 20px;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.timer-container {
    margin: 20px auto;
    text-align: center;
}

.timer-container input {
    width: 60px;
    padding: 5px;
    font-size: 16px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
}

.timer-container button {
    margin-left: 10px;
    padding: 8px 16px;
    font-size: 16px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.timer-container button:hover {
    background-color: #1e3a8a;
}

.timer-display {
    margin-top: 20px;
    font-size: 24px;
    color: #d1d5db;
}


        /* Animation de chargement */
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 24px;
            font-family: 'Poppins', sans-serif;
            color: #fff;
            text-align: center;
        }

        .loading .spinner {
            border: 4px solid transparent;
            border-top: 4px solid #3498db;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1.5s linear infinite;
            margin-bottom: 20px;
        }

        /* Animation de rotation du cercle */
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Masquer le player au départ */
        .player-container {
            display: none;
        }

        /* Style pour la notification */
        .notification {
            background-color: #ff9900;
            color: white;
            padding: 15px;
            text-align: center;
            font-size: 16px;
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            z-index: 1000;
            display: none; /* Masqué par défaut */
        }

        .live-container {
            margin-top: 20px; /* Ajoute de l'espace au-dessus de la section "En direct" */
            background: rgba(0, 0, 0, 0.7);
            padding: 15px;
            border-radius: 10px;
            color: #fff;
            font-size: 16px;
            text-align: left;
        }
        
        .live-container h2 {
            margin: 0;
            font-size: 18px;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.5);
            padding-bottom: 5px;
        }
        #background {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            filter: blur(10px); /* Ajoute l'effet de flou */
            opacity: 0; /* L'image est cachée par défaut */
            transition: opacity 0.5s ease-in-out; /* Transition fluide pour l'opacité */
            z-index: -1; /* S'assure que le fond reste derrière le contenu */
        }
        
        .car-mode-banner {
            background-color: #ffe46c;
            color: #333;
            font-weight: 600;
            font-family: 'Poppins', sans-serif;
            padding: 15px 20px;
            border-radius: 10px;
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9999;
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 8px 16px rgba(0,0,0,0.2);
            animation: slideDown 0.6s ease, fadeOut 0.5s ease 6.5s forwards;
            transition: opacity 0.5s;
        }
        
        .car-icon {
            font-size: 1.5em;
        }
        
        .close-btn {
            background: transparent;
            border: none;
            font-size: 1.2em;
            font-weight: bold;
            color: #333;
            margin-left: auto;
            cursor: pointer;
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }
        
        @keyframes fadeOut {
            to {
                opacity: 0;
                pointer-events: none;
            }
        }
        
        .hidden {
            display: none;
        }
.social-icons img {
    width: 32px;
    height: 32px;
    margin: 0 5px;
    cursor: pointer;
    transition: transform 0.2s;
}
.social-icons img:hover {
    transform: scale(1.1);
}

.history-icon {
    display: inline-block;
    margin-left: 10px;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.icon-button img {
    width: 30px;
    height: 30px;
}

.history-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    color: white;
    padding: 20px;
    border-radius: 12px;
    width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    z-index: 999;
    text-align: center;
}

.history-popup.hidden {
    display: none;
}

.history-popup ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    text-align: left;
}

.history-popup li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    /* Nouveau : pour aligner titre + boutons */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-popup li span {
    /* Pour que le titre prenne tout l’espace disponible */
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-popup li a {
    margin-left: 8px;
    text-decoration: none;
}

.history-popup li button {
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.85em;
    border: none;
    border-radius: 6px;
    background-color: #444;
    color: white;
    transition: background-color 0.3s ease;
}

.history-popup li button:hover {
    background-color: #e03e2f; /* Un rouge sympa au hover */
}

.close-history {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}
.close-history:hover {
    color: red;
}

@keyframes neonBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
