body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: #191414;
    color: #fff;
    margin: 0;
    min-height: 100vh;
    position: relative;
}
#bg-anim {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
}
.navbar-animated {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2em 2.5em;
    background: rgba(25, 25, 25, 0.7);
    box-shadow: 0 8px 32px #1db95433;
    border-bottom: 2px solid #1db954;
    backdrop-filter: blur(12px);
    z-index: 10;
    animation: navbarFadeIn 1.2s cubic-bezier(.4,2,.6,1) 0.2s both;
}
@keyframes navbarFadeIn {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}
.navbar-logo {
    font-size: 2em;
    margin-right: 1em;
    filter: drop-shadow(0 0 8px #1db954cc);
    animation: logoPulse 2s infinite alternate;
}
@keyframes logoPulse {
    from { filter: drop-shadow(0 0 8px #1db954cc); }
    to { filter: drop-shadow(0 0 24px #1ed760); }
}
.navbar-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #1db954;
    letter-spacing: 1px;
    text-shadow: 0 2px 16px #1db95444;
    text-decoration: none !important;
}
.navbar-links {
    display: flex;
    gap: 1.2em;
}

body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #191414 0%, #121212 100%);
    color: #fff;
    margin: 0;
    min-height: 100vh;
}

/* Suppression du style de l'animation musicale */
#music-bg { display: none !important; }

html, body {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    overflow-x: hidden;
}

header, main {
    position: relative;
    z-index: 1;
}

/* Palette musicale : néons et dégradés */
main {
    max-width: 600px;
    margin: 4.5rem auto 2rem auto;
    background: rgba(25, 20, 20, 0.92);
    border-radius: 24px;
    box-shadow: 0 8px 32px #1db95422;
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    animation: sectionFadeIn 1.2s cubic-bezier(.4,2,.6,1) both;
    border: 2px solid #1db954;
    position: relative;
    z-index: 2;
}
@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(60px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
h1, h2 {
    font-weight: 700;
    letter-spacing: 1px;
    color: #1db954;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 16px #1db95444;
}

button, select, input[type="text"] {
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    outline: none;
    padding: 0.7em 1.2em;
    margin: 0.2em 0;
    background: #222326;
    color: #fff;
    transition: box-shadow 0.2s, background 0.2s, transform 0.18s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
button {
    background: linear-gradient(90deg, #1db954 0%, #191414 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px #1db95433;
    border: none;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
    position: relative;
    overflow: hidden;
}
button::before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 0; height: 0;
    background: radial-gradient(circle, #1ed76088 0%, transparent 80%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, opacity 0.4s;
    opacity: 0.7;
    z-index: 0;
}
button:hover::before {
    width: 220px; height: 220px;
    opacity: 1;
}
button:hover {
    background: linear-gradient(90deg, #1ed760 0%, #1db954 100%);
    box-shadow: 0 4px 32px #1ed76088;
    transform: scale(1.07) rotate(-2deg);
}

input[type="text"]:focus, select:focus {
    box-shadow: 0 0 0 2px #1db954;
    background: #181818;
}

#artist-suggestions {
    animation: fadeIn 0.3s;
    background: #222326;
    color: #fff;
    border: 1.5px solid #1db954;
    border-radius: 8px;
    box-shadow: 0 2px 12px #1db95422;
    z-index: 10;
}
#artist-suggestions li {
    background: transparent;
    color: #fff;
    padding: 0.5em 1em;
    cursor: pointer;
}
#artist-suggestions li:hover {
    background: #1db95444;
    color: #191414;
    transition: background 0.2s;
}

#selected-artists span {
    background: #191414 !important;
    color: #1db954 !important;
    border: 1px solid #1db954;
    margin: 3px 4px 3px 0;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(30,185,84,0.10);
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.3em 0.8em 0.3em 0.3em;
}
#selected-artists span img {
    border-radius: 50%;
    width: 28px;
    height: 28px;
    background: #222326;
    border: 1.5px solid #1db95444;
    margin-right: 0.4em;
}
#selected-artists span button, #selected-artists span .remove-artist-btn {
    background: linear-gradient(90deg, #1db954 0%, #191414 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px #1db95433;
    transition: background 0.2s, box-shadow 0.2s;
    margin-left: 0.3em;
}
#selected-artists span button:hover, #selected-artists span .remove-artist-btn:hover {
    background: linear-gradient(90deg, #1ed760 0%, #1db954 100%);
    color: #191414;
}

/* Correction stricte du texte rose/violet dans le suppresseur de doublons */
.duplicate-scan-status, .duplicate-scan-status span, .duplicate-scan-status strong {
    color: #1db954 !important;
    background: transparent !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 8px #1db95422 !important;
    font-family: inherit !important;
}

/* Correction des liens ou balises <a> dans le status si besoin */
.duplicate-scan-status a, .duplicate-scan-status a:visited {
    color: #1db954 !important;
    text-decoration: none;
}

#playlist-result {
    margin-top: 1.5em;
    font-size: 1.1em;
    min-height: 2em;
    animation: fadeIn 0.7s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Animation pour le bouton de création */
#create-playlist-btn {
    animation: popIn 0.4s;
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.8);}
    to { opacity: 1; transform: scale(1);}
}

/* Responsive */
@media (max-width: 700px) {
    main {
        padding: 1rem 0.5rem;
    }
    .navbar-animated {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.8em 1em;
        gap: 0.7em;
        padding-right: 1.7em;
    }
    .navbar-title {
        font-size: 1.1em;
    }
    .navbar-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        width: 100vw;
        background: rgba(25,25,25,0.97);
        flex-direction: column;
        gap: 0.7em;
        z-index: 100;
        padding: 1.2em 0 1.2em 0;
        border-bottom: 2px solid #1db954;
        box-shadow: 0 8px 32px #1db95433;
        animation: navbarLinksSlideDown 0.4s cubic-bezier(.4,2,.6,1) both;
    }
    .navbar-links.open {
        display: flex;
    }
    .burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 38px;
        height: 38px;
        cursor: pointer;
        z-index: 200;
        margin-left: 1em;
        margin-right: 0.5em;
    }
    .burger span {
        display: block;
        width: 28px;
        height: 4px;
        background: #1db954;
        margin: 4px 0;
        border-radius: 2px;
        transition: 0.3s;
    }
}
@keyframes navbarLinksSlideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 701px) {
    .burger { display: none !important; }
}
@media (max-width: 600px) {
  #tools-nav {
    flex-direction: column;
    gap: 0.7em;
    margin-bottom: 1em;
  }
  .tool-group {
    margin-bottom: 0.7em;
    border-radius: 10px;
    padding: 0.5em 0.3em 0.7em 0.3em;
  }
  .tool-group-title {
    font-size: 1em;
    margin-bottom: 0.2em;
  }
  .tool-btn, .btn-music, button {
    width: 100%;
    min-width: 0;
    padding: 0.8em 0.5em;
    font-size: 1em;
  }
}

/* DA musicale globale */
.tool-desc {
    color: #fff;
    background: linear-gradient(90deg, #1db95422 0%, #19141422 100%);
    border-left: 4px solid #1db954;
    padding: 1em 1.2em;
    border-radius: 12px;
    margin-bottom: 1.2em;
    font-size: 1.08em;
    box-shadow: 0 2px 12px #1db95422;
}
.music-form-group {
    margin: 10px 0;
}
.input-music {
    background: #191414;
    color: #fff;
    border: 1.5px solid #1db954;
    box-shadow: 0 1px 8px #1db95422;
    padding: 0.7em 1.2em;
    border-radius: 8px;
    margin-bottom: 0.5em;
    transition: border 0.2s, box-shadow 0.2s;
}
.input-music:focus {
    border: 1.5px solid #1ed760;
    box-shadow: 0 0 8px #1db954aa;
    background: #222326;
}
.suggestions-music {
    border: 1.5px solid #1db954;
    background: #222326;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px #1db95422;
    z-index: 10;
}
.suggestions-music li:hover {
    background: #1db95444;
    color: #191414;
}
.selected-music span {
    background: #1db954;
    color: #191414;
    border-radius: 8px;
    padding: 0.3em 0.8em;
    margin: 3px 4px 3px 0;
    display: inline-block;
    font-size: 0.98em;
    box-shadow: 0 1px 6px #1db95433;
}
.btn-music {
    background: linear-gradient(90deg, #1db954 0%, #191414 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.7em 1.5em;
    box-shadow: 0 2px 8px #1db95433;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.btn-music:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px #1db95488;
    background: linear-gradient(90deg, #1ed760 0%, #1db954 100%);
}
.music-beta {
    color: #1db954;
    font-weight: 600;
}
.result-music {
    margin-top: 1.5em;
    font-size: 1.1em;
    min-height: 2em;
    color: #fff;
    background: #222326;
    border-radius: 12px;
    padding: 1em 1.2em;
    box-shadow: 0 2px 12px #1db95422;
}

/* Playlists DA */
.playlist-list-music {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
    max-height: none;
    overflow: visible;
}
.playlist-card-music {
    cursor: pointer;
    box-shadow: 0 2px 16px #1db95422;
    border-radius: 16px;
    padding: 0.5em 1em 1em 1em;
    background: linear-gradient(135deg, #191414 60%, #1db95433 100%);
    transition: box-shadow 0.2s, transform 0.2s;
    width: 170px;
    text-align: center;
    border: 2px solid #1db95444;
}
.playlist-card-music:hover {
    box-shadow: 0 4px 32px #1db95488;
    transform: translateY(-4px) scale(1.04);
    border: 2px solid #1db954;
}
.playlist-img-music {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.7em;
    box-shadow: 0 2px 12px #1db95422;
}
.playlist-title-music {
    margin-top: 0.7em;
    font-weight: 600;
    color: #1db954;
    font-size: 1.08em;
}
.playlist-count-music {
    font-size: 0.95em;
    color: #fff9;
}

#tool-section {
    overflow: visible;
    max-height: none;
}

/* Modale pour le tri de playlist */
#playlist-sorter-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.playlist-sorter-modal-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(25,20,20,0.85);
    z-index: 1;
    animation: fadeIn 0.3s;
}
.playlist-sorter-modal-content {
    position: relative;
    z-index: 2;
    background: #191414;
    border-radius: 18px;
    box-shadow: 0 8px 32px #1db95455;
    padding: 2em 2.5em;
    min-width: 320px;
    max-width: 95vw;
    animation: popIn 0.3s;
}
@media (max-width: 600px) {
    .playlist-sorter-modal-content {
        padding: 1em 0.5em;
        min-width: 0;
    }
}

/* --- Suppression des styles pour l'Analyseur de playlist --- */

/* --- Améliorations responsive mobile --- */
@media (max-width: 600px) {
  html, body {
    width: 100vw;
    min-width: 0;
    padding: 0;
    margin: 0;
  }
  main {
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0.5rem 0.2rem;
    border-width: 0 0 2px 0;
  }
  header > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  h1 {
    font-size: 1.3em;
    margin-bottom: 0.7em;
  }
  #tools-nav {
    flex-direction: column;
    gap: 0.7em;
    margin-bottom: 1em;
  }
  .tool-btn, .btn-music, button {
    width: 100%;
    min-width: 0;
    padding: 0.8em 0.5em;
    font-size: 1em;
  }
  .playlist-list-music {
    flex-direction: column;
    gap: 0.7em;
  }
  .playlist-card-music {
    width: 100%;
    min-width: 0;
    padding: 0.7em 0.5em 1em 0.5em;
  }
  .playlist-img-music {
    height: 90px;
  }
  .tool-desc {
    font-size: 1em;
    padding: 0.7em 0.5em;
  }
  #playlist-result, .result-music {
    font-size: 1em;
    padding: 0.7em 0.5em;
  }
}

/* Styles pour la séparation des groupes d'outils */
.tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-bottom: 1.2em;
}
.tool-group-title {
  font-weight: bold;
  color: #1db954;
  margin-bottom: 0.3em;
  font-size: 1.08em;
  letter-spacing: 0.5px;
}
@media (max-width: 600px) {
  .tool-group {
    margin-bottom: 0.7em;
  }
  .tool-group-title {
    font-size: 1em;
    margin-bottom: 0.2em;
  }
}

/* --- NAVIGATION RESPONSIVE PC & MOBILE --- */
/* Barre horizontale sur PC, menu burger sur mobile */
#main-navbar {
  width: 100vw;
  background: #181818;
  border-bottom: 2px solid #1db954;
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 56px;
}
#main-navbar .navbar-content {
  display: flex;
  width: 100%;
  max-width: 900px;
  justify-content: space-between;
  align-items: center;
  padding: 0 2vw;
}
#main-navbar .navbar-title {
  font-size: 1.25em;
  color: #1db954;
  font-weight: bold;
  letter-spacing: 1px;
}
#main-navbar .navbar-links {
  display: flex;
  gap: 1.5em;
}
#main-navbar .navbar-links .tool-btn {
  background: none;
  color: #fff;
  border: none;
  font-size: 1em;
  font-weight: 600;
  border-radius: 0;
  box-shadow: none;
  padding: 0.7em 1.2em;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
}
#main-navbar .navbar-links .tool-btn.active,
#main-navbar .navbar-links .tool-btn:hover {
  color: #1db954;
  border-bottom: 2px solid #1db954;
  background: none;
}
#main-navbar .burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  width: 36px;
  height: 36px;
  margin-left: 1em;
}
#main-navbar .burger span {
  height: 4px;
  width: 100%;
  background: #1db954;
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s;
}
@media (max-width: 700px) {
  #main-navbar .navbar-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100vw;
    flex-direction: column;
    background: #181818;
    border-bottom: 2px solid #1db954;
    gap: 0;
    z-index: 200;
  }
  #main-navbar .navbar-links.open {
    display: flex;
  }
  #main-navbar .burger {
    display: flex;
  }
}

/* Animation du menu burger (croix) sur mobile */
#main-navbar .burger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#main-navbar .burger.open span:nth-child(2) {
  opacity: 0;
}
#main-navbar .burger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
#main-navbar .burger span {
  transition: transform 0.3s, opacity 0.3s;
}

/* Icônes outils dans la navbar */
#main-navbar .tool-icon {
  display: inline-block;
  font-size: 1.15em;
  margin-right: 0.5em;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px #19141488);
  transition: transform 0.2s;
}
#main-navbar .tool-btn.active .tool-icon,
#main-navbar .tool-btn:hover .tool-icon {
  transform: scale(1.18) rotate(-8deg);
}
@media (max-width: 700px) {
  #main-navbar .tool-icon {
    font-size: 1.2em;
    margin-right: 0.7em;
  }
}

/* Bouton fixe 'Besoin d'un outil ?' */
#need-tool-btn-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
}
#need-tool-btn {
    background: linear-gradient(90deg, #1db954 0%, #191414 100%);
    color: #fff;
    font-weight: 600;
    border-radius: 24px;
    padding: 0.8em 1.5em;
    font-size: 1.1em;
    box-shadow: 0 2px 8px #1db95433;
    border: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
    overflow: hidden;
    height: 2.8em;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.need-tool-btn-text {
    position: absolute;
    left: 0; right: 0;
    top: 0; bottom: 0;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s, transform 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.1em;
    pointer-events: none;
}
.need-tool-btn-text-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#need-tool-btn:hover {
    background: linear-gradient(90deg, #1ed760 0%, #1db954 100%);
    box-shadow: 0 4px 16px #1db95488;
    transform: scale(1.05);
}

/* Modale 'Besoin d'un outil ?' */
#need-tool-modal.need-tool-modal-hidden {
    display: none;
}
#need-tool-modal.need-tool-modal-visible {
    display: flex;
}
#need-tool-modal {
    position: fixed;
    left: 0; bottom: 0; right: 0; top: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    display: none;
}
.need-tool-modal-content {
    background: #191414;
    border-radius: 18px;
    padding: 2.2em 2.5em 2em 2.5em;
    box-shadow: 0 8px 32px #1db95433;
    border: 2px solid #1db954;
    color: #fff;
    min-width: 320px;
    max-width: 90vw;
    text-align: center;
    position: relative;
}
#need-tool-modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 2em;
    color: #1db954;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}
#need-tool-modal-close:hover {
    color: #fff;
}
.github-issue-link {
    display: inline-block;
    margin-top: 1.2em;
    background: #1db954;
    color: #191414;
    font-weight: 700;
    padding: 0.7em 1.3em;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.github-issue-link:hover {
    background: #191414;
    color: #1db954;
    border: 1.5px solid #1db954;
}

/* Scrollbar Spotify animée */
body::-webkit-scrollbar {
    width: 18px;
    background: #191414;
}
body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1db954 0%, #191414 100%);
    border-radius: 12px;
    min-height: 60px;
    border: 4px solid #191414;
}
body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1ed760 0%, #1db954 100%);
}
body::-webkit-scrollbar-track {
    background: #222326;
    border-radius: 12px;
}
body {
    scrollbar-width: thin;
    scrollbar-color: #1db954 #222326;
}

#main-menu {
    position: absolute;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: rgba(25,25,25,0.97);
    border-radius: 18px;
    box-shadow: 0 8px 32px #1db95455;
    border: 2px solid #1db954;
    z-index: 1001;
    padding: 1.2em 0.5em 1em 0.5em;
    animation: mainMenuFadeIn 0.35s cubic-bezier(.4,2,.6,1);
    display: none;
}
#main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#main-menu li {
    margin: 0.5em 0;
    text-align: center;
}
#main-menu a {
    color: #1db954;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1em;
    padding: 0.5em 1.2em;
    border-radius: 8px;
    display: inline-block;
    transition: background 0.18s, color 0.18s;
}
#main-menu a:hover {
    background: #1db954;
    color: #191414;
}
.main-menu-hidden {
    display: none !important;
}
.main-menu-visible {
    display: block !important;
}
@keyframes mainMenuFadeIn {
    from { opacity: 0; transform: translateX(-50%) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}
.stats-genre {
    color: #1db954;
    font-weight: 600;
    font-size: 1.08em;
    margin-top: 0.7em;
    margin-bottom: 0.3em;
    letter-spacing: 0.5px;
}