/* ================================================================
   music-player-modal.css  — ChordStar Music Player Modal
   Spotify-inspired dark layout
   ================================================================ */

/* ── Modal wrapper ─────────────────────────────────────────────── */
.music-player-modal-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;        /* fix: fills full modal width even when section overlay is shown */
    height: 100%;
    overflow: hidden;
    background: #0a0a14;
    font-family: 'Outfit', sans-serif;
}

/* ── Music Player Modal — z-index & overlap fix ───────────────────
   Mobile .app-header = z-index 9500  (position: fixed)
   Mobile .news-ticker = z-index 9600 (position: fixed, !important)
   We must beat BOTH. We also forcibly hide them while the player is
   open so they never bleed through on any browser/OS.
   ------------------------------------------------------------------ */

/* 1. Raise the modal above every fixed element on the page */
#tkModal-music-player {
    z-index: 999999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* 2. Hide the app-header & ticker while the player is open
      (CSS :has() — supported in all modern mobile browsers) */
body:has(#tkModal-music-player.open) .app-header,
body:has(#tkModal-music-player.open) .news-ticker,
body:has(#tkModal-music-player.open) .sidebar {
    display: none !important;
}

/* ── Modal wrapper ─────────────────────────────────────────────── */
.mp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.4rem;
    background: #111120;
    border-bottom: 1px solid rgba(217,70,239,0.18);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.mp-modal-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
}
.mp-modal-emoji { font-size: 1.2rem; }
.mp-modal-close-btn {
    background: rgba(217,70,239,0.1);
    border: 1px solid rgba(217,70,239,0.3);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.38rem 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.mp-modal-close-btn:hover {
    background: rgba(217,70,239,0.22);
    border-color: rgba(217,70,239,0.55);
}

/* ── Header Search Bar — matches mobile .app-header search style ─ */

/* Mobile hamburger button (hidden on desktop) */
.mp-mob-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.1rem;
    line-height: 1;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
}
.mp-mob-menu-btn:hover { color: #d946ef; }

/* Desktop: show emoji, hide burger */
.mp-emoji-desktop { display: inline; }
.mp-title-text    { display: inline; }

/* Search wrap — absolutely centered in header */
.mp-header-search-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    z-index: 20;
}
.mp-header-search-inner {
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(168,85,247,0.35);
    border-radius: 20px;
    padding: 0 0.85rem;
    gap: 0.4rem;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.mp-header-search-inner:focus-within {
    background: rgba(255,255,255,0.13);
    border-color: rgba(168,85,247,0.7);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}
.mp-header-search-icon {
    font-size: 0.82rem;
    opacity: 0.6;
    flex-shrink: 0;
    pointer-events: none;
}
.mp-header-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f0e7ff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    padding: 0.42rem 0;
    min-width: 0;
}
.mp-header-search-input::placeholder { color: rgba(196,181,212,0.45); }
.mp-header-search-clear {
    background: transparent;
    border: none;
    color: rgba(196,181,212,0.4);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    display: none;
    transition: color 0.15s;
}
.mp-header-search-clear:hover { color: #a855f7; }
.mp-header-search-clear.visible { display: block; }

/* ── Search dropdown — gs-item style ───────────────────────────── */
.mp-header-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #120c24;
    border: 1px solid rgba(168,85,247,0.35);
    border-radius: 14px;
    overflow: hidden;
    z-index: 99999;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    display: none;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(168,85,247,0.3) transparent;
}
.mp-header-search-dropdown.open { display: block; }
.mp-header-search-dropdown::-webkit-scrollbar { width: 4px; }
.mp-header-search-dropdown::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.3); border-radius:4px; }

/* Section label — "🎧 MUSIC PLAYER" */
.mp-search-section-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(168,85,247,0.65);
    padding: 0.55rem 1rem 0.25rem;
    border-bottom: 1px solid rgba(168,85,247,0.1);
}
/* Result item */
.mp-search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(168,85,247,0.1);
    transition: background 0.15s;
}
.mp-search-result-item:last-child { border-bottom: none; }
.mp-search-result-item:hover,
.mp-search-result-item.active { background: rgba(217,70,239,0.1); }
.mp-search-result-thumb {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(168,85,247,0.14);
}
.mp-search-result-info { flex: 1; min-width: 0; }
.mp-search-result-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f0e7ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-search-result-title mark {
    background: transparent;
    color: #c4b5fd;
    font-weight: 700;
}
.mp-search-result-artist {
    font-family: 'Outfit', sans-serif;
    font-size: 0.73rem;
    color: rgba(196,181,212,0.55);
    margin-top: 1px;
}
/* "TRACK" badge */
.mp-search-result-badge {
    font-size: 0.62rem;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.25);
    border-radius: 6px;
    padding: 0.18rem 0.5rem;
    color: #c4b5fd;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}
.mp-search-no-results {
    padding: 1rem;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.83rem;
    color: rgba(196,181,212,0.5);
}

/* ── Mobile drawer — slide-in sidebar panel ─────────────────────
   Triggered by ☰ button. Shows cs-library + cs-tracklist stacked.
   ---------------------------------------------------------------- */
.mp-mob-drawer-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.mp-mob-drawer-overlay.open { display: block; }

.mp-mob-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: #0e0b1a;
    border-right: 1px solid rgba(168,85,247,0.2);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
    z-index: 201;
}
.mp-mob-drawer-overlay.open .mp-mob-drawer {
    transform: translateX(0);
}
.mp-mob-drawer-close {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(168,85,247,0.15);
    flex-shrink: 0;
}
.mp-mob-drawer-close span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: rgba(168,85,247,0.7);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.mp-mob-drawer-close button {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}
/* Inside the drawer, show the cs-library + cs-tracklist */
.mp-mob-drawer .cs-library,
.mp-mob-drawer .cs-tracklist {
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border: none !important;
    border-bottom: 1px solid rgba(168,85,247,0.12) !important;
    border-left: none !important;
    border-right: none !important;
    flex-shrink: 0;
    height: auto !important;
    min-height: 180px;
    max-height: 48vh;
}
/* Drawer library list and tracklist body must scroll */
.mp-mob-drawer .cs-lib-list,
.mp-mob-drawer .cs-tracklist-body {
    overflow-y: auto !important;
    max-height: 36vh;
    flex: 1;
}
/* Drawer track rows — bigger tap target */
.mp-mob-drawer .cs-track-row {
    padding: 0.65rem 1rem !important;
}
/* Library items in drawer */
.mp-mob-drawer .cs-lib-item {
    padding: 0.6rem 1rem !important;
}
/* Drawer library header */
.mp-mob-drawer .cs-library-header,
.mp-mob-drawer .cs-tracklist-header {
    padding: 0.7rem 1rem !important;
    font-size: 0.78rem !important;
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Show hamburger, hide desktop emoji + title text */
    .mp-mob-menu-btn    { display: block; }
    .mp-emoji-desktop   { display: none; }
    .mp-title-text      { display: none; }

    /* Search wrap: flow inline instead of absolute */
    .mp-header-search-wrap {
        position: static;
        transform: none;
        width: auto;
        flex: 1;
        margin: 0 0.5rem;
    }
    .mp-header-search-dropdown {
        position: fixed;
        left: 8px;
        right: 8px;
        width: auto;
        top: auto;   /* JS or CSS calc will handle; fixed fallback */
    }
}

/* ── Content area (fills between header and bottom bar) ────────── */
.mp-modal-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

/* ── Song detail overlay inside modal ──────────────────────────── */
#tkModal-music-player .song-detail-page {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #1e0a35 0%, #0a0514 55%, #080310 100%);
    z-index: 5;
    top: 0 !important;
    left: 0 !important;
}

/* ── Modal ke andar filter input: no zoom on iOS ────────────────── */
.mp-mob-drawer .cs-lib-search {
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: #0d0d1c;
    z-index: 2;
}
.mp-mob-drawer .cs-lib-search-input {
    font-size: 1rem;          /* iOS zoom prevent (16px minimum) */
    -webkit-appearance: none;
    border-radius: 8px;
}

/* ── Mobile: song detail back button sticky inside modal ─────────── */
@media (max-width: 768px) {
    #tkModal-music-player .song-detail-page .back-button {
        position: sticky;
        top: 0;
        z-index: 20;
    }

    /* Force single-column layout inside modal */
    #tkModal-music-player .song-detail-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        padding: 0 1rem;
        gap: 0.85rem;
    }

    /* Practice section: compact card */
    #tkModal-music-player .practice-controls-section {
        padding: 1rem;
        border-radius: 16px;
        margin-bottom: 0;
        border: 1px solid rgba(168, 85, 247, 0.15);
        background: rgba(255,255,255,0.025);
    }
    #tkModal-music-player .practice-controls-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Sidebar must flow below main, not float */
    #tkModal-music-player .song-detail-sidebar {
        position: static !important;
        max-height: none !important;
        order: 2;
    }
    #tkModal-music-player .song-detail-main { order: 1; }
    #tkModal-music-player .similar-songs-list {
        max-height: 820px !important;
        overflow-y: auto !important;
    }
}

/* ── Bottom player bar override (fixes left:260px from bundle) ─── */
#tkModal-music-player .bottom-player-bar {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    flex-shrink: 0;
    z-index: 20;
    box-sizing: border-box;
}

/* ================================================================
   THREE-COLUMN SPOTIFY LAYOUT
   cs-library | cs-player-main | cs-tracklist
   ================================================================ */
.cs-player-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
    background: #0a0a14;
}

/* ── LEFT: Library Sidebar ─────────────────────────────────────── */
.cs-library {
    width: 240px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    background: #0d0d1c;
    border-right: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}
.cs-library-header {
    padding: 1rem 1rem 0.5rem;
    flex-shrink: 0;
}
.cs-library-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #b3b3b3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.cs-library-tabs {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
}
.cs-lib-tab {
    background: rgba(255,255,255,0.07);
    border: none;
    color: #b3b3b3;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.cs-lib-tab:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cs-lib-tab--active { background: #fff; color: #000; font-weight: 600; }
.cs-lib-search { padding: 0.4rem 0.75rem; flex-shrink: 0; }
.cs-lib-search-input {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    color: #fff;
    outline: none;
    box-sizing: border-box;
}
.cs-lib-search-input::placeholder { color: #666; }
.cs-lib-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.3rem 0;
}
.cs-lib-list::-webkit-scrollbar { width: 3px; }
.cs-lib-list::-webkit-scrollbar-thumb { background: rgba(217,70,239,0.25); border-radius: 4px; }
.cs-lib-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    margin: 0 0.3rem;
    transition: background 0.15s;
}
.cs-lib-item:hover { background: rgba(255,255,255,0.07); }
.cs-lib-item-img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.cs-lib-item-img--round { border-radius: 50%; }
.cs-lib-item-name { font-size: 0.82rem; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.cs-lib-item-sub  { font-size: 0.72rem; color: #888; margin-top: 1px; }

/* ── CENTER: Main Content ──────────────────────────────────────── */
.cs-player-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 1.4rem;
    scroll-behavior: smooth;
}
.cs-player-main::-webkit-scrollbar { width: 5px; }
.cs-player-main::-webkit-scrollbar-thumb { background: rgba(217,70,239,0.25); border-radius: 4px; }

/* Section rows */
.cs-section { margin-bottom: 2rem; }
.cs-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.cs-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}
.cs-view-all-btn {
    background: none;
    border: none;
    color: #d946ef;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
    text-transform: uppercase;
}
.cs-view-all-btn:hover { background: rgba(217,70,239,0.12); }

/* Horizontal scroll row */
.cs-scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
}
.cs-scroll-row::-webkit-scrollbar { height: 4px; }
.cs-scroll-row::-webkit-scrollbar-thumb { background: rgba(217,70,239,0.3); border-radius: 4px; }

/* Song cards */
.cs-song-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    cursor: pointer;
    border-radius: 10px;
    padding: 0.85rem;
    background: rgba(255,255,255,0.04);
    transition: background 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}
.cs-song-card:hover { background: rgba(255,255,255,0.09); transform: translateY(-3px); }
.cs-song-card--md { width: 160px; }
.cs-song-card--sm { width: 130px; }
.cs-song-card-play {
    position: absolute;
    bottom: 3.8rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    background: #d946ef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 16px rgba(217,70,239,0.5);
}
.cs-song-card:hover .cs-song-card-play { opacity: 1; transform: translateY(0); }
.cs-song-card-info { margin-top: 0.65rem; }
.cs-song-card-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs-song-card-artist {
    font-size: 0.74rem;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Thumbnail inside card */
.cs-thumb-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #1a0a2e;
}
.cs-thumb-img {
    position: absolute;
    top: 50%; left: 50%;
    width: 120%; height: 120%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.3s;
}
.cs-song-card:hover .cs-thumb-img { transform: translate(-50%, -50%) scale(1.06); }
.cs-thumb-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,5,20,0.05) 0%, rgba(10,5,20,0.5) 100%);
    border-radius: 8px;
}

/* Trending table */
.cs-trend-table { display: flex; flex-direction: column; gap: 0.25rem; }
.cs-track-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.cs-track-row:hover { background: rgba(255,255,255,0.07); }
.cs-track-row:hover .cs-track-art-play { opacity: 1; }
.cs-track-rank {
    width: 22px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    flex-shrink: 0;
}
.cs-track-art {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #1a0a2e;
}
.cs-track-art img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
}
.cs-track-art-play {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}
.cs-track-meta { flex: 1; min-width: 0; }
.cs-track-name  { font-size: 0.85rem; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-track-sub   { font-size: 0.75rem; color: #888; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-track-dur   { font-size: 0.78rem; color: #888; flex-shrink: 0; }

/* Section / View All grid ─────────────────────────────────────── */
.cs-section-view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    position: sticky;
    top: -1.5rem;           /* offset equal to cs-player-main padding */
    background: #0a0a14;
    padding: 1rem 0 0.75rem;
    z-index: 5;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cs-back-btn {
    background: rgba(255,255,255,0.07);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s;
}
.cs-back-btn:hover { background: rgba(255,255,255,0.13); }
.cs-section-view-title { font-size: 1.3rem; font-weight: 700; color: #fff; }
.cs-grid-all {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding-bottom: 1rem;
}
/* Cards inside the grid must fill their cell, not use the fixed scroll-row width */
.cs-grid-all .cs-song-card {
    width: 100% !important;
    flex-shrink: unset;
}

/* ── Section overlay (View All / Playlist / Artist) ─────────────── */
/* Lives inside cs-player-main — scrolls naturally with center col  */
.cs-section-overlay {
    display: block;
}
.cs-section-overlay .cs-section-view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 0 0.75rem;
    background: #0a0a14;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 1.25rem;
    position: sticky;
    top: -1.5rem;   /* compensates for cs-player-main padding so header sticks at top */
    z-index: 5;
}
.cs-section-overlay .cs-grid-all {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    align-content: start;
    padding-bottom: 1.5rem;
}

/* ── Section layout helpers (no longer needed) ───────────────────── */

/* ── RIGHT: All Tracks ─────────────────────────────────────────── */
.cs-tracklist {
    width: 280px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    background: #0d0d1c;
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}
.cs-tracklist-header {
    padding: 1rem 1rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b3b3b3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cs-tracklist-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.4rem 0;
}
.cs-tracklist-body::-webkit-scrollbar { width: 3px; }
.cs-tracklist-body::-webkit-scrollbar-thumb { background: rgba(217,70,239,0.25); border-radius: 4px; }
.cs-tracklist-body .cs-track-row { padding: 0.4rem 0.65rem; }

/* ── Mobile: collapse sidebars ─────────────────────────────────── */
@media (max-width: 900px) {
    .cs-library { display: none; }
    .cs-tracklist { width: 220px; min-width: 220px; }
}
@media (max-width: 660px) {
    .cs-tracklist { display: none; }
    .cs-player-main { padding: 1rem; }
    .cs-song-card--md { width: 140px; }
    .cs-song-card--sm { width: 115px; }
}

/* ── Mobile header/close ───────────────────────────────────────── */
@media (max-width: 600px) {
    .mp-modal-header   { padding: 0.55rem 0.9rem; }
    .mp-modal-title    { font-size: 0.9rem; }
    .mp-modal-close-btn { font-size: 0.76rem; padding: 0.32rem 0.7rem; }
}

/* ── mp-modal-body: musicDashboard fills the content area ──────── */
.mp-modal-body {
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
#musicDashboard {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}
#musicDashboard {
    height: 100%;
    display: flex;
    flex-direction: column;
}
/* cs-player-layout fills remaining height inside musicDashboard */
.cs-player-layout {
    flex: 1;
    min-height: 0;
}

/* ── Sidebar: Liked Songs + User Playlists ─────────────────────── */
.cs-lib-item--special {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.18);
    margin-bottom: 0.2rem;
}
.cs-lib-item--special:hover { background: rgba(168, 85, 247, 0.15); }

.cs-lib-item-img--liked {
    background: linear-gradient(135deg, #c026d3, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    border-radius: 6px;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.cs-lib-item--user-pl {
    border-left: 2px solid rgba(217, 70, 239, 0.4);
}
.cs-lib-item--user-pl:hover { background: rgba(217, 70, 239, 0.08); }

.cs-lib-item-img--pl-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.cs-lib-section-divider {
    font-size: 0.67rem;
    font-weight: 700;
    color: rgba(168, 85, 247, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 1.15rem 0.25rem;
    border-top: 1px solid rgba(168, 85, 247, 0.1);
    margin-top: 0.35rem;
}

.cs-lib-loading {
    padding: 0.35rem 1.15rem;
    font-size: 0.73rem;
    color: rgba(168, 85, 247, 0.4);
    font-style: italic;
}
