/* Media Center Styles */
.player-section {
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 80px;
    min-height: 600px;
}

.player-container {
    max-width: 1000px;
    margin: 0 auto;
}

.player-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.player-tab {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 81, 47, 0.2);
    background: rgba(255, 255, 255, 0.5);
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-tab.active {
    background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 81, 47, 0.3);
}

.player-main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.player-visual-area {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.media-view {
    display: none;
    width: 100%;
    text-align: center;
}

.media-view.active {
    display: block;
}

/* CD Vinyl Animation */
.cd-container {
    width: 240px;
    height: 240px;
    margin: 0 auto 32px;
    position: relative;
}

.cd-vinyl {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: rotateCD 5s linear infinite;
    animation-play-state: paused;
}

.cd-vinyl.playing {
    animation-play-state: running;
}

.cd-vinyl::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cd-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-inner::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: #f8fafc;
    border-radius: 50%;
    border: 4px solid #334155;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes rotateCD {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.audio-info h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: #1e293b;
}

.audio-info p {
    color: #64748b;
    font-size: 0.95rem;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

#mainVideoPlayer {
    width: 100%;
    height: 100%;
}

/* Controls */
.playback-controls {
    width: 100%;
    margin-top: 32px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.progress-bar-container span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    min-width: 40px;
}

#progressSlider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 81, 47, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#progressSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #FF512F;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 81, 47, 0.4);
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: #FF512F;
    transform: scale(1.1);
}

.control-btn.active {
    color: #FF512F;
}

.play-pause-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
    color: white !important;
    border-radius: 50%;
    box-shadow: 0 8px 16px rgba(255, 81, 47, 0.3);
}

.play-pause-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 81, 47, 0.4);
}

/* Sidebar Playlist */
.player-sidebar {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.small-action-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.6);
}

.playlist-item.active {
    background: rgba(255, 81, 47, 0.1);
    border-left: 3px solid #FF512F;
}

.item-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

.empty-playlist {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #94a3b8;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .player-main-grid {
        grid-template-columns: 1fr;
    }

    .player-section {
        padding: 16px;
    }

    .cd-container {
        width: 180px;
        height: 180px;
    }
}
/* ══════════════════════════════════════════════════
   PLAYLIST BUILDER MODAL
══════════════════════════════════════════════════ */

.pl-browser-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(6px);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pl-browser-panel {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
}

.pl-browser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.pl-browser-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.pl-browser-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.pl-browser-close:hover { background: #fee2e2; color: #ef4444; }

/* Tabs */
.pl-browser-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    border-bottom: 1px solid #f1f5f9;
}

.pl-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pl-tab.active {
    color: #FF512F;
    border-bottom-color: #FF512F;
}

/* Tab Content */
.pl-tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.pl-tab-content.active { display: flex; }

/* Folder Path / Breadcrumb */
.pl-folder-path {
    padding: 10px 16px 6px;
    font-size: 0.78rem;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-crumb-link {
    cursor: pointer;
    color: #FF512F;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pl-crumb-current { color: #1e293b; font-weight: 600; }

/* Item List */
.pl-item-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.pl-loading, .pl-empty {
    text-align: center;
    padding: 40px 16px;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9rem;
}

.pl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.pl-item:hover { background: #f8fafc; }

.pl-item-icon { font-size: 1rem; flex-shrink: 0; }

.pl-item-name {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-item-meta { font-size: 0.75rem; color: #94a3b8; }

.pl-item-add {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FF512F;
    padding: 0 6px;
    opacity: 0;
    transition: opacity 0.15s;
}

.pl-item-media:hover .pl-item-add { opacity: 1; }

/* Checkbox for File Tab */
.pl-item-check {
    font-size: 1.2rem;
    color: #cbd5e1;
    transition: color 0.15s;
    flex-shrink: 0;
}

.pl-item.pl-selected { background: rgba(255,81,47,0.06); }
.pl-item.pl-selected .pl-item-check { color: #FF512F; }

/* Saved Playlist items */
.pl-item-saved {
    align-items: flex-start;
    gap: 12px;
}

.pl-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pl-item-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.pl-load-btn, .pl-del-btn {
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.pl-load-btn { background: #dcfce7; color: #16a34a; }
.pl-load-btn:hover { background: #16a34a; color: #fff; }
.pl-del-btn { background: #fee2e2; color: #ef4444; }
.pl-del-btn:hover { background: #ef4444; color: #fff; }

/* Footer */
.pl-browser-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    gap: 10px;
}

.pl-browser-footer span {
    font-size: 0.82rem;
    color: #64748b;
}

.pl-add-btn {
    background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pl-add-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,81,47,0.3);
}

/* New Sidebar Header Buttons */
.sidebar-header .small-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    background: rgba(0,0,0,0.03);
    color: #64748b;
}

.sidebar-header .small-action-btn:hover {
    background: rgba(255, 81, 47, 0.1);
    color: #FF512F;
    transform: translateY(-1px);
}

.sidebar-header .small-action-btn.pl-btn-add {
    background: rgba(255, 81, 47, 0.1);
    color: #FF512F;
}

/* Playlist Builder Item Polish */
.pl-item-media { position: relative; }
.pl-item-media .pl-item-add {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FF512F;
    margin-left: auto;
}


/* EXTRA PREMIUM POLISH */
.playlist-item {
    border: 1px solid transparent;
}
.playlist-item:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(255, 81, 47, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateX(4px);
}
.playlist-item.active {
    background: rgba(255, 81, 47, 0.08) !important;
    border-left: 4px solid #FF512F !important;
    box-shadow: 0 4px 15px rgba(255, 81, 47, 0.15);
}

.item-name {
    color: #1e293b;
    font-weight: 700;
}

.item-meta {
    color: #FF512F;
    font-weight: 600;
    opacity: 0.8;
}

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

.player-main-grid {
    animation: slideUp 0.5s ease-out;
}

