/**
 * MiMusicA - Personal Music Player
 * DARK PURPLE THEME - Updated Design
 * 
 * @author    Ricardo Chandia (eShape)
 * @copyright Copyright © 2025 Ricardo Chandia. All Rights Reserved.
 * @license   Proprietary - Unauthorized copying or distribution prohibited
 * @version   4.0.0
 * @link      https://mimusica.ca
 */

/* === MiMusicA Player (Dark Theme) === */

#vmp-root {
    background: #0a0a0a !important;
    border-radius: 16px;
    padding: 15px;
    max-width: 1400px !important;
    width: 100% !important;
    margin: 20px auto !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #ffffff;
    box-sizing: border-box !important;
    position: relative;
    overflow-x: hidden !important;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

/* ---------------------------------
    USER HEADER - DARK GRADIENT
    --------------------------------- */
#vmp-root > div:first-child {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(167, 139, 250, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin: -10px -12px 0 -12px;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

#vmp-root > div:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

#vmp-root > div:first-child span {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

#vmp-root > div:first-child strong {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Menu button - Dark theme */
#vmp-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 24px;
    padding: 6px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

#vmp-menu-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ---------------------------------
    MENU DROPDOWN - DARK THEME
    --------------------------------- */
#vmp-menu-dropdown {
    position: absolute;
    right: 20px;
    top: 90px;
    background: rgba(20, 20, 20, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    min-width: 95px;
    overflow: hidden;
}

#vmp-menu-dropdown.vmp-menu-hidden {
    display: none;
}

.vmp-menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border: none !important;
    background: transparent !important;
    color: #ffffff !important;
    text-align: center;
    cursor: pointer;
    font-size: 14px !important;
    font-family: system-ui, sans-serif;
    font-weight: 500 !important;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 40px;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
}

.vmp-menu-item:hover {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa !important;
}

/* ---------------------------------
    CONTROLS TOP ROW - DARK BUTTONS
    --------------------------------- */
#vmp-controls-top {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 8px !important;
}

.vmp-control-group {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

/* Dark gradient buttons */
.vmp-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    border: none;
    color: white;
    padding: 0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 20px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    white-space: nowrap;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.vmp-btn svg {
    width: 22px;
    height: 22px;
    stroke: white;
    transition: all 0.3s;
}

.vmp-btn:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.vmp-btn:active {
    transform: translateY(0);
}

.vmp-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.6);
}

.vmp-btn.active svg {
    stroke: #fde047;
}

/* Search Input - Dark theme */
#vmp-search {
    flex: 1;
    max-width: 350px;
    padding: 14px 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

#vmp-search:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

#vmp-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ---------------------------------
    PLAYLIST CONTAINER - DARK
    --------------------------------- */
#vmp-playlist-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    max-height: 600px;
    width: 100% !important;
    overflow-y: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

#vmp-playlist-container::-webkit-scrollbar {
    width: 8px;
}

#vmp-playlist-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#vmp-playlist-container::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

#vmp-playlist-container::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

#vmp-playlist {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

#vmp-playlist li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    background: transparent;
}

#vmp-playlist li:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

#vmp-playlist li:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(4px);
}

#vmp-playlist li.vmp-current-track {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, rgba(167, 139, 250, 0.15) 100%);
    border-left: 3px solid #8b5cf6;
    font-weight: 600;
}

#vmp-playlist li.vmp-current-track .vmp-track-title {
    color: #a78bfa;
}

.vmp-empty-list {
    text-align: center !important;
    padding: 60px 20px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 16px;
    font-style: italic;
}

.vmp-uploading {
    color: #8b5cf6 !important;
    font-style: italic;
    background: rgba(139, 92, 246, 0.15) !important;
    border-left: 4px solid #8b5cf6 !important;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.vmp-track-title {
    flex: 1;
    font-size: 15px;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 10px;
    cursor: move;
    text-align: left;
}

.vmp-track-title:hover {
    color: #a78bfa;
}

.playlist-buttons {
    display: flex;
    gap: 8px;
    position: relative;
}

.vmp-play-track {
    display: none !important;
}

.vmp-delete-track {
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-size: 16px;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.4) !important;
    flex-shrink: 0;
    transition: all 0.2s;
    line-height: 1;
    box-shadow: none !important;
}

.vmp-delete-track:hover {
    color: #ef4444 !important;
    background: none !important;
    transform: scale(1.2);
}

/* ---------------------------------
    MOVE MENU - DARK THEME
    --------------------------------- */
.vmp-move-menu {
    position: absolute;
    right: 0;
    top: 35px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
    min-width: 200px;
    max-width: 250px;
}

.vmp-move-title {
    padding: 12px 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.vmp-move-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
    transition: all 0.2s;
}

.vmp-move-item:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.vmp-move-empty {
    padding: 12px 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    text-align: center;
}

.vmp-move-divider {
    height: 1px;
    background: rgba(139, 92, 246, 0.2);
    margin: 8px 0;
}

.vmp-move-input {
    width: calc(100% - 24px);
    margin: 8px 12px 12px 12px;
    padding: 8px 12px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.vmp-move-input:focus {
    border-color: #8b5cf6;
}

.vmp-move-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    width: 24px;
    height: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.vmp-move-close:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

/* ---------------------------------
    MODAL - DARK THEME
    --------------------------------- */
.vmp-modal-hidden {
    display: none !important;
}

#vmp-modal,
#vmp-playlists-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

#vmp-modal.vmp-modal-hidden,
#vmp-playlists-modal.vmp-modal-hidden {
    display: none !important;
}

.vmp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.vmp-modal-content {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    margin-top: 60px;
}

.vmp-modal-content.vmp-modal-large {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: hidden;
}

.vmp-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    background: transparent;
}

.vmp-modal-header h2 {
    margin: 0 !important;
    font-size: 24px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    display: block !important;
}

.vmp-modal-close,
.vmp-modal-close-playlists {
    background: none;
    border: none;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vmp-modal-close:hover,
.vmp-modal-close-playlists:hover {
    color: #ffffff;
}

.vmp-modal-body {
    padding: 24px;
    background: transparent;
}

@media (max-width: 768px) {
    .vmp-modal-body {
        display: flex;
        justify-content: center;
        padding: 10px;
    }
}

.vmp-create-playlist {
    display: flex;
    gap: 12px;
}

.vmp-create-playlist input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.vmp-create-playlist input:focus {
    border-color: #8b5cf6;
}

.vmp-btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    border: none;
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.vmp-btn-primary:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* ---------------------------------
    PLAYLISTS GRID - DARK CARDS
    --------------------------------- */
#vmp-playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    justify-items: center;
}

.vmp-playlist-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    min-height: 140px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

.vmp-playlist-card.vmp-create-new {
    background: rgba(139, 92, 246, 0.1);
    border: 2px dashed rgba(139, 92, 246, 0.4);
}

.vmp-playlist-card.vmp-create-new:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.2);
}

.vmp-playlist-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    background: rgba(255, 255, 255, 0.08);
    z-index: 9999;
}

.vmp-playlist-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.vmp-playlist-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    word-break: break-word;
}

.vmp-playlist-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

.vmp-playlist-card * {
    pointer-events: none;
}

.vmp-playlist-card .vmp-playlist-menu-btn,
.vmp-playlist-card .vmp-playlist-menu {
    pointer-events: auto !important;
}

.vmp-playlists-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    font-style: italic;
}

/* Playlist menu button */
.vmp-playlist-menu-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none !important;
    border: none !important;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    z-index: 10;
    pointer-events: auto !important;
    padding: 8px;
    outline: none !important;
    box-shadow: none !important;
    transition: color 0.3s ease;
}

.vmp-playlist-menu-btn:hover {
    color: #8b5cf6 !important;
}

/* Playlist menu dropdown */
.vmp-playlist-menu {
    position: absolute;
    top: 48px;
    right: 12px;
    background: rgba(20, 20, 20, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 99999 !important;
    min-width: 120px;
    overflow: hidden;
    pointer-events: auto !important;
}

.vmp-playlist-menu-hidden {
    display: none !important;
}

.vmp-playlist-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none !important;
    background: transparent !important;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff !important;
    pointer-events: auto !important;
    transition: all 0.3s ease;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.vmp-playlist-menu-item:hover {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa !important;
}

.vmp-playlist-delete:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

/* ---------------------------------
    AUDIO & VISUALIZER - DARK
    --------------------------------- */
#vmp-audio {
    width: 100%;
    outline: none;
    border-radius: 10px;
    margin-top: 0;
    margin-bottom: 0;
    background: rgba(139, 92, 246, 0.1) !important;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

#vmp-visualizer {
    display: none !important;
}

@media (max-width: 768px) {
    #vmp-visualizer {
        display: none;
    }
}

/* ---------------------------------
    YOUTUBE SEARCH MODAL - DARK
    --------------------------------- */
#vmp-youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

#vmp-youtube-modal.vmp-modal-hidden {
    display: none !important;
}

.vmp-youtube-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: rgba(15, 15, 15, 0.98) !important;
    backdrop-filter: blur(20px);
    border-radius: 16px !important;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden !important;
    z-index: 1;
}

.vmp-youtube-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent !important;
    border-radius: 0 !important;
    margin: -1px -1px 0 -1px;
}

.vmp-youtube-search input:focus {
    border-color: #8b5cf6 !important; /* Force la couleur mauve */
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2) !important;
    outline: none !important; /* Supprime le contour bleu du navigateur */
    -webkit-appearance: none; /* Pour certains navigateurs mobiles */
}

.vmp-youtube-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vmp-youtube-close:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: scale(1.1);
}

.vmp-youtube-search {
    padding: 20px 24px;
    background: rgba(139, 92, 246, 0.05);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.vmp-youtube-search input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    outline: none;
    transition: all 0.3s;
}

.vmp-youtube-search input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.vmp-youtube-results {
    padding: 20px 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.vmp-youtube-result {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.2s;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.vmp-youtube-result:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateX(4px);
    border-color: rgba(139, 92, 246, 0.3);
}

.vmp-youtube-thumbnail {
    width: 120px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.vmp-youtube-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vmp-youtube-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.vmp-youtube-channel {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.vmp-youtube-add-btn {
    background: transparent !important;
    border: none !important;
    color: #a78bfa !important;
    padding: 0 !important;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.2s;
    flex-shrink: 0;
    align-self: center;
}

.vmp-youtube-add-btn:hover {
    color: #8b5cf6 !important;
    transform: scale(1.2);
}

.vmp-youtube-loading,
.vmp-youtube-empty {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

/* Force body to allow full width when player is open */
body:has(#vmp-yt-player-container[style*="display: flex"]),
body:has(#vmp-yt-player-container[style*="display: block"]) {
    overflow: hidden !important;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* YouTube Player - Recouvrement Total de l'Écran */
#vmp-yt-player-container {
    position: fixed !important;
    top: 0 !important;
    /* On force l'élément à ignorer la colonne centrale */
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    
    /* On utilise vw pour prendre 100% de la largeur du navigateur réel */
    width: 100vw !important;
    height: 100vh !important;
    
    /* Le décalage magique pour recentrer par rapport à l'écran */
    transform: translateX(-50%) !important;
    
    background: rgba(0, 0, 0, 0.98) !important; /* Presque opaque pour cacher le fond */
    backdrop-filter: blur(15px) !important;
    z-index: 2147483647 !important; /* Valeur maximale possible en CSS */
    display: none;
    margin: 0 !important;
    padding: 0 !important;
}

#vmp-yt-player-container[style*="display: flex"],
#vmp-yt-player-container[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#vmp-yt-player-container iframe {
    /* La vidéo prend enfin sa place */
    width: 85% !important;
    max-width: 1400px !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    border: none !important;
    box-shadow: 0 0 100px rgba(0,0,0,1) !important;
}

.vmp-track-title {
    cursor: pointer !important;
}

.vmp-track-title:active {
    cursor: grabbing !important;
}

/* ---------------------------------
    MOBILE ADJUSTMENTS
    --------------------------------- */
@media (max-width: 768px) {
    #vmp-root {
        padding: 20px;
        margin: 10px auto !important;
    }
    
    .vmp-btn {
        font-size: 22px;
        padding: 12px 16px;
    }
    
    #vmp-controls-top {
        flex-direction: column;
    }
    
    .vmp-control-group {
        width: 100%;
        min-width: auto;
    }
    
    #vmp-search {
        max-width: none;
    }
    
    #vmp-playlist-container {
        max-height: 500px;
    }
    
    .vmp-modal-content {
        max-width: 90vw;
        max-height: 60vh;
    }
    
    .vmp-modal-content.vmp-modal-large {
        max-width: 95vw;
    }
    
    #vmp-playlists-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .vmp-playlist-card {
    min-height: 95px;
    padding: 10px 6px;
}
    
    .vmp-playlist-icon {
        font-size: 24px;
    }
    
    .vmp-playlist-name {
        font-size: 12px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #vmp-root {
        padding: 16px;
    }
    
    .vmp-btn {
        font-size: 20px;
        padding: 10px 14px;
    }
    
    @media (max-width: 768px) {
    #vmp-playlists-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 450px;
        margin: 0 auto;
        justify-items: center;
    }
}

/* Fix visualizer paragraph spacing */
#vmp-root p {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
}

/* Hide scrollbar but keep scrolling */
body {
    overflow: auto !important;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
body::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
html {
    overflow: auto !important;
}
#vmp-root {
    overflow: visible !important;
}

.vmp-youtube-header {
    padding: 20px 24px 20px 60px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent !important;
    border-radius: 0 !important;
    margin: -1px -1px 0 -1px;
}

.vmp-youtube-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

}
#vmp-menu-dropdown br {
    display: none !important;
}

/* Fix YouTube Player Centering on Desktop */
#vmp-yt-player-container[style*="display: flex"],
#vmp-yt-player-container[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#vmp-yt-player-container iframe {
    width: 70% !important;
    max-width: 850px !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}

@media (max-width: 991px) {
    #vmp-yt-player-container iframe {
        width: 95% !important;
    }
}

/* YouTube Custom Controls - Modern & Sleek */
.vmp-yt-custom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 10000000;
    transition: opacity 0.3s ease;
}

.vmp-yt-song-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 10px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
}

.vmp-yt-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.2s ease;
}

.vmp-yt-progress-bar:hover {
    height: 6px;
}

.vmp-yt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.vmp-yt-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vmp-yt-play-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
}

.vmp-yt-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
}

.vmp-yt-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 80px;
    text-align: center;
    font-weight: 400;
}

.vmp-yt-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vmp-yt-volume-icon {
    color: #a78bfa;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.9;
}

.vmp-yt-volume-slider {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.vmp-yt-volume-slider:hover {
    height: 6px;
}

.vmp-yt-volume-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 2px;
    width: 100%;
    transition: width 0.1s;
}

.vmp-yt-fullscreen-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #a78bfa;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.vmp-yt-fullscreen-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

.vmp-yt-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10000001;
}

.vmp-yt-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Cacher les contrôles complexes */
    .vmp-yt-song-title,
    .vmp-yt-controls-row {
        display: none !important;
    }
    
    /* Garder juste la barre de progression + temps */
    .vmp-yt-custom-controls {
        padding: 8px 12px;
        background: rgba(0, 0, 0, 0.6);
        bottom: 0;
        border-radius: 0;
        width: 100%;
    }
    
    .vmp-yt-progress-bar {
        margin-bottom: 5px;
    }
    
    /* Temps en petit sous la barre */
    .vmp-yt-time-mobile {
        display: block !important;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.8);
        text-align: center;
    }
    
    /* Bouton Play/Pause AU CENTRE de l'écran */
    .vmp-yt-play-center {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 60px !important;
        height: 60px !important;
        background: rgba(139, 92, 246, 0.9) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 24px !important;
        color: white !important;
        z-index: 999999998 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    }
    
    .vmp-yt-close-btn {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }
}

/* Desktop: temps mobile caché */
.vmp-yt-time-mobile {
    display: none;
}

/* Fullscreen adjustments */
#vmp-yt-player-container:fullscreen .vmp-yt-custom-controls {
    max-width: 1100px;
    bottom: 30px;
}

#vmp-yt-player-container {
    cursor: default;
}

#vmp-yt-player-container.vmp-hide-cursor {
    cursor: none;
}

/* Empêche l'iframe de voler tous les événements si on veut garder le contrôle */
#vmp-yt-player-container {
    pointer-events: auto !important;
}

/* Les contrôles doivent être au-dessus de TOUT */
.vmp-yt-custom-controls, .vmp-yt-close-btn {
    position: absolute !important;
    z-index: 999999999 !important;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Si tu gardes ton système de classe vmp-hidden, force-le ici */
.vmp-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

#vmp-mouse-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999998 !important; /* Juste en-dessous des contrôles */
    background: transparent !important;
    pointer-events: auto !important;
}

.vmp-yt-custom-controls, .vmp-yt-close-btn {
    position: absolute !important;
    z-index: 999999999 !important;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Fullscreen: iframe prend TOUT l'espace */
#vmp-yt-player-container:fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
}

/* Pour Safari/Webkit */
#vmp-yt-player-container:-webkit-full-screen iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
}

/* Contrôles en fullscreen */
#vmp-yt-player-container:fullscreen .vmp-yt-custom-controls {
    bottom: 40px !important;
}

/* Cacher TOUTES les infos YouTube */
#vmp-yt-player-container iframe {
    pointer-events: auto !important;
}

/* Overlay pour bloquer la zone des infos YouTube */
#vmp-mouse-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 80px !important;
    z-index: 999999998 !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent) !important;
    pointer-events: none !important;
}

/* Force hide YouTube UI elements */
.ytp-chrome-top,
.ytp-title,
.ytp-title-text,
.ytp-gradient-top,
.ytp-show-cards-title {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Cacher le bouton Partager YouTube */
.ytp-share-button,
.ytp-share-button-visible,
.ytp-sharebutton,
.ytp-button[aria-label*="Share"],
.ytp-button[aria-label*="Partager"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Overlay transparent pour cacher les boutons YouTube */
#vmp-yt-player-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    z-index: 999999997;
    pointer-events: auto;
}

/* En fullscreen */
#vmp-yt-player-container:fullscreen::before {
    width: 100%;
    height: 100%;
    max-width: none;
}

/* Les contrôles custom au-dessus */
.vmp-yt-custom-controls, 
.vmp-yt-close-btn {
    z-index: 999999999 !important;
}