/* ============================================
   Ultimate Local Music Player - Styles
   ============================================ */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s ease;
}

.toggle-container:hover {
    background: rgba(255, 255, 255, 0.05);
}

.toggle-container input[type="checkbox"] {
    appearance: none;
    width: 34px;
    height: 18px;
    background: #444;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-right: 12px;
    flex-shrink: 0;
}

.toggle-container input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-container input[type="checkbox"]:checked {
    background: #28a745;
}

.toggle-container input[type="checkbox"]:checked::before {
    transform: translateX(16px);
}


    
    body { 
        display: flex;
        flex-direction: column; 
        align-items: center; 
        justify-content: flex-start; 
        min-height: 100vh; 
        background-color: #0a0a0a; 
        color: #ddd; 
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        padding: 20px;
        overflow-x: hidden;
        transition: background-color 1.5s ease;
        background-image: radial-gradient(circle at top right, rgba(220, 53, 69, 0.05), transparent 40%),
                          radial-gradient(circle at bottom left, rgba(0, 123, 255, 0.05), transparent 40%);
    }
    
    h1 { 
        margin-bottom: 20px;
        font-size: 2em; 
        color: #fff;
        text-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
    }
    
    /* Drag and Drop Overlay */
    #drop-zone {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(220, 53, 69, 0.9);
        color: white;
        display: none;
        align-items: center;
        justify-content: center;
        font-size: 3em;
        font-weight: bold;
        z-index: 1000;
        border: 5px dashed white;
        pointer-events: none;
    }

    #folder-button {
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }

    #folder-button:hover:not(:disabled) {
        background: linear-gradient(135deg, #34ce57 0%, #28a745 100%);
    }

    #folder-button.active {
        background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    }

    #clear-folder-button {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    padding: 8px 16px;
    font-size: 12px;
}
    
    /* Now Playing Section */
    #metadata-container {
        display: flex;
        align-items: center;
        gap: 25px;
        margin-bottom: 25px;
        width: 90%;
        max-width: 800px;
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 8px 32px rgba(220, 53, 69, 0.2);
        border: 1px solid #333;
        transition: background 0.5s ease, box-shadow 0.5s ease;
    }

    #playlist-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9em;
    }

    #playlist-search:focus {
    outline: none;
    border-color: #dc3545;
    }
    
    #cover-art-container {
        width: 180px;
        height: 180px;
        min-width: 180px;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
    }
    
    #cover-art {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: none;
    }
    
    #cover-art.loaded {
        display: block;
    }
    
    #cover-placeholder {
        font-size: 4em;
        color: #444;
    }
    
    #info-details {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    #info-details .label { 
        margin: 0;
        font-size: 0.75em;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 600;
    }
    
    #info-details .value { 
        color: #fff;
        font-size: 1.2em;
        margin-bottom: 8px;
        font-weight: 600;
    }

    /* Controls */
    #controls { 
        margin-bottom: 25px;
        display: flex; 
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

#mode-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 1.5em;
    font-weight: bold;
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    pointer-events: none;
}
    
    button { 
        padding: 12px 24px;
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        color: white; 
        border: none; 
        border-radius: 8px; 
        cursor: pointer; 
        transition: all 0.3s ease;
        font-size: 14px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    button:hover:not(:disabled) { 
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
    }
    
    button:active {
        transform: translateY(0);
    }
    
    button:disabled {
        background: linear-gradient(135deg, #555 0%, #444 100%);
        cursor: not-allowed;
        opacity: 0.5;
        box-shadow: none;
    }
    
    button.active { 
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    }
    
   button.loop-one {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

#playlist-status { 
    font-style: italic;
    margin-bottom: 20px;
    color: #888;
    font-size: 0.95em;
}

/* ========== ADD THE VOLUME CONTROL CSS HERE ========== */
/* Volume Control */
#volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    width: 90%;
    max-width: 800px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

#volume-icon {
    font-size: 1.5em;
    min-width: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#volume-icon:hover {
    transform: scale(1.1);
}

#volume-slider {
    flex: 1;
    height: 6px;
    background: #222;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #ff7788 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    transition: all 0.2s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6);
}

#volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #ff7788 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    transition: all 0.2s ease;
}

#volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6);
}

#volume-slider::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, 
        #dc3545 0%, 
        #dc3545 var(--volume-percent, 100%), 
        #222 var(--volume-percent, 100%), 
        #222 100%
    );
    height: 6px;
    border-radius: 3px;
}

#volume-slider::-moz-range-track {
    background: #222;
    height: 6px;
    border-radius: 3px;
}

#volume-slider::-moz-range-progress {
    background: linear-gradient(90deg, #dc3545 0%, #ff7788 100%);
    height: 6px;
    border-radius: 3px;
}

#volume-percentage {
    color: #fff;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
    font-size: 0.9em;
}
/* ========== END OF VOLUME CONTROL CSS ========== */

/* ========== EQUALIZER CONTROL CSS ========== */
#equalizer-control {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    width: 90%;
    max-width: 800px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.eq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.eq-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
}

.eq-reset-btn {
    padding: 6px 12px;
    font-size: 11px;
    background: linear-gradient(135deg, #666 0%, #555 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.eq-reset-btn:hover {
    background: linear-gradient(135deg, #777 0%, #666 100%);
}

.eq-bands {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 20px;
}

.eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.eq-label {
    color: #888;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eq-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    appearance: none;
    -webkit-appearance: none;
    width: 8px;
    height: 150px;
    background: #222;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Webkit (Chrome, Safari) */
.eq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #ff7788 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    transition: all 0.2s ease;
}

.eq-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6);
}

.eq-slider::-webkit-slider-runnable-track {
    background: linear-gradient(180deg, 
        #28a745 0%, 
        #28a745 50%, 
        #222 50%, 
        #222 100%
    );
    width: 8px;
    border-radius: 4px;
}

/* Firefox */
.eq-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #ff7788 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    transition: all 0.2s ease;
}

.eq-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6);
}

.eq-slider::-moz-range-track {
    background: #222;
    width: 8px;
    border-radius: 4px;
}

.eq-value {
    color: #fff;
    font-size: 0.8em;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    padding: 4px 8px;
    background: rgba(220, 53, 69, 0.2);
    border-radius: 4px;
}

/* Mobile EQ fixes */
@media (max-width: 768px) {
    .eq-bands {
        gap: 30px !important;
    }
    
    .eq-slider {
        width: 12px !important;
        height: 180px !important;
        /* Increase touch target */
        padding: 0 10px;
        margin: 0 -10px;
    }
    
    .eq-slider::-webkit-slider-thumb {
        width: 28px !important;
        height: 28px !important;
    }
    
    .eq-slider::-moz-range-thumb {
        width: 28px !important;
        height: 28px !important;
    }
    
    .eq-reset-btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
        min-height: 48px !important;
    }
    
    .eq-preset-dropdown {
        padding: 10px 16px !important;
        font-size: 14px !important;
        min-height: 48px !important;
    }
}
/* ========== END OF EQUALIZER CONTROL CSS ========== */

/* ========== END OF VOLUME CONTROL CSS ========== */

/* Custom Progress Bar */
#custom-progress-container {
    width: 90%;
    max-width: 800px;
    margin-bottom: 15px;
    background: #222;
    height: 8px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #dc3545 0%, #ff7788 100%);
    border-radius: 4px;
    transition: width 0.1s linear;
}

#time-display {
    width: 90%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #888;
    margin-bottom: 25px;
}

/* Audio Player */
#player-wrapper {
    width: 90%;
    max-width: 800px;
    margin-bottom: 25px;
    position: relative;
}

video { 
    width: 100%;
    background-color: #111;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: none;
}

/* Custom Lyrics Display */
#lyrics-display {
    position: relative;
    width: 90%;
    max-width: 800px;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #333;
    text-align: center;
    margin-bottom: 25px;
}

.lyric-line {
    font-size: 1.8em;
    color: #666;
    margin: 10px 0;
    transition: color 0.3s ease, font-size 0.3s ease;
    cursor: pointer;
    line-height: 1.4;
}

.lyric-line.active {
    color: #dc3545;
    font-size: 2em;
    font-weight: 700;
}

/* Lyrics Export Button */
#export-lyrics-button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    font-size: 12px;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#export-lyrics-button:hover:not(:disabled) {
    opacity: 1;
}

#export-lyrics-button:disabled {
    opacity: 0.3;
}

/* Playlist Section */
#playlist-container {
    width: 90%;
    max-width: 800px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.2);
    border: 1px solid #333;
    max-height: 400px;
    overflow-y: auto;
}

#playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dc3545;
}

#playlist-container h2 {
    color: #fff;
    font-size: 1.3em;
    margin: 0;
}

#clear-playlist {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

#playlist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    min-height: 48px;
    background: #222;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.playlist-item:hover {
    background: #2a2a2a;
    border-color: #dc3545;
    transform: translateX(5px);
}

.playlist-item.playing {
    background: linear-gradient(90deg, #dc354522 0%, #00000000 100%);
    border-color: #dc3545;
}

.playlist-item-number {
    color: #666;
    font-weight: bold;
    min-width: 30px;
    font-size: 0.9em;
}

.playlist-item.playing .playlist-item-number {
    color: #dc3545;
}

.playlist-item-thumbnail {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 5px;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 1.5em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.playlist-item-thumbnail.loaded {
    background: none;
    color: transparent;
}

.playlist-item-info {
    flex: 1;
}

.playlist-item-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 3px;
}

.playlist-item-artist {
    color: #888;
    font-size: 0.85em;
}

.playlist-item-edit-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.playlist-item-edit-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.5);
}

.playlist-item.playing .playlist-item-edit-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.playlist-item-badges {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.badge {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-lyrics {
    background: #28a745;
    color: #fff;
}

.badge-metadata {
    background: #dc3545;
    color: #fff;
}

.badge-analysis {
    background: #6f42c1;
    color: #fff;
}

.empty-playlist {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

/* Scrollbar Styling */
#playlist-container::-webkit-scrollbar,
#lyrics-display::-webkit-scrollbar {
    width: 8px;
}

#playlist-container::-webkit-scrollbar-track,
#lyrics-display::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

#playlist-container::-webkit-scrollbar-thumb,
#lyrics-display::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 4px;
}

#playlist-container::-webkit-scrollbar-thumb:hover,
#lyrics-display::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}

/* Debug Panel */
#debug-panel {
    width: 90%;
    max-width: 800px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #333;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #0f0;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

#debug-panel.visible {
    display: block;
}

#debug-toggle {
    margin-top: 10px;
    font-size: 12px;
    padding: 6px 12px;
}

        /* ========== COMPACT MODE CSS ========== */

/* Mini mode — metadata window only; everything else hidden by JS */
#main-content.mode-mini #metadata-container {
    padding: 10px 15px;
    gap: 15px;
}

#main-content.mode-mini #cover-art-container {
    width: 80px;
    height: 80px;
    min-width: 80px;
}

#main-content.mode-mini #info-details .value {
    font-size: 0.95em;
}

#main-content.mode-mini #info-details .label {
    font-size: 0.65em;
}
/* ========== END COMPACT MODE CSS ========== */
        
        /* ========== STICKY MINI PLAYER CSS ========== */
body.sticky-mini {
    padding-bottom: 180px; /* Make room for sticky player */
}

.sticky-mini #metadata-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 0;
    border-top: 2px solid #dc3545;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.8);
    max-width: 100%;
    margin: 0;
    animation: slideInUp 0.4s ease;
}

.sticky-mini #custom-progress-container {
    position: fixed;
    bottom: 140px;
    left: 0;
    right: 0;
    z-index: 9999;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

.sticky-mini #time-display {
    position: fixed;
    bottom: 150px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    max-width: calc(100% - 40px);
    margin: 0;
}

.sticky-mini #playback-controls {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(20, 20, 20, 0.9);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    width: auto !important;
    margin: 0 !important;
}

.sticky-mini #playback-controls .control-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sticky-mini #playback-controls .control-btn-play {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
}

.sticky-mini #playback-controls .control-icon {
    font-size: 18px !important;
}

.sticky-mini #playback-controls .control-btn-play .control-icon {
    font-size: 24px !important;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#sticky-toggle.active {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* Make sticky mode work better with mini mode */
.sticky-mini.mini-mode #metadata-container {
    padding: 15px 20px;
}

.sticky-mini.mini-mode #cover-art-container {
    width: 60px;
    height: 60px;
    min-width: 60px;
}

/* Close button for sticky mode */
.sticky-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.8);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10000;
}

.sticky-close:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}
/* ========== END STICKY MINI PLAYER CSS ========== */

/* ========== TABLET & LANDSCAPE FIXES ========== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Tablet-specific adjustments */
    #metadata-container {
        max-width: 90%;
    }
    
    #controls {
        max-width: 90%;
        gap: 8px;
    }
    
    button {
        padding: 10px 18px !important;
        font-size: 13px !important;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    /* Landscape phone adjustments */
    body {
        padding: 10px !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: flex-start !important;
        overflow-x: hidden !important;
    }

    h1 {
        font-size: 1.2em !important;
        margin-bottom: 10px !important;
        width: 100% !important;
    }

    #metadata-container {
        width: 45% !important;
        margin-right: 10px !important;
        margin-bottom: 10px !important;
        padding: 10px !important;
        flex-direction: row !important;
    }

    #cover-art-container {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
    }

    #info-details .value {
        font-size: 0.9em !important;
    }

    #playback-controls {
        width: 50% !important;
        margin-bottom: 10px !important;
        gap: 10px !important;
    }

    .control-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .control-btn-play {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
    }

    .control-icon {
        font-size: 18px !important;
    }

    #custom-progress-container {
        width: 90% !important;
        margin-bottom: 5px !important;
    }
    
    .lyric-line {
        font-size: 1.1em !important;
    }
    
    .lyric-line.active {
        font-size: 1.3em !important;
    }

    #sidebar {
        display: none !important; /* Hide sidebar in landscape to save space */
    }

    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Portrait orientation - ensure proper layout */
@media (orientation: portrait) and (max-width: 768px) {
    body {
        flex-direction: column !important;
        padding: 15px !important;
    }

    #metadata-container {
        width: 95% !important;
        flex-direction: row !important;
    }

    #playback-controls {
        width: 95% !important;
    }

    .control-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .control-btn-play {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
    }
}

/* ========== END TABLET & LANDSCAPE FIXES ========== */

.eq-preset-dropdown {
    padding: 6px 12px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.eq-preset-dropdown:hover {
    border-color: #dc3545;
}

.eq-preset-dropdown:focus {
    border-color: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
}



/* Mobile responsive */
@media (max-width: 768px) {
    .download-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .download-modal-header {
        padding: 15px 20px;
    }
    
    .download-modal-header h2 {
        font-size: 1.2em;
    }
    
    .download-modal-body {
        padding: 20px;
    }
    
    .download-input-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
}

/* ========== END DOWNLOAD SYSTEM STYLES ========== */

/* ========== METADATA EDITOR STYLES ========== */

#metadata-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#metadata-editor-modal.show {
    opacity: 1;
    pointer-events: all;
}

.metadata-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.metadata-editor-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    border: 2px solid #dc3545;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.metadata-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #dc3545;
    background: #1a1a1a;
}

.metadata-editor-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5em;
}

.metadata-editor-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.metadata-editor-close:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: rotate(90deg);
}

.metadata-editor-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* Preview section */
.metadata-editor-preview {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #333;
}

.metadata-preview-art {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metadata-preview-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.metadata-preview-placeholder {
    font-size: 2em;
    color: #444;
}

.metadata-preview-info {
    flex: 1;
}

.metadata-preview-label {
    color: #888;
    font-size: 0.85em;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metadata-preview-value {
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
}

/* Form styling */
#metadata-editor-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.metadata-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metadata-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.metadata-form-group label {
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
}

.metadata-form-group input,
.metadata-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: #222;
    border: 2px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.metadata-form-group input:focus,
.metadata-form-group textarea:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

.metadata-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.metadata-form-group input::placeholder,
.metadata-form-group textarea::placeholder {
    color: #666;
}

/* Form actions */
.metadata-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.metadata-form-actions button {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Scrollbar for modal body */
.metadata-editor-body::-webkit-scrollbar {
    width: 8px;
}

.metadata-editor-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.metadata-editor-body::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .metadata-editor-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .metadata-editor-header {
        padding: 15px 20px;
    }
    
    .metadata-editor-header h2 {
        font-size: 1.2em;
    }
    
    .metadata-editor-body {
        padding: 20px;
    }
    
    .metadata-form-row {
        grid-template-columns: 1fr;
    }
    
    .metadata-form-actions {
        flex-direction: column;
    }
}

/* ========== END METADATA EDITOR STYLES ========== */

/* ========== CUSTOM BACKGROUND SYSTEM ========== */
body.custom-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

body.custom-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

#custom-bg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

#custom-bg-modal.show {
    display: flex;
}

.custom-bg-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #dc3545;
    max-width: 500px;
    width: 90%;
}

.custom-bg-content h2 {
    color: #fff;
    margin-bottom: 20px;
}

.custom-bg-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-bg-preview {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    background: #000;
    display: none;
    object-fit: cover;
    margin-bottom: 15px;
}

.custom-bg-preview.show {
    display: block;
}
/* ========== END CUSTOM BACKGROUND SYSTEM ========== */
#auto-lyrics-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

#auto-lyrics-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1fc8e3 0%, #17a2b8 100%);
}

/* ========== FULLSCREEN LYRICS WITH EDGE VISUALIZER ========== */
#fullscreen-lyrics {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000; /* 🔥 FIX: Simple black background, canvas will provide color */
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#fullscreen-lyrics.show {
    display: flex;
}

#fullscreen-lyrics.fullscreen-lyrics-hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* 🔥 FIX: Canvas needs to be absolute and cover entire area */
#fullscreen-lyrics-viz-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Behind lyrics but visible */
    pointer-events: none;
    opacity: 1; /* 🔥 FIX: Was 0.8, now full opacity */
    /* 🔥 REMOVED: mix-blend-mode: screen; - this was hiding it */
}

/* 🔥 FIX: Content needs to be on top with proper z-index */
.fullscreen-lyrics-content {
    position: relative;
    z-index: 2; /* 🔥 FIX: Above canvas */
    width: 80%;
    max-width: 800px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 40px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3); /* 🔥 FIX: Semi-transparent so canvas shows through */
    backdrop-filter: blur(10px); /* 🔥 FIX: Blur the visualizer behind text */
    border-radius: 20px;
}

.fullscreen-lyrics-content::-webkit-scrollbar {
    width: 8px;
}

.fullscreen-lyrics-content::-webkit-scrollbar-track {
    background: transparent;
}

.fullscreen-lyrics-content::-webkit-scrollbar-thumb {
    background: rgba(220, 53, 69, 0.5);
    border-radius: 4px;
}

.fullscreen-lyric-line {
    font-size: 2em;
    color: rgba(255, 255, 255, 0.4); /* 🔥 FIX: More transparent inactive lines */
    margin: 20px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); /* 🔥 FIX: Stronger shadow for readability */
}

.fullscreen-lyric-line.active {
    color: #fff;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(220, 53, 69, 0.8), 0 2px 10px rgba(0, 0, 0, 0.9);
}

.fullscreen-lyric-line:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Bottom controls - need to be above canvas */
.fullscreen-lyrics-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 3; /* 🔥 FIX: Above everything */
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.7); /* 🔥 FIX: Dark background for buttons */
    padding: 15px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

#fullscreen-lyrics:hover .fullscreen-lyrics-controls {
    opacity: 1;
}

.lyrics-control-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.lyrics-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* Close button - needs to be above canvas */
.fullscreen-lyrics-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(220, 53, 69, 0.8);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3; /* 🔥 FIX: Above canvas */
    backdrop-filter: blur(10px);
}

.fullscreen-lyrics-close:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* No lyrics message */
.fullscreen-lyrics-empty {
    color: #666;
    font-size: 1.5em;
    text-align: center;
}
/* ========== END FULLSCREEN LYRICS WITH EDGE VISUALIZER ========== */

button.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

button.active:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba87d 100%);
}

#deep-analysis-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
}

#deep-analysis-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #7952cc 0%, #6f42c1 100%);
}

/* ========== SIDEBAR STYLES ========== */
body {
    display: block;
    padding: 0;
    margin: 0;
}

#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border-right: 2px solid #dc3545;
    z-index: 9000;
    transition: width 0.3s ease;
    overflow: hidden;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
}

#sidebar.collapsed {
    width: 70px;
}

#sidebar:not(.collapsed) {
    width: 280px;
}

.sidebar-toggle {
    width: 100%;
    padding: 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: #dc3545;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.sidebar-toggle:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
    box-shadow: none !important;
}

.sidebar-content {
    padding: 10px 0;
    overflow-y: auto;
    height: calc(100vh - 70px);
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 3px;
}

.sidebar-item {
    width: 100%;
}

.sidebar-btn {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    border-left: 3px solid transparent;
    white-space: nowrap;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.sidebar-btn:hover:not(:disabled) {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
    transform: none !important;
    box-shadow: none !important;
}

.sidebar-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.sidebar-btn.active {
    background: rgba(40, 167, 69, 0.2);
    border-left-color: #28a745;
    box-shadow: none !important;
}

.sidebar-icon {
    font-size: 20px;
    min-width: 30px;
    text-align: center;
    display: inline-block;
}

.sidebar-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 1;
    transition: opacity 0.2s ease;
    display: inline-block;
}

#sidebar.collapsed .sidebar-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

#sidebar.collapsed .sidebar-btn {
    justify-content: center;
    padding: 15px;
}

/* ========== MAIN CONTENT ADJUSTMENT ========== */
#main-content {
    margin-left: 70px;
    transition: margin-left 0.3s ease;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body h1 {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

/* ========== PLAYBACK CONTROLS ========== */
#playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    width: 90%;
    max-width: 600px;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    padding: 0;
    text-transform: none;
    letter-spacing: 0;
}

.control-btn-play {
    width: 80px;
    height: 80px;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.6);
}

.control-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
}

.control-btn:disabled {
    background: linear-gradient(135deg, #555 0%, #444 100%);
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.control-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.control-icon {
    font-size: 24px;
}

.control-btn-play .control-icon {
    font-size: 32px;
}

.control-label {
    display: none;
}

#loop-button {
    width: auto;
    padding: 0 20px;
    border-radius: 30px;
    gap: 8px;
}

#loop-button .control-label {
    display: inline;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ========== FILE CONTROLS ========== */
#file-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    width: 90%;
    max-width: 800px;
}

#file-controls button {
    padding: 12px 24px;
}

#auto-reload-label {
    display: inline-flex !important;
    align-items: center;
    color: #fff;
    font-size: 14px;
    gap: 8px;
    cursor: pointer;
}

#auto-reload-check {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* ========== RESPONSIVE SIDEBAR ========== */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px !important;
        visibility: visible;
        opacity: 1;
        transition: left 0.3s ease;
        z-index: 9000;
        overflow-x: hidden;
    }
    
    #sidebar:not(.collapsed) {
        left: 0;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.8);
    }
    
    .sidebar-toggle {
        position: fixed !important;
        left: 10px !important;
        top: 10px !important;
        width: 50px !important;
        height: 50px !important;
        z-index: 9001 !important;
        background: rgba(26, 26, 26, 0.95) !important;
        border-radius: 50% !important;
        border: 2px solid #dc3545 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    }
    
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    #sidebar .sidebar-label {
        display: inline-block !important;
        opacity: 1 !important;
    }
    
    #sidebar.collapsed .sidebar-label {
        display: none !important;
    }
    
    .sidebar-btn {
        padding: 15px 20px !important;
        justify-content: flex-start !important;
    }
}
/* ========== END SIDEBAR STYLES ========== */

/* DJ Mode Modal */
        .dj-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }

        .dj-modal.show {
            display: flex;
        }

        .dj-container {
            background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
            border-radius: 20px;
            max-width: 1200px;
            width: 95%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(220, 53, 69, 0.5);
            border: 1px solid rgba(220, 53, 69, 0.3);
        }

        .dj-header {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
            padding: 25px;
            border-radius: 20px 20px 0 0;
            position: relative;
        }

        .dj-header h2 {
            margin: 0;
            font-size: 2em;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .dj-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(0, 0, 0, 0.3);
            border: none;
            color: white;
            font-size: 28px;
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }

        .dj-close:hover {
            background: rgba(0, 0, 0, 0.6);
            transform: rotate(90deg);
        }

        .dj-content {
            padding: 30px;
        }

        /* Mix Styles Grid */
        .dj-styles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .dj-style-card {
            background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
            border: 2px solid rgba(220, 53, 69, 0.2);
            border-radius: 15px;
            padding: 25px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }

        .dj-style-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, transparent 100%);
            opacity: 0;
            transition: opacity 0.3s;
        }

        .dj-style-card:hover::before,
        .dj-style-card.active::before {
            opacity: 1;
        }

        .dj-style-card:hover {
            border-color: rgba(220, 53, 69, 0.6);
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
        }

        .dj-style-card.active {
            border-color: #dc3545;
            box-shadow: 0 0 30px rgba(220, 53, 69, 0.5);
        }

        .dj-style-icon {
            font-size: 3em;
            margin-bottom: 15px;
        }

        .dj-style-name {
            font-size: 1.3em;
            font-weight: bold;
            margin-bottom: 10px;
            color: #fff;
        }

        .dj-style-description {
            color: #aaa;
            font-size: 0.9em;
            line-height: 1.5;
        }

        /* Mix Visualization */
        .dj-visualization {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 15px;
            padding: 25px;
            margin-top: 30px;
            display: none;
        }

        .dj-visualization.show {
            display: block;
        }

        .dj-viz-title {
            font-size: 1.5em;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .dj-viz-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
        }

        .dj-stat-box {
            background: rgba(220, 53, 69, 0.1);
            border: 1px solid rgba(220, 53, 69, 0.3);
            border-radius: 10px;
            padding: 15px;
            text-align: center;
        }

        .dj-stat-label {
            color: #aaa;
            font-size: 0.85em;
            margin-bottom: 5px;
        }

        .dj-stat-value {
            color: #fff;
            font-size: 1.8em;
            font-weight: bold;
        }

        .dj-stat-quality {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75em;
            font-weight: bold;
            margin-top: 5px;
        }

        .quality-excellent { background: #28a745; color: white; }
        .quality-good { background: #17a2b8; color: white; }
        .quality-fair { background: #ffc107; color: black; }
        .quality-poor { background: #dc3545; color: white; }

        /* Energy/BPM Curves */
        .dj-curves {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 20px;
        }

        .dj-curve-container {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            padding: 15px;
        }

        .dj-curve-title {
            font-size: 1.1em;
            margin-bottom: 15px;
            color: #dc3545;
        }

        .dj-curve-canvas {
            width: 100%;
            height: 150px;
            border-radius: 8px;
        }

        /* Mood Flow */
        .dj-mood-flow {
            margin-top: 20px;
        }

        .dj-mood-title {
            font-size: 1.1em;
            margin-bottom: 15px;
            color: #dc3545;
        }

        .dj-mood-track {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            margin: 5px 0;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            border-left: 4px solid;
            transition: all 0.2s;
        }

        .dj-mood-track:hover {
            background: rgba(220, 53, 69, 0.1);
            transform: translateX(5px);
        }

        .dj-mood-index {
            font-weight: bold;
            color: #888;
            min-width: 30px;
        }

        .dj-mood-badge {
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 0.85em;
            font-weight: bold;
        }

        .dj-mood-title-text {
            flex: 1;
            color: #fff;
        }

        /* Control Buttons */
        .dj-controls {
            display: flex;
            gap: 15px;
            margin-top: 30px;
            flex-wrap: wrap;
        }

        .dj-button {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 10px;
            font-size: 1.1em;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .dj-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
        }

        .dj-button:active {
            transform: translateY(0);
        }

        .dj-button.secondary {
            background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
        }

        .dj-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Session Stats */
        .dj-session-stats {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 10px;
            padding: 15px;
            margin-top: 20px;
            display: none;
        }

        .dj-session-stats.show {
            display: block;
        }

        .dj-session-title {
            font-size: 1.1em;
            margin-bottom: 10px;
            color: #dc3545;
        }

        .dj-session-info {
            color: #aaa;
            font-size: 0.9em;
            line-height: 1.8;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .dj-curves {
                grid-template-columns: 1fr;
            }

            .dj-styles-grid {
                grid-template-columns: 1fr;
            }

            .dj-controls {
                flex-direction: column;
            }

            .dj-button {
                width: 100%;
                justify-content: center;
            }
        }

        /* Animations */
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .dj-modal.show .dj-container {
            animation: slideIn 0.4s ease-out;
        }

        /* Loading State */
        .dj-loading {
            text-align: center;
            padding: 40px;
            color: #aaa;
        }

        .dj-loading-spinner {
            border: 4px solid rgba(220, 53, 69, 0.1);
            border-top: 4px solid #dc3545;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

/* ========== FOLDER HISTORY MODAL ========== */
#folder-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-history-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.folder-history-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    border: 2px solid #dc3545;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.folder-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #dc3545;
    background: #1a1a1a;
}

.folder-history-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5em;
}

.folder-history-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.folder-history-close:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: rotate(90deg);
}

.folder-history-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.folder-history-body::-webkit-scrollbar {
    width: 8px;
}

.folder-history-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.folder-history-body::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 4px;
}

/* Current Folder Section */
.folder-history-current {
    background: rgba(40, 167, 69, 0.15);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.folder-history-current h3 {
    color: #28a745;
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

.folder-history-current.empty {
    background: rgba(108, 117, 125, 0.15);
    border-color: #6c757d;
    text-align: center;
    padding: 30px;
}

.folder-history-current.empty h3 {
    color: #6c757d;
}

/* History Section */
.folder-history-section h3 {
    color: #dc3545;
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

#folder-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.folder-history-item {
    background: rgba(40, 40, 40, 0.7);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.folder-history-item:hover {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    transform: translateX(5px);
}

.folder-history-item.current {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    cursor: default;
}

.folder-history-item.current:hover {
    transform: none;
}

.folder-item-info {
    flex: 1;
}

.folder-item-name {
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.folder-item-current-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 8px;
}

.folder-item-details {
    color: #888;
    font-size: 0.85em;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.folder-item-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.folder-item-date {
    color: #666;
    font-size: 0.8em;
    white-space: nowrap;
}

/* Actions */
.folder-history-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.folder-history-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.folder-history-btn.primary {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.folder-history-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.folder-history-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.folder-history-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.5);
}

/* Empty state */
.folder-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.folder-history-empty-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.folder-history-empty p {
    font-size: 1.1em;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .folder-history-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .folder-history-actions {
        flex-direction: column;
    }
    
    .folder-item-details {
        flex-direction: column;
        gap: 5px;
    }
}
/* ========== END FOLDER HISTORY MODAL ========== */

/* ========== ENHANCED LYRICS SYSTEM ========== */

/* Lyrics Control Panel */
.lyrics-control-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.lyrics-control-panel button {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 53, 69, 0.3);
    transition: all 0.2s ease;
}

.lyrics-control-panel button:hover {
    background: rgba(220, 53, 69, 0.8);
    transform: scale(1.1);
}

.lyrics-control-panel button.active {
    background: rgba(40, 167, 69, 0.8);
    border-color: #28a745;
}

/* Search Overlay */
#lyrics-search-overlay {
    position: absolute;
    top: 60px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 15px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 53, 69, 0.3);
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#lyrics-search-overlay.lyrics-search-hidden {
    display: none;
}

#lyrics-search-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

#lyrics-search-input:focus {
    border-color: #dc3545;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
}

#lyrics-search-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-result-item:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: translateX(5px);
}

.search-result-time {
    color: #dc3545;
    font-weight: 600;
    font-size: 12px;
    min-width: 50px;
}

.search-result-text {
    color: #fff;
    font-size: 14px;
}

.search-result-text mark {
    background: rgba(220, 53, 69, 0.4);
    color: #fff;
    padding: 2px 4px;
    border-radius: 3px;
}

.search-no-results {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

#lyrics-search-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(220, 53, 69, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Display Modes */
#lyrics-display.lyrics-compact .lyric-line {
    font-size: 1.2em;
    margin: 6px 0;
}

#lyrics-display.lyrics-compact .lyric-line.active {
    font-size: 1.4em;
}

#lyrics-display.lyrics-large .lyric-line {
    font-size: 2.2em;
    margin: 15px 0;
}

#lyrics-display.lyrics-large .lyric-line.active {
    font-size: 2.5em;
}

/* Export Menu */
.lyrics-export-menu {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.lyrics-export-menu button {
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 6px;
}

.lyrics-export-menu button:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: translateX(3px);
}

/* Settings Modal */
.lyrics-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyrics-settings-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #dc3545;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.lyrics-settings-content h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.settings-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(220, 53, 69, 0.2);
}

.settings-group label {
    display: block;
    color: #fff;
    margin-bottom: 10px;
    font-size: 14px;
}

.settings-group input[type="checkbox"] {
    margin-right: 8px;
}

.settings-group select,
.settings-group input[type="range"] {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    color: #fff;
    margin-top: 5px;
}

.settings-group input[type="range"] {
    padding: 0;
}

#smoothing-value {
    display: inline-block;
    margin-left: 10px;
    color: #dc3545;
    font-weight: 600;
}

.lyrics-settings-content button {
    width: 100%;
    margin-top: 10px;
}

/* Enhanced Fullscreen Visualizer */
#fullscreen-lyrics {
    background: radial-gradient(ellipse at center, rgba(10, 10, 10, 0.95) 0%, rgba(0, 0, 0, 1) 100%);
}

#fullscreen-lyrics-viz-canvas {
    opacity: 0.8;
    mix-blend-mode: screen;
}

.fullscreen-lyric-line {
    transition: color 0.3s ease, text-shadow 0.3s ease, font-size 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lyrics-control-panel {
        flex-wrap: wrap;
    }
    
    .lyrics-control-panel button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    #lyrics-search-overlay {
        top: 100px;
        max-height: 300px;
    }
    
    .lyrics-export-menu {
        width: calc(100% - 40px);
        left: 20px !important;
    }
}

/* Animations */
@keyframes lyricPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.lyric-line.active {
    animation: lyricPulse 2s ease-in-out infinite;
}

/* ========== ENHANCED PLAYLIST RENDERER STYLES ========== */

/* Toolbar */
.playlist-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #dc3545;
    gap: 10px;
    flex-wrap: wrap;
}

.playlist-toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.playlist-toolbar-right {
    display: flex;
    align-items: center;
}

.toolbar-btn {
    padding: 8px 16px !important;
    font-size: 16px !important;
    min-width: 40px;
    height: 40px;
}

.toolbar-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4) !important;
}

.toolbar-select {
    padding: 8px 12px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.toolbar-select:hover {
    border-color: #dc3545;
}

.toolbar-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
}

.playlist-count {
    color: #888;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Selection Mode */
.playlist-selection-toolbar {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid #28a745;
    border-radius: 10px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.selection-count {
    color: #28a745;
    font-weight: 600;
    margin-right: auto;
}

.playlist-item.selectable {
    cursor: pointer;
    user-select: none;
}

.playlist-item.selected {
    background: rgba(40, 167, 69, 0.2) !important;
    border-color: #28a745 !important;
}

.playlist-item-checkbox {
    font-size: 20px;
    color: #666;
    min-width: 30px;
    text-align: center;
}

.playlist-item.selected .playlist-item-checkbox {
    color: #28a745;
}

.playlist-item.selected .playlist-item-checkbox::before {
    content: '☑';
}

/* Drag and Drop */
.playlist-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.playlist-item.drop-before {
    border-top: 3px solid #dc3545;
}

.playlist-item.drop-after {
    border-bottom: 3px solid #dc3545;
}

/* Context Menu */
.playlist-context-menu {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #dc3545;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    z-index: 10001;
    padding: 8px;
    min-width: 200px;
}

.playlist-context-menu button {
    width: 100%;
    text-align: left;
    padding: 10px 15px !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px !important;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.playlist-context-menu button:hover {
    background: rgba(220, 53, 69, 0.2) !important;
    transform: translateX(5px) !important;
}

/* Enhanced Track Item */
.playlist-item-menu-btn {
    background: transparent !important;
    color: #888 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    cursor: pointer;
    font-size: 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 5px;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.playlist-item-menu-btn:hover {
    background: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
    transform: scale(1.1) !important;
}

.playlist-item-duration {
    color: #888;
    font-size: 0.85em;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

.playlist-item-album {
    color: #666;
    font-size: 0.8em;
    margin-top: 2px;
}

.playlist-item-analysis {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    font-size: 0.75em;
}

.playlist-item-analysis span {
    background: rgba(220, 53, 69, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    color: #888;
}

.playlist-item-placeholder {
    font-size: 1.5em;
    color: #444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .playlist-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .playlist-toolbar-left,
    .playlist-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .toolbar-select {
        flex: 1;
    }
    
    .playlist-selection-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .selection-count {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* ========== END ENHANCED PLAYLIST RENDERER STYLES ========== */
/* ========== SIMULATED FULLSCREEN FALLBACK ========== */
.simulated-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: #000 !important;
}

/* ========== MOBILE STICKY MODE ENHANCEMENTS ========== */
@media (max-width: 768px) {
    .sticky-mini #metadata-container {
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }
    
    .sticky-mini #playback-controls {
        bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }
}

/* ========== LANDSCAPE STICKY MODE FIX ========== */
@media (orientation: landscape) and (max-height: 600px) {
    .sticky-mini #metadata-container {
        bottom: 0;
        padding: 10px 15px;
    }
    
    .sticky-mini #playback-controls {
        bottom: 60px;
        padding: 5px 15px;
    }
    
    .sticky-mini #custom-progress-container {
        bottom: 110px;
    }
}
