/* Music library view */
.music-container {
    display: none;
    padding: 0;
}

.music-container.active {
    display: block;
}

/* ========= Full-width empty state (zero playlists) ========== */
.music-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    min-height: calc(100vh - 260px);
}

.music-empty-state-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--color-music-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px var(--color-shadow-2xl);
}

.music-empty-state-icon i {
    font-size: 40px;
    color: var(--color-danger-text);
}

.music-empty-state-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.music-empty-state-desc {
    margin: 0 0 28px;
    font-size: 14px;
    color: var(--color-text-muted);
    max-width: 360px;
    line-height: 1.5;
}

/* ========= Toolbar (when playlists exist) ========== */
.music-toolbar {
    display: none;
}

.music-content {
    display: flex;
    gap: 0;
    height: calc(100vh - 200px);
    min-height: 400px;
    transition: height 0.3s ease;
}

.music-player-active .music-content {
    height: calc(100vh - 290px);
}

.music-sidebar {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    background: var(--color-bg-surface);
}

.music-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.music-sidebar-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.music-sidebar-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--color-accent-gradient);
    color: var(--color-danger-text);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.15s,
        box-shadow 0.15s;
    box-shadow: 0 2px 8px var(--color-accent-shadow);
}

.music-sidebar-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--color-accent-shadow);
}

.music-playlist-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.music-playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.music-playlist-item:hover {
    background: var(--color-bg-hover);
}

.music-playlist-item.active {
    background: var(--color-bg-alt);
}

.music-playlist-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--color-music-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-danger-text);
    font-size: 14px;
    flex-shrink: 0;
}

.music-playlist-item-info {
    flex: 1;
    min-width: 0;
}

.music-playlist-item-name {
    display: block;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-playlist-item-count {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.music-main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.music-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--color-text-secondary);
}

.music-welcome i {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--color-text-muted);
}

.music-welcome h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.music-welcome p {
    margin: 0;
    font-size: 14px;
}

.music-playlist-detail {
    max-width: 900px;
}

.music-playlist-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.music-playlist-cover {
    width: 140px;
    height: 140px;
    min-width: 140px;
    border-radius: 12px;
    background: var(--color-music-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-danger-text);
    font-size: 48px;
    box-shadow: 0 8px 24px var(--color-shadow-3xl);
}

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

.music-playlist-info h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
}

.music-playlist-info p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.music-playlist-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.music-playlist-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.music-playlist-actions .btn i {
    font-size: 13px;
}

/* Icon-only action buttons (no text label) */
.music-playlist-actions .btn:not(:has(span)) {
    padding: 8px 12px;
    min-width: 36px;
    justify-content: center;
}

.music-track-list {
    background: var(--color-item);
    border-radius: 12px;
    overflow: hidden;
}

.music-track-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.music-track {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.15s ease;
}

.music-track:last-child {
    border-bottom: none;
}

.music-track:hover {
    background: var(--color-item-hover);
}

.music-track.selected {
    background: var(--color-item-selected);
}

.music-track-col {
    padding: 0 8px;
}

.music-track-num {
    width: 40px;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.music-track-title {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.music-track-icon {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.music-track-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: var(--color-text);
}

.music-track-artist {
    flex: 1;
    color: var(--color-text-secondary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-album {
    flex: 1;
    color: var(--color-text-secondary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-duration {
    width: 60px;
    text-align: right;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.music-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--color-text-secondary);
}

.music-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--color-text-muted);
}

.music-empty p {
    margin: 0;
    font-size: 14px;
}

.music-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--color-text-secondary);
    font-size: 14px;
    gap: 8px;
}

.music-loading i {
    animation: spin 1s linear infinite;
}

.music-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--color-error-text);
}

.music-error i {
    font-size: 48px;
    margin-bottom: 16px;
}

.music-error p {
    margin: 0;
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .music-content {
        flex-direction: column;
        height: auto;
    }

    .music-sidebar {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        max-height: 200px;
    }

    .music-playlist-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .music-playlist-cover {
        width: 120px;
        height: 120px;
        font-size: 32px;
    }

    .music-playlist-info h2 {
        font-size: 20px;
    }

    .music-track-album {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC PLAYER
   ═══════════════════════════════════════════════════════════════ */

.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: var(--color-music-background);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    z-index: 1000;
    box-shadow: 0 -4px 20px var(--color-shadow);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.music-player.has-track {
    transform: translateY(0);
}

.music-player.hidden {
    display: none;
}

/* Track Info */
.player-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    max-width: 240px;
}

.player-album-art {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--color-music-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-danger-text);
    font-size: 20px;
    flex-shrink: 0;
}

.player-track-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-track-name {
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.player-track-artist {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Player Controls */
.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 600px;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--color-text-secondary);
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
}

.player-btn.active {
    color: var(--color-text);
}

.player-btn-main {
    background: var(--color-text);
    color: var(--color-danger-text) !important;
    font-size: 21px;
}

.player-btn-main:hover {
    background: var(--color-text-dark);
    transform: scale(1.05);
}

.player-btn-small {
    padding: 6px;
    font-size: 14px;
}

/* Progress Bar */
.player-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.player-time {
    font-size: 11px;
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 40px;
}

.player-time-current {
    text-align: right;
}

.player-time-total {
    text-align: left;
}

.player-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.player-progress-fill {
    height: 100%;
    background: var(--color-text);
    border-radius: 2px;
    transition: width 0.1s linear;
    width: 0;
}

.player-progress-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    background: var(--color-text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 4px var(--color-shadow-xl);
}

.player-progress-bar:hover .player-progress-handle {
    opacity: 1;
}

.player-progress-bar:hover .player-progress-fill {
    height: 6px;
    margin-top: -1px;
}

/* Volume Controls */
.player-extra {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: flex-end;
}

.player-close-btn {
    opacity: 0.5;
    transition: opacity 0.15s ease;
    margin-left: 4px;
}

.player-close-btn:hover {
    opacity: 1;
}

.player-volume-slider {
    width: 80px;
    display: flex;
    align-items: center;
}

#player-volume-input {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border);
    border-radius: 2px;
    cursor: pointer;
}

#player-volume-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--color-text);
    border-radius: 50%;
    cursor: pointer;
}

#player-volume-input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--color-text);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Queue Panel */
.player-queue {
    position: fixed;
    bottom: 100px;
    right: 16px;
    width: 320px;
    max-height: 400px;
    background: var(--color-music-background);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--color-shadow-md);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}

.player-queue::after {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 60px;
    width: 14px;
    height: 14px;
    background: var(--color-music-background);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transform: rotate(45deg);
    z-index: -1;
}

.player-queue.hidden {
    display: none;
}

.player-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

.player-queue-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.player-queue-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.player-queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.player-queue-item:hover {
    background: var(--color-bg-hover);
}

.player-queue-item.active {
    background: var(--color-bg-alt);
}

.queue-item-num {
    width: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.player-queue-item.active .queue-item-num {
    color: var(--color-text);
    font-weight: 600;
}

.queue-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.queue-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-artist {
    font-size: 11px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-duration {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.queue-item-remove {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-secondary);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.player-queue-item:hover .queue-item-remove {
    opacity: 1;
}

.queue-item-remove:hover {
    color: var(--color-error-text);
}

.player-queue-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-secondary);
}

.player-queue-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--color-text-muted);
}

/* Track playing indicator */
.music-track.playing {
    background: var(--color-item-active);
}

.music-track.playing.selected {
    background: var(--color-item-selected);
}

.music-track.playing .music-track-name {
    color: var(--color-text);
}

.track-num-text.hidden {
    display: none;
}

.track-play-icon {
    display: none;
    color: var(--color-text);
}

/* Repeat one icon */
.player-btn.repeat-one i {
    position: relative;
}

.player-btn.repeat-one i::after {
    content: "1";
    font-size: 8px;
    position: absolute;
    top: 0;
    right: 0;
}

/* Mobile player adjustments */
@media (max-width: 768px) {
    .music-player {
        height: 70px;
        padding: 0 8px;
        gap: 8px;
    }

    .music-player-active .music-content {
        height: calc(100vh - 270px);
    }

    .player-track-info {
        min-width: auto;
        max-width: 120px;
    }

    .player-album-art {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .player-track-name {
        max-width: 70px;
        font-size: 12px;
    }

    .player-track-artist {
        max-width: 70px;
        font-size: 10px;
    }

    .player-controls {
        max-width: none;
    }

    .player-buttons {
        gap: 4px;
    }

    .player-btn {
        padding: 6px;
        font-size: 14px;
    }

    .player-btn-main {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .player-extra {
        min-width: auto;
    }

    .player-volume-slider {
        display: none;
    }

    .player-queue {
        right: 8px;
        left: 8px;
        width: auto;
    }
}

/* ========== Drag handle column ========== */
.music-track-drag {
    width: 28px;
    flex: 0 0 28px;
    cursor: grab;
    color: var(--color-text-secondary);
    opacity: 0;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.music-track-header .music-track-drag {
    cursor: default;
}
.music-track:hover .music-track-drag {
    opacity: 0.6;
}
.music-track-drag:active {
    cursor: grabbing;
}
.music-track.dragging {
    opacity: 0.35;
    background: var(--color-bg-hover);
}
.music-track.drag-over {
    border-top: 2px solid var(--color-accent-hover);
    margin-top: -2px;
}

/* ========== Track actions column ========== */
.music-track-actions {
    width: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.music-track-remove-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0;
    transition:
        opacity 0.15s,
        color 0.15s;
    font-size: 0.85rem;
}
.music-track:hover .music-track-remove-btn {
    opacity: 1;
}
.music-track-remove-btn:hover {
    color: var(--color-danger-text);
    background: var(--color-danger-bg);
}

/* ========== Cover art ========== */
.music-playlist-cover {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.music-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.music-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-shadow-4xl);
    color: var(--color-danger-text);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: inherit;
}
.music-playlist-cover:hover .music-cover-overlay {
    opacity: 1;
}

/* ========== Public badge ========== */
.music-public-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    background: var(--color-music-public-bg);
    color: var(--color-text);
    border-radius: 12px;
    margin-top: 4px;
}
.music-public-badge.hidden {
    display: none;
}
#music-toggle-public-btn.active {
    color: var(--color-text);
    background: var(--color-item-active);
}

/* ========== Shares management dialog ========== */
.music-shares-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-shadow-4xl);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.music-shares-panel {
    background: var(--color-music-background);
    border-radius: 12px;
    width: 420px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px var(--color-shadow-md);
}
.music-shares-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
}
.music-shares-header h3 {
    margin: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.music-shares-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
    font-size: 1rem;
}
.music-shares-close-btn:hover {
    color: var(--color-text);
}
.music-shares-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    min-height: 60px;
}
.music-shares-loading {
    text-align: center;
    padding: 20px;
    color: var(--color-text-secondary);
}
.music-shares-empty {
    text-align: center;
    color: var(--color-text-secondary);
    padding: 16px 0;
    margin: 0;
}
.music-share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}
.music-share-item:last-child {
    border-bottom: none;
}
.music-share-user {
    flex: 1;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.music-share-perm {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}
.music-share-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
    transition: color 0.15s;
}
.music-share-remove-btn:hover {
    color: var(--color-danger-text);
}
.music-shares-add {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.music-shares-input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.88rem;
    background: var(--color-bg-surface);
    color: var(--color-text);
}
.music-shares-input:focus {
    outline: none;
    border-color: var(--color-text);
}
.music-shares-write-label {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

/* ═══════════════ Audio file picker modal ═══════════════ */

.music-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-shadow-4xl);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.music-picker-overlay.active {
    opacity: 1;
}

.music-picker-modal {
    display: flex;
    flex-direction: column;
    width: min(560px, 94vw);
    max-height: min(620px, 85vh);
    background: var(--color-music-background);
    border-radius: 12px;
    box-shadow: 0 12px 40px var(--color-shadow-xl);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform 0.2s ease;
}
.music-picker-overlay.active .music-picker-modal {
    transform: translateY(0);
}

/* ── header ── */
.music-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}
.music-picker-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}
.music-picker-header h3 i {
    margin-right: 8px;
    color: var(--color-primary);
}
.music-picker-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0 4px;
    line-height: 1;
}
.music-picker-close:hover {
    color: var(--color-text);
}

/* ── search bar ── */
.music-picker-search {
    position: relative;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
}
.music-picker-search i {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 13px;
}
.music-picker-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--color-bg-surface);
    color: var(--color-text);
    outline: none;
}
.music-picker-search input:focus {
    border-color: var(--color-accent);
}

/* ── file list ── */
.music-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    min-height: 200px;
}
.music-picker-loading,
.music-picker-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    color: var(--color-text-muted);
    font-size: 13px;
}

.music-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 13px;
    color: var(--color-text);
}
.music-picker-item:hover {
    background: var(--color-item-hover);
}
.music-picker-item.selected {
    background: var(--color-item-selected);
}

.music-picker-item input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.music-picker-item i.fa-file-audio {
    color: var(--color-primary);
    font-size: 14px;
    flex-shrink: 0;
}
.music-picker-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.music-picker-size {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ── footer ── */
.music-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--color-border);
}
.music-picker-selected-count {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 500;
}
.music-picker-actions {
    display: flex;
    gap: 8px;
}
