/* WMusic BG v1.7 */
.wmusic-bg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff !important;
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin: 6px 0;
}
.wmusic-bg-btn:hover { opacity: 0.9; }

.wmusic-bg-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.65);
    align-items: flex-end;
    justify-content: center;
}
.wmusic-bg-modal.active { display: flex; }

.wmusic-bg-modal-content {
    background: #1a1a2e;
    color: #eee;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wmusic-bg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #333;
}
.wmusic-bg-modal-header h3 { margin: 0; font-size: 16px; }
.wmusic-bg-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
}

.wmusic-bg-search { padding: 10px 16px; }
.wmusic-bg-search input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #444;
    background: #2a2a40;
    color: #fff;
    box-sizing: border-box;
}

.wmusic-bg-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 12px;
}

.wmusic-bg-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}
.wmusic-bg-track:hover,
.wmusic-bg-track.selected { background: #2d2d4a; }
.wmusic-bg-track img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #333;
}
.wmusic-bg-track-info { flex: 1; min-width: 0; }
.wmusic-bg-track-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wmusic-bg-track-artist {
    font-size: 12px;
    color: #aaa;
}
.wmusic-bg-track-duration {
    font-size: 11px;
    color: #888;
}

.wmusic-bg-modal-footer {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #333;
}
.wmusic-bg-btn-cancel,
.wmusic-bg-btn-confirm {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}
.wmusic-bg-btn-cancel { background: #333; color: #ddd; }
.wmusic-bg-btn-confirm { background: #a855f7; color: #fff; }

.wmusic-bg-selected {
    display: none;
    align-items: center;
    gap: 10px;
    background: #1e1e2f;
    border-radius: 12px;
    padding: 8px 12px;
    margin: 8px 0;
    color: #fff;
}
.wmusic-bg-selected.active { display: flex; }
.wmusic-bg-selected img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}
.wmusic-bg-selected-info { flex: 1; min-width: 0; }
.wmusic-bg-selected-title { font-size: 13px; font-weight: 600; }
.wmusic-bg-selected-artist { font-size: 11px; color: #aaa; }
.wmusic-bg-remove {
    background: none;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
}

.wmusic-bg-now button {
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}