:root {
    --accent: #ffffff;
    --bg-dark: #050505;
    --bg-card: #0e0e0e;
    --border: #1c1c1c;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 136, 0.5); }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    background-color: #050505;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important;
}

button:focus, input:focus { outline: none !important; }

body {
    background: var(--bg-dark);
    color: var(--accent);
    font-family: ui-monospace, Consolas, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

body.system-offline .scrollable-list,
body.system-offline .bottom-banner,
body.system-offline button[onclick="toggleAddMenu()"],
body.system-offline button[onclick="openSettings()"],
body.system-offline #reorderBtn,
body.system-offline #filterToggleBtn,
body.system-offline #searchToggleBtn {
    pointer-events: none !important;
    opacity: 0.3 !important;
    filter: grayscale(100%) !important;
    user-select: none;
}

#mainPowerBtn {
    pointer-events: auto !important;
    opacity: 1 !important;
    filter: none !important;
}

#offlineOverlay {
    pointer-events: auto !important;
    z-index: 9999;
}

.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 190;
    display: none;
}

/* WIDESCREEN LAYOUT */
.widescreen-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: var(--bg-dark);
    overflow: hidden;
}

.main-workspace {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

.col-controls {
    /* Base width, will be overridden by JS dragging */
    flex: 0 0 33.33%;
    width: 33.33%;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    padding: 20px 20px 0 20px;
    z-index: 10;
}

.col-player {
    /* Fills the remaining middle space naturally */
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

.col-history {
    /* Base width, will be overridden by JS dragging */
    flex: 0 0 33.33%;
    width: 33.33%;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    padding: 20px 20px 0 20px;
    z-index: 10;
}



@media (max-width: 900px) {
}

/* RESIZER DRAG HANDLES */
.resizer {
    width: 6px;
    cursor: col-resize;
    background: var(--border);
    z-index: 50;
    transition: background 0.2s;
    flex-shrink: 0;
}
.resizer:hover, .resizer.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Bottom Banner constrained to Middle Column */
.bottom-banner {
    flex-shrink: 0;
    height: 100px;
    width: 100%;
    background: rgba(10, 10, 10, 0.6) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    display: flex;
    align-items: center;
    padding: 10px 25px !important;
    margin: 0 !important;
    z-index: 100;
    cursor: default;
}

.scrollable-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.scrollable-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    padding-bottom: 20px;
}

/* Ambient Backdrops */
.ambient-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; 
    overflow: hidden;
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
    pointer-events: none; 
}

.ambient-image {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(1.4); 
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(60px) saturate(2.5) brightness(0.5); 
    will-change: filter; 
}

.inline-search-bar { display: none !important; width: 100%; margin-bottom: 15px; }
.inline-search-bar.show { display: flex !important; }
.search-btn-active { color: var(--accent) !important; background: rgba(255, 255, 255, 0.1) !important; }

.settings-modal {
    position: fixed;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: #151515; border: 1px solid #333; border-radius: 24px;
    width: 85%; max-width: 450px; display: none; flex-direction: column;
    z-index: 200; padding: 2rem; box-shadow: 0 20px 80px rgba(0, 0, 0, 1);
    max-height: 80vh; overflow-y: auto;
}

.btn-nav, .btn-minimal {
    background: #1a1a1a; border: none; color: #fff; cursor: pointer;
    transition: all 0.2s; display: flex; justify-content: center; align-items: center;
    border-radius: 14px; outline: none; flex-shrink: 0;
}
.btn-nav { width: 45px; height: 45px; padding: 11px; }
.btn-minimal { width: 55px; height: 55px; padding: 15px; }
.btn-nav svg, .btn-minimal svg, .hist-heart svg { width: 100%; height: 100%; object-fit: contain; }

@media (hover: hover) {
    .btn-nav:hover, .btn-minimal:hover { transform: none !important; }
    .btn-nav:hover svg, .btn-minimal:hover svg, #reorderBtn:hover svg { transform: scale(1.15); transition: transform 0.2s ease; }
    .spotify-heart-main:hover { color: var(--accent) !important; background: transparent !important; }
    
    /* Make the glass buttons pop slightly */
    .desktop-header-row .btn-minimal:hover {
        background: rgba(255,255,255,0.1) !important;
    }
}

.btn-nav.active { background: var(--accent); color: #000; }

button.primary-btn {
    background: var(--accent); color: #000; font-weight: bold; font-size: 1.1rem;
    padding: 15px 25px; border: none; border-radius: 14px; cursor: pointer; transition: all 0.2s;
}
button.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.power-btn-circle {
    width: 100px; height: 100px; border-radius: 28px; background: var(--accent); color: #000;
    padding: 25px; border: none; cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
.power-btn-circle:hover { transform: scale(1.1); box-shadow: 0 0 50px var(--accent); }

.edit-btn {
    background: transparent; border: none; color: #666; width: 35px; height: 35px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; margin-left: 5px; flex-shrink: 0; outline: none;
}
.edit-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); transform: scale(1.1); }

.filter-badge {
    position: absolute; top: 5px; right: 5px; background: #ff2a55; color: white; font-size: 0.65rem; font-weight: bold;
    width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    pointer-events: none; opacity: 0; transition: opacity 0.2s, transform 0.2s; transform: scale(0.8);
}
.filter-badge.show { opacity: 1; transform: scale(1); }
.btn-minimal.filter-active { color: var(--accent); background: rgba(255, 255, 255, 0.1); }

.search-filter-bar { display: flex; gap: 10px; flex-shrink: 0; position: relative; width: 100%; }
.search-filter-bar input {
    background: #151515; border: 1px solid #222; color: #fff; padding: 12px 15px; border-radius: 12px;
    font-family: inherit; outline: none; font-size: 0.9rem; flex-grow: 1; transition: border-color 0.2s;
}
.search-filter-bar input:focus { border-color: var(--accent); }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.section-title {
    font-size: 1rem; color: #777575; text-transform: none; letter-spacing: normal;
    font-weight: bold; margin-bottom: 10px; text-align: left;
}

.preset-item:has(.trash-btn) .list-eq { display: none !important; }

.text-btn {
    background: transparent; border: none; color: #555; cursor: pointer; font-family: inherit; font-size: 0.8rem;
    font-weight: bold; text-transform: uppercase; letter-spacing: 0.1em; transition: color 0.2s; padding: 5px; outline: none;
}
.text-btn:hover { color: #fff; }
.text-btn.active { color: var(--accent); }

#tunerBoxTitleDesktop, #tunerBoxSloganDesktop, #tunerBoxTitleHistory, #tunerBoxSloganHistory {
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8), 0px 2px 5px rgba(0, 0, 0, 0.5);
}

.album-art {
    width: auto; 
    height: auto; 
    max-width: 100%; 
    max-height: 100%; 
    aspect-ratio: 1 / 1;
    border-radius: 12px; 
    display: none; 
    object-fit: contain; 
    background: #0a0a0a; 
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.song-info { width: 100%; display: flex; flex-direction: column; align-items: center; overflow: hidden; position: relative; }
.song-info .title-wrapper { padding-top: 15px; padding-bottom: 20px; margin-top: -15px; margin-bottom: -15px; }
.title-wrapper { width: 100%; overflow: hidden; position: relative; margin-bottom: 4px; text-align: center; }

.song-title {
    font-size: 2.2rem; font-weight: bold; color: #fff; display: inline-flex; white-space: nowrap; transition: color 0.2s; margin-bottom: 2px !important; 
}

@keyframes infiniteScroll { 0%, 15% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.song-title.marquee, .song-artist.marquee, .preset-title.marquee, .preset-slogan.marquee {
    display: inline-flex; white-space: nowrap; width: max-content; animation: infiniteScroll 10s linear infinite; 
    will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden; transform: translateZ(0); 
}

.eq-bar { height: 4px; width: 4px; background: var(--accent); border-radius: 2px; transition: height 0.3s ease; }
@keyframes eq1 { 0% { height: 20%; } 25% { height: 90%; } 50% { height: 40%; } 75% { height: 100%; } 100% { height: 30%; } }
@keyframes eq2 { 0% { height: 80%; } 25% { height: 30%; } 50% { height: 100%; } 75% { height: 20%; } 100% { height: 70%; } }
@keyframes eq3 { 0% { height: 40%; } 25% { height: 100%; } 50% { height: 20%; } 75% { height: 80%; } 100% { height: 50%; } }
body.is-playing-audio .eq-bar:nth-child(1) { animation: eq1 1.1s ease-in-out infinite alternate; }
body.is-playing-audio .eq-bar:nth-child(2) { animation: eq2 1.2s ease-in-out infinite alternate; }
body.is-playing-audio .eq-bar:nth-child(3) { animation: eq3 1.3s ease-in-out infinite alternate; }

.trash-btn { background: transparent; border: none; color: #666; width: 35px; height: 35px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; margin-left: auto; flex-shrink: 0; outline: none; }
.trash-btn:hover { color: #ff2a55; background: rgba(255, 42, 85, 0.1); transform: scale(1.1); }
.sort-btn { flex: 1; background: #222; border: 1px solid #333; color: #888; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: bold; transition: all 0.2s; }
.sort-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-block-main:hover { background: #ff2a55 !important; color: #fff !important; opacity: 1 !important; transform: scale(1.1); }

.song-title, .song-artist, .progress-time-inline, #fallbackSpacer { text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8), 0px 2px 5px rgba(0, 0, 0, 0.5); }
.compact-player .btn-minimal svg, .spotify-heart-main svg { filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.6)); }
.progress-bar-bg { box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.6); }

.song-artist { font-size: 1.4rem; color: #d4d4d4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; display: block; }
#sTitleLink:hover .song-title { color: var(--accent); }

.compact-player { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 25px; width: 100%; max-width: 100%; gap: 10px; }
.player-left { justify-self: start; }
.player-center { display: flex; align-items: center; justify-content: center; gap: 20px; }
.player-right { justify-self: end; }

.spotify-heart-main { color: #fff; transition: all 0.2s; padding: 14px; background: transparent !important;}
.spotify-heart-main:hover { color: #000; background: var(--accent) !important; }
.spotify-heart-main.liked { color: #1DB954; }
.spotify-heart-main.liked:hover { color: #1ed760; background: #1a1a1a !important; }

.btn-block-hover, .btn-delete-hover {
    opacity: 0; background: transparent; color: #666; transition: all 0.2s; position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%); width: 35px; height: 35px; border: none; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; cursor: pointer; outline: none;
}
.blacklist-item-row:hover .btn-block-hover, .blacklist-item-row:hover .btn-delete-hover { opacity: 1; }
.btn-block-hover:hover, .btn-delete-hover:hover { color: #ff2a55 !important; background: rgba(255, 42, 85, 0.1) !important; transform: translateY(-50%) scale(1.1); }
.blacklist-item-row { position: relative; padding-right: 50px !important; }

.progress-wrapper { width: 100%; max-width: 100%; display: flex; align-items: center; gap: 15px; margin-top: 20px; }
.progress-time-inline { font-size: 0.8rem; color: #e0e0e0; font-weight: bold; min-width: 35px; text-align: center; }
.progress-bar-bg { flex-grow: 1; background: rgba(255, 255, 255, 0.15); height: 6px; border-radius: 3px; overflow: hidden; position: relative; }
.progress-bar-fill { background: var(--accent); width: 0%; height: 100%; transition: width 0.1s linear; position: absolute; top: 0; left: 0; }

.preset-item, .history-item {
    display: flex; align-items: center; background: #151515; padding: 12px; border: 1px solid #222;
    border-radius: 12px; cursor: pointer; text-align: left; transition: border-color 0.2s, background-color 0.2s; flex-shrink: 0; position: relative;
}
.history-item { background: transparent; padding: 5px; border: none; }
.preset-item { border: 2px solid transparent !important; transition: background-color 0.2s, border-color 0.2s; }
.preset-item:hover { border-color: #444; }
.preset-item:hover:not(.is-playing) { background: rgba(255, 255, 255, 0.08) !important; border-color: transparent !important; }
.preset-item.is-playing { border-color: var(--dynamic-color, var(--accent)) !important; background: color-mix(in srgb, var(--dynamic-color, var(--accent)) 15%, transparent) !important; }
.preset-item.placeholder { background: transparent !important; border: 2px dashed var(--accent) !important; opacity: 0.3; }

.preset-logo, .history-art { width: 45px; height: 45px; border-radius: 8px; object-fit: contain; margin-right: 15px; background: #0a0a0a; flex-shrink: 0; }
.history-art { width: 35px; height: 35px; margin-right: 12px; }
.preset-text, .history-text { flex-grow: 1; overflow: hidden; min-width: 0; }

.history-title, .preset-title { font-size: 1rem; font-weight: bold; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-title { font-size: 0.9rem; color: #ccc; text-decoration: none; display: block; }
.preset-title { color: #fff; }
.history-title:hover { color: var(--accent); }
.history-artist, .preset-slogan { color: #716c6c; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.preset-slogan { color: #d4d4d4; }

.history-controls { display: flex; align-items: center; flex-shrink: 0; padding-left: 10px; }
.history-time { color: var(--accent); font-size: 0.7rem; font-weight: bold; white-space: nowrap; opacity: 0.6; }
.hist-heart { background: transparent; border: none; color: #fff; width: 35px; height: 35px; padding: 8px; cursor: pointer; transition: all 0.2s; outline: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.hist-heart:hover { transform: scale(1.2); }
.hist-heart.liked { color: #1DB954; }
.hist-heart.liked:hover { color: #1ed760; }
.history-actions { display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity 0.2s; margin-right: 10px; }
.history-item:hover .history-actions { opacity: 1; }

.setting-group { margin-bottom: 25px; width: 100%; max-width: 400px; }
.setting-group label { color: #888; font-size: 0.8rem; text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 10px; }
.btn-add { background: var(--accent); border: none; color: #000; padding: 6px 12px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: transform 0.2s; }
.btn-add:hover { transform: scale(1.05); }
.btn-block { background: transparent; border: none; color: #666; width: 35px; height: 35px; padding: 8px; cursor: pointer; transition: all 0.2s; outline: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-block:hover { color: #ff2a55; transform: scale(1.1); background: rgba(255, 42, 85, 0.1); }
.shazam-block-btn { position: absolute; top: 15px; left: 15px; z-index: 10; }

.block-dropdown { position: fixed; background: #161616; border: 1px solid #333; border-radius: 12px; z-index: 1000; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9); display: none; flex-direction: column; overflow: hidden; min-width: 150px; }
#tunerBoxDesktop .preset-text, #tunerBoxHistory .preset-text { text-align: left !important; display: flex !important; flex-direction: column !important; align-items: flex-start !important; }
#tunerBoxDesktop .title-wrapper, #tunerBoxHistory .title-wrapper { text-align: left !important; justify-content: flex-start !important; }
.block-dropdown.show { display: flex; animation: slideDown 0.1s ease-out; }
.block-dropdown button { background: transparent; border: none; color: #fff; padding: 12px 20px; text-align: left; cursor: pointer; transition: background 0.2s; font-family: inherit; font-size: 0.9rem; border-bottom: 1px solid #222; }
.block-dropdown button:last-child { border-bottom: none; }
.block-dropdown button:hover { background: #222; color: #ff2a55; }
#addIheartDesktop { display: flex; }
#addIheartMobile { display: none; }

.flip-horizontal { animation: flipH 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); }
@keyframes flipH { 0% { transform: rotateY(0deg); opacity: 1; } 50% { transform: rotateY(90deg); opacity: 0.5; } 100% { transform: rotateY(0deg); opacity: 1; } }

.shazam-content .btn-minimal { background: transparent !important; border: none !important; box-shadow: none !important; }
.tag-pill { display: inline-flex; align-items: center; background: #222; border: 1px solid #444; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; color: #fff; margin: 4px; }
.tag-pill .remove-tag { margin-left: 8px; color: #ff2a55; cursor: pointer; font-weight: bold; }
.tag-pill .remove-tag:hover { color: #ff5e7e; }
.filter-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #222; cursor: pointer; }
.filter-row:last-child { border-bottom: none; }
.filter-checkbox { width: 20px; height: 20px; margin-right: 15px; accent-color: var(--accent); cursor: pointer; }
#inlineSearchBar, #inlineStationSearch { width: 100%; box-sizing: border-box; }
.inline-search-bar.show { display: block; }
.shazam-content .btn-minimal svg { width: 32px !important; height: 32px !important; transition: transform 0.2s ease; }
.preset-item.is-playing .list-eq { display: flex !important; }
.preset-item.is-playing .iheart-badge { display: none !important; }
.shazam-content .btn-minimal:hover svg { transform: scale(1.15); }

/* --- MOBILE UI SYSTEM --- */
.mobile-bottom-bar { display: none; }

@media (max-width: 900px) {
    html, body {
        overflow: hidden; width: 100vw; height: 100dvh; padding: 0; margin: 0;
        background: var(--bg-card); touch-action: none;
    }

    .widescreen-layout {
        height: 100dvh; width: 100vw; border-radius: 0; border: none;
        background: var(--bg-card) !important; display: flex; flex-direction: column; padding: 0 !important; 
    }

    .main-workspace {
        position: relative; flex: 1; width: 100%; height: 100%; margin: 0; padding: 0 !important; overflow: hidden;
    }

    .mobile-bottom-bar {
        display: flex; position: fixed; bottom: 0; left: 0; width: 100%;
        height: calc(65px + env(safe-area-inset-bottom)); 
        background: rgba(14, 14, 14, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid #222; justify-content: space-around; align-items: center; 
        padding-bottom: env(safe-area-inset-bottom) !important; box-sizing: border-box; z-index: 1000;
    }

    .nav-tab {
        background: transparent; border: none; color: #666; display: flex; flex-direction: column; 
        align-items: center; justify-content: center; gap: 5px; font-size: 0.75rem; 
        cursor: pointer; transition: color 0.2s; flex: 1; height: 100%; 
    }
    .nav-tab svg { width: 24px; height: 24px; }
    .nav-tab.active { color: var(--accent); }

    /* Absolute Tab Layout for Mobile (Ignores JS Width overrides) */
    .col-controls, .col-player, .col-history, #settingsModal {
        position: absolute !important; top: 0; left: 0; right: 0; bottom: 0;
        width: 100% !important; max-width: 100% !important; height: 100% !important; flex: none !important;
        background: var(--bg-card) !important; transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
        opacity: 0; pointer-events: none; transform: translateX(100%); 
        z-index: 10; margin: 0 !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; box-sizing: border-box;
    }

    .col-controls.active-tab, .col-player.active-tab, .col-history.active-tab, #settingsModal.active-tab { opacity: 1; pointer-events: auto; transform: translateX(0); }
    .col-controls.slide-left, .col-player.slide-left, .col-history.slide-left, #settingsModal.slide-left { transform: translateX(-100%); }

    /* Tab 1: Favorites */
    .col-controls { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: calc(max(env(safe-area-inset-top), 25px) + 10px) 15px calc(160px + env(safe-area-inset-bottom)) 15px !important; }
    .scrollable-section { background: transparent !important; border: none !important; padding: 0 !important; flex: 1; display: flex; flex-direction: column; min-height: 0; }

    /* Tab 2: Now Playing */
    .col-player { display: flex !important; flex-direction: column !important; height: 100% !important; padding: 0 0 calc(65px + env(safe-area-inset-bottom)) 0 !important; gap: 0 !important; }
    .shazam-content {
        flex-grow: 1; background: transparent !important; border-radius: 0 !important; border: none !important; box-shadow: none !important; margin: 0 !important; 
        padding: calc(max(env(safe-area-inset-top), 25px) + 20px) 15px calc(110px) 15px !important;
        justify-content: center !important; align-items: center; display: flex; flex-direction: column; flex-shrink: 1; min-height: 0;
    }
    
    .album-art { width: 100% !important; max-width: 100% !important; height: auto !important; aspect-ratio: 1 / 1 !important; object-fit: contain !important; background: #0a0a0a !important; border-radius: 16px !important; margin-top: 0 !important; margin-bottom: 20px !important; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important; flex-shrink: 0 !important; }
    .song-title { font-size: 1.6rem; font-weight: bold; color: #fff; display: inline-flex; white-space: nowrap; transition: color 0.2s; margin-bottom: 8px; }
    
    #historyModal { top: 45% !important; transform: translate(-50%, -50%) !important; width: 90% !important; max-height: 60vh !important; border-radius: 24px !important; }

    /* Tab 3: Settings */
    #settingsModal { display: flex !important; flex-direction: column; padding: calc(max(env(safe-area-inset-top), 25px) + 10px) 15px calc(85px + env(safe-area-inset-bottom)) 15px !important; }
    #settingsModal .btn-nav { display: none; } 
    #settingsModal .top-bar h2 { text-align: center; width: 100%; }

    /* Hide Desktop Elements */
    .desktop-header-row, #addIheartDesktop, .resizer { display: none !important; }
    #mobileHideWorkspaceSettings { display: none !important; }
    
    /* Convert Banner back to Mobile format */
    #tunerBoxDesktop {
        position: absolute; bottom: calc(65px + env(safe-area-inset-bottom)); left: 0; z-index: 100;
        background: rgba(0, 0, 0, 0.30) !important; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        border: none !important; border-top: 2px solid var(--accent) !important; height: auto; padding: 15px !important; cursor: pointer;
    }
    #tunerBoxDesktop .preset-text { text-align: left !important; display: flex !important; flex-direction: column !important; align-items: flex-start !important; }
    #tunerBoxDesktop .title-wrapper { text-align: left !important; justify-content: flex-start !important; }

    .btn-delete-hover, .history-actions, .btn-block-hover { opacity: 1; }
    .title-wrapper { margin-bottom: 2px; }
    .compact-player { gap: 15px; margin-top: 15px; width: 100%; flex-shrink: 0; }
    .section-title { margin-top: 0; margin-bottom: 10px; text-align: center; }
    .scrollable-list { padding-bottom: 10px; }
    #addIheartMobile { display: flex; }

    .btn-minimal:active, .btn-nav:active, .power-btn-circle:active, .trash-btn:active {
        transform: scale(1.05) !important; background: transparent !important; transition: transform 0.1s ease !important;
    }
}