/* 次元惜音乐网页端 · 全局样式
 * 主色：粉紫色系 #FF8FA3 / #FF6B8A / #B58FFF（与手机端导航栏一致）
 * 材质：全系液态玻璃；8dp 栅格；圆角克制（卡片12px以内） */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

:root {
    --primary: #FF6B8A;
    --primary-soft: #FF8FA3;
    --primary-purple: #B58FFF;
    --grad-primary: linear-gradient(135deg, #FF6B8A 0%, #B58FFF 100%);
    --danger: #ff4d4f;

    --bg-page: #f5f5f8;
    --bg-card: #ffffff;
    --bg-input: #f0f0f4;
    --divider: rgba(0, 0, 0, .06);

    --text-1: #1c1c24;
    --text-2: rgba(32, 32, 48, .55);
    --text-3: rgba(32, 32, 48, .38);

    --glass-bg: rgba(255, 255, 255, .6);
    --glass-border: rgba(0, 0, 0, .08);
    --glass-hover: rgba(255, 255, 255, .85);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .06);
    --shadow-2: 0 8px 24px rgba(255, 107, 138, .12);

    --track-bg: rgba(0, 0, 0, .1);
    --mask-bg: rgba(0, 0, 0, .45);
}

html[data-theme="dark"] {
    --bg-page: #121218;
    --bg-card: #1c1c24;
    --bg-input: #26262e;
    --divider: rgba(255, 255, 255, .08);

    --text-1: #ffffff;
    --text-2: rgba(255, 255, 255, .52);
    --text-3: rgba(255, 255, 255, .34);

    --glass-bg: rgba(255, 255, 255, .08);
    --glass-border: rgba(255, 255, 255, .16);
    --glass-hover: rgba(255, 255, 255, .14);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 8px 24px rgba(0, 0, 0, .35);

    --track-bg: rgba(255, 255, 255, .16);
    --mask-bg: rgba(0, 0, 0, .55);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-page);
    color: var(--text-1);
    overflow: hidden;
    transition: background-color 350ms ease-out;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

#app { display: flex; height: 100vh; position: relative; z-index: 1; }

/* ================= 动态背景图（tk接口） ================= */

.bg-layer {
    position: fixed; inset: -24px; z-index: 0;
    background-size: cover; background-position: center;
    filter: blur(28px) saturate(1.25);
    transform: scale(1.08);
    opacity: 0; transition: opacity 500ms ease-out;
    pointer-events: none;
}
.bg-layer.show { opacity: 1; }
.bg-mask {
    position: fixed; inset: 0; z-index: 0;
    background: var(--bg-page);
    opacity: .55;
    pointer-events: none;
}
html[data-theme="dark"] .bg-mask { opacity: .68; }
@supports (height: 100dvh) { #app { height: 100dvh; } }

/* ================= 左侧导航（酷狗风格：无边框，仅右侧1px分隔线） ================= */

.sidebar {
    flex: 0 0 216px;
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border-right: 1px solid var(--divider);
    z-index: 10;
}
.side-brand { padding: 24px 20px 16px; display: flex; align-items: center; gap: 10px; }
.side-logo {
    width: 38px; height: 38px; flex: none;
    border-radius: 10px;
    background: var(--grad-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    box-shadow: var(--shadow-2);
}
.side-title { font-size: 15.5px; font-weight: 700; }
.side-sub { font-size: 10.5px; color: var(--text-3); margin-left: auto; letter-spacing: 1px; }

.side-nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.side-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 13.5px;
    text-decoration: none;
    transition: background-color 200ms ease-out, color 200ms ease-out;
}
.side-item svg { width: 19px; height: 19px; flex: none; }
.side-item:hover { background: var(--bg-input); color: var(--text-1); }
.side-item.active {
    background: linear-gradient(135deg, rgba(255, 107, 138, .14), rgba(181, 143, 255, .14));
    color: var(--primary);
    font-weight: 600;
}

.side-user {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background-color 200ms ease-out;
}
.side-user:hover { background: var(--bg-input); }
.user-avatar {
    width: 34px; height: 34px; flex: none;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-action { margin-top: 2px; font-size: 10.5px; color: var(--text-3); max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-action.pretty {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* ================= 内容区与页面切换动画 ================= */

.content { flex: 1; position: relative; overflow: hidden; }

.page-view {
    position: absolute; inset: 0;
    overflow-y: auto;
    padding: 24px 32px 96px;
    background: var(--bg-page);
    transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1), opacity 300ms ease-out;
    will-change: transform;
}
.page-view.enter-right { transform: translateX(100%); }
.page-view.enter-left { transform: translateX(-25%); }
.page-view.leave-left { transform: translateX(-25%); opacity: .6; z-index: 1; }
.page-view.leave-right { transform: translateX(100%); z-index: 2; }
/* 登录页透出动态背景图 */
.page-view.login-bg { background: transparent; }

/* ================= 通用组件 ================= */

.page-title-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}
.page-title { font-size: 21px; font-weight: 700; margin-right: auto; }
.back-btn {
    width: 34px; height: 34px; flex: none;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    box-shadow: var(--shadow-1);
    color: var(--text-2);
    transition: background-color 200ms ease-out;
}
.back-btn:hover { background: var(--bg-input); }
.back-btn svg { width: 18px; height: 18px; }

.btn-primary {
    display: block; width: 100%;
    margin-top: 12px; padding: 10px 0;
    border-radius: 8px;
    background: var(--grad-primary);
    color: #fff;
    font-size: 14px; font-weight: 600;
    box-shadow: var(--shadow-2);
    transition: transform 150ms ease-out, opacity 200ms ease-out;
}
.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-primary.btn-danger { background: linear-gradient(135deg, #ff4d4f, #ff7875); box-shadow: 0 8px 24px rgba(255, 77, 79, .18); }

.btn-plain {
    display: block; width: 100%;
    margin-top: 10px; padding: 10px 0;
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-2);
    font-size: 13.5px;
    transition: background-color 200ms ease-out;
}
.btn-plain:hover { color: var(--text-1); }

.btn-ghost {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-2);
    font-size: 13px;
    transition: background-color 200ms ease-out, color 200ms ease-out;
    white-space: nowrap;
}
.btn-ghost:hover { background: var(--glass-hover); color: var(--text-1); }
.btn-ghost.liked { color: var(--primary); border-color: rgba(255, 107, 138, .4); font-weight: 600; }

.input {
    display: block; width: 100%;
    margin-top: 12px; padding: 11px 14px;
    border: 1px solid var(--divider);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-1);
    font-size: 14px;
    outline: none;
    transition: border-color 200ms ease-out;
}
.input:focus { border-color: var(--primary); }
.input::placeholder { color: var(--text-3); }

.glass-card {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-1);
}

.list-empty {
    padding: 64px 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-3);
}
.local-hint {
    padding: 10px 14px; margin-bottom: 8px;
    border-radius: 8px;
    background: var(--bg-input);
    font-size: 12px;
    color: var(--text-2);
}
.load-more { text-align: center; padding: 12px 0 32px; }

/* ================= 登录页 ================= */

.login-wrap {
    min-height: calc(100vh - 120px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 16px;
}
.login-card {
    width: min(380px, calc(100vw - 48px));
    border-radius: 12px;
    padding: 28px 24px 20px;
}
.login-head { text-align: center; }
.login-logo {
    width: 52px; height: 52px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: var(--grad-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700;
    box-shadow: var(--shadow-2);
}
.login-title { font-size: 22px; font-weight: 700; }
.login-sub { margin-top: 6px; font-size: 12px; color: var(--text-3); }

.login-tabs {
    display: flex; gap: 4px;
    margin: 20px 0 4px;
    padding: 4px;
    border-radius: 8px;
    background: var(--bg-input);
}
.login-tab {
    flex: 1;
    padding: 8px 0;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-2);
    transition: background-color 200ms ease-out, color 200ms ease-out;
}
.login-tab.active { background: var(--bg-card); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-1); }
.login-tip { margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--text-3); }

/* 扫码登录 */
.qr-box {
    width: 200px; height: 200px;
    margin: 16px auto 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.qr-loading { font-size: 12.5px; color: var(--text-3); padding: 0 16px; text-align: center; }
.qr-img { width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; }
.qr-img canvas, .qr-img img { border-radius: 0; }
.qr-mask {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, .92);
    padding: 12px;
}
.qr-mask-text { font-size: 12.5px; color: #333; text-align: center; }
.qr-tip { margin-top: 12px; text-align: center; font-size: 12px; color: var(--text-3); }
.qr-inline { display: flex; justify-content: center; margin-top: 12px; }

.code-row { display: flex; gap: 10px; align-items: center; }
.code-row .input { flex: 1; }
.code-row .btn-ghost { margin-top: 12px; flex: none; height: 40px; }
.verify-choose { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }

.login-note { font-size: 11px; color: var(--text-3); letter-spacing: .5px; }

/* ================= 搜索页 ================= */

.search-head { margin-bottom: 16px; }
.search-box {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--bg-card);
    box-shadow: var(--shadow-1);
    height: 44px;
}
.search-box svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search-box input {
    flex: 1; height: 100%;
    border: none; outline: none;
    background: none;
    color: var(--text-1);
    font-size: 14px;
}
.search-box input::placeholder { color: var(--text-3); }

.platform-tabs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ptab {
    padding: 6px 16px;
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: var(--shadow-1);
    font-size: 12.5px;
    color: var(--text-2);
    transition: background-color 200ms ease-out, color 200ms ease-out;
}
.ptab.active { background: var(--grad-primary); color: #fff; font-weight: 600; }

.sq-search { max-width: 480px; margin-bottom: 16px; }

/* 歌曲列表 */
.song-list { max-width: 860px; }
.song-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 200ms ease-out;
}
.song-row:hover { background: var(--bg-card); box-shadow: var(--shadow-1); }
.song-idx { width: 24px; flex: none; text-align: center; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.song-cover {
    width: 42px; height: 42px; flex: none;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-input);
}
.song-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.song-meta { flex: 1; min-width: 0; }
.song-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-singer { margin-top: 2px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-tag {
    flex: none; padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-input);
    font-size: 10.5px;
    color: var(--text-3);
}
.song-dur { flex: none; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.song-add, .song-del {
    flex: none; width: 30px; height: 30px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3);
    transition: background-color 200ms ease-out, color 200ms ease-out;
}
.song-add:hover, .song-del:hover { background: var(--bg-input); color: var(--primary); }
.song-add svg, .song-del svg { width: 16px; height: 16px; }
.song-del:hover { color: var(--danger); }

/* ================= 我的歌单 ================= */

.pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    max-width: 1080px;
}
.pl-card { cursor: pointer; }
.pl-cover {
    position: relative;
    width: 100%; aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 143, 163, .25), rgba(181, 143, 255, .25));
    box-shadow: var(--shadow-1);
}
.pl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-play-icon {
    position: absolute; right: 8px; bottom: 8px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 200ms ease-out, transform 200ms ease-out;
    box-shadow: var(--shadow-2);
}
.pl-play-icon svg { width: 16px; height: 16px; }
.pl-card:hover .pl-play-icon { opacity: 1; transform: translateY(0); }
.pl-fav-tag, .pl-sq-tag {
    position: absolute; left: 8px; top: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px; font-weight: 600;
    color: #fff;
    background: rgba(255, 107, 138, .85);
    backdrop-filter: blur(4px);
}
.pl-sq-tag { background: rgba(181, 143, 255, .85); left: auto; right: 8px; }
.pl-name {
    margin-top: 8px;
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-count { margin-top: 2px; font-size: 11px; color: var(--text-3); }

/* 歌单选择弹窗 */
.pl-picker { max-height: 320px; overflow-y: auto; margin-top: 12px; }
.pl-pick-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 200ms ease-out;
}
.pl-pick-item:hover { background: var(--bg-input); }
.pl-pick-cover {
    width: 40px; height: 40px; flex: none;
    border-radius: 8px; overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 143, 163, .25), rgba(181, 143, 255, .25));
}
.pl-pick-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-pick-name { flex: 1; font-size: 13px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-pick-count { font-size: 11px; color: var(--text-3); }

/* ================= 歌单广场 ================= */

.sq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    max-width: 1080px;
}
.sq-card {
    border-radius: 12px;
    padding: 12px;
    background: var(--bg-card);
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
.sq-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.sq-cover {
    width: 100%; aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 143, 163, .25), rgba(181, 143, 255, .25));
}
.sq-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sq-name { margin-top: 10px; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-meta { margin-top: 4px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-stats { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--text-3); }

/* ================= 迷你播放条 ================= */

.mini-player {
    position: fixed;
    left: 216px; right: 0; bottom: 0;
    height: 64px;
    z-index: 20;
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--divider);
    cursor: pointer;
}
.mini-cover {
    width: 42px; height: 42px; flex: none;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-input);
    color: var(--text-3);
    display: flex; align-items: center; justify-content: center;
}
.mini-cover svg { width: 20px; height: 20px; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-info { flex: none; width: 180px; min-width: 0; }
.mini-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-singer { margin-top: 2px; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mini-progress {
    flex: 1; height: 3px;
    border-radius: 999px;
    background: var(--track-bg);
    overflow: hidden;
}
.mini-progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad-primary); }

.mini-btn {
    flex: none; width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2);
    transition: color 200ms ease-out, background-color 200ms ease-out;
}
.mini-btn:hover { color: var(--text-1); background: var(--bg-input); }
.mini-btn svg { width: 20px; height: 20px; }
.mini-play {
    width: 40px; height: 40px;
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--shadow-2);
}
.mini-play:hover { background: var(--grad-primary); color: #fff; opacity: .92; }
.mini-play svg { width: 20px; height: 20px; }
.mini-expand svg { transform: rotate(180deg); }

/* ================= 播放页（fenxiang 同款布局，覆盖整个窗口） ================= */

.play-page {
    position: fixed; inset: 0; z-index: 50;
    display: none;
    background: var(--bg-page);
}
.play-page.show { display: block; animation: ppFadeIn 220ms ease-out; }
@keyframes ppFadeIn { from { opacity: 0; } to { opacity: 1; } }

.pp-bg-blur {
    position: absolute; inset: -60px; z-index: 0;
    background-size: cover; background-position: center;
    filter: blur(60px) saturate(1.4) brightness(.9);
    transform: scale(1.2);
}
html[data-theme="light"] .pp-bg-blur { filter: blur(60px) saturate(1.4) brightness(1.05); }
.pp-bg-mask {
    position: absolute; inset: 0; z-index: 1;
    background: var(--mask-bg);
}
html[data-theme="light"] .pp-bg-mask { background: rgba(250, 250, 252, .72); }

.pp-page {
    position: relative; z-index: 2;
    height: 100%;
    display: flex; flex-direction: column;
    padding: 0 26px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 18px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    color: var(--text-1);
}
@supports (height: 100dvh) { .pp-page { height: 100dvh; } }

.pp-icon-btn {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-1);
    display: flex; align-items: center; justify-content: center;
    z-index: 5;
    transition: transform 150ms ease-out;
}
.pp-icon-btn:active { transform: scale(.88); }
.pp-icon-btn svg { width: 18px; height: 18px; }
.pp-close { right: 22px; }
#ppTheme { right: 72px; }

.pp-main-row { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pp-left-pane { display: flex; flex-direction: column; flex: none; }
.pp-right-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* 黑胶 CD */
.pp-cd-zone { flex: none; display: flex; align-items: center; justify-content: center; padding: 22px 0 20px; }
.pp-cd-disc {
    position: relative;
    width: min(62vw, 264px); height: min(62vw, 264px);
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, .028) 0px, rgba(255, 255, 255, .028) 1px,
            transparent 1px, transparent 5px),
        conic-gradient(from 0deg, #26262e, #1a1a22, #26262e, #1a1a22, #26262e);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .06);
    animation: ppDiscSpin 24s linear infinite;
    animation-play-state: paused;
}
.pp-cd-disc.spinning { animation-play-state: running; }
@keyframes ppDiscSpin { to { transform: rotate(360deg); } }
@supports (height: 100dvh) {
    .pp-cd-disc { width: min(62vw, 36dvh, 264px); height: min(62vw, 36dvh, 264px); }
}
.pp-cd-cover {
    position: absolute; left: 50%; top: 50%;
    width: 72%; height: 72%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4);
}
.pp-cd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; background: #222; }
.pp-cd-hole {
    position: absolute; left: 50%; top: 50%;
    width: 18px; height: 18px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, #0c0c12 0%, #16161e 100%);
    box-shadow: 0 0 0 3.5px rgba(0, 0, 0, .32), inset 0 0 6px rgba(0, 0, 0, .8);
    z-index: 3;
}

.pp-song-info { flex: none; text-align: center; padding-bottom: 14px; }
.pp-song-name {
    font-size: 21px; font-weight: 700; letter-spacing: .3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.pp-song-artist { margin-top: 7px; font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 歌词区：当前行 40% 锚点，短平滑滚动 */
.pp-lyric-zone {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 90px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%);
}
.pp-lyric-inner {
    position: absolute; left: 0; right: 0;
    top: 40%;
    transition: transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}
.pp-lyric-line {
    padding: 9px 6px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-3);
    transform-origin: center center;
    transition: color 300ms ease-out, opacity 300ms ease-out, transform 300ms ease-out;
}
.pp-lyric-line.active {
    color: var(--text-1);
    font-size: 15.5px;
    font-weight: 600;
}
.pp-lyric-empty {
    position: absolute; left: 0; right: 0; top: 40%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
    letter-spacing: 1px;
}

/* 进度条 */
.pp-progress-zone { flex: none; padding: 10px 2px 4px; }
.pp-progress-bar { position: relative; height: 24px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.pp-track { position: relative; width: 100%; height: 3px; border-radius: 999px; background: var(--track-bg); overflow: visible; }
.pp-track-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 0%;
    border-radius: 999px;
    background: var(--grad-primary);
}
.pp-track-dot {
    position: absolute;
    top: 50%; left: 0%;
    width: 11px; height: 11px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .45);
    transition: transform 150ms ease-out;
}
.pp-progress-bar:active .pp-track-dot { transform: translate(-50%, -50%) scale(1.35); }
.pp-time-row {
    display: flex; justify-content: space-between;
    margin-top: 2px;
    font-size: 10.5px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

/* 控制区 */
.pp-ctrl-zone {
    flex: none;
    display: flex; align-items: center; justify-content: center;
    gap: 34px;
    padding: 6px 0 4px;
}
.pp-btn-side {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2);
    opacity: .9;
    transition: color 300ms ease-out;
}
.pp-btn-side:active { transform: scale(.9); }
.pp-btn-play {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 10px 26px rgba(255, 107, 138, .35), inset 0 1px 1px rgba(255, 255, 255, .35);
    display: flex; align-items: center; justify-content: center;
    transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.pp-btn-play:active { transform: scale(.93); }
.pp-rate-text { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-brand { margin-top: 10px; text-align: center; font-size: 10.5px; color: var(--text-3); letter-spacing: 2.5px; }

/* 播放队列弹层 */
.pp-queue-mask {
    position: absolute; inset: 0; z-index: 10;
    display: none;
    align-items: flex-end; justify-content: center;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(4px);
}
.pp-queue-mask.show { display: flex; animation: ppFadeIn 200ms ease-out; }
.pp-queue-sheet {
    width: min(520px, 100%);
    max-height: 45vh;
    border-radius: 12px 12px 0 0;
    background: var(--bg-card);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .2);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.pp-queue-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    font-size: 14px; font-weight: 700;
    border-bottom: 1px solid var(--divider);
}
.pp-queue-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.pp-queue-close svg { width: 16px; height: 16px; }
.pp-queue-list { flex: 1; overflow-y: auto; padding: 8px; }
.q-item {
    display: flex; align-items: baseline; gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 200ms ease-out;
}
.q-item:hover { background: var(--bg-input); }
.q-item.active { background: linear-gradient(135deg, rgba(255, 107, 138, .12), rgba(181, 143, 255, .12)); }
.q-item.active .q-name { color: var(--primary); }
.q-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-singer { font-size: 11px; color: var(--text-3); flex: none; }

/* ================= 弹窗与轻提示 ================= */

.modal-mask {
    position: fixed; inset: 0; z-index: 60;
    display: none;
    align-items: center; justify-content: center;
    background: var(--mask-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 220ms ease-out;
}
.modal-mask.show { display: flex; }
.modal-mask.visible { opacity: 1; }
.modal-sheet {
    width: min(340px, calc(100vw - 48px));
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
    padding: 20px 18px 16px;
    transform: translateY(20px) scale(.97);
    opacity: 0;
    transition: transform 260ms cubic-bezier(0.25, 0.1, 0.25, 1), opacity 240ms ease-out;
}
.modal-mask.visible .modal-sheet { transform: translateY(0) scale(1); opacity: 1; }
.modal-title { text-align: center; font-size: 16px; font-weight: 700; }
.modal-sub { text-align: center; margin-top: 6px; font-size: 11.5px; color: var(--text-2); }

.toast {
    position: fixed;
    left: 50%; bottom: 88px;
    transform: translateX(-50%) translateY(8px);
    z-index: 99;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(20, 20, 28, .88);
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease-out, transform 220ms ease-out;
    max-width: calc(100vw - 48px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= 窄屏适配（手机/小窗口） ================= */

@media (max-width: 767px) {
    #app { flex-direction: column; }
    .sidebar {
        flex: none;
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--divider);
        padding: 8px 12px;
    }
    .side-brand { padding: 0; gap: 8px; }
    .side-logo { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }
    .side-title { font-size: 13.5px; }
    .side-sub { display: none; }
    .side-nav { flex-direction: row; padding: 0 8px; gap: 2px; }
    .side-item { padding: 8px 10px; font-size: 12.5px; }
    .side-item span { display: none; }
    .side-user { padding: 0; }
    .user-meta { display: none; }

    .page-view { padding: 16px 16px 96px; }

    .mini-player { left: 0; }
    .mini-progress { display: none; }
    .mini-info { width: auto; flex: 1; }
}

/* 播放页窄屏：纵向布局（移动端与 fenxiang 一致），矮屏压缩 */
@media (max-width: 899px) {
    .pp-lyric-line { padding: 8px 6px; font-size: 13px; }
    .pp-lyric-line.active { font-size: 14.5px; }
}

@media (min-width: 900px) {
    .pp-main-row { flex-direction: row; gap: 60px; align-items: center; }
    .pp-left-pane { flex: 0 0 400px; align-items: center; }
    .pp-right-pane { flex: 1; align-self: stretch; justify-content: center; }
    .pp-cd-zone { padding: 10px 0 24px; }
    .pp-cd-disc { width: min(340px, 42vh); height: min(340px, 42vh); }
    .pp-song-name { font-size: 25px; }
    .pp-song-artist { font-size: 14.5px; margin-top: 9px; }
    .pp-lyric-line { font-size: 15px; padding: 11px 6px; }
    .pp-lyric-line.active { font-size: 17.5px; }
}

/* PC 矮窗口：CD 缩小防底部溢出 */
@media (min-width: 900px) and (max-height: 640px) {
    .pp-cd-zone { padding: 4px 0 10px; }
    .pp-cd-disc { width: min(260px, 46vh); height: min(260px, 46vh); }
    .pp-song-name { font-size: 21px; }
    .pp-song-artist { font-size: 13px; margin-top: 5px; }
    .pp-lyric-line { font-size: 13.5px; padding: 8px 6px; }
    .pp-lyric-line.active { font-size: 15.5px; }
    .pp-ctrl-zone { gap: 26px; }
    .pp-btn-play { width: 56px; height: 56px; }
}

/* PC 超窄窗口（900~1080px）：左栏收紧 */
@media (min-width: 900px) and (max-width: 1080px) {
    .pp-main-row { gap: 36px; }
    .pp-left-pane { flex-basis: 320px; }
}

/* 横屏手机 */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 899px) {
    .pp-page { padding-top: calc(env(safe-area-inset-top, 0px) + 8px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); }
    .pp-main-row { flex-direction: row; gap: 26px; align-items: center; }
    .pp-left-pane { flex: 0 0 auto; }
    .pp-cd-zone { padding: 6px 0; }
    .pp-cd-disc { width: min(46vh, 190px); height: min(46vh, 190px); }
    .pp-song-name { font-size: 16px; }
    .pp-lyric-line { padding: 6px; font-size: 12px; }
    .pp-lyric-line.active { font-size: 14px; }
    .pp-btn-play { width: 50px; height: 50px; }
    .pp-brand { display: none; }
}

/* 滚动条 */
.page-view::-webkit-scrollbar, .pl-picker::-webkit-scrollbar, .pp-queue-list::-webkit-scrollbar, .modal-sheet::-webkit-scrollbar { width: 6px; }
.page-view::-webkit-scrollbar-thumb, .pl-picker::-webkit-scrollbar-thumb, .pp-queue-list::-webkit-scrollbar-thumb, .modal-sheet::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--track-bg); }
