/* ==========================================================================
   Spotify Mobile UI Theme - Mobile Portrait Player & Car Audio Mode
   Strictly isolated to Mobile Portrait (max-width: 768px and orientation: portrait).
   Landscape Mode and Desktop are 100% UNTOUCHED and preserved!
   ========================================================================== */

#mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% 0%, #061e24 0%, #080c14 55%, #04060a 100%);
    --mp-surface: #0e1624;
    --mp-elevated: #152238;
    --mp-accent: #00f2fe;
    --mp-accent-glow: rgba(0, 242, 254, 0.38);
    --mp-text: #ffffff;
    --mp-text-sub: #b3b3b3;
    --mp-text-muted: #727272;
    --mp-border: rgba(0, 242, 254, 0.25);
    --mp-backdrop: rgba(0, 242, 254, 0.28);
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: var(--mp-bg);
    transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.6s ease;
    color: var(--mp-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Circular', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}

/* ==========================================================================
   THEME COLORWAY OVERRIDES (Synced with DJ Themes)
   ========================================================================== */
[data-theme="cyber-neon"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="cyber-neon"],
[data-theme="cyber-neon"] .mobile-player-shell,
.mobile-player-shell[data-theme="cyber-neon"],
body[data-theme="cyber-neon"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #083742 0%, #061e28 35%, #050d18 70%, #020509 100%);
    --mp-surface: #0a1f2c;
    --mp-elevated: #112d40;
    --mp-accent: #00f2fe;
    --mp-accent-glow: rgba(0, 242, 254, 0.45);
    --mp-border: rgba(0, 242, 254, 0.3);
    --mp-backdrop: rgba(0, 242, 254, 0.38);
}

[data-theme="spotify-dark"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="spotify-dark"],
[data-theme="spotify-dark"] .mobile-player-shell,
.mobile-player-shell[data-theme="spotify-dark"],
body[data-theme="spotify-dark"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #104c26 0%, #0c2e17 35%, #091a10 70%, #040806 100%);
    --mp-surface: #102d1a;
    --mp-elevated: #164024;
    --mp-accent: #1db954;
    --mp-accent-glow: rgba(29, 185, 84, 0.45);
    --mp-border: rgba(29, 185, 84, 0.32);
    --mp-backdrop: rgba(29, 185, 84, 0.38);
}

[data-theme="pioneer-onyx"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="pioneer-onyx"],
[data-theme="pioneer-onyx"] .mobile-player-shell,
.mobile-player-shell[data-theme="pioneer-onyx"],
body[data-theme="pioneer-onyx"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #0c3372 0%, #0a2048 35%, #071328 70%, #03060d 100%);
    --mp-surface: #0e1c38;
    --mp-elevated: #152952;
    --mp-accent: #0088ff;
    --mp-accent-glow: rgba(0, 136, 255, 0.45);
    --mp-border: rgba(0, 136, 255, 0.3);
    --mp-backdrop: rgba(0, 136, 255, 0.38);
}

[data-theme="niffty-dark"] #mobile-portrait-player,
[data-theme="serato-dark"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="niffty-dark"],
#mobile-portrait-player[data-theme="serato-dark"],
[data-theme="niffty-dark"] .mobile-player-shell,
.mobile-player-shell[data-theme="niffty-dark"],
body[data-theme="niffty-dark"] #mobile-portrait-player,
body[data-theme="serato-dark"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #5c0f1d 0%, #360a12 35%, #1c060b 70%, #070204 100%);
    --mp-surface: #2b0b12;
    --mp-elevated: #400f1a;
    --mp-accent: #ff1744;
    --mp-accent-glow: rgba(255, 23, 68, 0.45);
    --mp-border: rgba(255, 23, 68, 0.3);
    --mp-backdrop: rgba(255, 23, 68, 0.38);
}

[data-theme="tokyo-violet"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="tokyo-violet"],
[data-theme="tokyo-violet"] .mobile-player-shell,
.mobile-player-shell[data-theme="tokyo-violet"],
body[data-theme="tokyo-violet"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #590f70 0%, #370a46 35%, #1e0527 70%, #0a010d 100%);
    --mp-surface: #2d0b3a;
    --mp-elevated: #420f54;
    --mp-accent: #ff007f;
    --mp-accent-glow: rgba(255, 0, 127, 0.45);
    --mp-border: rgba(255, 0, 127, 0.3);
    --mp-backdrop: rgba(181, 23, 158, 0.42);
}

[data-theme="technics-silver"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="technics-silver"],
[data-theme="technics-silver"] .mobile-player-shell,
.mobile-player-shell[data-theme="technics-silver"],
body[data-theme="technics-silver"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #443c22 0%, #292415 35%, #18150d 70%, #080705 100%);
    --mp-surface: #242014;
    --mp-elevated: #36301e;
    --mp-accent: #e5c07b;
    --mp-accent-glow: rgba(229, 192, 123, 0.4);
    --mp-border: rgba(229, 192, 123, 0.3);
    --mp-backdrop: rgba(229, 192, 123, 0.32);
}

[data-theme="ghost-stealth"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="ghost-stealth"],
[data-theme="ghost-stealth"] .mobile-player-shell,
.mobile-player-shell[data-theme="ghost-stealth"],
body[data-theme="ghost-stealth"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #36363a 0%, #202024 35%, #121214 70%, #050506 100%);
    --mp-surface: #1e1e22;
    --mp-elevated: #2c2c32;
    --mp-accent: #ffffff;
    --mp-accent-glow: rgba(255, 255, 255, 0.35);
    --mp-border: rgba(255, 255, 255, 0.25);
    --mp-backdrop: rgba(255, 255, 255, 0.2);
}

[data-theme="yt-music"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="yt-music"],
[data-theme="yt-music"] .mobile-player-shell,
.mobile-player-shell[data-theme="yt-music"],
body[data-theme="yt-music"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #600812 0%, #38050b 35%, #1e0306 70%, #080102 100%);
    --mp-surface: #2c0509;
    --mp-elevated: #42070e;
    --mp-accent: #ff0033;
    --mp-accent-glow: rgba(255, 0, 51, 0.45);
    --mp-border: rgba(255, 0, 51, 0.3);
    --mp-backdrop: rgba(255, 0, 51, 0.38);
}

[data-theme="niffty-day-light"] #mobile-portrait-player,
[data-theme="serato-day-light"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="niffty-day-light"],
#mobile-portrait-player[data-theme="serato-day-light"],
[data-theme="niffty-day-light"] .mobile-player-shell,
.mobile-player-shell[data-theme="niffty-day-light"],
body[data-theme="niffty-day-light"] #mobile-portrait-player,
body[data-theme="serato-day-light"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #93c5fd 0%, #bfdbfe 35%, #e2e8f0 70%, #f1f5f9 100%);
    --mp-surface: #ffffff;
    --mp-elevated: #f8fafc;
    --mp-accent: #0066ff;
    --mp-accent-glow: rgba(0, 102, 255, 0.3);
    --mp-text: #090d16;
    --mp-text-sub: #334155;
    --mp-text-muted: #64748b;
    --mp-border: rgba(0, 0, 0, 0.12);
    --mp-backdrop: rgba(0, 102, 255, 0.2);
}

[data-theme="studio-pearl"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="studio-pearl"],
[data-theme="studio-pearl"] .mobile-player-shell,
.mobile-player-shell[data-theme="studio-pearl"],
body[data-theme="studio-pearl"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, #7dd3fc 0%, #bae6fd 35%, #e0f2fe 70%, #ffffff 100%);
    --mp-surface: #ffffff;
    --mp-elevated: #f0f9ff;
    --mp-accent: #0284c7;
    --mp-accent-glow: rgba(2, 132, 199, 0.3);
    --mp-text: #0f172a;
    --mp-text-sub: #334155;
    --mp-text-muted: #64748b;
    --mp-border: rgba(15, 23, 42, 0.12);
    --mp-backdrop: rgba(2, 132, 199, 0.2);
}

[data-theme="custom"] #mobile-portrait-player,
#mobile-portrait-player[data-theme="custom"],
[data-theme="custom"] .mobile-player-shell,
.mobile-player-shell[data-theme="custom"],
body[data-theme="custom"] #mobile-portrait-player {
    --mp-bg: radial-gradient(circle at 50% -10%, var(--mp-custom-glow, #182234) 0%, var(--mp-custom-base, #060910) 45%, #020306 100%);
    --mp-surface: var(--mp-custom-surface, #0e1624);
    --mp-elevated: var(--mp-custom-elevated, #152238);
    --mp-accent: var(--mp-custom-accent, #00f2fe);
    --mp-accent-glow: var(--mp-custom-accent-glow, rgba(0, 242, 254, 0.45));
    --mp-border: var(--mp-custom-border, rgba(0, 242, 254, 0.3));
    --mp-backdrop: var(--mp-custom-backdrop, rgba(0, 242, 254, 0.38));
}

/* ==========================================================================
   VIEW MODES: Mobile Portrait, Landscape, and Desktop Player Support
   ========================================================================== */
@media (max-width: 768px) and (orientation: portrait) {
    body:not(.force-dj-view) #mobile-portrait-player,
    body.force-player-view:not(.force-dj-view) #mobile-portrait-player {
        display: flex !important;
        flex-direction: column;
    }

    body:not(.force-dj-view) .dj-workspace-grid,
    body:not(.force-dj-view) .niffty-header,
    body:not(.force-dj-view) .header-bar,
    body:not(.force-dj-view) .rotate-device-overlay,
    body.force-player-view:not(.force-dj-view) .dj-workspace-grid,
    body.force-player-view:not(.force-dj-view) .niffty-header,
    body.force-player-view:not(.force-dj-view) .header-bar,
    body.force-player-view:not(.force-dj-view) .rotate-device-overlay {
        display: none !important;
    }
}

/* Landscape Mode: Preserves full DJ console by default, but allows opening player view */
@media (orientation: landscape) {
    #mobile-portrait-player {
        display: none;
    }
    body.force-player-view:not(.force-dj-view) #mobile-portrait-player {
        display: flex !important;
        flex-direction: column !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 99990 !important;
        background: var(--mp-bg) !important;
        transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.6s ease;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }
    body.force-player-view:not(.force-dj-view) #mobile-portrait-player .mobile-player-shell.spotify-theme {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }
    body.force-player-view:not(.force-dj-view) .dj-workspace-grid,
    body.force-player-view:not(.force-dj-view) .niffty-header,
    body.force-player-view:not(.force-dj-view) .header-bar,
    body.force-player-view:not(.force-dj-view) .rotate-device-overlay {
        display: none !important;
    }
    body:not(.force-player-view) .dj-workspace-grid {
        display: flex !important;
    }
    body:not(.force-player-view) .niffty-header {
        display: flex !important;
    }
    body:not(.force-player-view) .header-bar {
        display: flex !important;
    }
    body:not(.force-player-view) .rotate-device-overlay {
        display: none !important;
    }
}

/* Wide / Desktop screens (>= 769px): Hidden by default, edge-to-edge true app when player forced */
@media (min-width: 769px) {
    #mobile-portrait-player {
        display: none;
    }
    body.force-player-view:not(.force-dj-view) #mobile-portrait-player {
        display: flex !important;
        flex-direction: column !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 99990 !important;
        background: var(--mp-bg) !important;
        transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.6s ease;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }
    body.force-player-view:not(.force-dj-view) #mobile-portrait-player .mobile-player-shell.spotify-theme {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        overflow: hidden !important;
        margin: 0 !important;
    }
    body.force-player-view:not(.force-dj-view) .dj-workspace-grid,
    body.force-player-view:not(.force-dj-view) .niffty-header,
    body.force-player-view:not(.force-dj-view) .header-bar,
    body.force-player-view:not(.force-dj-view) .rotate-device-overlay {
        display: none !important;
    }
}

/* Explicit Force DJ Mode Override across all viewports */
body.force-dj-view #mobile-portrait-player {
    display: none !important;
}
body.force-dj-view .dj-workspace-grid {
    display: grid !important;
}
body.force-dj-view .niffty-header,
body.force-dj-view .header-bar {
    display: flex !important;
}
body.force-dj-view .rotate-device-overlay {
    display: none !important;
}
/* Portrait mode: deck column uses display: contents for authentic single-column layout */
.sp-player-deck-column {
    display: contents;
}

/* ==========================================================================
   Spotify Shell with Safe-Area insets for notched phones
   ========================================================================== */
.mobile-player-shell.spotify-theme {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: calc(max(env(safe-area-inset-top, 0px), 48px) + 6px) max(20px, env(safe-area-inset-right, 0px)) calc(max(env(safe-area-inset-bottom, 0px), 16px) + 8px) max(20px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* Standalone PWA / iOS WebClip Home Screen App Mode */
@media (display-mode: standalone) {
    .mobile-player-shell.spotify-theme {
        padding-top: calc(max(env(safe-area-inset-top, 0px), 52px) + 8px) !important;
        padding-bottom: calc(max(env(safe-area-inset-bottom, 0px), 24px) + 8px) !important;
    }
}
body.is-standalone-pwa .mobile-player-shell.spotify-theme {
    padding-top: calc(max(env(safe-area-inset-top, 0px), 52px) + 8px) !important;
    padding-bottom: calc(max(env(safe-area-inset-bottom, 0px), 24px) + 8px) !important;
}

/* Background dynamic color ambiance */
.sp-backdrop-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 45vh;
    background: radial-gradient(circle, var(--mp-backdrop) 0%, rgba(18, 18, 18, 0) 70%);
    pointer-events: none;
    z-index: 0;
    transition: background 0.8s ease;
}

/* ==========================================================================
   1. Spotify Minimalist Header
   ========================================================================== */
.sp-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 6px 0 10px 0;
    flex-shrink: 0;
    z-index: 2;
    width: 100%;
}

.sp-icon-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: transform 0.15s ease, background 0.15s ease;
    touch-action: manipulation;
}

.sp-icon-btn:active {
    transform: scale(0.88);
    background: rgba(255, 255, 255, 0.1);
}

.sp-library-btn {
    justify-self: start;
    position: relative;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.sp-library-btn:hover,
.sp-library-btn:active {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--mp-accent);
    color: var(--mp-accent);
    transform: scale(1.06);
    box-shadow: 0 0 16px var(--mp-accent-glow);
}

.sp-header-center {
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    padding: 0 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.sp-header-center:active {
    transform: scale(0.96);
    opacity: 0.82;
}

.sp-header-sub {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #a7a7a7;
    text-transform: uppercase;
}

.sp-header-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
    margin-top: 1px;
}

.sp-header-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-options-btn {
    position: relative;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.sp-options-btn:hover,
.sp-options-btn:active {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--mp-accent);
    color: var(--mp-accent);
    transform: scale(1.06);
    box-shadow: 0 0 16px var(--mp-accent-glow);
}

.sp-dj-toggle-btn {
    position: relative;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.sp-dj-toggle-btn:hover,
.sp-dj-toggle-btn:active {
    background: var(--mp-backdrop);
    border-color: var(--mp-accent);
    color: var(--mp-accent);
    transform: scale(1.06);
    box-shadow: 0 0 16px var(--mp-accent-glow);
}

.sp-dj-toggle-btn .sp-icon-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    font-size: 8px;
    font-weight: 900;
    background: var(--mp-accent);
    color: #000000;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.1;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.sp-header-pill-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 5px 11px;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.sp-header-pill-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: var(--mp-accent);
}

.sp-header-pill-btn:active {
    transform: scale(0.92);
}

/* ==========================================================================
   2. One-Click Auto Play Banner (Spotify Green Pill)
   ========================================================================== */
.sp-autoplay-banner {
    margin: 2px 0 10px 0;
    flex-shrink: 0;
    z-index: 2;
}

.sp-autoplay-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #181818;
    border: 1.5px solid var(--mp-border);
    border-radius: 14px;
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: manipulation;
}

.sp-autoplay-action-btn:hover {
    border-color: var(--mp-accent);
    box-shadow: 0 4px 20px var(--mp-accent-glow);
}

.sp-autoplay-action-btn:active {
    transform: scale(0.98);
}

.sp-autoplay-banner.active .sp-autoplay-action-btn {
    background: linear-gradient(90deg, var(--mp-backdrop) 0%, #181818 100%);
    border-color: var(--mp-accent);
    box-shadow: 0 0 24px var(--mp-accent-glow);
}

.sp-autoplay-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-autoplay-badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mp-accent);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 0 12px var(--mp-accent-glow);
    flex-shrink: 0;
}

.sp-autoplay-banner.active .sp-autoplay-badge-icon {
    animation: spIconPulse 2s infinite ease-in-out;
}

@keyframes spIconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px var(--mp-accent-glow); }
    50% { transform: scale(1.08); box-shadow: 0 0 18px var(--mp-accent-glow); }
}

.sp-autoplay-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sp-autoplay-headline {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--mp-accent);
}

.sp-autoplay-desc {
    font-size: 10.5px;
    color: #b3b3b3;
    margin-top: 1px;
}

.sp-toggle-pill {
    font-size: 11px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    color: #b3b3b3;
    transition: all 0.2s ease;
}

.sp-toggle-pill.active {
    background: var(--mp-accent);
    color: #000000;
    box-shadow: 0 0 14px var(--mp-accent-glow);
}

/* ==========================================================================
   3. Main Player Scroll Area
   ========================================================================== */
.sp-content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    padding-bottom: 24px;
    z-index: 1;
}

.sp-content-scroll::-webkit-scrollbar {
    width: 4px;
}
.sp-content-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* ==========================================================================
   4. Motorized DJ Turntable Platter Display
   ========================================================================== */
.sp-artwork-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 6px 0;
    position: relative;
}

.sp-platter-chassis {
    width: min(76vw, 290px);
    height: min(76vw, 290px);
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 45% 45%, #1f1f23 0%, #121214 65%, #080809 100%);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: manipulation;
}

/* Outer Machined Platter Rim with Strobe Markings */
.sp-platter-rim {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid #2a2a2e;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 2;
}

.sp-platter-strobe-dots {
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.12);
}

/* Rotating Platter Vinyl Assembly */
.sp-platter-disk {
    position: relative;
    width: calc(100% - 14px);
    height: calc(100% - 14px);
    border-radius: 50%;
    background: radial-gradient(circle at center, #1c1c1f 0%, #101012 50%, #060608 100%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 3;
    animation: spPlatterSpin 3.5s linear infinite;
    animation-play-state: paused;
}

.sp-platter-disk.spinning {
    animation-play-state: running;
}

@keyframes spPlatterSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Outer Lead-in / Run-in Rim */
.sp-vinyl-run-in-edge {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 4;
}

/* Authentic Vinyl Concentric Microgrooves */
.sp-platter-grooves {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.035) 0,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 2;
}

/* Specular Light Reflection across Vinyl Face */
.sp-platter-sheen {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 30deg at 50% 50%,
        rgba(255, 255, 255, 0.16) 0deg,
        transparent 45deg,
        transparent 135deg,
        rgba(255, 255, 255, 0.16) 180deg,
        transparent 225deg,
        transparent 315deg,
        rgba(255, 255, 255, 0.16) 360deg
    );
    pointer-events: none;
    z-index: 3;
}

/* Spiral Lead-out Groove & Run-out Dead Wax Area */
.sp-vinyl-dead-wax {
    position: absolute;
    width: 58%;
    height: 58%;
    border-radius: 50%;
    background: radial-gradient(circle at center, #0c0c0e 0%, #151518 70%, #0a0a0c 100%);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 5;
}

/* White 12-o'clock Visual Cue Marker */
.sp-platter-cue-marker {
    position: absolute;
    top: 3px;
    left: calc(50% - 2px);
    width: 4px;
    height: 14px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    z-index: 6;
}

/* Circular Center Record Label Hub */
.sp-platter-center-label {
    position: relative;
    width: 44%;
    height: 44%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.85), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
    border: 2px solid #18181a;
    background: #18181a;
    z-index: 6;
}

.sp-platter-center-label .sp-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sp-art-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sp-art-gradient-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, var(--mp-backdrop) 0%, #181818 80%);
    transition: background 0.6s ease;
}

.sp-platter-center-icon {
    font-size: 24px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.sp-platter-center-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
    z-index: 3;
}

/* ==========================================================================
   Centered Non-Rotating Live Deck HUD in Platter Scratch Area
   Fixed in center, stays level and legible while record spins!
   ========================================================================== */
.sp-scratch-center-badge-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
}

.sp-scratch-deck-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(8, 12, 20, 0.88);
    border: 1.5px solid var(--mp-accent, #00f2fe);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.85), 0 0 14px var(--mp-accent-glow, rgba(0, 242, 254, 0.45));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.sp-scratch-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mp-accent, #00f2fe);
    box-shadow: 0 0 8px var(--mp-accent, #00f2fe);
    animation: spDotBlink 2s infinite ease-in-out;
}

@keyframes spDotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.sp-scratch-deck-text {
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.sp-scratch-changing-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    background: rgba(255, 140, 0, 0.9);
    border: 1.5px solid #ffaa00;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.85), 0 0 16px rgba(255, 170, 0, 0.7);
    backdrop-filter: blur(8px);
    animation: spBadgePulse 0.8s ease-in-out infinite alternate;
}

.sp-scratch-changing-pill .sp-changing-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spSpinSlow 1.2s linear infinite;
}

.sp-scratch-changing-pill .sp-changing-text {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Authentic Classic Black Vinyl Center Label (No gradient art, real microgrooves) */
.sp-platter-vinyl-center {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 45% 45%, #18191c 0%, #0d0e10 50%, #050506 100%);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sp-vinyl-center-ring {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.sp-vinyl-center-grooves {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.04) 0px,
        rgba(255, 255, 255, 0.04) 1px,
        transparent 1.5px,
        transparent 3px
    );
    pointer-events: none;
}

@keyframes spSpinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Metallic 45-Adapter Spindle Hub */
.sp-platter-spindle-hub {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e8e8ec 0%, #8c8c94 45%, #2a2a2e 100%);
    border: 1.5px solid #111113;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.sp-platter-spindle-pin {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #9c9ca4 60%, #1a1a1e 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.95);
}

/* Tonearm Completely Removed Per User Request */
.sp-turntable-tonearm {
    display: none !important;
}

.sp-tonearm-base {
    position: absolute;
    top: 6px;
    right: 34px;
    width: 28px;
    height: 28px;
}

.sp-tonearm-gimbal {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #a8abb2 0%, #4a4d55 55%, #18191c 100%);
    border: 1.5px solid #222327;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.sp-tonearm-counterweight {
    position: absolute;
    top: -8px;
    left: 4px;
    width: 20px;
    height: 12px;
    border-radius: 3px;
    background: linear-gradient(180deg, #585c65 0%, #202226 50%, #44474f 100%);
    border: 1px solid #141517;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.sp-tonearm-tube {
    position: absolute;
    top: 24px;
    right: 46px;
    width: 4px;
    height: 86px;
    border-radius: 2px;
    background: linear-gradient(90deg, #c5c8cf 0%, #ffffff 40%, #767980 80%, #3a3c42 100%);
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.6);
}

.sp-tonearm-headshell {
    position: absolute;
    top: 104px;
    right: 42px;
    width: 12px;
    height: 24px;
    background: #1e2025;
    border-radius: 2px 2px 5px 5px;
    border: 1px solid #383b43;
    transform: rotate(-10deg);
    transform-origin: top center;
}

.sp-tonearm-cartridge {
    position: absolute;
    bottom: 2px;
    left: 1px;
    width: 10px;
    height: 12px;
    background: var(--mp-accent, #00f2fe);
    border-radius: 1px 1px 3px 3px;
    box-shadow: 0 0 8px var(--mp-accent-glow, rgba(0, 242, 254, 0.45));
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.sp-tonearm-stylus-needle {
    position: absolute;
    bottom: -4px;
    left: 4px;
    width: 2px;
    height: 5px;
    background: #ffffff;
    border-radius: 1px;
    box-shadow: 0 0 6px #ffffff;
}

/* Status Badge with Transition Pulse Glow */
.sp-live-deck-badge {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--mp-accent, #00f2fe);
    color: var(--mp-accent, #00f2fe);
    font-size: 9px;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    z-index: 10;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}

.sp-live-deck-badge.transitioning {
    background: rgba(255, 153, 0, 0.3);
    border-color: #ffaa00;
    color: #ffbb00;
    box-shadow: 0 0 14px rgba(255, 170, 0, 0.65);
    animation: spBadgePulse 0.8s ease-in-out infinite alternate;
}

@keyframes spBadgePulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
    }
    to {
        transform: scale(1.06);
        box-shadow: 0 0 20px rgba(255, 170, 0, 0.9);
    }
}

/* ==========================================================================
   5. Spotify Track Info Row
   ========================================================================== */
.sp-track-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2px 4px 0 4px;
}

.sp-track-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sp-track-title {
    font-size: 21px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.4px;
    line-height: 1.25;
}

.sp-track-artist {
    font-size: 15px;
    font-weight: 500;
    color: #b3b3b3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.sp-heart-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
    touch-action: manipulation;
}

.sp-heart-btn:active {
    transform: scale(1.3);
}

.sp-heart-btn.active {
    color: #ff4757 !important;
}

/* ==========================================================================
   6. DJ Metadata Badges (BPM, Key, Genre, Mix Style)
   ========================================================================== */
.sp-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 4px;
    max-width: 100%;
    box-sizing: border-box;
}

.sp-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #b3b3b3;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sp-bpm-badge {
    color: var(--mp-accent);
    background: var(--mp-backdrop);
}

.sp-key-badge {
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.14);
}

.sp-trans-dropdown-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 1;
    box-sizing: border-box;
}

select.sp-trans-pill,
.sp-trans-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.18s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    padding: 3px 22px 3px 9px;
    border-radius: 4px;
    user-select: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' opacity='0.85' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 8px 5px;
    box-sizing: border-box;
    line-height: 1.3;
    max-width: min(100%, 145px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 24px;
}

select.sp-trans-pill:hover,
select.sp-trans-pill:focus,
.sp-trans-pill:hover,
.sp-trans-pill:focus {
    border-color: var(--mp-accent, #1db954);
    background-color: var(--mp-backdrop, rgba(29, 185, 84, 0.25));
    color: #ffffff;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.35);
}

select.sp-trans-pill option {
    background: #14171d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
}

.sp-modal-trans-select-wrap {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin-top: 8px;
}

.sp-custom-trans-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    font-family: inherit;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' opacity='0.85' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 9px 6px;
    box-sizing: border-box;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.sp-custom-trans-select:focus,
.sp-custom-trans-select:hover {
    border-color: var(--mp-accent, #1db954);
    background-color: rgba(255, 255, 255, 0.15);
}

.sp-custom-trans-select option {
    background: #12151a;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
}

.sp-trans-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    max-height: 290px;
    overflow-y: auto;
    background: rgba(14, 16, 20, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 1200;
    display: none;
    flex-direction: column;
    padding: 6px;
    gap: 2px;
}

.sp-trans-dropdown-menu.open {
    display: flex;
    animation: spDropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sp-trans-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.12s ease;
    user-select: none;
}

.sp-trans-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sp-trans-dropdown-item.selected {
    background: var(--mp-backdrop, rgba(29, 185, 84, 0.22));
    color: var(--mp-accent, #1db954);
}

.sp-trans-item-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.sp-trans-item-icon {
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-trans-item-name {
    font-family: 'JetBrains Mono', monospace, sans-serif;
    font-size: 11.5px;
    letter-spacing: 0.2px;
}

.sp-trans-item-check {
    font-size: 12px;
    font-weight: 900;
    color: var(--mp-accent, #1db954);
}

/* sp-custom-trans-select rules defined above near sp-modal-trans-select-wrap */
}

/* ==========================================================================
   7. Spotify Progress Bar & Scrubber
   ========================================================================== */
.sp-progress-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 4px;
    margin: 4px 0 2px 0;
}

.sp-progress-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    position: relative;
    cursor: pointer;
    touch-action: none;
    transition: height 0.12s ease;
}

.sp-progress-bar:hover,
.sp-progress-bar:active {
    height: 6px;
}

.sp-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: #ffffff;
    transition: background 0.1s ease;
}

.sp-progress-bar:hover .sp-progress-fill,
.sp-progress-bar:active .sp-progress-fill {
    background: var(--mp-accent);
}

.sp-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.sp-progress-bar:hover .sp-progress-thumb,
.sp-progress-bar:active .sp-progress-thumb {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
}

.sp-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #a7a7a7;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* ==========================================================================
   8. Spotify 5-Button Center Control Bar
   ========================================================================== */
.sp-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    margin: 4px 0 8px 0;
}

.sp-ctrl-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.sp-ctrl-btn:hover {
    color: #ffffff;
}

.sp-ctrl-btn:active {
    transform: scale(0.9);
}

.sp-sub-btn {
    width: 44px;
    height: 44px;
    position: relative;
}

.sp-sub-btn.active {
    color: var(--mp-accent) !important;
}

.sp-sub-btn.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--mp-accent);
}

.sp-skip-btn {
    width: 50px;
    height: 50px;
    color: #ffffff;
}

/* Big 64px Spotify Signature Solid White Circle Play/Pause Button */
.sp-play-circle-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.18s ease;
    touch-action: manipulation;
}

.sp-play-circle-btn:hover {
    transform: scale(1.06);
    background: #f4f4f4;
}

.sp-play-circle-btn:active {
    transform: scale(0.94);
}

.sp-play-circle-btn.playing {
    background: #ffffff;
    color: #000000;
}

/* ==========================================================================
   9. Spotify Connect / Car Audio Bar
   ========================================================================== */
.sp-device-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2px;
}

.sp-device-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 7px;
    color: #b3b3b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.sp-device-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.sp-device-btn.active {
    background: var(--mp-backdrop);
    color: var(--mp-accent);
    border-color: var(--mp-accent);
    box-shadow: 0 0 14px var(--mp-accent-glow);
}

.sp-device-btn.active svg {
    color: var(--mp-accent);
    filter: drop-shadow(0 0 6px var(--mp-accent-glow));
    animation: sp-wake-pulse 2.2s infinite ease-in-out;
}

@keyframes sp-wake-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.14); opacity: 0.82; }
}

.sp-queue-toggle-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b3b3b3;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.15s ease;
    touch-action: manipulation;
}

.sp-queue-toggle-btn:hover,
.sp-queue-toggle-btn:active {
    color: #ffffff;
}

/* ==========================================================================
   10. Spotify Queue Section (Upcoming Tracks List)
   ========================================================================== */
.sp-queue-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--mp-border, rgba(255, 255, 255, 0.08));
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.sp-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.sp-queue-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.sp-queue-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.sp-queue-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--mp-text, #ffffff);
    margin: 0;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* Compact 5-Character Scrolling Ticker for Next in Queue */
.sp-queue-ticker-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid var(--mp-border, rgba(0, 242, 254, 0.28));
    border-radius: 10px;
    padding: 1.5px 6px;
    box-sizing: border-box;
    line-height: 1;
    overflow: hidden;
    max-width: 100px;
}

.sp-ticker-label {
    font-size: 8.5px;
    font-weight: 900;
    color: var(--mp-accent, #00f2fe);
    letter-spacing: 0.5px;
    font-family: var(--font-mono, monospace);
    white-space: nowrap;
}

.sp-ticker-window {
    width: 5ch;
    max-width: 5ch;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.sp-ticker-text {
    display: inline-block;
    white-space: nowrap;
    font-family: var(--font-mono, monospace);
    font-size: 9.5px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.4px;
    animation: sp-ticker-marquee 4.5s ease-in-out infinite alternate;
}

@keyframes sp-ticker-marquee {
    0%, 20% {
        transform: translateX(0);
    }
    80%, 100% {
        transform: translateX(calc(-100% + 5ch));
    }
}

.sp-queue-sub {
    font-size: 10.5px;
    color: var(--mp-text-sub, #b3b3b3);
    margin-top: 1px;
}

.sp-queue-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sp-new-playlist-header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--mp-border, rgba(255, 255, 255, 0.15));
    border-radius: 16px;
    color: var(--mp-text, #ffffff);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    touch-action: manipulation;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.sp-new-playlist-header-btn:active {
    transform: scale(0.92);
    background: var(--mp-accent);
    color: #000000;
}

.sp-plus-icon {
    font-size: 13px;
    line-height: 1;
    font-weight: 900;
}

.sp-search-input {
    background: var(--mp-surface, #242424);
    border: 1px solid var(--mp-border, rgba(255, 255, 255, 0.12));
    border-radius: 16px;
    padding: 5px 12px;
    color: var(--mp-text, #ffffff);
    font-size: 11px;
    outline: none;
    width: 100px;
    transition: all 0.18s ease;
}

.sp-search-input:focus {
    border-color: var(--mp-accent);
    background: var(--mp-elevated, #2a2a2a);
    width: 130px;
}

/* Crate Filter Chips (Horizontally Scrollable, Never Squeezed or Broken) */
.sp-filter-chips-wrapper {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 6px 0;
    box-sizing: border-box;
    display: flex;
}

.sp-filter-chips-wrapper::-webkit-scrollbar {
    display: none;
}

.sp-filter-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.sp-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--mp-surface, #2a2a2a);
    border: 1px solid var(--mp-border, transparent);
    color: var(--mp-text, #ffffff);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 18px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.sp-chip:hover {
    background: var(--mp-elevated, #383838);
}

.sp-chip:active {
    transform: scale(0.95);
}

.sp-chip.active {
    background: var(--mp-accent);
    color: #000000;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--mp-accent-glow);
}

.sp-chip-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    color: inherit;
    margin-left: 1px;
}

.sp-chip-add-btn {
    border: 1px dashed var(--mp-border, rgba(255, 255, 255, 0.3));
    background: rgba(255, 255, 255, 0.06);
    color: var(--mp-accent);
}

.sp-chip-drawer-btn {
    background: rgba(255, 255, 255, 0.1);
}

/* Playlist AutoPlay Action Bar (Queue Section) */
.sp-playlist-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    margin: 4px 0 8px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--mp-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
    width: 100%;
}

.sp-pb-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.sp-pb-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.sp-pb-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sp-pb-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--mp-text, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.sp-pb-sub {
    font-size: 10.5px;
    color: var(--mp-text-sub, #b3b3b3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.sp-autoplay-playlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    background: var(--mp-accent, #1db954);
    color: #000000;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 10px var(--mp-accent-glow, rgba(29, 185, 84, 0.3));
    transition: all 0.18s cubic-bezier(0.25, 1, 0.5, 1);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.sp-autoplay-playlist-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.sp-autoplay-playlist-btn:active {
    transform: scale(0.95);
}

.sp-autoplay-playlist-btn.is-playing {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
    animation: sp-pulse-glow 2s infinite ease-in-out;
}

@keyframes sp-pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
    }
}

/* Spotify Track Rows */
.sp-track-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-empty-list {
    padding: 24px;
    text-align: center;
    color: #b3b3b3;
    font-size: 12.5px;
}

.sp-track-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    touch-action: manipulation;
}

.sp-track-row-item:hover {
    background: #222222;
}

.sp-track-row-item:active {
    background: #2a2a2a;
}

.sp-track-row-item.active-playing {
    background: var(--mp-backdrop);
}

/* Already played tracks in queue / library: faded soft white */
.sp-track-row-item.is-played {
    opacity: 0.42;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.sp-track-row-item.is-played:hover {
    opacity: 0.88;
}

.sp-track-row-item.is-played .sp-row-title {
    color: rgba(255, 255, 255, 0.65);
}

.sp-track-row-item.is-played .sp-row-artist {
    color: rgba(255, 255, 255, 0.38);
}

.sp-track-row-item.is-played .sp-row-num {
    color: rgba(255, 255, 255, 0.35);
}

.sp-track-row-item.is-played .sp-played-check {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 900;
}

.sp-track-row-item.is-played .sp-row-thumb {
    opacity: 0.55;
}

.sp-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.sp-row-num {
    font-size: 12px;
    font-weight: 600;
    color: #b3b3b3;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sp-row-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
    background: #242424;
}

.sp-row-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sp-row-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-track-row-item.active-playing .sp-row-title {
    color: var(--mp-accent);
}

.sp-row-artist {
    font-size: 12.5px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sp-row-bpm-pill {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--mp-accent);
    background: var(--mp-backdrop);
    padding: 2px 6px;
    border-radius: 4px;
}

.sp-row-duration {
    font-size: 11.5px;
    color: #b3b3b3;
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    text-align: right;
}

.sp-row-more-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, color 0.15s ease;
}

.sp-track-row-item:hover .sp-row-more-btn {
    color: var(--mp-accent);
    transform: scale(1.15);
}

/* Spotify Equalizer Bars Animation on Playing Track */
.sp-eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 13px;
    width: 15px;
}

.sp-bar {
    width: 3px;
    background: var(--mp-accent);
    border-radius: 1px;
    animation: spEqBounce 0.75s ease-in-out infinite alternate;
}

.sp-bar.b1 { animation-delay: 0.1s; height: 5px; }
.sp-bar.b2 { animation-delay: 0.35s; height: 13px; }
.sp-bar.b3 { animation-delay: 0.2s; height: 8px; }

@keyframes spEqBounce {
    0% { height: 3px; }
    100% { height: 13px; }
}

/* ==========================================================================
   11. Spotify Options Bottom Sheet Modal
   ========================================================================== */
.sp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.sp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: spFadeIn 0.2s ease forwards;
}

@keyframes spFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sp-modal-sheet {
    position: relative;
    z-index: 2;
    background: #222222;
    border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(max(env(safe-area-inset-bottom, 0px), 16px) + 16px) 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
    animation: spSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sp-modal-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto;
}

.sp-modal-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-modal-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}

.sp-modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sp-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-modal-artist {
    font-size: 13px;
    color: #b3b3b3;
}

.sp-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-modal-action-row {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 8px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
    touch-action: manipulation;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.sp-modal-trans-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    cursor: default;
}

.sp-modal-trans-row:hover,
.sp-modal-trans-row:active {
    background: transparent;
}

.sp-modal-trans-row-top {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.sp-modal-action-row:hover,
.sp-modal-action-row:active {
    background: rgba(255, 255, 255, 0.08);
}

.sp-modal-action-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.sp-modal-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.sp-modal-action-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.sp-modal-action-sub {
    font-size: 11.5px;
    color: #b3b3b3;
}

.sp-modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 24px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease;
    touch-action: manipulation;
}

.sp-modal-close-btn:active {
    background: rgba(255, 255, 255, 0.18);
}

/* Row Action: + Add to Playlist Button */
.sp-row-add-playlist-btn {
    background: transparent;
    border: none;
    color: var(--mp-text-sub, #b3b3b3);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.sp-row-add-playlist-btn:hover {
    color: var(--mp-accent);
    background: rgba(255, 255, 255, 0.08);
}

.sp-row-add-playlist-btn:active {
    transform: scale(0.85);
    color: var(--mp-accent);
}

/* Row Action: ⏭ Play Next Button */
.sp-row-play-next-btn {
    background: transparent;
    border: none;
    color: var(--mp-text-sub, #b3b3b3);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.sp-row-play-next-btn:hover {
    color: var(--mp-accent, #00f2fe);
    background: rgba(255, 255, 255, 0.08);
}

.sp-row-play-next-btn:active,
.sp-row-play-next-btn.added {
    transform: scale(1.18);
    color: var(--mp-accent, #00f2fe);
}

/* Row Action: Quick Like Heart Button */
.sp-row-like-btn {
    background: transparent;
    border: none;
    color: var(--mp-text-muted, #727272);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: manipulation;
}

.sp-row-like-btn:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.sp-row-like-btn.active {
    color: #ff4757;
}

.sp-row-like-btn:active {
    transform: scale(1.3);
}

/* ==========================================================================
   Slide-Out Side Tab Drawer: Playlists & Crates
   ========================================================================== */
.sp-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 99995;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.sp-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.sp-drawer-backdrop {
    position: absolute;
    inset: 0;
}

.sp-drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 86%;
    max-width: 340px;
    background: var(--mp-surface, #141414);
    border-right: 1px solid var(--mp-border, rgba(255, 255, 255, 0.14));
    display: flex;
    flex-direction: column;
    padding: calc(max(env(safe-area-inset-top, 0px), 48px) + 12px) 16px calc(max(env(safe-area-inset-bottom, 0px), 20px) + 12px) 16px;
    box-sizing: border-box;
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.75);
    z-index: 2;
}

.sp-drawer-overlay.open .sp-drawer-panel {
    transform: translateX(0);
}

/* Right-side Slide-Out Drawer (3-dots Player & DJ Options) */
.sp-right-drawer-overlay {
    justify-content: flex-end;
}

.sp-right-drawer-panel {
    left: auto !important;
    right: 0 !important;
    border-right: none !important;
    border-left: 1px solid var(--mp-border, rgba(255, 255, 255, 0.14)) !important;
    transform: translateX(100%) !important;
    box-shadow: -12px 0 36px rgba(0, 0, 0, 0.75) !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.sp-drawer-overlay.open .sp-right-drawer-panel {
    transform: translateX(0) !important;
}

.sp-drawer-options-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-bottom: 24px;
}

.sp-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--mp-border, rgba(255, 255, 255, 0.1));
}

.sp-drawer-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sp-drawer-icon {
    font-size: 22px;
}

.sp-drawer-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--mp-text, #ffffff);
    margin: 0;
    letter-spacing: -0.2px;
}

.sp-drawer-sub {
    font-size: 11px;
    color: var(--mp-text-sub, #b3b3b3);
    margin: 2px 0 0 0;
}

.sp-drawer-action-row {
    margin: 14px 0 10px 0;
}

.sp-create-playlist-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--mp-accent) 0%, var(--mp-accent-glow) 100%);
    border: none;
    border-radius: 24px;
    color: #000000;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 11px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px var(--mp-accent-glow);
    transition: transform 0.15s ease, opacity 0.15s ease;
    touch-action: manipulation;
}

.sp-create-playlist-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.sp-btn-plus-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: 900;
}

.sp-drawer-content {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    padding-top: 4px;
}

.sp-drawer-content::-webkit-scrollbar {
    display: none;
}

.sp-drawer-section-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--mp-text-muted, #757575);
    padding: 6px 4px;
    text-transform: uppercase;
}

.sp-custom-count-badge {
    background: rgba(255, 255, 255, 0.12);
    color: var(--mp-text, #ffffff);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 9.5px;
}

.sp-playlist-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.sp-drawer-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease;
    touch-action: manipulation;
}

.sp-drawer-playlist-item:hover {
    background: var(--mp-elevated, #222222);
}

.sp-drawer-playlist-item:active {
    background: var(--mp-elevated, #282828);
}

.sp-drawer-playlist-item.active {
    background: var(--mp-backdrop);
    border-left: 3px solid var(--mp-accent);
}

.sp-drawer-playlist-item.active .sp-dpi-name {
    color: var(--mp-accent);
    font-weight: 700;
}

.sp-dpi-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.sp-dpi-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.sp-dpi-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sp-dpi-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mp-text, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-dpi-sub {
    font-size: 11px;
    color: var(--mp-text-sub, #a0a0a0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-dpi-count {
    font-size: 11px;
    color: var(--mp-text-muted, #757575);
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 6px;
}

.sp-dpi-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sp-dpi-del-btn {
    background: transparent;
    border: none;
    color: var(--mp-text-muted, #757575);
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
    touch-action: manipulation;
}

.sp-dpi-del-btn:hover {
    color: #ff3344;
    background: rgba(255, 51, 68, 0.1);
}

.sp-empty-custom-playlists {
    padding: 16px 8px;
    text-align: center;
    color: var(--mp-text-sub, #a0a0a0);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==========================================================================
   Theme Switcher Modal & Cards
   ========================================================================== */
.sp-theme-sheet {
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.sp-theme-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
}

.sp-theme-sheet-header-text {
    display: flex;
    flex-direction: column;
}

.sp-sheet-close-x-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
    flex-shrink: 0;
}

.sp-sheet-close-x-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sp-sheet-close-x-btn:active {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0.9);
}

.sp-theme-sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-text, #ffffff);
    margin: 0;
}

.sp-theme-sheet-sub {
    font-size: 11.5px;
    color: var(--mp-text-sub, #b3b3b3);
    margin: 2px 0 0 0;
}

.sp-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    padding: 4px 2px 10px 2px;
}

.sp-theme-card {
    background: var(--mp-surface, #1e1e1e);
    border: 2px solid var(--mp-border, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 9px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
    box-sizing: border-box;
}

.sp-theme-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: var(--mp-elevated, #252525);
}

.sp-theme-card.active {
    border-color: var(--mp-accent);
    box-shadow: 0 0 16px var(--mp-accent-glow);
    background: var(--mp-elevated, #252525);
}

.sp-theme-swatch-box {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    font-size: 18px;
}

.sp-theme-active-check {
    font-size: 12px;
    font-weight: 900;
    color: #000000;
    background: #ffffff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.sp-theme-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-theme-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mp-text, #ffffff);
}

.sp-theme-desc {
    font-size: 10px;
    color: var(--mp-text-sub, #a0a0a0);
    line-height: 1.25;
}

/* ==========================================================================
   Custom Colorway Studio - Mobile Player Hue & Neon Customizer
   ========================================================================== */
.sp-custom-colorway-studio {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--mp-border, rgba(255, 255, 255, 0.12));
    border-radius: 14px;
    padding: 12px;
    margin: 8px 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.sp-custom-studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.sp-custom-studio-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-custom-studio-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 6px var(--mp-accent, #00f2fe));
}

.sp-custom-studio-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mp-text, #ffffff);
    margin: 0;
}

.sp-custom-studio-sub {
    font-size: 10px;
    color: var(--mp-text-sub, #b3b3b3);
    margin: 1px 0 0 0;
}

.sp-custom-studio-badge {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3px 7px;
    border-radius: 10px;
    color: var(--mp-accent, #00f2fe);
    background: var(--mp-accent-glow, rgba(0, 242, 254, 0.15));
    border: 1px solid var(--mp-border, rgba(0, 242, 254, 0.3));
    text-transform: uppercase;
}

/* 2-Column Pickers Row */
.sp-custom-pickers-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.sp-color-input-card {
    background: var(--mp-surface, #181818);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 9px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.sp-color-input-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.sp-color-label-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-color-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--mp-text, #ffffff);
}

.sp-hex-badge {
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    color: var(--mp-text-sub, #b3b3b3);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 5px;
    border-radius: 4px;
}

.sp-color-picker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    touch-action: manipulation;
}

.sp-color-picker-native {
    position: absolute;
    opacity: 0;
    width: 32px;
    height: 32px;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 2;
}

.sp-color-preview-disc {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 0 0 4px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sp-color-picker-label:hover .sp-color-preview-disc {
    transform: scale(1.08);
}

.sp-color-picker-tap-hint {
    font-size: 10px;
    color: var(--mp-text-muted, #888888);
}

/* Fast Preset Swatches */
.sp-custom-swatches-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-custom-swatches-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--mp-text-sub, #b3b3b3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sp-custom-swatches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sp-preset-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: var(--mp-text, #ffffff);
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.sp-preset-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.sp-preset-chip:active {
    transform: scale(0.96);
}

.sp-preset-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    display: inline-block;
}

/* Live Dynamic Preview Card */
.sp-custom-preview-card {
    background: linear-gradient(135deg, #060910 0%, rgba(0, 242, 254, 0.14) 100%);
    border: 1.5px solid var(--mp-accent, #00f2fe);
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.2);
    border-radius: 11px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.25s ease;
}

.sp-custom-preview-art {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: var(--mp-accent, #00f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-custom-preview-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.sp-custom-preview-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-custom-preview-sub {
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-custom-preview-glow-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    border-radius: 6px;
    color: var(--mp-accent, #00f2fe);
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.4);
    flex-shrink: 0;
}

/* Actions Row */
.sp-custom-studio-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.sp-custom-btn-apply {
    flex: 1;
    background: linear-gradient(135deg, var(--mp-accent, #00f2fe) 0%, #0088ff 100%);
    color: #000000;
    border: none;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 14px var(--mp-accent-glow, rgba(0, 242, 254, 0.35));
    transition: all 0.18s ease;
    touch-action: manipulation;
}

.sp-custom-btn-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--mp-accent-glow, rgba(0, 242, 254, 0.5));
}

.sp-custom-btn-apply:active {
    transform: scale(0.97);
}

.sp-custom-btn-apply.applied {
    background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
    color: #000000;
}

.sp-custom-btn-reset {
    background: rgba(255, 255, 255, 0.08);
    color: var(--mp-text-sub, #b3b3b3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
    white-space: nowrap;
}

.sp-custom-btn-reset:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.sp-custom-btn-reset:active {
    transform: scale(0.96);
}

/* ==========================================================================
   Add to Playlist Modal & Picker
   ========================================================================== */
.sp-modal-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--mp-text-sub, #b3b3b3);
    margin: 10px 0 6px 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.sp-playlist-picker-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 40vh;
    overflow-y: auto;
    padding: 2px;
}

.sp-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--mp-surface, #1e1e1e);
    border: 1px solid var(--mp-border, rgba(255, 255, 255, 0.08));
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.sp-picker-row:hover {
    background: var(--mp-elevated, #262626);
}

.sp-picker-row.in-playlist {
    border-color: var(--mp-accent);
    background: var(--mp-backdrop);
}

.sp-picker-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.sp-picker-icon {
    font-size: 18px;
}

.sp-picker-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sp-picker-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--mp-text, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-picker-sub {
    font-size: 10.5px;
    color: var(--mp-text-sub, #a0a0a0);
}

.sp-picker-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 14px;
    color: var(--mp-text, #ffffff);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 11px;
    flex-shrink: 0;
    pointer-events: none;
    transition: all 0.15s ease;
}

.sp-picker-toggle-btn.active {
    background: var(--mp-accent);
    color: #000000;
}

.sp-picker-empty {
    padding: 16px;
    text-align: center;
    color: var(--mp-text-sub, #a0a0a0);
    font-size: 12px;
}

/* Play Next Option Row Styling */
.sp-play-next-row {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--mp-border, rgba(255, 255, 255, 0.16));
    margin-bottom: 8px;
    border-radius: 8px;
}

.sp-play-next-row:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sp-play-next-row .sp-picker-icon svg {
    stroke: var(--mp-accent, #00f2fe);
}

.sp-play-next-row .sp-picker-name {
    color: #ffffff;
}

.sp-play-next-row .sp-picker-toggle-btn {
    background: var(--mp-accent, #00f2fe);
    color: #000000;
    font-weight: 800;
    box-shadow: 0 0 10px var(--mp-accent-glow, rgba(0, 242, 254, 0.4));
}

/* ==========================================================================
   Toast Notification (Safe Canvas Bounds)
   ========================================================================== */
.sp-toast {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    left: 50%;
    transform: translateX(-50%) translateY(25px);
    background: var(--mp-elevated, #242424);
    color: var(--mp-text, #ffffff);
    border: 1px solid var(--mp-border, rgba(255, 255, 255, 0.25));
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.75);
    pointer-events: none;
    opacity: 0;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100000;
    white-space: normal;
    max-width: min(92%, 360px);
    width: max-content;
    min-width: 140px;
    text-align: center;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.sp-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Transition Bars Range Slider in Options Modal */
.sp-slider-action-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px;
    cursor: default !important;
}

.sp-modal-action-top-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.sp-bars-value-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 9px;
    border-radius: 12px;
    margin-left: auto;
}

.sp-slider-wrap {
    width: 100%;
    padding: 4px 4px 8px 4px;
    box-sizing: border-box;
}

.sp-bars-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
    outline: none;
    cursor: pointer;
    margin: 8px 0;
}

.sp-bars-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.sp-bars-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.sp-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    padding: 0 2px;
}

/* Mobile Screen & Canvas Fit Tuning for Dropdown & Badges */
@media (max-width: 480px) {
    .sp-badges-row {
        gap: 4px;
        padding: 0 2px;
    }
    .sp-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    select.sp-trans-pill,
    .sp-trans-pill {
        font-size: 10px;
        max-width: 130px;
        padding: 3px 18px 3px 7px;
    }
}

@media (max-width: 360px) {
    .sp-badges-row {
        gap: 3px;
    }
    .sp-badge {
        font-size: 9.5px;
        padding: 2px 5px;
    }
    select.sp-trans-pill,
    .sp-trans-pill {
        font-size: 9.5px;
        max-width: 110px;
        padding: 2px 16px 2px 6px;
    }
}

/* ==========================================================================
   Platter Quick-Seek, Countdown Mode & Mobile File/Folder Import
   ========================================================================== */
.sp-platter-chassis {
    position: relative;
}

.sp-seek-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(10, 14, 22, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--mp-accent, #00f2fe);
    box-shadow: 0 0 20px var(--mp-accent-glow, rgba(0, 242, 254, 0.6));
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 7px 16px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 25;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-seek-indicator.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
}

.sp-time-dur {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 1px 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.sp-time-dur:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.sp-time-dur.countdown-active {
    color: var(--mp-accent, #00f2fe);
    font-weight: 700;
}

.sp-drawer-action-subrow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.sp-import-music-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 9px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.sp-import-music-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--mp-accent, #00f2fe);
}

.sp-import-music-btn:active {
    transform: scale(0.96);
}

.sp-add-music-queue-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.sp-add-music-queue-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--mp-accent, #00f2fe);
}

.sp-add-music-queue-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   TRUE APP LANDSCAPE / HORIZONTAL MODE
   Adapts cleanly to all mobile phones, tablets, laptops, and desktop screens
   ========================================================================== */
@media (orientation: landscape), (min-aspect-ratio: 1/1) {
    #mobile-portrait-player {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        position: fixed !important;
        inset: 0 !important;
        background: var(--mp-bg) !important;
        transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.6s ease;
        align-items: stretch !important;
        justify-content: flex-start !important;
        z-index: 99990 !important;
    }

    body.force-player-view:not(.force-dj-view) #mobile-portrait-player .mobile-player-shell.spotify-theme,
    .mobile-player-shell.spotify-theme {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        padding: max(env(safe-area-inset-top, 0px), 6px) max(env(safe-area-inset-right, 0px), 16px) max(env(safe-area-inset-bottom, 0px), 6px) max(env(safe-area-inset-left, 0px), 16px) !important;
        overflow: hidden !important;
    }

    /* Ambient backdrop glow in landscape */
    .sp-backdrop-glow {
        top: -20px !important;
        width: 100vw !important;
        height: 100vh !important;
        opacity: 0.55 !important;
    }

    /* Minimalist header in landscape */
    .sp-header {
        padding: 2px 0 6px 0 !important;
        margin-bottom: 2px !important;
    }

    .sp-header-title {
        max-width: 320px !important;
    }

    /* AutoPlay Hero bar in landscape */
    .sp-autoplay-banner {
        margin: 0 0 6px 0 !important;
    }

    .sp-autoplay-action-btn {
        padding: 5px 12px !important;
        border-radius: 10px !important;
    }

    .sp-autoplay-badge-icon {
        width: 26px !important;
        height: 26px !important;
        font-size: 13px !important;
    }

    .sp-autoplay-headline {
        font-size: 12px !important;
    }

    .sp-autoplay-desc {
        font-size: 10px !important;
    }

    .sp-toggle-pill {
        font-size: 10px !important;
        padding: 4px 10px !important;
    }

    /* True 2-Column Responsive Layout */
    .sp-content-scroll {
        display: grid !important;
        grid-template-columns: minmax(300px, 38%) 1fr !important;
        gap: 16px !important;
        height: calc(100% - 50px) !important;
        max-height: calc(100% - 50px) !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
    }

    /* Left Column: Platter, Track Row, Badges, Scrubber, Transport, Device */
    .sp-player-deck-column {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 6px !important;
        gap: 3px !important;
        scrollbar-width: thin;
        box-sizing: border-box;
    }

    .sp-player-deck-column::-webkit-scrollbar {
        width: 3px;
    }
    .sp-player-deck-column::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 3px;
    }

    .sp-artwork-wrap {
        margin: 0 0 2px 0 !important;
    }

    .sp-platter-chassis {
        width: clamp(110px, 26vh, 220px) !important;
        height: clamp(110px, 26vh, 220px) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    }

    .sp-track-row {
        margin: 1px 0 !important;
    }

    .sp-track-title {
        font-size: 13.5px !important;
        line-height: 1.2 !important;
    }

    .sp-track-artist {
        font-size: 11px !important;
    }

    .sp-badges-row {
        margin: 2px 0 !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
    }

    .sp-badge {
        font-size: 9.5px !important;
        padding: 3px 8px !important;
    }

    .sp-trans-pill {
        font-size: 9.5px !important;
        padding: 3px 8px !important;
    }

    .sp-progress-block {
        margin: 1px 0 !important;
        gap: 2px !important;
    }

    .sp-progress-bar {
        height: 3.5px !important;
    }

    .sp-time-row {
        font-size: 10.5px !important;
    }

    .sp-controls-bar {
        margin: 2px 0 !important;
        padding: 0 4px !important;
    }

    .sp-play-circle-btn {
        width: 48px !important;
        height: 48px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
    }

    .sp-play-circle-btn svg {
        width: 22px !important;
        height: 22px !important;
    }

    .sp-skip-btn {
        width: 38px !important;
        height: 38px !important;
    }

    .sp-skip-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    .sp-sub-btn {
        width: 34px !important;
        height: 34px !important;
    }

    .sp-sub-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    .sp-device-bar {
        padding: 4px 0 !important;
        margin-top: 2px !important;
    }

    .sp-device-btn {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    .sp-queue-toggle-btn {
        display: none !important; /* In 2-column landscape mode, queue is always side-by-side */
    }

    /* Right Column: Queue, Crate Chips, Track List */
    .sp-queue-section {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
        border-left: 1px solid var(--mp-border, rgba(255, 255, 255, 0.08)) !important;
        padding-left: 14px !important;
        box-sizing: border-box;
    }

    .sp-queue-header {
        flex-shrink: 0 !important;
        padding-bottom: 4px !important;
    }

    .sp-queue-title {
        font-size: 13px !important;
    }

    .sp-queue-sub {
        font-size: 9.5px !important;
    }

    .sp-search-input {
        width: 120px !important;
        padding: 4px 10px !important;
        font-size: 10.5px !important;
    }

    .sp-search-input:focus {
        width: 160px !important;
    }

    .sp-add-music-queue-btn,
    .sp-new-playlist-header-btn {
        padding: 4px 8px !important;
        font-size: 10px !important;
    }

    .sp-filter-chips-wrapper {
        flex-shrink: 0 !important;
        padding: 2px 0 4px 0 !important;
    }

    .sp-chip {
        font-size: 10.5px !important;
        padding: 4px 10px !important;
    }

    .sp-playlist-banner {
        flex-shrink: 0 !important;
        margin: 2px 0 4px 0 !important;
        padding: 5px 10px !important;
    }

    .sp-pb-icon {
        width: 26px !important;
        height: 26px !important;
    }

    .sp-pb-title {
        font-size: 11.5px !important;
    }

    .sp-pb-sub {
        font-size: 9.5px !important;
    }

    .sp-autoplay-playlist-btn {
        padding: 5px 10px !important;
        font-size: 10.5px !important;
    }

    /* Scrollable Track List in Right Column */
    .sp-track-list {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 4px !important;
        scrollbar-width: thin;
    }

    .sp-track-list::-webkit-scrollbar {
        width: 4px;
    }
    .sp-track-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }

    .sp-track-row-item {
        padding: 5px 8px !important;
    }

    .sp-tr-artwork {
        width: 36px !important;
        height: 36px !important;
    }

    .sp-tr-title {
        font-size: 12px !important;
    }

    .sp-tr-artist {
        font-size: 10px !important;
    }
}

@media (orientation: landscape) and (max-height: 420px) {
    .sp-autoplay-banner {
        display: none !important;
    }
    .sp-content-scroll {
        height: calc(100% - 40px) !important;
    }
    .sp-platter-chassis {
        width: clamp(100px, 24vh, 140px) !important;
        height: clamp(100px, 24vh, 140px) !important;
    }
}



