:root {
    --bg: #0b0f1a;
    --card: rgba(255, 255, 255, .06);
    --card-border: rgba(255, 255, 255, .12);
    --text: #e6e9f0;
    --muted: #9aa4b2;
    --primary: #5865F2;
    --primary-600: #4752C4;
    --glow: rgba(88, 101, 242, .55);
    --accent: #00ccff;
    --pink: #ff4dad;
    --warn: #ffcf5c;
    --success: #66e483
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}

/* Toasts */
.toast-container {
    position: fixed;
    top: 50%;
    right: 26px;
    transform: translateY(-50%);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 340px;
    pointer-events: none;
}

.toast {
    background: linear-gradient(160deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .05) 90%);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(14px) saturate(160%);
    padding: 14px 16px 14px 16px;
    border-radius: 16px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 10px 32px -6px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04) inset;
    opacity: 0;
    transform: translateX(46px) translateY(0) scale(.96);
    transition: opacity .4s ease, transform .55s cubic-bezier(.22, 1, .32, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 120% 0%, rgba(255, 255, 255, .35), transparent 60%);
    opacity: .18;
    pointer-events: none;
}

.toast.visible {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

.toast-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-text {
    flex: 1;
    word-break: break-word;
}

.toast-close {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px 4px;
    border-radius: 8px;
    transition: background .2s, color .2s;
}

.toast-close:hover {
    background: rgba(255, 255, 255, .18);
}

.toast-info {
    border-color: rgba(120, 160, 255, .45);
    box-shadow: 0 0 0 1px rgba(120, 160, 255, .25) inset;
}

.toast-success {
    border-color: rgba(80, 200, 140, .55);
    box-shadow: 0 0 0 1px rgba(80, 200, 140, .35) inset;
}

.toast-error {
    border-color: rgba(255, 120, 120, .55);
    box-shadow: 0 0 0 1px rgba(255, 120, 120, .35) inset;
}

.toast-warn,
.toast-warning {
    border-color: rgba(255, 200, 120, .55);
    box-shadow: 0 0 0 1px rgba(255, 200, 120, .35) inset;
}

.toast+.toast {
    margin-top: 0;
}

.toast:focus-within {
    outline: 2px solid var(--primary);
}

.toast-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    font-size: 13px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: linear-gradient(140deg, rgba(60, 180, 120, .9), rgba(40, 120, 85, .9));
}

.toast-error .toast-icon {
    background: linear-gradient(140deg, rgba(200, 70, 70, .9), rgba(140, 40, 40, .9));
}

.toast-warn .toast-icon,
.toast-warning .toast-icon {
    background: linear-gradient(140deg, rgba(200, 150, 60, .9), rgba(140, 90, 40, .9));
}

.bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(1200px 800px at 10% 20%, rgba(88, 101, 242, .25), transparent 60%),
        radial-gradient(900px 600px at 90% 30%, rgba(0, 200, 255, .18), transparent 60%),
        radial-gradient(700px 700px at 30% 90%, rgba(255, 0, 128, .14), transparent 60%),
        linear-gradient(180deg, #0b0f1a 0%, #0a0d16 100%);
    filter: saturate(1.05) contrast(1.02);
    animation: floatBg 16s ease-in-out infinite alternate
}

@keyframes floatBg {
    0% {
        transform: translate3d(0, 0, 0) scale(1)
    }

    100% {
        transform: translate3d(0, -10px, 0) scale(1.02)
    }
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(35px);
    opacity: .6;
    mix-blend-mode: screen;
    animation: drift var(--dur, 18s) ease-in-out infinite alternate
}

.orb.o1 {
    width: 260px;
    height: 260px;
    left: -60px;
    top: 20%;
    background: #5865F2;
    --dur: 16s
}

.orb.o2 {
    width: 340px;
    height: 340px;
    right: -80px;
    top: 35%;
    background: #00ccff;
    --dur: 20s
}

.orb.o3 {
    width: 280px;
    height: 280px;
    left: 20%;
    bottom: -60px;
    background: #ff4dad;
    --dur: 22s
}

@keyframes drift {
    to {
        transform: translateY(-30px) translateX(10px) scale(1.06)
    }
}

.app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .04) 80%);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border)
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.brand {
    font-weight: 800;
    letter-spacing: .3px;
    font-size: 1.4em;
}

.tabs {
    display: flex;
    gap: 8px
}

.tab {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer
}

.tab.active {
    border-color: rgba(88, 101, 242, .6);
    box-shadow: 0 8px 24px var(--glow)
}

.actions {
    display: flex;
    gap: 8px
}

.user-bar {
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #222;
    display: block;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .12);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.user-badge.control {
    background: linear-gradient(135deg, var(--primary), #7aa8ff);
    color: #fff;
}

.user-badge.readonly {
    background: #333a48;
    color: var(--muted);
}

/* Read-only Theme adjustments */
.readonly-mode .controls-row button,
.readonly-mode #playBtn,
.readonly-mode #plCreate,
.readonly-mode .playlist-actions button,
.readonly-mode #addPlCreate,
.readonly-mode #addNowBtn,
.readonly-mode #addNowBtn2,
.readonly-mode #shuffleBtn,
.readonly-mode #skipBtn,
.readonly-mode #skipBtn2,
.readonly-mode #stopBtn,
.readonly-mode #stopBtn2,
.readonly-mode #toggleBtn,
.readonly-mode #toggleBtn2,
.readonly-mode #volRange,
.readonly-mode #volRangeFooter,
.readonly-mode #seekRange,
.readonly-mode #seekRangeFooter {
    pointer-events: none !important;
    opacity: .35 !important;
    filter: grayscale(.6);
}

.readonly-mode .playlist-actions input {
    opacity: .5;
}

.readonly-mode .tab[data-tab="playlists"],
.readonly-mode .tab[data-tab="search"] {
    position: relative;
}

.readonly-mode .tab[data-tab="playlists"],
.readonly-mode .tab[data-tab="search"] {
    opacity: .45;
    pointer-events: none;
}

/* Settings */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
}

.settings-form .setting-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.settings-form .setting-row:last-child {
    border-bottom: none;
}

.settings-form input[type=number] {
    width: 120px;
}

.settings-form .setting-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-form .small {
    font-size: 12px;
}

.settings-intro {
    margin: 4px 0 12px;
    font-size: 13px;
}

.setting-meta {
    flex: 1;
    min-width: 0;
}

.setting-meta label {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.setting-desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.4;
}

.setting-control {
    display: flex;
    align-items: center;
}

.number-pill {
    background: #182233;
    border: 1px solid rgba(255, 255, 255, .15);
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
}

.number-pill:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Switch */
.switch-wrap {
    position: relative;
    padding-left: 50px;
}

.switch {
    position: absolute;
    left: -9999px;
}

.switch-ui {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 20px;
    background: #303b4d;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transition: background .25s ease;
}

.switch-ui:after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    background: #cfd6e4;
    border-radius: 50%;
    transition: transform .25s ease, background .25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.switch:checked+.switch-ui {
    background: linear-gradient(135deg, var(--primary), #7aa8ff);
}

.switch:checked+.switch-ui:after {
    transform: translateX(18px);
    background: #fff;
}

.switch:focus+.switch-ui {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.readonly-mode .switch-ui {
    filter: grayscale(.6);
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    background: #1a2333;
    color: var(--text);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2)
}

.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7aa8ff)
}

.btn-secondary {
    background: #141c2a
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #52d979)
}

.btn-warning {
    background: linear-gradient(135deg, var(--warn), #ffd879);
    color: #171a22
}

.btn.icon {
    padding: 10px 12px
}

.btn.icon i {
    pointer-events: none
}

.muted {
    color: var(--muted)
}

.badge {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 12px;
    color: var(--muted)
}

.main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px
}

.card {
    border-radius: 16px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .04) 80%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .05) inset
}

.view {
    display: none
}

.view.active {
    display: block
}

.search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(16, 24, 38, .7);
    color: var(--text);
    min-width: 280px;
    flex: 1;
    outline: none
}

/* NOW */
.now {
    display: grid;
    gap: 14px
}

.now-head {
    display: flex;
    gap: 14px;
    align-items: center
}

.now-thumb-wrap {
    position: relative;
    width: 116px;
    /* 108px image + 8px ring */
    height: 116px;
    display: grid;
    place-items: center;
    --thumb-pct: 0;
    /* 0..100 */
    --ring-bg: rgba(255, 255, 255, .06);
    --ring-size: 6px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}

.now-thumb-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    /* ring outer radius */
    padding: var(--ring-size);
    background:
        conic-gradient(var(--primary) calc(var(--thumb-pct) * 1%), rgba(255, 255, 255, .14) 0) border-box;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background .12s linear;
}

/* glow moved to wrapper box-shadow */

.now-thumb {
    width: 108px;
    height: 108px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    object-fit: cover;
    background: rgba(255, 255, 255, .06)
}

.now-thumb-wrap.playing .now-thumb {
    /* No rotation for real images */
    animation: none;
}

/* No-image vinyl fallback: render on wrapper, hide <img> to avoid broken icon/alt */
.now-thumb-wrap.no-image {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .05)),
        radial-gradient(120% 100% at 20% 10%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #141a24, #0d131f);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .12);
}

.now-thumb-wrap.no-image .now-thumb {
    display: none;
}

.now-thumb-wrap.no-image::after {
    content: "\f001";
    /* Font Awesome music icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 32px;
    line-height: 1;
    color: rgba(230, 233, 240, .92);
    text-shadow: 0 8px 22px rgba(0, 0, 0, .45);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.now-title {
    font-size: 22px;
    font-weight: 800
}

.now-sub {
    color: var(--muted)
}

.now-controls {
    display: grid;
    gap: 12px
}

.seek input[type=range] {
    width: 100%
}

.seek-labels {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.vol {
    display: flex;
    align-items: center;
    gap: 8px
}

.vol input {
    width: 160px
}

/* Search results */
.results {
    margin-top: 14px;
    display: grid;
    gap: 8px
}

.result {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding: 8px 10px
}

.result img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover
}

.result .r-title {
    font-weight: 600
}

.result .r-sub {
    color: var(--muted);
    font-size: 12px
}

.result .r-actions {
    margin-left: auto
}

.result .r-actions .btn {
    padding: 8px 10px
}

/* Playlists & Queue */
.playlist-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px
}

.pl-list {
    display: grid;
    gap: 8px
}

.pl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    padding: 10px
}

.pl-item .name {
    font-weight: 600
}

.pl-item .actions {
    margin-left: auto;
    display: flex;
    gap: 8px
}

.add-info {
    margin: 8px 0 10px
}

.queue-item.drag-over {
    border-color: rgba(88, 101, 242, .8);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, .25) inset
}

.queue-item.dragging {
    opacity: .7
}

/* Drag handle for queue items */
.queue-item .drag-handle {
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: grab;
}

.queue-item:active .drag-handle {
    cursor: grabbing;
}

/* Player bar */
.playerbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 720px) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    z-index: 100;
    padding-top: 22px;
    overflow: visible
}

.pb-meta {
    color: var(--muted)
}

.pb-controls {
    display: flex;
    gap: 8px
}

.pb-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

.pb-left .pb-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.pb-time {
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
    color: var(--muted);
    font-size: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 3px 8px;
    border-radius: 8px
}

.pb-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center
}

.pb-center {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 2px 0 20px;
}

.pb-right {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
    justify-content: flex-end
}

.pb-right input[type=range] {
    width: 160px
}

.pb-seek {
    display: block;
    width: 100%
}

.pb-seek input[type=range] {
    width: 100%
}

/* Footer top-edge progress bar */
#seekRangeFooter {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    /* Pin exactly to the top edge of the footer */
    top: -1px;
    height: 12px;
    /* bigger hit area */
    -webkit-appearance: none;
    appearance: none;
    --pct: 0;
    background:
        linear-gradient(90deg, var(--primary), var(--accent)) 0 0/ calc(var(--pct, 0) * 1%) 100% no-repeat,
        linear-gradient(90deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .10));
    border: none;
    outline: none;
    cursor: pointer;
    transition: background-size .15s ease-out;
}

#seekRangeFooter::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 6px 18px rgba(88, 101, 242, .18)
}

#seekRangeFooter::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    margin-top: 0
}

#seekRangeFooter:hover::-webkit-slider-thumb,
#seekRangeFooter:focus-visible::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25);
    margin-top: -4px
}

#seekRangeFooter::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: transparent
}

#seekRangeFooter::-moz-range-thumb {
    width: 0;
    height: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none
}

#seekRangeFooter:hover::-moz-range-thumb,
#seekRangeFooter:focus-visible::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25)
}

/* Ensure content not covered by fixed footer */
.main {
    padding-bottom: 96px
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: visible
}

.modal.hidden {
    display: none
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    z-index: 0
}

.modal-content {
    position: relative;
    max-width: 860px;
    width: 92vw;
    max-height: 80vh;
    overflow: auto;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    z-index: 1;
    background: rgba(20, 20, 30, .92);
    border: 1px solid rgba(255, 255, 255, .12)
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px
}

.modal-title {
    font-weight: 800
}

.tracks {
    display: grid;
    gap: 8px
}

.track {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    padding: 8px
}

.track .idx {
    width: 28px;
    text-align: center;
    color: var(--muted)
}

.track .meta {
    overflow: hidden
}

.track .title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.track .sub {
    color: var(--muted);
    font-size: 12px
}

.track .actions {
    display: flex;
    gap: 8px
}

/* Range styling */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
    outline: none
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25)
}

/* Minimal, clean slider styling (main seek + footer progress) */
#seekRange,
#seekRangeFooter {
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    --pct: 0;
    background:
        linear-gradient(90deg, var(--primary), var(--primary)) 0 0 / calc(var(--pct, 0) * 1%) 100% no-repeat,
        linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .06));
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    transition: background-size .08s ease-out;
}

#seekRange::-webkit-slider-runnable-track,
#seekRangeFooter::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
    box-shadow: none
}

#seekRange::-moz-range-track,
#seekRangeFooter::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: transparent
}

/* Footer Thumb: kleiner, primärfarbener Punkt – ohne Glow */
#seekRangeFooter::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: none;
    margin-top: -3px;
    transform: translateX(-3px)
}

#seekRangeFooter::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: none;
    transform: translateX(-3px)
}

/* Keep footer thumb size on hover to avoid misalignment */
#seekRangeFooter:hover::-webkit-slider-thumb,
#seekRangeFooter:focus-visible::-webkit-slider-thumb {
    width: 10px;
    height: 10px;
    background: var(--primary);
    box-shadow: none;
    margin-top: -3px
}

#seekRangeFooter:hover::-moz-range-thumb,
#seekRangeFooter:focus-visible::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--primary);
    box-shadow: none
}

/* Pretty main seek slider */
#seekRange {
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    --pct: 0;
    background:
        linear-gradient(90deg, var(--primary), var(--accent)) 0 0/ calc(var(--pct, 0) * 1%) 100% no-repeat,
        linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .12));
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    transition: background-size .12s ease-out;
}

#seekRange::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 6px 18px rgba(88, 101, 242, .18)
}

#seekRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25);
    margin-top: -6px;
    transform: translateX(-3px)
}

#seekRange:hover::-webkit-slider-thumb,
#seekRange:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25)
}

#seekRange::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: transparent
}

#seekRange::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25);
    transform: translateX(-3px)
}

/* Pretty footer seek slider (match main) */
#seekRangeFooter {
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    --pct: 0;
    background:
        linear-gradient(90deg, var(--primary), var(--accent)) 0 0/ calc(var(--pct, 0) * 1%) 100% no-repeat,
        linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .12));
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    transition: background-size .12s ease-out;
}

#seekRangeFooter::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 6px 18px rgba(88, 101, 242, .18);
}

#seekRangeFooter::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25);
    margin-top: -6px;
    transform: translateX(-3px);
}

#seekRangeFooter:hover::-webkit-slider-thumb,
#seekRangeFooter:focus-visible::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25);
    margin-top: -6px;
    transform: translateX(-3px);
}

#seekRangeFooter::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
}

#seekRangeFooter::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25);
    transform: translateX(-3px);
}

#seekRangeFooter:hover::-moz-range-thumb,
#seekRangeFooter:focus-visible::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(88, 101, 242, .25);
    transform: translateX(-3px);
}

/* Anim */
.glow {
    box-shadow: 0 0 0 0 var(--glow);
    animation: pulse 2.2s infinite cubic-bezier(.66, 0, 0, 1)
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 var(--glow)
    }

    70% {
        box-shadow: 0 0 0 22px rgba(88, 101, 242, 0)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(88, 101, 242, 0)
    }
}

@media (max-width:860px) {
    .tabs {
        display: none
    }

    .main {
        padding: 12px
    }

    .now-head {
        flex-direction: column;
        align-items: flex-start
    }

    .vol input {
        width: 120px
    }
}

/* Legal footer overlay (centered, non-intrusive) */
.legal-footer-links {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--muted);
    pointer-events: auto;
    text-align: center;
    line-height: 1.2;
    opacity: .85;
}

.legal-footer-links a {
    color: var(--muted);
    text-decoration: none;
    padding: 0 2px;
}

.legal-footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}