:root {
    --gold: #f1c40f;
    --neon: #39ff14;
    --blue: #add8e6;
    --red: #c0392b;
    --glass-bg: rgba(0, 0, 0, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
	--color-text-dim:rgba(255, 100, 0, 0.5);
}

body, html {
    margin: 0; padding: 0; height: 100vh; width: 100vw;
    background-color: #000; font-family: 'Montserrat', sans-serif;
    display: flex; justify-content: center; align-items: center; overflow: hidden;
}

#dynamic-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    filter: brightness(0.5); transition: background-image 1.2s ease-in-out;
}

.jukebox-container {
    position: relative; z-index: 10; display: flex; width: 1100px; height: 650px;
    gap: 15px; background: transparent; overflow: visible; 
}

.playlist-side {
    width: 380px; display: flex; flex-direction: column; background: transparent;
}
.playlist-header { padding: 20px 10px; }
.playlist-header h2 {
    color: var(--gold); font-size: 0.9rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 2px; margin: 0 0 15px 0; text-shadow: 1px 1px 5px #000;
}
.header-actions { display: flex; gap: 10px; }

#searchBar {
    flex-grow: 1; padding: 10px; background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border); border-radius: 8px; color: #fff;
    outline: none; font-family: 'Montserrat', sans-serif; backdrop-filter: blur(5px);
}
.stats-btn {
    padding: 0 15px; background: var(--gold); border: none; border-radius: 8px;
    cursor: pointer; font-size: 1.2rem; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-btn:hover { box-shadow: 0 0 15px var(--gold); transform: scale(1.05); }

#playlist { flex-grow: 1; margin: 0; padding: 0; list-style: none; overflow-y: auto; scrollbar-width: thin; }

.track-item {
    display: flex; align-items: center; padding: 14px 15px; background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; transition: background 0.2s ease;
}
.track-item:hover { background: rgba(0, 0, 0, 0.4) !important; border-radius: 8px; }

.track-num { width: 35px; color: #ccc; font-size: 0.8rem; font-weight: 700; text-shadow: 1px 1px 3px #000; }
.track-name { color: #fff; font-size: 0.85rem; font-weight: 500; text-shadow: 1px 1px 4px #000; }
.track-item.active { background: rgba(0, 0, 0, 0.6) !important; border-left: 4px solid var(--neon); border-radius: 0 8px 8px 0; }
.track-item.active .track-name { color: var(--neon); font-weight: 900; }

.player-side {
    flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border);
    border-radius: 20px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8); padding-bottom: 20px; overflow: visible;
}

.vinyl-display { position: relative; width: 350px; height: 350px; overflow: visible; }
.vinyl-record {
    position: absolute; z-index: 5; top: 7.5px; left: 7.5px; width: 335px; height: 335px;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.vinyl-rotation-wrapper {
    position: relative; width: 100%; height: 100%; background: #050505;
    background-image: repeating-radial-gradient(circle, #050505, #050505 1px, #111 2px, #050505 3px);
    border: 2px solid #222; border-radius: 50%; display: flex; justify-content: center; align-items: center;
}
.vinyl-shine {
    position: absolute; width: 100%; height: 100%; background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.05) 50%, transparent 60%);
    border-radius: 50%; pointer-events: none;
}
.playing .vinyl-record { transform: translateX(290px); }
.playing .vinyl-rotation-wrapper { animation: rotateClockwise 3s linear infinite; border-color: var(--neon); box-shadow: 0 0 30px rgba(57, 255, 20, 0.3); }

@keyframes rotateClockwise { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.vinyl-label {
    position: relative; width: 120px; height: 120px; background: var(--gold); border: 3px solid #000; border-radius: 50%; overflow: hidden; transition: background-color 0.5s ease;
}
.label-top { position: absolute; top: 12%; left: 15%; width: 70%; text-align: center; color: #000; font-size: 7px; font-weight: 900; text-transform: uppercase; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.label-bottom { position: absolute; bottom: 12%; left: 10%; width: 80%; text-align: center; color: #000; font-size: 6.5px; font-weight: 900; }
.label-left { position: absolute; top: 50%; left: 6%; transform: translateY(-50%); color: var(--red); font-size: 7px; font-weight: 900; }
.label-right { position: absolute; top: 50%; right: 6%; transform: translateY(-50%); color: #000; font-size: 7px; font-weight: 900; }
.vinyl-hole { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; background: #000; border-radius: 50%; z-index: 10; }

.vinyl-sleeve {
    position: absolute; z-index: 10; width: 100%; height: 100%; background: #1a1a1a; border-radius: 5px; overflow: hidden; box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.8); border-right: 2px solid #0a0a0a; border-bottom: 2px solid #0a0a0a;
}
#sleeveContent { width: 100%; height: 100%; background-size: cover; background-position: center; filter: sepia(0.3) contrast(0.85) saturate(0.8) brightness(0.9) blur(0.4px); }

.sleeve-wear {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none;
    background: radial-gradient(circle at 50% 50%, transparent 38%, rgba(255, 255, 255, 0.08) 41%, transparent 44%), radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.7) 100%); box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}
.sleeve-gloss { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; background: linear-gradient(135deg, rgba(255, 250, 220, 0.15) 0%, transparent 50%); }
.sleeve-badge { position: absolute; top: 25px; right: -35px; z-index: 7; padding: 5px 40px; background: var(--red); color: #fff; font-size: 0.7rem; font-weight: 900; transform: rotate(45deg); border: 1px solid rgba(255, 255, 255, 0.2); text-shadow: 1px 1px 2px #000; }

.sleeve-info-sticker { position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 8; background: transparent; display: flex; flex-direction: column; align-items: flex-start; }
.sticker-brand { color: var(--gold); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 4px; margin-bottom: 5px; text-shadow: 1px 1px 4px #000; }
#sleeveTitle { margin: 0; color: #fff; font-size: 1.25rem; font-weight: 900; line-height: 1.3; text-transform: uppercase; letter-spacing: 1px; text-align: left; text-wrap: balance; text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.8); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.audio-interface { z-index: 20; width: 480px; margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
#audioVisualizer { width: 90%; max-width: 350px; height: 30px; background: rgba(0, 0, 0, 0.2); border-radius: 5px; border: 1px solid rgba(57, 255, 20, 0.1); }

.progress-area { width: 100%; display: flex; align-items: center; gap: 15px; }
.time { width: 40px; color: var(--color-text-dim); font-size: 0.75rem; font-weight: 700; font-family: monospace; }

.progress-bar-bg { flex-grow: 1; height: 14px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; cursor: pointer; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
#progressBar { height: 100%; width: 0%; background: var(--neon); box-shadow: 0 0 15px var(--neon); pointer-events: none; border-radius: 10px;}

/* =========================================================================
   BOUTONS DE NAVIGATION PRINCIPALE (MAIN CONTROLS & PLAY-PAUSE)
   ========================================================================= */
.main-controls { display: flex; align-items: center; gap: 20px; margin-bottom: 5px; }

.main-controls button { 
    background: transparent; 
    border: none; 
    color: rgba(255, 255, 255, 0.65); 
    cursor: pointer; 
    font-size: 1.3rem; 
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.main-controls button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.15);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.main-controls button:active {
    transform: scale(0.92);
}

.play-pause-btn { 
    width: 70px !important; 
    height: 70px !important; 
    border-radius: 50%; 
    border: 2px solid var(--gold) !important; 
    color: var(--gold) !important; 
    font-size: 1.8rem !important; 
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.2), inset 0 0 10px rgba(241, 196, 15, 0.1);
}

.play-pause-btn:hover { 
    background: var(--gold) !important; 
    color: #000 !important; 
    transform: scale(1.08) !important;
    box-shadow: 0 0 25px var(--gold), inset 0 0 12px rgba(255, 255, 255, 0.5) !important;
}

.opt-btn.active { 
    color: var(--neon) !important; 
    text-shadow: 0 0 12px var(--neon); 
}

.secondary-controls { width: 100%; max-width: 450px; display: flex; align-items: center; justify-content: space-between; }
.volume-control { display: flex; align-items: center; gap: 10px; }
#volumeSlider { width: 80px; accent-color: var(--gold); cursor: pointer; }
#muteBtn { background: none; border: none; color: var(--color-text-dim); cursor: pointer; }

/* =========================================================================
   BOUTONS D'ACTION AVEC ANIMATION DE LUMIÈRE ET ICÔNES SEULES (.dl-btn)
   ========================================================================= */
.action-buttons { display: flex; gap: 8px; }

.dl-btn { 
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.08) 100%); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 50%; /* Boutons ronds pour correspondre aux commandes de lecture */
    color: #f1f1f1; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    backdrop-filter: blur(5px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Style de l'icône émoji (🤍, 🔗, ⬇️) */
.btn-icon {
    font-size: 1.45rem !important; /* Taille de l'icône augmentée */
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Rayon de lumière glissant (effet Shimmer) */
.dl-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-20deg);
}

.dl-btn:hover { 
    background: rgba(241, 196, 15, 0.08); 
    border-color: var(--gold); 
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.25);
}

/* Légère animation d'échelle sur l'icône au survol */
.dl-btn:hover .btn-icon {
    transform: scale(1.25);
}

/* Lancement du balayage de lumière au survol */
.dl-btn:hover::after {
    animation: glow-sweep 1.6s infinite ease-in-out;
}

.dl-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* État 'Liked' */
.dl-btn.liked { 
    color: var(--red); 
    border-color: rgba(192, 57, 43, 0.4); 
    background: rgba(192, 57, 43, 0.08); 
}

.dl-btn.liked::after {
    background: linear-gradient(90deg, transparent, rgba(192, 57, 43, 0.25), transparent);
}

.dl-btn.liked:hover {
    background: rgba(192, 57, 43, 0.15);
    border-color: var(--red);
    box-shadow: 0 0 12px rgba(192, 57, 43, 0.35);
    color: #fff;
}

@keyframes glow-sweep {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* FENÊTRES MODALES */
.modal-overlay { position: fixed; z-index: 100; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); display: none; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show { display: flex; opacity: 1; }
.modal-content { position: relative; width: 90%; max-width: 550px; height: 80vh; max-height: 600px; background: #111; border: 1px solid var(--gold); border-radius: 15px; display: flex; flex-direction: column; box-shadow: 0 0 50px rgba(0, 0, 0, 0.8); }
.modal-content h2 { text-align: center; margin: 20px 0; color: var(--gold); }
.close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Modale de partage & MP3 */
.share-modal-content { height: auto !important; min-height: min-content; max-height: 85vh; padding: 25px 20px; box-sizing: border-box; overflow-y: auto; }
.share-modal-content p { color: #ccc; text-align: center; font-size: 0.9rem; margin-bottom: 20px; }
.share-box { display: flex; gap: 10px; background: #222; padding: 10px; border-radius: 8px; border: 1px solid #444; }
#shareLinkInput { flex-grow: 1; background: #111; color: #fff; border: 1px solid #333; padding: 10px; border-radius: 5px; font-family: monospace; font-size: 0.8rem; cursor: text;}
#copyLinkBtn { background: var(--neon); color: #000; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; }

/* =========================================================================
   BOUTONS DE SÉLECTION D'ONGLETS SOURS-NAV (.tab-btn)
   ========================================================================= */
.modal-tabs { display: flex; justify-content: space-around; background: #1a1a1a; padding: 12px; border-bottom: 2px solid #252525; gap: 8px; }

.tab-btn { 
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid rgba(255, 255, 255, 0.06); 
    color: #888; 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 700; 
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer; 
    padding: 8px 18px; 
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tab-btn.active { 
    color: var(--neon); 
    background: rgba(57, 255, 20, 0.06);
    border-color: var(--neon); 
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.15);
}

.tab-btn:active {
    transform: translateY(1px);
}

.modal-body { flex-grow: 1; padding: 15px; overflow-y: auto; scrollbar-width: thin; }
.top-list { list-style: decimal inside; margin: 0; padding: 0; color: #fff; }
.top-list li { display: flex; justify-content: space-between; padding: 10px; border-bottom: 1px solid #222; font-size: 0.9rem; }
.top-title { font-weight: 700; color: #ccc; }
.top-count { font-weight: 900; color: var(--gold); }

/* BASCULE AUTOMATIQUE SMARTPHONE (MINIMALISTE) */
@media (max-width: 900px) {
    body, html { overflow-y: auto; display: block; }
    .jukebox-container { flex-direction: column; width: 100%; max-width: 100vw; height: auto; min-height: 100vh; gap: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); box-sizing: border-box; }
    .player-side { order: 1; width: 100%; max-width: 100vw; padding: 30px 10px; background: transparent; border: none; box-shadow: none; border-radius: 0; box-sizing: border-box; }
    .vinyl-record { display: none !important; }
    .vinyl-display { width: 280px; height: 280px; margin: 0 auto; }
    .vinyl-sleeve { border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); }
    #sleeveTitle { font-size: 1.1rem; }
    #audioVisualizer { display: none; }
    .audio-interface { width: 100%; max-width: 90vw; margin-top: 20px; }
    .secondary-controls { flex-direction: column; gap: 15px; margin-top: 10px; width: 100%; }
    .playlist-side { order: 2; width: 100%; background: transparent; box-sizing: border-box; padding: 0 10px; }
    #playlist { overflow-y: visible; padding-bottom: 50px; }
    .modal-content { width: 95%; height: 90vh; }
}

/* =========================================================================
   12. REPERTOIRE D'INFORMATIONS DU TITRE (MP3 MODAL)
   ========================================================================= */
.mp3-modal-body { padding: 10px 20px; text-align: center; color: #fff; }

/* Zone de défilement pour les fiches techniques longues */
.mp3-meta-list {
    text-align: left;
    margin-bottom: 25px;
    max-height: 250px; 
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 8px;
    margin-top: 10px;
}

/* Alignement élégant label/valeur style bdd */
.meta-row {
    font-size: 0.85rem;
    margin: 10px 0;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}
.meta-row strong { color: #888; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px;}
.meta-row span { color: var(--gold); font-weight: 700; text-align: right; }

/* Zone d'affichage des Paroles déroulantes */
.meta-row-lyrics { margin-top: 18px; font-size: 0.85rem; text-align: left; }
.meta-row-lyrics strong { color: #888; display: block; margin-bottom: 8px; text-transform: uppercase; font-size: 0.75rem; }
.lyrics-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    color: #ccc;
    max-height: 140px;
    overflow-y: auto;
    white-space: pre-wrap; 
    margin: 0;
    line-height: 1.5;
    scrollbar-width: thin;
}

/* Boutons de la modale */
.mp3-actions-layout { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.dl-btn-large {
    background: var(--glass-bg);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}
.dl-btn-large:hover { background: var(--gold); color: #000; box-shadow: 0 0 15px var(--gold); }

/* Bouton spécifique Suno AI */
.dl-btn-large.suno-btn { border-color: var(--neon); color: var(--neon); }
.dl-btn-large.suno-btn:hover { background: var(--neon); color: #000; box-shadow: 0 0 15px var(--neon); }

/* Bouton spécifique Vidéo Suno */
.dl-btn-large.video-btn { border-color: var(--blue); color: var(--blue); }
.dl-btn-large.video-btn:hover { background: var(--blue); color: #000; box-shadow: 0 0 15px var(--blue); }

.mp3-help-text { font-size: 0.75rem; color: var(--color-text-dim); margin-top: 10px; line-height: 1.4; }