/* 点歌大厅视觉层：沿用现有主题和交互，统一布局与阅读层级。 */
body.theme-light {
    --bg: #f5f6f3; --card: #fff; --card-solid: #fff; --card-hover: #f0f5f1;
    --primary: #17765e; --primary-hover: #115b48; --primary-glow: rgba(23,118,94,.13);
    --text: #202e28; --text-sec: #6d7972; --text-dim: #7b857f;
    --border: #e5eae4; --border-hover: #a1c9b5;
    --shadow: 0 6px 20px rgba(28,55,39,.04); --shadow-lg: 0 16px 40px rgba(28,55,39,.12);
}
body.theme-dark { --bg: #101815; --card: #18231e; --card-solid: #18231e; --card-hover: #23332a; --primary: #85c6a5; --primary-hover: #5da881; --text-dim: #87988c; }
body.theme-blue { --text-dim: #84a8bd; }
body.theme-pink { --text-dim: #937185; }
body { font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, .st-btn, .side-nav-item, .nav-item { -webkit-tap-highlight-color: transparent; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.bg-orbs { display: none; }
.app-container { height: 100vh; height: 100dvh; }
.sidebar { width: 248px; padding: 30px 18px 20px; background: var(--card-solid); }
.sidebar-top { flex-wrap: wrap; gap: 20px; padding: 0 14px 30px; }
.logo-desk { display: block; font-size: 25px; letter-spacing: 3px; line-height: 1.2; color: var(--text); }
.logo-desk::before { content: none; }
.logo-desk span { display: block; font-size: 11px; letter-spacing: 4px; font-weight: 500; color: var(--text-sec); margin-top: 9px; }
.sidebar-top .header-btns { width: 100%; }
.theme-switch-btn { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; box-shadow: none; }
.side-nav { gap: 7px; }
.side-nav-item { min-height: 48px; padding: 12px 16px; font-size: 14px; border-radius: 10px; font-weight: 500; }
.side-nav-item span:first-child { display: flex; align-items: center; gap: 14px; }
.side-nav-item span:first-child::before { width: 20px; text-align: center; font-size: 20px; font-weight: 400; content: '♫'; }
.side-nav-item[data-tab="recommend"] span:first-child::before { content: '◈'; }
.side-nav-item[data-tab="search"] span:first-child::before { content: '⌕'; }
.side-nav-item[data-tab="queue"] span:first-child::before { content: '≡'; }
.side-nav-item[data-tab="history"] span:first-child::before { content: '↶'; }
.side-nav-item.active { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.side-nav-item.active::before { display: none; }
.side-nav-item:hover { transform: none; }
#queueCountDesk { padding: 2px 8px !important; font-size: 11px !important; box-shadow: none !important; border-radius: 6px !important; }
.side-nav-item[data-tab="favorites"] span:first-child::before { content: '♡'; }
.favorites-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-top: 26px; border-top: 1px solid var(--border); padding-top: 20px; }
.favorites-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; gap: 8px; }
.favorites-panel-heading h2 { font-size: 13px; font-weight: 650; }
.favorites-view-all { background: none; border: 0; color: var(--text-sec); font-size: 10px; cursor: pointer; padding: 5px; }
.favorites-view-all:hover { color: var(--primary); }
.favorites-tabs { display: flex; gap: 5px; margin: 12px 0; padding: 3px; border-radius: 8px; background: var(--bg); }
.favorites-tabs button { flex: 1; border: 0; border-radius: 6px; padding: 9px 6px; background: transparent; color: var(--text-sec); font-size: 11px; cursor: pointer; white-space: nowrap; }
.favorites-tabs button.active { background: var(--card-solid); color: var(--primary); box-shadow: var(--shadow); font-weight: 600; }
.favorites-tabs button span { font-size: 10px; margin-left: 4px; opacity: .8; }
.sidebar-favorites-list { flex: 1; min-height: 0; overflow-y: auto; }
.compact-favorite-row, .favorite-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding: 10px 5px; }
.compact-favorite-row:hover, .favorite-row:hover { background: var(--card-hover); }
.favorite-item-info { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; text-align: left; border: 0; background: none; color: var(--text); cursor: pointer; padding: 3px; }
.favorite-item-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.favorite-item-meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--text-sec); }
.favorite-row-actions, .song-actions { display: flex; align-items: center; flex-shrink: 0; gap: 8px; }
.favorite-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--card-solid); color: var(--text-sec); font-size: 22px; line-height: 1; cursor: pointer; }
.favorite-button:hover { color: var(--primary); border-color: var(--border-hover); }
.favorite-button.is-favorite { color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--card-solid)); }
.cover-wrap > .favorite-button { position: absolute; top: 9px; right: 9px; z-index: 3; box-shadow: 0 2px 8px #0001; }
.favorites-page-tabs { max-width: 340px; margin-bottom: 24px; border: 1px solid var(--border); }
.favorites-page-tabs button { font-size: 13px; padding: 11px 14px; }
#favoritesPageList { border: 1px solid var(--border); background: var(--card-solid); border-radius: 12px; overflow: hidden; }
.favorite-row { min-height: 76px; padding: 13px 18px; }
.favorite-row:last-child { border-bottom: 0; }
.favorite-row .favorite-item-name { font-size: 14px; }
.favorite-row .favorite-item-meta { font-size: 11px; }
.favorites-empty { padding: 28px 12px; text-align: center; color: var(--text-sec); }
.favorites-empty > span { display: block; font-size: 32px; color: var(--primary); opacity: .6; margin-bottom: 10px; }
.favorites-empty p { font-size: 12px; margin-bottom: 8px; }
.favorites-empty small { display: block; font-size: 10px; line-height: 1.8; }
.favorites-notice { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); max-width: calc(100% - 32px); width: max-content; padding: 12px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-solid); color: var(--text); box-shadow: var(--shadow-lg); font-size: 13px; z-index: 1100; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, transform .2s; }
.favorites-notice.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#queueList .song-info > .favorite-button { margin-left: 8px; }
.main-content { min-width: 0; }
.header { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding: 22px 36px; background: var(--bg); backdrop-filter: blur(18px); }
.desktop-heading { margin-right: auto; }
.eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--text-sec); line-height: 1.5; }
.desktop-heading h1 { font-size: 23px; letter-spacing: -.5px; margin-top: 4px; }
.controller-status-wrap { position: relative; display: inline-block; margin-bottom: 5px; }
.controller-status-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text-sec); border-radius: 999px; padding: 6px 11px; font-size: 11px; cursor: pointer; box-shadow: 0 2px 8px rgba(20,50,30,.04); }
.controller-status-btn:hover { color: var(--primary); border-color: var(--border-hover); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #28ad70; box-shadow: 0 0 0 3px color-mix(in srgb, #28ad70 15%, transparent); }
.controller-chevron { font-size: 14px; line-height: 9px; opacity: .7; }
.controller-panel { position: absolute; top: calc(100% + 9px); left: 0; width: 290px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--card-solid); box-shadow: var(--shadow-lg); z-index: 50; opacity: 0; visibility: hidden; transform: translateY(-5px); transition: opacity .18s, transform .18s, visibility .18s; }
.controller-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }
.controller-panel-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.controller-panel-head button { border: 0; background: transparent; color: var(--text-sec); font-size: 20px; line-height: 1; cursor: pointer; }
.controller-panel-tip { margin: 8px 0 10px; color: var(--text-sec); font-size: 11px; line-height: 1.7; }
.controller-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.controller-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; background: var(--bg); }
.controller-row.is-self { background: color-mix(in srgb, var(--primary) 9%, var(--card-solid)); }
.controller-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.controller-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 11px; }
.controller-info small { color: var(--text-sec); font-size: 9px; }
.controller-info .controller-pending { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary); max-width: 210px; }
.controller-disconnect-btn { border: 1px solid color-mix(in srgb, #d9534f 38%, var(--border)); border-radius: 7px; padding: 5px 8px; background: transparent; color: #d9534f; font-size: 10px; cursor: pointer; }
.controller-disconnect-btn:hover { background: #d9534f; color: #fff; }
.controller-empty { color: var(--text-sec); font-size: 11px; text-align: center; padding: 14px 4px; }
.controller-modal-card { max-width: 420px; }
.controller-modal-card .controller-list { max-height: 360px; }
#controllerStatusBtnMobile { display: none; }
.controls-row { width: auto; gap: 6px; margin: 0; }
.text-control-btn { flex: initial; font-size: 12px; padding: 10px 12px; min-height: 40px; border-radius: 9px; font-weight: 500; background: var(--card-solid); }
.text-control-btn.active { background: var(--primary); color: var(--card-solid); box-shadow: none; }
.text-control-btn:hover { transform: none; box-shadow: none; }
#playPauseBtn::before { content: 'Ⅱ'; }
#loopBtn::before { content: '↻'; }
#volumeToggleBtn::before { content: '♪'; }
.search-type-toggle { background: color-mix(in srgb, var(--text) 4%, var(--bg)); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.st-btn { padding: 8px 12px; font-size: 12px; border-radius: 6px; }
.st-btn.active { color: var(--primary); background: var(--card-solid); box-shadow: 0 2px 5px rgba(0,0,0,.04); }
.tab-content { max-width: 1500px; margin: auto; padding: 28px 36px 40px; }
.discovery-hero { position: relative; min-height: 280px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; padding: 32px 38px; border-radius: 18px; background: #e4efe6; color: #243d30; border: 1px solid #d9e7da; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy .eyebrow { color: #54785f; font-size: 10px; }
.hero-copy h2 { font-size: clamp(27px, 2.7vw, 40px); font-weight: 750; line-height: 1.35; letter-spacing: -1px; margin: 14px 0 12px; }
.hero-copy p { color: #63796b; font-size: 13px; line-height: 1.9; }
.hero-search { display: flex; align-items: center; gap: 13px; margin-top: 22px; border: 1px solid #d5e1d7; background: #fff; color: #4b6856; border-radius: 9px; padding: 12px 16px; font-size: 12px; cursor: pointer; box-shadow: 0 3px 8px rgba(40,75,51,.03); }
.hero-search span:first-child { font-size: 24px; line-height: 16px; }
.hero-search span:last-child { margin-left: 24px; font-size: 18px; }
.hero-search:hover { border-color: #17765e; color: #17765e; }
.record-art { width: 330px; height: 240px; position: relative; flex: 0 0 330px; margin-right: 12px; }
.record-sleeve { position: absolute; top: 22px; left: 18px; width: 192px; height: 206px; transform: rotate(-10deg); background: #adc8ad; border: 1px solid #91b497; padding: 18px; box-shadow: 0 16px 25px rgba(46,80,52,.12); overflow: hidden; z-index: 2; }
.record-sleeve > span { font-size: 18px; line-height: 1.2; letter-spacing: 1px; font-weight: 800; color: #254e38; position: relative; z-index: 2; }
.record-sleeve small { position: absolute; bottom: 13px; left: 15px; font-size: 6px; letter-spacing: .6px; color: #254e38; }
.sleeve-circle { position: absolute; width: 146px; height: 146px; border: 25px solid #dce7bd; border-radius: 50%; bottom: 20px; right: -30px; }
.vinyl { position: absolute; width: 218px; height: 218px; border-radius: 50%; right: -2px; top: 8px; background: repeating-radial-gradient(circle, #26332e 0 1px, #16241e 2px 4px); box-shadow: 10px 20px 28px rgba(25,50,35,.15); display: grid; place-items: center; transform: rotate(12deg); }
.vinyl::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(transparent 0deg, #ffffff1c 50deg, transparent 90deg, transparent 180deg, #ffffff13 235deg, transparent 280deg); }
.vinyl-label { width: 72px; height: 72px; border-radius: 50%; background: #e8bc75; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #243d30; font-size: 27px; font-weight: 800; }
.vinyl-label span { font-size: 6px; letter-spacing: 1px; }
.music-note { position: absolute; right: -12px; bottom: -2px; z-index: 3; font-size: 45px; color: #568466; transform: rotate(12deg); }
body.theme-dark .discovery-hero { background: #283f32; border-color: #354c3e; color: #eef5e9; }
body.theme-dark .hero-copy p, body.theme-dark .hero-copy .eyebrow { color: #b4c9b7; }
body.theme-blue .discovery-hero { background: #153747; border-color: #245468; color: #e0f7ff; }
body.theme-blue .hero-copy p, body.theme-blue .hero-copy .eyebrow { color: #a8c9d3; }
body.theme-pink .discovery-hero { background: #f9e3e8; border-color: #efd0d9; color: #713c51; }
.section-title { font-size: 18px; font-weight: 700; margin: 32px 0 16px; gap: 6px; flex-wrap: wrap; }
.section-title > span { font-size: 10px !important; padding: 4px 7px; border-radius: 5px; background: color-mix(in srgb, var(--primary) 7%, transparent); }
.section-refresh-btn { font-size: 11px; border-radius: 7px; padding: 6px 10px; background: transparent; font-weight: 500; }
.section-refresh-btn::before { content: '↻'; font-size: 15px; }
.playlist-grid, .search-playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 20px; overflow: visible; margin: 0; padding: 0; }
.playlist-card { background: transparent; border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
.playlist-card:hover { transform: translateY(-3px); box-shadow: none; }
.playlist-card .cover-wrap { border-radius: 12px; background: var(--card-hover); border: 1px solid var(--border); }
.playlist-card img { display: block; }
.playlist-card .p-name { font-size: 12px; line-height: 1.7; padding: 10px 2px 0; font-weight: 500; }
.playlist-card .cover-overlay { justify-content: flex-end; padding: 12px; }
.playlist-card .play-icon { width: 34px; height: 34px; font-size: 12px; color: var(--card-solid); }
.list { gap: 0; background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.list:empty { display: flex; min-height: 110px; align-items: center; justify-content: center; padding: 24px; color: var(--text-sec); }
.list:empty::before { content: '还没有歌曲，去发现或搜索你喜欢的音乐吧'; font-size: 13px; line-height: 1.8; text-align: center; }
#recSongsList:empty::before { content: '正在等待音乐推荐…'; }
#searchResults:empty::before { content: '输入关键词，开始寻找喜欢的音乐'; }
#historyList:empty::before { content: '听过的歌曲会出现在这里'; }
.list li { min-height: 70px; padding: 13px 18px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; backdrop-filter: none; background: transparent; }
.list li:last-child { border-bottom: 0; }
.list li:hover { transform: none; box-shadow: none; }
.list li.playing-item { background: color-mix(in srgb, var(--primary) 9%, var(--card-solid)); box-shadow: inset 3px 0 var(--primary); }
.list li.has-requester { cursor: help; }
.s-name { font-size: 14px; font-weight: 600; }
.s-artist { font-size: 11px; line-height: 1.5; }
.action-btn { min-height: 34px; padding: 7px 14px; font-size: 11px; border-radius: 7px; font-weight: 600; }
.action-btn:hover { transform: none; box-shadow: none; }
.priority-btn { background: transparent; border-color: var(--border); color: var(--text-sec); }
.view-intro { margin: 4px 0 26px; }
.view-intro h2 { font-size: 25px; letter-spacing: -.5px; }
.view-intro p { margin-top: 10px; font-size: 13px; color: var(--text-sec); line-height: 1.8; }
.search-box { max-width: 760px; }
.search-box input { min-width: 0; border-radius: 10px; background: var(--card-solid); }
.search-box button { border-radius: 10px; box-shadow: none; background: var(--primary); color: var(--card-solid); }
#tab-search > .search-type-toggle { margin-bottom: 24px; }
#playlistDetailView { padding: 30px 36px 100px; }
.playing-header { margin-top: 28px; }
.playing-name { font-size: 32px; }
.modal-card { max-height: calc(100dvh - 40px); overflow-y: auto; }
@media (min-width: 768px) and (max-width: 1100px) {
    .header { padding: 20px 24px; gap: 12px; }
    .desktop-heading { width: 100%; }
    .tab-content { padding: 24px; }
    .record-art { transform: scale(.8); transform-origin: right center; flex-basis: 235px; margin-right: 0; }
    .discovery-hero { padding: 28px; }
}
@media (max-width: 767px) {
    .desktop-heading { display: none; }
    .header { padding: 16px; display: grid; grid-template-columns: 1fr; gap: 12px; }
    .mobile-header-top { margin: 0; }
    .mobile-title { font-size: 18px; letter-spacing: -.4px; }
    #controllerStatusBtnMobile { display: inline-flex; width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 11px; border-radius: 10px; }
    #controllerStatusBtnMobile .status-dot { width: 6px; height: 6px; }
    .mobile-title::before { content: '♫'; color: var(--primary); }
    .controls-row { max-width: none; width: 100%; gap: 8px; }
    .text-control-btn { flex: 1; padding: 8px 4px; font-size: 11px; }
    .platform-toggle { justify-self: start; }
    .main-content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
    .tab-content { padding: 18px 16px 28px; }
    .discovery-hero { min-height: 245px; padding: 24px; border-radius: 14px; }
    .hero-copy { max-width: 100%; }
    .hero-copy .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
    .hero-copy h2 { font-size: 29px; }
    .hero-copy p { font-size: 11px; max-width: 230px; }
    .hero-search { font-size: 11px; gap: 8px; padding: 11px 12px; margin-top: 18px; }
    .hero-search span:last-child { margin-left: 8px; }
    .record-art { position: absolute; right: -90px; top: 15px; opacity: .13; transform: scale(.85); pointer-events: none; }
    .playlist-grid, .search-playlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
    .playlist-card .p-name { font-size: 12px; }
    .section-title { font-size: 16px; margin-top: 26px; margin-bottom: 14px; }
    .section-title > span { font-size: 9px !important; }
    .section-refresh-btn { font-size: 10px; padding: 5px 8px; }
    .list li { padding: 12px; min-height: 68px; }
    .s-name { font-size: 13px; }
    .s-artist { font-size: 10px; }
    .song-info { padding-right: 8px; }
    .action-btn { padding: 6px 10px; font-size: 10px; }
    .nav-bar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; padding: 8px 6px; border: 1px solid var(--border); border-radius: 16px; background: var(--card-solid); box-shadow: var(--shadow-lg); }
    .nav-item { border-radius: 10px; font-size: 11px; padding: 7px 2px; gap: 3px; }
    .nav-item.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); border-top-color: transparent; }
    .nav-item[data-tab="playing"]::before { content: '♫'; }
    .nav-item[data-tab="recommend"]::before { content: '◈'; }
    .nav-item[data-tab="search"]::before { content: '⌕'; }
    .nav-item[data-tab="queue"]::before { content: '≡'; }
    .nav-item[data-tab="history"]::before { content: '↶'; }
    .nav-item[data-tab="favorites"]::before { content: '♡'; }
    .song-actions { gap: 5px !important; }
    .song-actions .favorite-button { width: 30px; height: 32px; font-size: 20px; }
    #queueList .song-info > .favorite-button { width: 28px; margin-left: 5px; }
    #queueList .action-btn { padding: 6px 8px !important; }
    #queueList .drag-handle { padding: 4px; }
    #queueList .song-info > div[style*="gap:8px"] { gap: 4px !important; margin-left: 5px !important; }
    .favorite-row { padding: 12px; }
    .view-intro h2 { font-size: 23px; }
    .view-intro p { font-size: 12px; }
    #playlistDetailView { padding: 20px 16px calc(110px + env(safe-area-inset-bottom)); }
    .playing-badge { font-size: 9px; padding: 4px 6px; margin-right: 8px; }
}
@media (min-width: 560px) and (max-width: 767px) { .playlist-grid, .search-playlist-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
