:root {
    /* Default Dark Theme - unified with index.html */
    --bg-main: #141414;
    --bg-pane: #1b1b1b;
    --bg-hover: #262626;
    --bg-active: #303030;
    --text-main: #e3e3dc;
    --text-muted: #95968f;
    --accent: #ff5252;
    --accent-hover: #ff7b7b;
    --border: #2a2a2a;
    --danger: #cf6679;

    --btn-primary-text: #ffffff;
    --card-bg: #1e1e1e;
    --card-shadow: rgba(0, 0, 0, 0.4);
    --bg-tracks: #181818;
    --track-card-bg: #202020;
    --track-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --thumb-bg: #222222;
    --thumb-placeholder: rgba(255, 255, 255, 0.06);
    --table-header-bg: #181818;
    --table-row-hover: #282828;
    --table-playing-bg: rgba(255, 82, 82, 0.16);
    --waveform-container-bg: rgba(255, 255, 255, 0.05);
    --scrubber-progress-bg: rgba(255, 82, 82, 0.35);
    --context-menu-bg: #242424;
    --context-menu-shadow: rgba(0, 0, 0, 0.6);
    --scrollbar-thumb: #555555;
    --scrollbar-thumb-hover: #777777;
    --queue-card-bg: rgba(255, 82, 82, 0.08);
    --queue-card-border: rgba(255, 82, 82, 0.25);
    --queue-active-bg: rgba(255, 82, 82, 0.15);
    --notification-bg: #242424;
    --notification-shadow: rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: light) {
    :root {
        /* Clean Modern Light Theme - unified with index.html */
        --bg-main: #f7f7f9;
        --bg-pane: #ffffff;
        --bg-tracks: #f5f5f7;
        --track-card-bg: #ffffff;
        --track-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        --bg-hover: #f0f0f3;
        --bg-active: #e5e5ea;
        --text-main: #111111;
        --text-muted: #555555;
        --accent: #d32f2f;
        --accent-hover: #b71c1c;
        --border: #e5e5ea;
        --danger: #dc2626;

        --btn-primary-text: #ffffff;
        --card-bg: #ffffff;
        --card-shadow: rgba(0, 0, 0, 0.08);
        --thumb-bg: #ebebf0;
        --thumb-placeholder: rgba(0, 0, 0, 0.05);
        --table-header-bg: #f5f5f7;
        --table-row-hover: #fafafc;
        --table-playing-bg: rgba(211, 47, 47, 0.08);
        --waveform-container-bg: rgba(0, 0, 0, 0.05);
        --scrubber-progress-bg: rgba(211, 47, 47, 0.25);
        --context-menu-bg: #ffffff;
        --context-menu-shadow: rgba(0, 0, 0, 0.15);
        --scrollbar-thumb: #c7c7cc;
        --scrollbar-thumb-hover: #8e8e93;
        --queue-card-bg: rgba(211, 47, 47, 0.06);
        --queue-card-border: rgba(211, 47, 47, 0.2);
        --queue-active-bg: rgba(211, 47, 47, 0.12);
        --notification-bg: #ffffff;
        --notification-shadow: rgba(0, 0, 0, 0.15);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: ui-monospace, 'Cascadia Code', 'Cascadia Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Panes */
.pane {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-pane);
    border-right: none;
}

#explorer-pane {
    width: 440px;
    min-width: 360px;
    resize: horizontal;
    overflow: auto; /* for resize */
}

#tracks-pane {
    flex: 1;
    min-width: 400px;
    background-color: var(--bg-tracks);
}

/* App Brand Header */
.app-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 60px 14px 60px;
    margin-bottom: 0;
}

.app-brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.app-brand-link {
    font-size: 0.76rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

.app-brand-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 60px 20px 60px;
    border-bottom: none;
    height: auto;
}

#explorer-pane .pane-header {
    padding: 10px 60px 20px 60px;
    height: auto;
    min-height: 48px;
}

#tracks-pane .pane-header {
    background-color: var(--bg-tracks);
}

#tracks-pane .pane-header h2 {
    max-width: min(500px, 50vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tracks-pane .pane-header h2 span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pane-header h2 {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
    display: block;
    margin-top: 2px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.reopen-card {
    margin-top: 18px;
    padding: 14px 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-width: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.reopen-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.reopen-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
    text-align: center;
    margin: 0;
}

/* Buttons & Form Controls */
button, input, select, textarea {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--btn-primary-text);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-hover);
}

/* Tree View */
#tree-container {
    padding: 10px 60px 60px 60px;
}
.tree-item {
    padding: 2px 0;
}
.tree-row {
    display: flex;
    align-items: center;
    position: relative;
    padding: 8px 10px 8px 0;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    gap: 10px;
    transition: background-color 0.15s;
}
.tree-row:hover {
    background-color: var(--bg-hover);
}
.tree-row.selected {
    background-color: var(--bg-active);
}
.tree-expander {
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.68rem;
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
    cursor: pointer;
    z-index: 2;
}
.tree-expander:hover {
    color: var(--accent);
}
.tree-item.expanded > .tree-row > .tree-expander,
.tree-row.expanded > .tree-expander {
    transform: translateY(-50%) rotate(90deg);
}
.tree-expander.empty {
    display: none;
}
.tree-icon {
    width: 18px;
    text-align: center;
    color: var(--text-muted);
    flex-shrink: 0;
}
.tree-children {
    padding-left: 24px;
    display: none;
}
.tree-children.expanded {
    display: block;
}
.tree-thumbnail {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    background-color: var(--thumb-bg);
    flex-shrink: 0;
    display: block;
}
.tree-thumbnail-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background-color: var(--thumb-placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.tree-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-size: 0.9rem;
}
.tree-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* Tracks Table */
#tracks-container {
    padding: 0 60px 60px 60px;
    background-color: var(--bg-tracks);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    text-align: left;
    font-size: 0.85rem;
}
th {
    position: sticky;
    top: 0;
    background-color: var(--bg-tracks);
    padding: 12px 18px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.78rem;
    border: none;
    border-bottom: none;
    z-index: 1;
}
td {
    padding: 13px 18px;
    border: none;
    border-bottom: none;
    font-size: 0.85rem;
}
tbody tr {
    cursor: pointer;
    background-color: var(--track-card-bg);
    box-shadow: var(--track-card-shadow);
    transition: background-color 0.15s ease;
}
tbody tr:hover {
    background-color: var(--table-row-hover);
}
tbody tr.playing {
    color: var(--accent);
    background-color: var(--table-playing-bg);
}
tbody tr td:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
tbody tr td:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}
.track-num {
    color: var(--text-muted);
    width: 36px;
    text-align: center;
    font-size: 0.78rem;
}

/* Player Pane */
#player-pane {
    height: 100px;
    background-color: var(--bg-pane);
    border-top: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 0 60px;
    justify-content: space-between;
}

.player-info {
    display: flex;
    align-items: center;
    width: 30%;
    min-width: 200px;
    gap: 15px;
}

.album-art {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.album-art img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.track-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

#np-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    text-overflow: ellipsis;
    overflow: hidden;
}

#np-artist, #np-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Player Controls & Scrubber */
.player-controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
    max-width: 600px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

.control-btn {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.control-btn:hover:not(:disabled) {
    color: var(--text-main);
}

.play-btn {
    font-size: 2rem;
    color: var(--text-main);
}
.play-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.scrubber-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

#waveform-container {
    flex: 1;
    position: relative;
    height: 32px;
    background: transparent;
    border: none;
    overflow: hidden;
    cursor: pointer;
}

#waveform-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#scrubber-progress {
    display: none;
}

#seek-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Hidden but clickable */
    cursor: pointer;
    margin: 0;
    z-index: 3;
}

/* Player Extras */
.player-extras {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 30%;
    min-width: 150px;
    gap: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

#volume-slider {
    width: 80px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Notifications */
#notifications-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.notification {
    background-color: var(--notification-bg);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px var(--notification-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    border-left: 4px solid var(--danger);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Utilities */
.hidden {
    display: none !important;
}

.control-btn.active {
    color: var(--accent);
}

/* Queue Drawer */
.queue-drawer {
    width: 440px;
    min-width: 360px;
    background-color: var(--bg-pane);
    border-left: none;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 60px 20px 60px;
    border-bottom: none;
    height: auto;
}

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

.queue-title-group h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background-color: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

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

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.2s;
    font-size: 0.95rem;
}

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

.queue-content {
    padding: 0 60px 60px 60px;
}

.queue-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 10px 8px 6px;
}

.queue-np-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background-color: var(--queue-card-bg);
    border: 1px solid var(--queue-card-border);
    border-radius: 6px;
    margin: 0 4px 12px 4px;
}

.queue-np-card img {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--thumb-bg);
}

.queue-np-card .queue-item-info {
    flex: 1;
    min-width: 0;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
    position: relative;
}

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

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

.queue-item-thumb {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--thumb-bg);
}

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

.queue-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 4px;
}

.queue-item-remove {
    opacity: 0;
    color: var(--text-muted);
    padding: 4px 6px;
    border-radius: 4px;
    transition: opacity 0.15s, color 0.15s;
    font-size: 0.8rem;
    flex-shrink: 0;
}

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

.queue-item-remove:hover {
    color: var(--danger);
    background-color: rgba(207, 102, 121, 0.15);
}

.queue-empty-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 24px 10px;
}

/* Context Menu */
.context-menu {
    position: fixed;
    z-index: 2000;
    background-color: var(--context-menu-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 0;
    min-width: 170px;
    box-shadow: 0 8px 24px var(--context-menu-shadow);
    animation: fadeIn 0.1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    transition: background-color 0.15s;
}

.context-menu-item i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.context-menu-item:hover {
    background-color: var(--bg-hover);
    color: var(--accent);
}

.context-menu-item:hover i {
    color: var(--accent);
}

.context-menu-item.danger:hover {
    background-color: rgba(207, 102, 121, 0.15);
    color: var(--danger);
}

.context-menu-item.danger:hover i {
    color: var(--danger);
}

.context-menu-divider {
    height: 1px;
    background-color: var(--border);
    margin: 4px 0;
}

/* ==========================================
   Desktop / Mobile Responsive Layout Rules
   ========================================== */
#mobile-nav {
    display: none;
}

#mobile-combined-queue {
    display: none;
}

@media (max-width: 768px) {
    /* Mobile / Tablet App Shell: Natural Flexbox Stack */
    #app-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        width: 100%;
        overflow: hidden;
        position: relative;
    }

    /* Main Content Area (Library & Tracks Views) */
    #main-content {
        flex: 1 1 0;
        min-height: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
    }

    /* Single View Collapsing: Exactly one view active at a time */
    #explorer-pane,
    #tracks-pane,
    #queue-drawer {
        display: none !important;
        width: 100% !important;
        height: 100% !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        max-width: none !important;
    }

    .view-library #explorer-pane {
        display: flex !important;
        flex-direction: column;
        overflow: hidden;
        border-right: none;
    }

    .view-tracks #tracks-pane {
        display: flex !important;
        flex-direction: column;
        overflow: hidden;
    }

    .app-brand-header {
        padding: 16px 15px 12px 15px;
        margin-bottom: 6px;
    }

    .pane-header {
        padding: 15px;
        height: 60px;
    }

    #explorer-pane .pane-header {
        padding: 8px 15px 12px 15px;
        height: auto;
        min-height: 48px;
    }

    #tracks-pane .pane-header {
        padding: 15px;
        height: 60px;
        min-height: auto;
    }

    #tree-container {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 15px 24px 15px;
    }

    #tracks-container {
        padding: 0 15px 15px;
    }

    #table-container {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    /* Table responsive adjustments for mobile */
    #tracks-table th:nth-child(4),
    #tracks-table td:nth-child(4),
    #tracks-table th:nth-child(6),
    #tracks-table td:nth-child(6) {
        display: none;
    }

    /* Bottom Navigation Bar: Dedicated flex item with its own space */
    #mobile-nav {
        display: flex;
        position: relative;
        flex: 0 0 58px;
        height: 58px;
        width: 100%;
        background-color: var(--bg-pane);
        border-top: none;
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 4px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .mobile-nav-btn {
        background: transparent;
        border: none;
        color: var(--text-muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 0.72rem;
        cursor: pointer;
        padding: 6px 8px;
        flex: 1 1 0;
        max-width: 33.33%;
        min-width: 0;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-btn span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .mobile-nav-btn i {
        font-size: 1.15rem;
    }

    .mobile-nav-btn.active {
        color: var(--accent);
        font-weight: 600;
    }

    /* Mini-Player mode: Dedicated flex item between main-content and bottom nav */
    #player-pane {
        position: relative;
        flex: 0 0 102px;
        height: 102px;
        width: 100%;
        z-index: 900;
        border-top: none;
        background-color: var(--bg-pane);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 44px 14px 6px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    }

    .player-info {
        flex: 1;
        min-width: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        width: auto;
    }

    .album-art {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 6px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-hover);
        flex-shrink: 0;
    }

    .album-art img {
        width: 100%;
        height: 100%;
        border-radius: 6px;
        object-fit: cover;
        display: block;
    }

    .track-details {
        max-width: calc(100vw - 190px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #np-meta {
        display: none;
    }

    .player-controls-container {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: auto;
        max-width: none;
    }

    /* Waveform Scrubber in Mobile Mini-Player: Tripled height (42px) */
    .scrubber-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 42px;
        display: flex;
        align-items: center;
        padding: 0;
        margin: 0;
        gap: 0;
        z-index: 10;
        cursor: pointer;
        border-bottom: none;
    }

    .scrubber-container #time-current,
    .scrubber-container #time-total {
        display: none;
    }

    .scrubber-container #waveform-container {
        width: 100%;
        height: 42px;
        margin: 0;
        position: relative;
    }

    .scrubber-container #waveform-canvas {
        height: 42px;
        width: 100%;
    }

    .player-extras {
        display: none;
    }

    /* Full Now Playing & Integrated Queue Combined View */
    .view-nowplaying #main-content {
        display: none !important;
    }

    .view-nowplaying #player-pane {
        flex: 1 1 0;
        min-height: 0;
        height: auto;
        position: relative;
        z-index: 950;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 20px 20px 24px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background-color: var(--bg-main);
    }

    .view-nowplaying .player-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 16px auto;
        gap: 0;
        flex: 0 0 auto;
        cursor: default;
    }

    .view-nowplaying .album-art {
        width: min(250px, 65vw);
        height: min(250px, 65vw);
        min-width: unset;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        margin: 0 auto 16px auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-hover);
        overflow: hidden;
        flex-shrink: 0;
    }

    .view-nowplaying .album-art img {
        width: 100%;
        height: 100%;
        border-radius: 16px;
        object-fit: cover;
        display: block;
    }

    .view-nowplaying .album-art i {
        font-size: 4.5rem;
        color: var(--text-muted);
        opacity: 0.6;
    }

    .view-nowplaying .track-details {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .view-nowplaying #np-title {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 4px;
        text-align: center;
        width: 100%;
    }

    .view-nowplaying #np-artist {
        font-size: 1rem;
        color: var(--text-muted);
        margin-bottom: 6px;
        text-align: center;
        width: 100%;
    }

    .view-nowplaying #np-meta {
        display: inline-block;
        font-size: 0.75rem;
        color: var(--text-muted);
        opacity: 0.75;
        text-align: center;
    }

    .view-nowplaying .player-controls-container {
        width: 100%;
        max-width: 440px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        margin: 0 auto 16px auto;
        flex: 0 0 auto;
    }

    /* Waveform Scrubber: Tripled height (48px) in Mobile Now Playing view */
    .view-nowplaying .scrubber-container {
        position: static;
        display: flex;
        align-items: center;
        width: 100%;
        height: 48px;
        min-height: 48px;
        gap: 12px;
        margin-bottom: 6px;
        padding: 0;
    }

    .view-nowplaying .scrubber-container #time-current,
    .view-nowplaying .scrubber-container #time-total {
        display: inline-block;
        font-size: 0.82rem;
        font-variant-numeric: tabular-nums;
        min-width: 36px;
        text-align: center;
        color: var(--text-muted);
    }

    .view-nowplaying .scrubber-container #waveform-container {
        position: relative;
        height: 48px;
        min-height: 48px;
        flex: 1;
        cursor: pointer;
    }

    .view-nowplaying .scrubber-container #waveform-canvas {
        height: 48px;
        width: 100%;
    }

    .view-nowplaying .player-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 32px;
        width: 100%;
    }

    .view-nowplaying .control-btn {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
    }

    .view-nowplaying .play-btn {
        width: 64px;
        height: 64px;
        font-size: 1.65rem;
    }

    /* Centered Volume Slider in Now Playing */
    .view-nowplaying .player-extras {
        display: flex;
        width: 100%;
        max-width: 440px;
        justify-content: center;
        align-items: center;
        margin: 0 auto 20px auto;
        padding: 0;
        flex: 0 0 auto;
    }

    .view-nowplaying .player-extras #btn-queue {
        display: none;
    }

    .view-nowplaying .volume-control {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        max-width: 220px;
        margin: 0 auto;
    }

    .view-nowplaying .volume-control i {
        font-size: 1.05rem;
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .view-nowplaying #volume-slider {
        flex: 1;
        width: 100%;
        max-width: 170px;
        cursor: pointer;
        margin: 0;
    }

    /* Mobile Combined Queue Section */
    .view-nowplaying #mobile-combined-queue {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 440px;
        border-top: none;
        padding-top: 16px;
        margin: 0 auto;
        flex: 1 1 auto;
    }

    .mobile-queue-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .mobile-queue-header h3 {
        font-size: 0.95rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #mobile-queue-list {
        max-height: 280px;
        overflow-y: auto;
    }
}
