/* ============================================================
   music.css — 音乐播放器页「Aura 液态玻璃」
   参照 aura-music-player：单个大玻璃容器（左控制 / 右歌词队列）、
   随歌变色的 mix-blend-screen 大光斑、旋转封面 + 水波涟漪
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* 当前歌曲的主题色（JS 随歌更新） */
    --aura: #3b82f6;
    --aura-soft: rgba(59, 130, 246, .35);
}

html, body { height: 100%; }

body {
    min-height: 100vh;
    background: #000;
    color: #fff;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

/* ---------- 动态背景：随歌变色的三团大光斑 ---------- */
.mx-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #000;
    pointer-events: none;
}
.mx-orb {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    background: var(--aura);
    /* 不做颜色过渡:大模糊层逐帧重绘是移动端切歌掉帧的根源,换色瞬时完成只重绘一帧 */
}
.o1 {
    top: -10%; left: -10%;
    width: 50vmax; height: 50vmax;
    filter: blur(120px);
    opacity: .6;
    animation: orb-1 15s linear infinite;
    animation-play-state: paused;
}
.o2 {
    bottom: -10%; right: -10%;
    width: 60vmax; height: 60vmax;
    filter: blur(150px);
    opacity: .4;
    animation: orb-2 20s linear infinite;
    animation-play-state: paused;
}
.o3 {
    top: 20%; left: 40%;
    width: 40vmax; height: 40vmax;
    filter: blur(100px);
    opacity: .3;
    animation: orb-3 25s ease-in-out infinite;
    animation-play-state: paused;
}
body.playing .o1 { animation-play-state: running; }
body.playing .o2 { animation-play-state: running; }
body.playing .o3 { animation-play-state: running; }

@keyframes orb-1 {
    from { transform: scale(1) rotate(0deg); }
    to   { transform: scale(1.2) rotate(90deg); }
}
@keyframes orb-2 {
    from { transform: scale(1) rotate(0deg); }
    to   { transform: scale(1.3) rotate(-90deg); }
}
@keyframes orb-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(100px, -50px) scale(1.5); }
}

/* 移动端氛围背景:静态三色渐变层(换歌时两层 opacity 交叉淡化,合成器动画零重绘) */
.mx-bg-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
    will-change: opacity;
}
@media (min-width: 860px) {
    .mx-bg-layer { display: none; }   /* 桌面端沿用动画光斑 */
}

/* 噪点纹理 */
.mx-noise {
    position: absolute;
    inset: 0;
    opacity: .03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 玻璃基底 ---------- */
.glass-panel {
    background: rgba(255, 255, 255, .05);
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);
}
.glass-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.05rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .25s, transform .25s;
}
.glass-pill:hover { background: rgba(255, 255, 255, .15); transform: translateY(-1px); }
.glass-pill svg { width: 15px; height: 15px; }

/* ---------- 返回胶囊 ---------- */
.mx-back {
    position: fixed;
    top: 26px;
    left: 30px;
    z-index: 30;
}

/* ---------- 主容器 ---------- */
.mx-root {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 32px);
}
.mx-main {
    width: 100%;
    max-width: 1152px;
    height: min(85vh, 820px);
    min-height: 600px;
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@media (min-width: 860px) {
    .mx-main { flex-direction: row; }
}

/* ---------- 左区：播放器与控制 ---------- */
.mx-left {
    width: 100%;
    padding: clamp(24px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
@media (min-width: 860px) {
    .mx-left {
        width: 60%;
        border-bottom: 0;
        border-right: 1px solid rgba(255, 255, 255, .1);
    }
}

.mx-head { text-align: center; margin-bottom: clamp(16px, 2.4vh, 30px); }
.mx-song {
    font-size: clamp(22px, 2vw, 26px);
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: song-in .45s cubic-bezier(.22, .61, .36, 1) both;
}
@keyframes song-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mx-artist { margin-top: 4px; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .6); }

/* ---------- 封面：旋转唱片 + 水波涟漪 ---------- */
.mx-cover-area {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(18px, 2.6vh, 38px);
    min-height: 220px;
}

/* 水波涟漪（播放时的液态纹理） */
.mx-ripples { position: absolute; inset: 0; display: none; pointer-events: none; }
body.playing .mx-ripples { display: flex; align-items: center; justify-content: center; }
.mx-ripples span {
    position: absolute;
    width: min(280px, 68%);
    aspect-ratio: 1;
    background: var(--aura);
    mix-blend-mode: screen;
    opacity: 0;
    animation: ripple 3s ease-out infinite;
}
.mx-ripples span:nth-child(2) { animation-delay: 1s; }
.mx-ripples span:nth-child(3) { animation-delay: 2s; }
@keyframes ripple {
    0%   { transform: scale(.9); opacity: .5; border-radius: 50%; }
    50%  { opacity: .25; border-radius: 45% 55% 65% 40% / 50% 45% 60% 55%; }
    100% { transform: scale(1.6); opacity: 0; border-radius: 50%; }
}

/* 圆形封面：外玻璃环 + 内旋转唱片 */
.mx-cover {
    position: relative;
    z-index: 2;
    width: min(340px, 84%);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 8px;
    background: rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 40px rgba(255, 255, 255, .1);
}
.mx-cover-art {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, .5);
    background:
        repeating-radial-gradient(circle at 50% 50%,
            var(--aura) 0 1.5px,
            color-mix(in srgb, var(--aura) 62%, #000) 1.5px 3px,
            color-mix(in srgb, var(--aura) 38%, #000) 3px 5.5px);
    animation: cover-spin 25s linear infinite;
    animation-play-state: paused;
    transition: background 1.2s ease;
}
body.playing .mx-cover-art { animation-play-state: running; }
@keyframes cover-spin {
    to { transform: rotate(360deg); }
}
/* 盘面高光 */
.mx-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
}
.mx-cover-art::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 40deg,
        transparent 0deg, rgba(255, 255, 255, .18) 26deg, transparent 64deg,
        transparent 178deg, rgba(255, 255, 255, .11) 206deg, transparent 244deg);
}
.mx-cover-hole {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .2);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6);
    z-index: 3;
}

/* ---------- 控制区 ---------- */
.mx-ctrls { width: 100%; display: flex; flex-direction: column; gap: clamp(14px, 2vh, 26px); }

/* 进度条 */
.mx-progress { width: 100%; }
.mx-track {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}
.mx-track::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}
.mx-fill {
    position: absolute;
    height: 6px;
    border-radius: 99px;
    background: #fff;
    transition: width .1s linear;
    pointer-events: none;
}
.mx-thumb {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
    transform: translateX(-50%) scale(0);
    transition: transform .18s;
    pointer-events: none;
}
.mx-track:hover .mx-thumb, .mx-track.dragging .mx-thumb { transform: translateX(-50%) scale(1); }
.mx-times {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .03em;
    color: rgba(255, 255, 255, .5);
    font-variant-numeric: tabular-nums;
}

/* 控制按钮排 */
.mx-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 1.8vw, 24px);
}
.mx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    color: rgba(255, 255, 255, .65);
    transition: color .2s, background .2s, transform .2s;
}
.mx-btn svg { width: 20px; height: 20px; }
.mx-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.mx-btn:active { transform: scale(.92); }
.mx-btn.skip { color: rgba(255, 255, 255, .82); padding: 12px; }
.mx-btn.skip svg { width: 27px; height: 27px; }

.mx-btn.play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    box-shadow: 0 0 30px rgba(255, 255, 255, .3);
    z-index: 2;
}
.mx-btn.play:hover { transform: scale(1.05); background: #fff; }
.mx-btn.play:active { transform: scale(.95); }
.mx-btn.play svg { width: 29px; height: 29px; }
.mx-btn.play .ic-play { margin-left: -3px; }
.mx-btn.play .ic-pause { display: none; }
.mx-btn.play.playing .ic-play { display: none; }
.mx-btn.play.playing .ic-pause { display: block; }

/* 模式按钮的图标切换 + 激活色 */
.mx-btn.mode .ic-repeat1, .mx-btn.mode .ic-shuffle { display: none; }
.mx-btn.mode[data-mode="one"] .ic-repeat { display: none; }
.mx-btn.mode[data-mode="one"] .ic-repeat1 { display: block; }
.mx-btn.mode[data-mode="shuffle"] .ic-repeat { display: none; }
.mx-btn.mode[data-mode="shuffle"] .ic-shuffle { display: block; }
.mx-btn.mode:not([data-mode="order"]) { color: #93b4ff; }

/* 音量 */
.mx-volume {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255, 255, 255, .6);
}
.mx-volume > button { color: rgba(255, 255, 255, .6); transition: color .2s; display: flex; }
.mx-volume > button:hover { color: #fff; }
.mx-volume svg { width: 18px; height: 18px; }
.ic-mute { display: none; }
.mx-volume.muted .ic-vol { display: none; }
.mx-volume.muted .ic-mute { display: block; }
#mxVolume {
    flex: 1;
    max-width: 300px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, .2);
    border-radius: 99px;
    cursor: pointer;
    outline: none;
}
#mxVolume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}
#mxVolume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}
.mx-vol-val {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .45);
    min-width: 26px;
    font-variant-numeric: tabular-nums;
}


/* ---------- 右区：歌词 / 队列 ---------- */
.mx-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, .2);
    -webkit-backdrop-filter: blur(48px);
    backdrop-filter: blur(48px);
    position: relative;
    z-index: 5;
    min-height: 0;
}
@media (min-width: 860px) {
    .mx-right { width: 40%; }
}

/* Tabs：分段控制器，两个等宽方块，整块可点 */
.mx-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin: 20px 24px 0;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
}
.mx-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .45);
    transition: color .2s, background .2s;
}
.mx-tab:hover { color: rgba(255, 255, 255, .85); }
.mx-tab.active {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.mx-tab svg { width: 17px; height: 17px; }

/* Tab 内容 */
.mx-tab-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.mx-pane {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity .3s, transform .3s;
    pointer-events: none;
}
.mx-pane.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* 歌词空态 */
.mx-lyrics {
    height: 100%;
    overflow-y: auto;
    padding: 12% 15%;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
.mx-lyrics::-webkit-scrollbar { display: none; }
.mx-lyrics .mx-line {
    margin: 0 0 1.35em;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, .22);
    transform-origin: left center;
    transition: color .45s, transform .45s, opacity .45s;
    cursor: pointer;
}
.mx-lyrics .mx-line:hover { color: rgba(255, 255, 255, .5); }
.mx-lyrics .mx-line.passed { color: rgba(255, 255, 255, .42); transform: scale(.96); }
.mx-lyrics .mx-line.active {
    color: #fff;
    font-weight: 900;
    font-size: 25px;
    transform: scale(1);
}
.mx-lyrics-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 24px;
}
.mx-vinyl-mark { color: var(--aura); opacity: .8; transition: color 1.2s; }
.mx-vinyl-mark svg { width: 54px; height: 54px; }
.ly1 { font-size: 19px; font-weight: 700; }
.ly2 { font-size: 14px; color: rgba(255, 255, 255, .45); }

/* 播放列表 */
.mx-queue {
    height: 100%;
    overflow-y: auto;
    padding: 24px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.mx-queue::-webkit-scrollbar { width: 6px; }
.mx-queue::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 99px; }
.mx-queue-head {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
    padding: 0 10px 18px;
}
.mx-qitem {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    animation: q-in .4s both;
}
@keyframes q-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mx-qitem:hover { background: rgba(255, 255, 255, .05); }
.mx-qitem.playing {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
/* 缩略封面 */
.q-thumb {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    background:
        radial-gradient(circle at 30% 30%,
            color-mix(in srgb, var(--qc, var(--aura)) 90%, #fff 8%),
            color-mix(in srgb, var(--qc, var(--aura)) 55%, #000) 70%);
}
.q-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-radial-gradient(circle at 50% 50%,
            transparent 0 2px, rgba(0, 0, 0, .18) 2px 3.5px);
}
.q-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.q-play-mark {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .42);
    z-index: 2;
}
.q-play-mark svg { width: 20px; height: 20px; color: #fff; fill: #fff; }
.mx-qitem:hover .q-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.q-play-mark { display: flex; }
.mx-qitem.playing .q-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.q-play-mark { display: flex; }
.mx-qitem.playing:hover .q-play-mark .mark-play { display: block; }
.mx-qitem.playing:hover .q-eq { display: none; }
/* eq 跳动 */
.q-eq {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}
.mx-qitem.playing .q-play-mark .q-eq { display: inline-flex; }
.q-eq i {
    width: 3.5px;
    border-radius: 2px;
    background: #fff;
    animation: q-eq .8s ease-in-out infinite;
}
.q-eq i:nth-child(1) { height: 12px; animation-delay: 0s; }
.q-eq i:nth-child(2) { height: 7px; animation-delay: .2s; }
.q-eq i:nth-child(3) { height: 15px; animation-delay: .4s; }
@keyframes q-eq {
    0%, 100% { transform: scaleY(.35); }
    50%      { transform: scaleY(1); }
}

.q-meta { flex: 1; min-width: 0; }
.q-name {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mx-qitem.playing .q-name { color: #fff; }
.q-artist {
    margin-top: 2px;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.q-check { flex: none; color: rgba(255, 255, 255, .8); display: none; }
.mx-qitem.playing .q-check { display: flex; }
.q-check svg { width: 17px; height: 17px; }

/* ---------- 响应式 ---------- */
@media (max-width: 859px) {
    /* 页面固定；播放器占上方，第二屏（歌词/列表）为可拖拽底部面板 */
    /* 注意：必须清除基础样式里的 min-height:100vh。
       100vh =「大视口高度」（不含底部地址栏时的高度），
       在地址栏占据布局空间的浏览器（如 Edge 底部栏）里，
       min-height:100vh 会把页面撑到比可视区更高，
       导致底部对齐的第二屏面板沉到地址栏下面被挡住。 */
    body { overflow: hidden; height: 100vh; height: 100dvh; min-height: 0; }
    .mx-root { display: block; padding: 0; height: 100vh; height: 100dvh; min-height: 0; }
    .mx-main {
        display: block;
        height: 100%;
        min-height: 0;
        border-radius: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .mx-back { top: 14px; left: 14px; z-index: 50; }

    /* 播放器：占满整屏（高度 = 可视高，含地址栏补偿）；排列保持原序：歌名 → 封面 → 控制组件 */
    .mx-left {
        position: absolute;
        top: 0; left: 0; right: 0;
        height: var(--vv-h, 100dvh);
        z-index: 1;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 22px 16px;
        justify-content: center;        /* 歌名/封面/控制整体向中间聚拢 */
        gap: 0;
        touch-action: none;
    }
    .mx-head { margin-bottom: 10px; }
    .mx-song { font-size: 22px; }
    .mx-artist { font-size: 13px; }
    .mx-cover-area { flex: 0 1 auto; min-height: 0; margin-bottom: 10px; }
    .mx-cover { width: min(72vw, 320px); }
    .mx-buttons { gap: 22px; margin-top: 0; position: relative; }   /* 五键等距居中,与桌面端一致 */
    .mx-btn.skip { padding: 9px; }
    .mx-btn.skip svg { width: 23px; height: 23px; }
    .mx-btn.play { width: 56px; height: 56px; }
    .mx-btn.play svg { width: 25px; height: 25px; }
    .mx-volume { padding: 0; gap: 10px; }
    .mx-spectrum, .mx-lyrics-empty { display: none; }
    .mx-orb { display: none; }        /* 移动端用渐变层,动画光斑不渲染 */
    .mx-right {
        background: rgba(16, 16, 22, .82);          /* 高不透明深底,去掉逐帧 backdrop 重模糊 */
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    /* 第二屏：底部面板，初始在屏幕外（高度 0），上划带出，最高 70% */
    .mx-right {
        position: absolute;
        left: 0; right: 0; bottom: var(--toolbar-comp, 0px);
        z-index: 40;
        height: var(--sheet-h, 0px);
        min-height: 0;
        max-height: none;
        overflow: hidden;
        border-radius: 22px 22px 0 0;
        border: 1px solid rgba(255, 255, 255, .12);
        border-bottom: 0;
        box-shadow: 0 -20px 60px rgba(0, 0, 0, .55);
        touch-action: none;
    }
    body.sheet-anim .mx-right { transition: height .42s cubic-bezier(.22, .61, .36, 1); }
    .mx-tabs { margin: 12px 12px 0; }
    .mx-tab { font-size: 15px; padding: 13px 0; }   /* 方块大热区,防误触 */
    .mx-tab svg { width: 18px; height: 18px; }
    .mx-tab-body { flex: 1; min-height: 0; touch-action: pan-y; }
    .mx-queue { padding: 12px 10px 20px; }
    .mx-qitem { padding: 9px 10px; }
    .mx-lyrics { padding: 8% 9%; }
}

@media (max-width: 480px) {
    .mx-root { padding: 12px; }
    .mx-left { padding: 20px 18px; }
    .mx-head { margin-bottom: 14px; }
    .mx-cover-area { min-height: 230px; margin-bottom: 14px; }
    .mx-cover { width: min(84vw, 340px); }
    .mx-cover-hole { width: 30px; height: 30px; }
    .mx-tabs { margin: 10px 10px 0; }
    .mx-queue { padding: 16px 10px; }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    .mx-orb, .mx-cover-art, .mx-ripples span, .q-eq i, .mx-song { animation: none !important; }
}

/* ---------- 听歌统计：按钮 + 液态玻璃弹框 ---------- */
.mx-stats-anchor { position: relative; display: inline-flex; }
.mx-btn.stats svg { width: 21px; height: 21px; }
.mx-btn.stats.active { color: #fff; background: rgba(255, 255, 255, .14); }
.mx-stats-pop {
    position: absolute;
    bottom: calc(100% + 14px);          /* 向上展开:面板 overflow:hidden 会裁掉向下超出的部分 */
    top: auto;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: clamp(250px, 24vw, 300px);
    padding: 15px 18px 16px;
    border-radius: 18px;
    /* 深色玻璃:保留透明质感与背景色彩透出,同时保证文字对比度(白玻璃会被彩色背景吃掉) */
    background:
        linear-gradient(165deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 42%),
        rgba(16, 16, 22, .72);
    -webkit-backdrop-filter: blur(28px) saturate(1.35);
    backdrop-filter: blur(28px) saturate(1.35);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .12);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    z-index: 60;
}
.mx-stats-pop.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.ms-online {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ms-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, .9);
    animation: ms-pulse 2s ease-in-out infinite;
}
@keyframes ms-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.ms-group { margin-top: 12px; }
.ms-label {
    font-size: 11.5px;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .55);
    margin-bottom: 5px;
}
.ms-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ms-cell .v {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ms-cell .k { font-size: 10.5px; color: rgba(255, 255, 255, .58); margin-top: 2px; }

/* 移动端:弹框向上弹出、锚定统计按钮(与桌面端一致)。
   旧方案用 position:fixed 锚定视口底部 + var(--sheet-h),播放时
   visualViewport 高度波动会被反复写进 --sheet-h,弹框 bottom 跟随抖动
   而来回移动,且贴屏幕底易被浏览器工具栏遮挡——已废弃 */
@media (max-width: 859px) {
    .mx-stats-pop {
        left: auto;
        right: 0;               /* 统计按钮在最右:右缘贴齐按钮,向左上方展开不溢出屏幕 */
        width: min(320px, 86vw);
        transform: translateY(6px);
    }
    .mx-stats-pop.show { transform: translateY(0); }
}


/* ---------- 播放模式选择:玻璃弹窗(与统计弹窗同体系) ---------- */
.mx-mode-anchor { position: relative; display: inline-flex; }
.mx-mode-pop {
    position: absolute;
    bottom: calc(100% + 14px);          /* 向上展开,避开面板 overflow:hidden 裁剪 */
    top: auto;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 190px;
    padding: 8px;
    border-radius: 16px;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 42%),
        rgba(16, 16, 22, .72);
    -webkit-backdrop-filter: blur(28px) saturate(1.35);
    backdrop-filter: blur(28px) saturate(1.35);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .12);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    z-index: 60;
}
.mx-mode-pop.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.mx-mode-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .75);
    font-size: 13.5px;
    cursor: pointer;
    text-align: left;
    transition: background .15s ease, color .15s ease;
}
.mx-mode-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.mx-mode-item.active { background: rgba(255, 255, 255, .12); color: #fff; }
.mx-mode-item .mk { width: 16px; height: 16px; opacity: 0; transition: opacity .15s ease; }
.mx-mode-item.active .mk { opacity: 1; }

/* 移动端:模式按钮在最左,左缘贴齐按钮向右上方展开,不溢出屏幕 */
@media (max-width: 859px) {
    .mx-mode-pop {
        left: 0;
        width: min(240px, 80vw);
        transform: translateY(6px);
    }
    .mx-mode-pop.show { transform: translateY(0); }
}


/* 拖动第二屏期间:面板内部重排隔离 */
@media (max-width: 859px) {
    .mx-right { contain: layout paint; }
}
