*{box-sizing:border-box;margin:0;padding:0;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overflow:hidden;background:#0b0b0b;color:#fff;font-family:system-ui,-apple-system,"Microsoft YaHei",sans-serif;cursor:default}
body{display:flex;justify-content:center}

/* 图片背景层：设置中开启，垫在歌词舞台下方 */
#bgImageLayer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:0;background-size:cover;background-position:center;background-repeat:no-repeat;pointer-events:none;transition:opacity .3s ease}
#bgImageLayer.hidden{display:none}
body.bg-img .stage{background:transparent}

/* logo用独立div+CSS背景，固定左上角，按图片原始比例480:340设置尺寸，半透明大水印 */
.logoBg{position:fixed;top:4px;left:6px;width:calc(80px * var(--logo-scale,1));height:calc(32px * var(--logo-scale,1));background-image:url('assets/logo.png');background-size:contain;background-repeat:no-repeat;background-position:left top;z-index:200;pointer-events:none;opacity:.7;transition:opacity .3s ease,width .2s,height .2s}
.logoBg.hide{opacity:0}

#app{width:100%;height:100%;position:relative}

main{width:min(1600px,100vw);height:100vh;height:100dvh;display:flex;flex-direction:column;position:relative;max-height:100vh;max-height:100dvh}

/* 歌单面板：播放时和控制栏一起隐藏 */
.searchPanel{position:fixed;top:0;left:0;right:0;padding:calc(10px + env(safe-area-inset-top)) 14px 12px;background:#111;border-bottom:1px solid #333;box-shadow:0 4px 20px rgba(0,0,0,.5);transition:opacity .25s ease,max-height .25s ease,padding .25s ease;max-height:60vh;overflow:hidden;z-index:9999}
.searchPanel.hiddenBar{opacity:0;visibility:hidden;pointer-events:none;max-height:0;padding:0;border-bottom:none}
.searchRow{display:flex;gap:8px;align-items:center}
.searchIcon{font-size:18px;flex-shrink:0;opacity:.7}
.searchRow #filterInput{flex:1;min-width:0;background:#1a1a1a;color:#fff;border:1px solid #555;border-radius:12px;padding:12px 14px;font-size:16px;outline:none;transition:border-color .2s,background .2s}
.searchRow #filterInput:focus{border-color:#f36b0a;background:#222;box-shadow:0 0 0 3px rgba(243,107,10,.15)}
.onlineSearchToggle{display:flex;align-items:center;justify-content:center;gap:6px;flex:none;min-height:42px;padding:0 11px;border:1px solid #4a3326;border-radius:11px;background:#211810;color:#ffc18c;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.onlineSearchToggle input{width:17px;height:17px;margin:0;accent-color:#f36b0a;cursor:pointer}
.onlineSearchToggle:has(input:checked){border-color:#a8511b;background:#302013;color:#ffd0a8}
.onlineLrcGroup{margin-top:4px;border-top:1px solid #29211c}
.onlineLrcHeading{padding:10px 6px 6px;color:#ff9a56;font-size:12px;font-weight:750}
.onlineLrcStatus{padding:10px 6px;color:#888;font-size:12px;line-height:1.5}
.onlineLrcStatus.error{color:#ffaaa1}
.onlineLrcItem{display:flex;width:100%;flex-direction:column;gap:4px;padding:10px 8px;border:0;border-bottom:1px solid #29211c;border-left:2px solid #a8511b;background:transparent;color:#fff;font:inherit;text-align:left;cursor:pointer}
.onlineLrcItem:hover,.onlineLrcItem.selected{background:#211810}
.onlineLrcItem.loading{opacity:.65;pointer-events:none}
.onlineLrcItem:focus-visible{outline:2px solid #f36b0a;outline-offset:-2px}
.onlineLrcTitle{color:#eee;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.onlineLrcMeta{color:#999;font-size:10px;line-height:1.4}
.songList{max-height:calc(42vh - 56px);min-height:120px;overflow:auto;margin-top:8px}
.songList::-webkit-scrollbar{width:4px}
.songList::-webkit-scrollbar-thumb{background:#444;border-radius:2px}
.result{display:flex;align-items:center;justify-content:space-between;padding:9px 6px;border-bottom:1px solid #1e1e1e;gap:10px;cursor:pointer;border-radius:6px}
.result:active{background:#1e1e1e}
.resultTitle{font-size:14px}
.resultMeta{color:#777;font-size:10px;margin-top:2px}

/* 舞台 */
.stage{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;overflow:hidden;background:radial-gradient(circle at 50% 40%,#1a1a1a 0,#0b0b0b 70%)}
/* 全屏歌词时保留背景层的可见度，同时压暗画面以维持文字对比度 */
html:fullscreen .stage,html:-webkit-full-screen .stage{background:radial-gradient(circle at 50% 40%,rgba(26,26,26,.58) 0,rgba(11,11,11,.62) 70%)}
.meta{display:flex;flex-direction:column;align-items:flex-end;gap:2px;color:#666;font-size:12px;position:absolute;right:5vw;top:30px;z-index:2;text-align:right}

/* 歌词视口 + 平滑向上滚动 */
.lyricsViewport{transition:opacity 3s ease;height:100%;overflow:hidden;position:relative}
.lyricsViewport::before,.lyricsViewport::after{display:none}
.lyricsTrack{width:100%;transition:transform .2s ease-out;will-change:transform}
.lyricSpacer{width:100%}
.lyricLine{text-align:center;padding:10px 5vw;font-weight:600;line-height:1.25;color:#555;font-size:calc(var(--active-size,38px) * 0.5);transition:color .3s ease,opacity .3s ease;opacity:.3;white-space:pre-wrap}
.lyricLine.active{color:#fff;font-size:var(--active-size,38px);opacity:1;text-shadow:0 0 30px rgba(243,107,10,.35)}
.lyricLine.near{color:#999;opacity:.65;font-size:calc(var(--active-size,38px) * 0.7)}
/* 互动模式三色 */
.lyricLine.role-lead{color:#ff9a56}
.lyricLine.role-lead.active{color:#ffb380;text-shadow:0 0 25px rgba(255,154,86,.45)}
.lyricLine.role-audience{color:#7ec8e3}
.lyricLine.role-audience.active{color:#a5d8ee;text-shadow:0 0 25px rgba(126,200,227,.45)}
.lyricLine.role-chorus{color:#ffd700;font-weight:700}
.lyricLine.role-chorus.active{color:#ffe44d;font-weight:800;text-shadow:0 0 25px rgba(255,215,0,.5)}
/* 互动图例 */
.interactiveLegend{position:fixed;left:10px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:16px;padding:14px 10px;background:rgba(40,40,40,.85);border:1px solid rgba(255,255,255,.15);border-radius:16px;z-index:200;font-size:12px;color:#ddd;transition:opacity .3s;pointer-events:none;}
.interactiveLegend.hidden{display:none}
.legendItem{display:flex;align-items:center;gap:4px}
.legendDot{width:8px;height:8px;border-radius:50%;display:inline-block;box-shadow:0 0 6px currentColor}
.legendDot.lead{background:#ff9a56;color:#ff9a56}
.legendDot.audience{background:#7ec8e3;color:#7ec8e3}
.legendDot.chorus{background:#ffd700;color:#ffd700}

/* 控制栏 */
.controls{position:relative;width:100%;padding:10px 14px calc(12px + env(safe-area-inset-bottom));background:rgba(17,17,17,.96);border-top:1px solid #292929;transition:opacity .28s ease,transform .28s ease,max-height .28s ease,padding .28s ease;z-index:180;flex-shrink:0;-webkit-transform:translateZ(0);transform:translateZ(0);max-height:min(300px,46dvh);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.controls.hiddenBar{opacity:0;visibility:hidden;transform:translateY(105%);pointer-events:none;max-height:0;padding-top:0;padding-bottom:0;border-top:none}
.controls input[type=range]{width:100%;accent-color:#f36b0a;height:6px;cursor:pointer}
.controlRow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));justify-content:center;align-items:stretch;gap:6px;margin-top:8px;max-width:100%;width:100%}
.controlRow button,.controlRow .controlLink{border:1px solid #292929;border-radius:11px;background:#202020;color:#fff;padding:6px 3px;font-size:15px;cursor:pointer;min-width:0;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center;text-decoration:none;line-height:1.05;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.controlRow button::after,.controlRow .controlLink::after{content:attr(data-label);display:block;font-size:clamp(9px,2.5vw,10px);line-height:1.1;color:rgba(255,255,255,.78);white-space:nowrap}
.controlRow button:active,.controlRow .controlLink:active{transform:scale(.95)}
.controlRow button:focus-visible,.controlRow .controlLink:focus-visible{outline:2px solid #f36b0a;outline-offset:2px}
.controlRow .play{background:#f36b0a;font-size:20px;min-width:0}
.showControlsBtn{position:fixed;left:50%;bottom:calc(5px + env(safe-area-inset-bottom));z-index:10001;display:none;align-items:center;justify-content:center;width:34px;height:34px;transform:translateX(-50%);padding:0;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(20,20,20,.9);box-shadow:0 4px 18px rgba(0,0,0,.4);color:#fff;font-size:15px;line-height:1;cursor:pointer;touch-action:manipulation;backdrop-filter:blur(10px)}
.showControlsBtn::before{content:'';position:absolute;inset:-5px;border-radius:50%}
body.controlsHidden .showControlsBtn{display:flex}
body.controlsLocked .showControlsBtn{display:none}
@media(min-width:900px){.controlRow{grid-template-columns:repeat(auto-fit,minmax(58px,1fr))}.controlRow button,.controlRow .controlLink{min-height:52px}}

/* 倒计时 */
.countdown{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);font-size:140px;font-weight:800;color:#f36b0a;z-index:200;text-shadow:0 0 50px rgba(243,107,10,.6);pointer-events:none}
.countdown.show{animation:cdPulse 1s ease forwards}
@keyframes cdPulse{0%{transform:translate(-50%,-50%) scale(.6);opacity:0}20%{transform:translate(-50%,-50%) scale(1.15);opacity:1}80%{transform:translate(-50%,-50%) scale(1);opacity:1}100%{transform:translate(-50%,-50%) scale(.9);opacity:0}}

/* 双击快进快退反馈 */
.seekFeedback{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);font-size:48px;font-weight:700;color:#f36b0a;z-index:150;pointer-events:none;text-shadow:0 0 20px rgba(243,107,10,.5);animation:seekFade .8s ease forwards}
@keyframes seekFade{0%{opacity:0;transform:translate(-50%,-50%) scale(.5)}20%{opacity:1;transform:translate(-50%,-50%) scale(1.1)}100%{opacity:0;transform:translate(-50%,-70%) scale(1)}}

/* 设置面板 */
.settings{position:fixed;right:14px;bottom:80px;width:min(320px,calc(100vw - 28px));background:#1a1a1a;border:1px solid #333;border-radius:14px;padding:16px;z-index:50;box-shadow:0 10px 40px #000}
.settings h2{margin:0 0 10px;font-size:16px;color:#f36b0a}
.settings label{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:12px 0;color:#ddd;font-size:13px}
.settings select,.settings input{max-width:140px;background:#292929;color:#fff;border:1px solid #444;border-radius:7px;padding:5px}
.settings input[type=checkbox]{width:18px;height:18px;accent-color:#f36b0a;max-width:none}
.settings button{width:100%;background:#f36b0a;color:#fff;border:0;border-radius:8px;padding:9px;margin-top:8px;cursor:pointer;font-size:14px}
.hidden{display:none!important}

/* 横屏：给歌单足够高度，确保搜索结果可见 */
@media (orientation:landscape) and (min-width:700px){
  .logoBg{width:calc(100px * var(--logo-scale,1));height:calc(40px * var(--logo-scale,1));top:4px;left:6px}
  .searchPanel{max-height:45vh}
  .songList{max-height:calc(45vh - 56px);min-height:100px}
  .lyricLine{font-size:calc(var(--active-size,38px) * 0.5);padding:10px 12vw}
  .lyricLine.active{font-size:var(--active-size,48px)}
  .lyricLine.near{font-size:calc(var(--active-size,38px) * 0.7)}
}

/* ===== 桌面端适配：充分利用大屏幕 ===== */
.is-desktop main{width:100%;max-width:100%}
.is-desktop .searchPanel{padding:16px 24px 18px;max-height:50vh;left:20vw;right:20vw;border-radius:0 0 12px 12px}
.is-desktop .searchPanel.hiddenBar{max-height:0;padding-top:0;padding-bottom:0}
.is-desktop .searchRow #filterInput{font-size:18px;padding:14px 18px}
.is-desktop .result{padding:12px 10px}
.is-desktop .resultTitle{font-size:17px}
.is-desktop .resultMeta{font-size:12px}
.is-desktop .songList{max-height:calc(50vh - 70px)}
.is-desktop .lyricLine{font-size:calc(var(--active-size,48px) * 0.5);padding:12px clamp(24px,8vw,140px)}
.is-desktop .lyricLine.active{font-size:var(--active-size,56px)}
.is-desktop .lyricLine.near{font-size:calc(var(--active-size,48px) * 0.7)}
.is-desktop .controls{padding:16px 24px 20px}
.is-desktop .controls button{font-size:18px;padding:14px 20px}
.is-desktop .controls .controlRow button,.is-desktop .controls .controlRow .controlLink{font-size:16px;padding:7px 4px;min-width:0;min-height:52px}
.is-desktop .controls input[type=range]{height:8px}
.is-desktop .nowPlaying{font-size:18px}
.is-desktop .timeDisplay{font-size:16px}
.is-desktop .logoBg{width:calc(120px * var(--logo-scale,1));height:calc(48px * var(--logo-scale,1));top:6px;left:10px;opacity:.6}
.is-desktop .settings{width:360px;padding:24px}
.is-desktop .settings label{font-size:16px}
.is-desktop .settings select,.is-desktop .settings input[type=range]{font-size:16px}

/* 锁定状态解锁按钮 */
.unlockBtn{position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));right:calc(20px + env(safe-area-inset-right));width:44px;height:44px;border-radius:50%;background:rgba(0,0,0,.6);border:1px solid rgba(255,255,255,.2);color:#fff;font-size:18px;cursor:pointer;z-index:9998;display:flex;align-items:center;justify-content:center;opacity:.7;transition:opacity .2s}
.unlockBtn:hover{opacity:1}
.unlockBtn.hidden{display:none}

/* ===== 歌单面板 ===== */
.playlistOverlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);z-index:99998;opacity:0;transition:opacity .3s ease}
.playlistOverlay.show{opacity:1}
.playlistPanel{position:fixed;left:0;right:0;bottom:0;top:10vh;background:#111;border-radius:16px 16px 0 0;z-index:99999;display:flex;flex-direction:column;transform:translateY(100%);transition:transform .35s cubic-bezier(.4,0,.2,1);box-shadow:0 -4px 30px rgba(0,0,0,.5)}
.playlistPanel.show{transform:translateY(0)}
.playlistHeader{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #222;flex-shrink:0}
.playlistTitle{font-size:17px;font-weight:bold;color:#fff}
.closePlaylist{background:none;border:none;color:#888;font-size:20px;cursor:pointer;padding:4px 8px;border-radius:6px;transition:background .2s,color .2s}
.closePlaylist:hover{background:#222;color:#fff}
.singerScroll{display:flex;gap:16px;padding:16px 20px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;border-bottom:1px solid #1a1a1a;flex-shrink:0}
.singerScroll::-webkit-scrollbar{display:none}
.singerItem{display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;flex-shrink:0;opacity:.6;transition:opacity .2s}
.singerItem.active{opacity:1}
.singerAvatar{width:56px;height:56px;border-radius:50%;object-fit:cover;border:2px solid transparent;transition:border-color .2s,transform .2s}
.singerItem.active .singerAvatar{border-color:#f36b0a;transform:scale(1.08)}
.singerName{font-size:12px;color:#ccc;white-space:nowrap}
.singerCount{font-size:10px;color:#666}
.playlistSongs{flex:1;overflow-y:auto;padding:8px 12px 20px}
.playlistSongItem{display:flex;align-items:center;padding:12px 14px;border-radius:8px;cursor:pointer;transition:background .2s;margin-bottom:4px}
.playlistSongItem:hover{background:#1a1a1a}
.playlistSongItem:active{background:#222}
.playlistSongItem .songIdx{width:28px;font-size:13px;color:#555;flex-shrink:0}
.playlistSongItem .songInfo{flex:1;min-width:0}
.playlistSongItem .songTitle{font-size:15px;color:#eee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.playlistSongItem .songArtist{font-size:12px;color:#666;margin-top:2px}
.playlistSongItem .songPlay{color:#f36b0a;font-size:16px;flex-shrink:0;margin-left:8px;opacity:0;transition:opacity .2s}
.playlistSongItem:hover .songPlay{opacity:1}
.playlistEmpty{text-align:center;color:#555;padding:40px;font-size:14px}
/* 横屏适配 */
@media (orientation:landscape) and (max-height:500px){
  .playlistPanel{top:5vh}
  .singerAvatar{width:44px;height:44px}
  .playlistSongs{padding:4px 12px 12px}
}
/* 桌面端适配 */
.is-desktop .playlistPanel{top:15vh;left:20vw;right:20vw;border-radius:16px}
.is-desktop .playlistOverlay{background:rgba(0,0,0,.7)}

/* 欢迎页logo */
.welcomeLogo{width:min(280px,70vw);height:auto;opacity:.85;display:block;margin:0 auto}

/* ===== 开屏动画 ===== */
.splash{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#080808;z-index:99999;transition:opacity .6s ease}
.splash.hide{opacity:0;pointer-events:none}
.splash .grid-bg{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);background-size:40px 40px;mask-image:radial-gradient(ellipse at center,black 30%,transparent 75%);-webkit-mask-image:radial-gradient(ellipse at center,black 30%,transparent 75%);animation:gridFade 3s ease forwards}
@keyframes gridFade{0%{opacity:0}10%{opacity:1}100%{opacity:1}}
.splash .glow{position:absolute;width:500px;height:500px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.06) 0%,transparent 70%);animation:glowPulse 3s ease-in-out forwards}
@keyframes glowPulse{0%,100%{transform:scale(.8);opacity:.5}50%{transform:scale(1.2);opacity:1}}
.splash .loader{position:absolute;display:flex;flex-direction:column;align-items:center;gap:22px;animation:loaderInOut 3s cubic-bezier(.4,0,.2,1) forwards;z-index:2}
@keyframes loaderInOut{0%{opacity:0;transform:translateY(16px)}5%{opacity:1;transform:translateY(0)}30%{opacity:1;transform:translateY(0)}40%{opacity:0;transform:translateY(-24px);filter:blur(8px)}100%{opacity:0;transform:translateY(-24px);filter:blur(8px)}}
.splash .ring{position:relative;width:100px;height:100px;margin-bottom:4px}
.splash .ring::before,.splash .ring::after{content:"";position:absolute;inset:0;border-radius:50%;border:1.5px solid transparent}
.splash .ring::before{border-top-color:rgba(255,255,255,.8);border-right-color:rgba(255,255,255,.3);animation:ringSpin .9s linear infinite}
.splash .ring::after{inset:-10px;border-bottom-color:rgba(255,255,255,.4);border-left-color:rgba(255,255,255,.1);animation:ringSpin 1.4s linear infinite reverse}
@keyframes ringSpin{to{transform:rotate(360deg)}}
.splash .ring-percent{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:#fff;letter-spacing:1px;text-shadow:0 0 10px rgba(255,255,255,.3)}
.splash .loader-text{font-size:18px;letter-spacing:5px;color:rgba(255,255,255,.9);white-space:nowrap;padding-left:5px;text-shadow:0 0 8px rgba(255,255,255,.2)}
.splash .loader-text::after{content:"";animation:dots .4s steps(4,end) infinite}
@keyframes dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}100%{content:"...."}}
.splash .progress-wrap{width:220px;height:2px;background:rgba(255,255,255,.08);border-radius:2px;overflow:hidden;position:relative}
.splash .progress-bar{height:100%;width:0%;background:rgba(255,255,255,.9);border-radius:2px;animation:progressFill .85s cubic-bezier(.65,0,.35,1) forwards;position:relative}
.splash .progress-bar::after{content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:50%;background:#fff;box-shadow:0 0 8px rgba(255,255,255,.8)}
@keyframes progressFill{0%{width:0%}100%{width:100%}}
.splash .loader-status{font-size:14px;letter-spacing:3px;color:rgba(255,255,255,.6);height:20px;overflow:hidden;position:relative;width:220px;text-align:center}
.splash .loader-status span{position:absolute;width:100%;left:0;opacity:0;animation:statusRotate .85s steps(1) forwards}
.splash .loader-status span:nth-child(1){animation-delay:0s}
.splash .loader-status span:nth-child(2){animation-delay:.21s}
.splash .loader-status span:nth-child(3){animation-delay:.42s}
.splash .loader-status span:nth-child(4){animation-delay:.63s}
@keyframes statusRotate{0%{opacity:0;transform:translateY(8px)}10%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-8px)}}
.splash .scan-line{position:absolute;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent);top:50%;opacity:0;animation:scanSweep .5s ease 1.3s forwards;z-index:3}
@keyframes scanSweep{0%{opacity:0;transform:scaleX(0)}30%{opacity:1;transform:scaleX(1)}100%{opacity:0;transform:scaleX(1)}}
.splash .signature{position:absolute;display:flex;flex-direction:column;align-items:center;gap:0;opacity:0;animation:sigIn 3s cubic-bezier(.16,1,.3,1) forwards;z-index:2}
@keyframes sigIn{0%,60%{opacity:0;transform:scale(.8);filter:blur(14px)}70%{opacity:1;transform:scale(1.08);filter:blur(0)}78%{transform:scale(.97)}85%{transform:scale(1.02)}92%{transform:scale(1)}100%{opacity:1;transform:scale(1);filter:blur(0)}}
.splash .sig-en{font-size:11px;letter-spacing:10px;color:rgba(255,255,255,.4);margin-bottom:10px;padding-left:10px;opacity:0;animation:enIn .5s ease 1.7s forwards}
@keyframes enIn{from{opacity:0;letter-spacing:20px}to{opacity:1;letter-spacing:10px}}
.splash .sig-name{font-size:clamp(48px,10vw,92px);font-weight:700;letter-spacing:16px;color:#fff;padding-left:16px;text-shadow:0 0 30px rgba(255,255,255,.15);position:relative}
.splash .sig-logo{width:min(300px,70vw);height:auto;display:block;margin:4px 0;filter:drop-shadow(0 0 20px rgba(255,255,255,.15))}
.splash .sig-divider{display:flex;align-items:center;gap:12px;margin:14px 0;opacity:0;animation:dividerIn .5s ease 1.8s forwards}
@keyframes dividerIn{to{opacity:1}}
.splash .sig-divider .line{width:0;height:1px;background:rgba(255,255,255,.3);animation:lineGrow .4s ease 1.9s forwards}
.splash .sig-divider .line.right{animation:lineGrowR .4s ease 1.9s forwards}
@keyframes lineGrow{to{width:70px}}
@keyframes lineGrowR{to{width:70px}}
.splash .sig-divider .dot{width:4px;height:4px;border-radius:50%;background:rgba(255,255,255,.6);transform:scale(0);animation:dotPop .3s ease 2.1s forwards}
@keyframes dotPop{to{transform:scale(1)}}
.splash .sig-sub{font-size:13px;letter-spacing:6px;color:rgba(255,255,255,.5);opacity:0;padding-left:6px;animation:subIn .5s ease 2s forwards}
@keyframes subIn{from{opacity:0;transform:translateY(8px);letter-spacing:14px}to{opacity:1;transform:translateY(0);letter-spacing:6px}}
.splash .footer{position:absolute;bottom:28px;left:0;right:0;display:flex;justify-content:space-between;padding:0 36px;font-size:10px;letter-spacing:2px;color:rgba(255,255,255,.2);opacity:0;animation:footerIn .5s ease 2.2s forwards}
@keyframes footerIn{to{opacity:1}}
.splash .top-tag{position:absolute;top:28px;left:50%;transform:translateX(-50%);font-size:10px;letter-spacing:6px;color:rgba(255,255,255,.25);padding-left:6px;opacity:0;animation:topTagIn .5s ease 2.15s forwards}
@keyframes topTagIn{to{opacity:1}}
.splash .corner{position:absolute;width:24px;height:24px;border:1px solid rgba(255,255,255,.15);opacity:0;animation:cornerIn 3s ease forwards}
.splash .corner.tl{top:24px;left:24px;border-right:none;border-bottom:none}
.splash .corner.tr{top:24px;right:24px;border-left:none;border-bottom:none}
.splash .corner.bl{bottom:24px;left:24px;border-right:none;border-top:none}
.splash .corner.br{bottom:24px;right:24px;border-left:none;border-top:none}
@keyframes cornerIn{0%,65%{opacity:0;transform:scale(.6)}80%{opacity:1;transform:scale(1)}100%{opacity:.7}}

/* ===== 全屏歌名渐隐 ===== */
.titleSplash{position:fixed;inset:0;z-index:99999;background:#000;display:flex;align-items:center;justify-content:center;transition:opacity .8s ease;pointer-events:none}
.titleSplash.hide{opacity:0}
.titleSplashInner{text-align:center;padding:20px}
.titleSplashSong{font-size:clamp(32px,8vw,72px);font-weight:700;color:#fff;margin-bottom:12px;text-shadow:0 0 30px rgba(255,255,255,.2)}
.titleSplashArtist{font-size:clamp(16px,3vw,28px);color:#f36b0a;letter-spacing:4px}

/* ===== 我的歌单管理面板 ===== */
.myPlaylistOverlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:99998;opacity:0;transition:opacity .3s ease}
.myPlaylistOverlay.show{opacity:1}
.myPlaylistPanel{position:fixed;left:0;right:0;bottom:0;top:8vh;background:#111;border-radius:16px 16px 0 0;z-index:99999;display:flex;flex-direction:column;transform:translateY(100%);transition:transform .35s cubic-bezier(.4,0,.2,1);box-shadow:0 -4px 30px rgba(0,0,0,.5)}
.myPlaylistPanel.show{transform:translateY(0)}
.mpHeader{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #222}
.mpTitle{font-size:18px;font-weight:600;color:#fff}
.mpClose{background:none;border:none;color:#888;font-size:20px;cursor:pointer;padding:4px 8px}
.mpClose:hover{color:#fff}
.mpView{flex:1;overflow-y:auto;padding:16px 20px}
.mpView.hidden{display:none}
.mpActions{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.mpBtn{background:#222;border:1px solid #333;color:#ddd;padding:8px 14px;border-radius:8px;font-size:14px;cursor:pointer;transition:all .2s}
.mpBtn:hover{background:#2a2a2a;border-color:#444}
.mpBtn.primary{background:#f36b0a;border-color:#f36b0a;color:#fff}
.mpBtn.primary:hover{background:#e55a00}
.mpBtn.danger{background:#3a1515;border-color:#5a2020;color:#ff6b6b}
.mpBtn.danger:hover{background:#4a1a1a}
.mpBtn.small{padding:6px 10px;font-size:12px}
.mpList{display:flex;flex-direction:column;gap:10px}
.mpListItem{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:#1a1a1a;border-radius:10px;border:1px solid #252525;cursor:pointer;transition:all .2s}
.mpListItem:hover{background:#222;border-color:#333}
.mpListItemInfo{flex:1}
.mpListItemName{font-size:16px;color:#fff;margin-bottom:4px}
.mpListItemMeta{font-size:12px;color:#777}
.mpListItemActions{display:flex;gap:8px}
.mpEditHeader{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.mpNameInput{flex:1;min-width:120px;background:#1a1a1a;border:1px solid #333;color:#fff;padding:8px 12px;border-radius:8px;font-size:14px}
.mpNameInput:focus{outline:none;border-color:#f36b0a}
.mpEditActions{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.mpPlaySettings{display:flex;gap:20px;margin-bottom:16px;padding:12px;background:#1a1a1a;border-radius:8px;font-size:13px;color:#aaa;flex-wrap:wrap;align-items:center}
.mpPlaySettings select,.mpPlaySettings input{background:#222;border:1px solid #333;color:#ddd;padding:4px 8px;border-radius:4px;font-size:13px}
.mpEditSongs{display:flex;flex-direction:column;gap:6px}
.mpSongItem{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#1a1a1a;border-radius:8px;border:1px solid #222}
.mpSongIdx{color:#666;font-size:13px;width:24px;text-align:center}
.mpSongInfo{flex:1;min-width:0}
.mpSongTitle{font-size:14px;color:#ddd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mpSongArtist{font-size:11px;color:#666}
.mpSongRemove{background:none;border:none;color:#666;font-size:16px;cursor:pointer;padding:4px 8px}
.mpSongRemove:hover{color:#ff6b6b}
.mpSongUp,.mpSongDown{background:none;border:none;color:#666;font-size:12px;cursor:pointer;padding:4px 6px}
.mpSongUp:hover,.mpSongDown:hover{color:#fff}
.mpAddSearch{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.mpAddSearch #mpAddFilter{flex:1;min-width:0;background:#1a1a1a;border:1px solid #333;color:#fff;padding:10px 14px;border-radius:8px;font-size:14px;box-sizing:border-box}
.mpAddSearch #mpAddFilter:focus{outline:none;border-color:#f36b0a}
.mpAddList{display:flex;flex-direction:column;gap:6px}
.mpAddItem{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#1a1a1a;border-radius:8px;border:1px solid #222;cursor:pointer;transition:all .2s}
.mpAddItem:hover{background:#222;border-color:#f36b0a}
.mpAddItem.added{opacity:.4;pointer-events:none}
.mpAddItem .addBtn{color:#f36b0a;font-size:18px;font-weight:bold}
.mpSubTitle{font-size:15px;color:#aaa}

/* ===== 导入弹窗 ===== */
.importModal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.7)}
.importModal.hidden{display:none}
.importModalContent{background:#1a1a1a;border-radius:12px;padding:24px;width:min(90vw,500px);max-height:80vh;overflow-y:auto;border:1px solid #333}
.importModalContent h3{margin:0 0 12px;color:#fff;font-size:18px}
.importModalContent textarea{width:100%;background:#111;border:1px solid #333;color:#ddd;padding:12px;border-radius:8px;font-size:13px;box-sizing:border-box;resize:vertical;font-family:monospace}
.importModalContent textarea:focus{outline:none;border-color:#f36b0a}
.importModalActions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.importResult{margin-top:12px;font-size:13px;color:#aaa;max-height:150px;overflow-y:auto}
.importResult .ok{color:#4ade80}
.importResult .fail{color:#f87171}

/* 桌面端歌单面板适配 */
.is-desktop .myPlaylistPanel{top:10vh;left:20vw;right:20vw;border-radius:16px}

/* ===== 扫码导入界面 ===== */
.scanModal{position:fixed;inset:0;z-index:100001;background:#000;display:flex;align-items:center;justify-content:center}
.scanModal.hidden{display:none}
.scanContent{width:100%;max-width:500px;height:100%;display:flex;flex-direction:column;background:#111}
.scanHeader{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #222}
.scanTitle{font-size:18px;font-weight:600;color:#fff}
.scanClose{background:none;border:none;color:#888;font-size:20px;cursor:pointer;padding:4px 8px}
.scanClose:hover{color:#fff}
.scanViewport{position:relative;flex:1;overflow:hidden;background:#000;display:flex;align-items:center;justify-content:center}
#scanVideo{width:100%;height:100%;object-fit:cover}
.scanFrame{position:absolute;width:250px;height:250px;border:2px solid rgba(255,255,255,.2);border-radius:12px}
.scanFrame .scanCorner{position:absolute;width:30px;height:30px;border-color:#f36b0a;border-style:solid;border-width:0}
.scanFrame .tl{top:-2px;left:-2px;border-top-width:4px;border-left-width:4px;border-top-left-radius:8px}
.scanFrame .tr{top:-2px;right:-2px;border-top-width:4px;border-right-width:4px;border-top-right-radius:8px}
.scanFrame .bl{bottom:-2px;left:-2px;border-bottom-width:4px;border-left-width:4px;border-bottom-left-radius:8px}
.scanFrame .br{bottom:-2px;right:-2px;border-bottom-width:4px;border-right-width:4px;border-bottom-right-radius:8px}
.scanLine{position:absolute;left:10%;right:10%;height:2px;background:linear-gradient(90deg,transparent,#f36b0a,transparent);animation:scanLineMove 2s ease-in-out infinite}
@keyframes scanLineMove{0%,100%{top:10%}50%{top:90%}}
.scanHint{text-align:center;padding:12px 16px 8px;color:#888;font-size:14px}
.scanActions{display:flex;justify-content:center;padding:0 16px 12px}
.scanActions .mpBtn{font-size:14px;padding:10px 20px}
.scanResult{padding:0 20px 20px;text-align:center;font-size:14px;min-height:40px}
.scanResult.ok{color:#4ade80}
.scanResult.fail{color:#f87171}

/* 添加歌曲视图：头部固定 */
#mpAddView{padding:0;display:flex;flex-direction:column}
#mpAddView .mpEditHeader{position:sticky;top:0;background:#111;z-index:10;padding:12px 16px;margin:0;border-bottom:1px solid #222}
#mpAddView .mpAddSearch{padding:12px 16px;position:sticky;top:53px;background:#111;z-index:9}
#mpAddView .mpAddList{padding:0 16px 16px;flex:1;overflow-y:auto}

/* ===== 当前播放列表 ===== */
.playingListPanel{position:fixed;bottom:0;left:0;right:0;max-height:70vh;background:#1a1a1a;border-radius:16px 16px 0 0;z-index:1001;display:flex;flex-direction:column;box-shadow:0 -4px 20px rgba(0,0,0,.5);transform:translateY(100%);transition:transform .3s ease;}
.playingListPanel.show{transform:translateY(0);}
.plHeader{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #333;}
.plTitle{font-size:16px;font-weight:600;color:#fff;}
.plClose{background:none;border:none;color:#999;font-size:18px;cursor:pointer;padding:4px 8px;}
.plSongs{overflow-y:auto;padding:8px 0;flex:1;}
.plSongItem{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;cursor:pointer;border-bottom:1px solid #2a2a2a;}
.plSongItem:hover{background:#2a2a2a;}
.plSongItem.active{background:#2a3a4a;}
.plSongTitle{font-size:15px;color:#eee;}
.plSongItem.active .plSongTitle{color:#4fc3f7;font-weight:600;}
.plSongArtist{font-size:12px;color:#888;margin-top:2px;}
.playingListOverlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:1000;}
/* ===== 遥控器配对面板 ===== */
.remotePairPanel{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#1a1a1a;border-radius:16px;padding:24px;z-index:2000;width:90%;max-width:360px;box-shadow:0 8px 32px rgba(0,0,0,.6);}
.rpHeader{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;}
.rpTitle{font-size:18px;font-weight:600;color:#fff;}
.rpClose{background:none;border:none;color:#999;font-size:20px;cursor:pointer;}
.rpContent{text-align:center;}
.rpHint{color:#aaa;font-size:14px;margin-bottom:16px;}
.rpQRCode{display:inline-block;padding:16px;background:#fff;border-radius:12px;margin-bottom:16px;}
.rpId{color:#888;font-size:13px;margin-bottom:8px;}
.rpStatus{color:#4fc3f7;font-size:14px;}
/* 歌词结束画面：大logo+时间 */
.endScreen{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:150;opacity:0;pointer-events:none;transition:opacity 3s ease;}
.endScreen.show{opacity:1;pointer-events:none;}
.endScreenLogo{width:400px;height:160px;background-image:url('assets/logo.png');background-size:contain;background-repeat:no-repeat;background-position:center;}
.endScreenTime{margin-top:30px;font-size:80px;color:#fff;font-weight:300;letter-spacing:2px;font-variant-numeric:tabular-nums;}
.endScreenDate{margin-top:8px;font-size:24px;color:#888;}
/* 抽奖界面 */
.luckyOverlay{position:fixed;inset:0;z-index:99999;background:#000;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.luckyStage{text-align:center;}
.luckyTitle{font-size:32px;color:#f36b0a;letter-spacing:8px;margin-bottom:60px;}
.luckySong{font-size:clamp(60px,12vw,160px);font-weight:800;color:#fff;text-shadow:0 0 60px rgba(243,107,10,.4);}
.luckySong.rolling{color:#888;}
.luckyArtist{font-size:clamp(24px,4vw,48px);color:#666;margin-top:30px;letter-spacing:4px;}
.luckyResult{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(0,0,0,.95);opacity:0;pointer-events:none;transition:opacity .5s;}
.luckyResult.show{opacity:1;pointer-events:auto;}
.luckyResultNum{font-size:120px;color:#f36b0a;font-weight:900;margin-bottom:40px;}
.luckyResultSong{font-size:clamp(60px,12vw,140px);font-weight:800;color:#fff;text-shadow:0 0 80px rgba(243,107,10,.6);}
.luckyResultArtist{font-size:clamp(24px,4vw,40px);color:#888;margin-top:20px;letter-spacing:6px;margin-bottom:40px;}
.luckyPlayBtn{padding:20px 60px;border-radius:16px;border:none;background:#f36b0a;color:#fff;font-size:24px;font-weight:700;cursor:pointer;margin:10px;}
.luckyAgainBtn{padding:16px 40px;border-radius:12px;border:none;background:#333;color:#fff;font-size:18px;cursor:pointer;margin:10px;}
.luckyPlayed{position:fixed;right:10px;top:50%;transform:translateY(-50%);width:180px;max-height:80vh;overflow-y:auto;background:rgba(20,20,20,.7);border-radius:12px;padding:12px;z-index:50;}
.luckyPlayed h4{color:#f36b0a;font-size:14px;margin-bottom:10px;text-align:center;}
.luckyPlayedItems div{font-size:12px;color:#888;padding:4px 0;border-bottom:1px solid #333;}
.luckyCloseBtn{position:fixed;top:20px;right:20px;width:44px;height:44px;border-radius:50%;border:none;background:#333;color:#fff;font-size:18px;cursor:pointer;z-index:100;}
to{transform:translateX(-100%);}
}
/* 遥控器：手机/电脑宽屏适配 */
.remoteApp{width:100%;}
.remoteApp .rMain{width:100%;}
.remoteApp .rPanels{width:100%;}
@media (min-width:900px){
  .remoteApp{max-width:1000px !important;margin:0 auto;flex-direction:row !important;align-items:flex-start !important;gap:24px !important;}
  .remoteApp .rMain{flex:0 0 340px;}
  .remoteApp .rPanels{flex:1;}
  .remoteApp .rFnGrid{grid-template-columns:1fr 1fr !important;}
  .remoteApp .rPlayRow{display:flex !important;justify-content:center !important;}
  .remoteApp .rMain>div,.remoteApp .rPanels>div{max-width:100% !important;}
  #rPlaylistPanel{display:block !important;}
}

/* Responsive controls and settings */
.is-desktop .logoBg.hide{opacity:0}
.settings{max-height:calc(100dvh - 24px - env(safe-area-inset-top));overflow-y:auto;overscroll-behavior:contain}
.searchPanel{padding-left:clamp(10px,2vw,24px);padding-right:clamp(10px,2vw,24px)}
.meta{max-width:min(72vw,700px);padding-left:12px}
@media (max-width:640px){
  .controls{padding:7px 8px calc(9px + env(safe-area-inset-bottom));max-height:270px}
  .controlRow{grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:4px;margin-top:5px}
  .controlRow button,.controlRow .controlLink{min-height:46px;padding:5px 2px;border-radius:8px}
  .controlRow button::after,.controlRow .controlLink::after{font-size:9px}
  .controlRow .play{font-size:18px}
  .searchPanel{max-height:46dvh;padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:8px}
  .songList{max-height:calc(35dvh - 48px);min-height:72px}
  .meta{right:12px;top:calc(12px + env(safe-area-inset-top));max-width:68vw;font-size:11px}
  .interactiveLegend{left:4px;gap:9px;padding:9px 6px;font-size:10px}
  .settings{right:8px;bottom:calc(8px + env(safe-area-inset-bottom));width:min(380px,calc(100vw - 16px));max-height:calc(100dvh - 16px - env(safe-area-inset-top))}
  .settings label{font-size:12px;gap:8px;margin:10px 0}
  .settings select,.settings input:not([type=checkbox]):not([type=range]){max-width:45%;min-width:88px}
}
@media (max-width:360px){
  .controls{padding-left:5px;padding-right:5px}
  .controlRow{grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:3px}
  .controlRow button,.controlRow .controlLink{font-size:13px;min-height:43px}
  .controlRow button::after,.controlRow .controlLink::after{font-size:8px}
  .meta{max-width:64vw;font-size:10px}
}
@media (orientation:landscape) and (max-height:520px){
  .controls{padding:5px 8px calc(6px + env(safe-area-inset-bottom));max-height:180px}
  .controlRow{grid-template-columns:repeat(auto-fit,minmax(38px,1fr));gap:3px;margin-top:4px}
  .controlRow button,.controlRow .controlLink{min-height:40px;padding:3px 1px;font-size:13px}
  .controlRow button::after,.controlRow .controlLink::after{font-size:8px;margin-top:1px}
  .searchPanel{max-height:42dvh}
  .songList{max-height:calc(34dvh - 48px);min-height:56px}
}

/* Remote controller usability pass */
.remoteApp{min-height:100dvh !important;height:auto !important;padding:clamp(12px,3vw,24px) !important;gap:14px !important;align-items:stretch !important;background:radial-gradient(ellipse at 50% 0,#17232a 0,#0b0b0b 52%) !important;overscroll-behavior-y:contain;padding-bottom:calc(20px + env(safe-area-inset-bottom)) !important}
.remoteApp .rMain,.remoteApp .rPanels{width:100%;min-width:0}
.remoteApp .rMain{max-width:520px;margin:0 auto;background:rgba(22,22,22,.94);border:1px solid #292929;border-radius:20px;padding:18px 16px;box-shadow:0 12px 32px rgba(0,0,0,.28)}
.remoteApp .rMain h2{font-size:20px;letter-spacing:.02em}
.remoteApp #rSong{display:flex;align-items:center;justify-content:center;min-height:52px;padding:10px 12px;border:1px solid rgba(79,195,247,.18);border-radius:12px;background:rgba(79,195,247,.07);text-align:center;line-height:1.45;overflow-wrap:anywhere}
.remoteApp #rProgress{height:28px;accent-color:#4fc3f7;touch-action:pan-x}
.remoteApp .rPlayRow{justify-content:center;gap:clamp(22px,8vw,42px) !important;margin:14px 0 !important}
.remoteApp .rPlayRow button{flex:none;box-shadow:0 5px 16px rgba(0,0,0,.25);touch-action:manipulation}
.remoteApp .rPlayRow #rPlay{width:76px !important;height:76px !important}

.remoteApp .rSeekRow,.remoteApp .rFontRow{justify-content:center;flex-wrap:wrap;gap:10px !important;margin:12px 0 !important}
.remoteApp .rSeekRow button,.remoteApp .rFontRow button{min-width:92px;min-height:44px;padding:10px 14px !important;border:1px solid #383838 !important;border-radius:12px !important;background:#262626 !important;font-size:14px !important;touch-action:manipulation}
.remoteApp .rFnGrid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px !important;margin:14px auto 0 !important}
.remoteApp .rFnGrid button{min-height:48px;padding:10px 8px !important;border:1px solid #333 !important;border-radius:12px !important;font-size:14px !important;font-weight:600;touch-action:manipulation}
.remoteApp .rFnGrid #rShowLucky{grid-column:span 2;background:linear-gradient(110deg,#f36b0a,#d94c20) !important}
.remoteApp #rStatus{position:sticky;bottom:calc(8px + env(safe-area-inset-bottom));z-index:4;width:fit-content;max-width:100%;align-self:center;margin:0 auto !important;padding:8px 14px;border:1px solid #303030;border-radius:999px;background:rgba(18,18,18,.94);text-align:center;backdrop-filter:blur(10px)}
.remoteApp .rPanels{max-width:520px;margin:0 auto}
.remoteApp #rSearchPanel,.remoteApp #rPlaylistPanel,.remoteApp #rSettingsPanel,.remoteApp #rLuckyPanel{max-width:none !important;margin:0 0 14px !important;border:1px solid #2a2a2a;border-radius:16px;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.2)}
.remoteApp #rSearchPanel,.remoteApp #rPlaylistPanel{padding:14px;background:#171717}
.remoteOnlineSearchRow{display:flex;align-items:center;gap:8px;width:100%}
.remoteApp #rSearch{min-height:48px;padding:12px 14px !important;border:1px solid #3a3a3a !important;border-radius:12px !important;font-size:16px !important}
.remoteApp .onlineSearchToggle{min-height:44px}
.remoteApp .onlineSearchToggle input{width:17px !important;height:17px !important;min-height:0 !important;padding:0 !important;border:0 !important;background:transparent !important}
.remoteApp #rSearchResults,.remoteApp #rPlaylistSongs{max-height:min(42dvh,360px) !important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.remoteApp #rSearchResults>div,.remoteApp #rPlaylistSongs>div{min-height:48px;padding:12px !important;border-bottom:1px solid #303030;line-height:1.4}
.remoteApp #rPlaySelected{min-height:48px;border-radius:12px !important;touch-action:manipulation}
.remoteApp #rSettingsPanel{padding:16px !important;background:#171717 !important}
.remoteApp #rSettingsPanel>div{min-height:48px;gap:14px}
.remoteApp #rSettingsPanel button{min-width:64px;min-height:40px}
.remoteApp #rLogoScale{max-width:52%;accent-color:#4fc3f7}
.remoteApp #rLuckyPanel>div{padding:14px !important;background:#171717 !important}
.remoteApp #rLuckyPanel button{min-height:46px;touch-action:manipulation}
.remoteApp #rLuckyPanel input:not([type="checkbox"]){min-height:44px;font-size:16px !important}
.remoteApp #rLuckyArtistGrid{grid-template-columns:repeat(auto-fit,minmax(76px,1fr)) !important;max-height:30dvh;overflow:auto;overscroll-behavior:contain}
.remoteApp #rLuckyArtistGrid button{min-height:74px}
.remoteApp #rLuckyArtistSongs,.remoteApp #luckySearchResults,.remoteApp #luckySelectedList{max-height:34dvh !important;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.remoteApp button{transition:transform .12s ease,filter .12s ease,background-color .12s ease}
.remoteApp button:active{transform:scale(.97);filter:brightness(1.15)}
.remoteApp button:focus-visible,.remoteApp input:focus-visible{outline:2px solid #4fc3f7;outline-offset:2px}
@media(min-width:900px){.remoteApp{min-height:100dvh !important;padding:24px !important;gap:24px !important}.remoteApp .rMain{position:sticky;top:18px;max-height:calc(100dvh - 36px);overflow-y:auto;overscroll-behavior:contain}.remoteApp .rPanels{padding-top:0}.remoteApp #rStatus{position:fixed;bottom:12px}}
@media(max-width:360px){.remoteApp{padding:10px 8px calc(16px + env(safe-area-inset-bottom)) !important}.remoteApp .rMain{padding:14px 12px;border-radius:16px}.remoteApp .rFnGrid{gap:6px !important}.remoteApp .rFnGrid button{font-size:13px !important}.remoteApp .rPlayRow{gap:18px !important}}
@media(orientation:landscape) and (max-height:520px){.remoteApp{padding:8px 12px calc(12px + env(safe-area-inset-bottom)) !important;gap:10px !important}.remoteApp .rMain{padding:10px 14px}.remoteApp .rMain h2{font-size:18px}.remoteApp #rSong{min-height:40px;padding:6px 10px}.remoteApp .rPlayRow{margin:8px 0 !important}.remoteApp .rPlayRow #rPlay{width:60px !important;height:60px !important}.remoteApp .rSeekRow,.remoteApp .rFontRow{margin:6px 0 !important}.remoteApp .rFnGrid{margin-top:8px !important}.remoteApp .rFnGrid button{min-height:42px}.remoteApp #rStatus{position:sticky}}.remoteApp #rFontSize{flex:1;min-width:72px;max-width:240px;height:30px;touch-action:pan-x}
.remoteApp #rEventLuckyPanel{max-width:none !important;margin:0 0 14px !important;box-shadow:0 8px 24px rgba(0,0,0,.24)}
.remoteApp #rEventRoom{min-height:46px}
.remoteApp #rEventMode,.remoteApp #rEventCount{min-height:44px}
.remoteApp #rEventStop{background:#69359a;touch-action:manipulation}
.remoteApp #rEventStart{background:linear-gradient(110deg,#f36b0a,#d94c20);touch-action:manipulation}
.lyricsViewport{touch-action:none;overscroll-behavior:contain}
/*现场观众抽奖主持台嵌入播放器页面*/
.eventLuckyHostPanel{position:fixed;inset:0;z-index:100500;display:flex;flex-direction:column;background:#090909;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.eventLuckyHostPanel.hidden{display:none}
.eventLuckyHostHeader{height:48px;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 14px;background:#111;border-bottom:1px solid #27232e;color:#eee;font-size:14px;font-weight:700}
.eventLuckyHostHeader button{min-height:36px;padding:6px 12px;border:1px solid #514064;border-radius:9px;background:#241b2e;color:#fff;font-size:13px}
#eventLuckyHostFrame{width:100%;height:calc(100% - 48px);flex:1;min-height:0;border:0;background:#0b0b0b}
.remoteApp #rEventEnter,.remoteApp #rEventExit{touch-action:manipulation}

.remoteApp .rFnGrid button[aria-expanded="true"]{outline:2px solid #ffc18c;outline-offset:-2px}
.remoteApp #rEventLuckyPanel :disabled{opacity:.45}
.remoteApp #rEventStop[hidden]{display:none}
.remotePairPanel{max-height:calc(100dvh - 24px);overflow:auto}

.moreMenu{position:fixed;inset:auto 14px calc(22px + env(safe-area-inset-bottom)) auto;width:min(320px,calc(100vw - 28px));max-height:80dvh;overflow:auto;padding:12px;border:1px solid #49413b;border-radius:18px;background:#171513;color:#fff;box-shadow:0 16px 70px #0009}
.moreMenu::backdrop{background:#0007;backdrop-filter:blur(3px)}
.moreMenu button{display:block;width:100%;min-height:46px!important;margin:4px 0!important;padding:10px 14px!important;text-align:left;border:1px solid #333!important;border-radius:10px!important;background:#24211f!important;color:#eee!important;font-size:14px!important}
.moreMenu button[data-label]::after{content:attr(data-label);margin-left:12px}
.moreMenu button:first-child{color:#a69b91!important;background:transparent!important;border:0!important;text-align:right}
.settings{z-index:220}
body.controlsLocked .controls{pointer-events:none}

.remoteApp .rLyrics{position:relative;display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:150px;margin:10px 0 4px;padding:16px 12px 24px;border:1px solid #342e28;border-radius:14px;background:radial-gradient(ellipse at top,#30251b,#141313 75%);text-align:center;transition:opacity .2s}
.remoteApp .rLyrics p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.35}
.remoteApp .rLyricCurrent{font-size:clamp(20px,5.4vw,28px);font-weight:700;color:#fff;text-shadow:0 0 20px #f36b0a30}
.remoteApp .rLyricNear{min-height:1.35em;font-size:13px;color:#887f77}
.remoteApp .rLyricStatus{position:absolute;bottom:6px;right:12px;font-size:10px;color:#938578}
.remoteApp .rLyrics.disconnected{opacity:.5}
@media(orientation:landscape) and (max-height:520px){.remoteApp .rLyrics{min-height:110px;padding-top:8px;gap:4px}.remoteApp .rLyricCurrent{font-size:22px}}

/* Viewport-driven lyric stages */
main{height:var(--app-height,100dvh);max-height:var(--app-height,100dvh)}
.lyricsViewport{height:auto;flex:1;min-height:0;width:100%}
.remoteApp .rLyrics{height:210px;min-height:0;padding:0;margin:10px 0;gap:0;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#24211e,#101010 80%);border-color:#34302b}
.remoteApp .rLyricToolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex:none;padding:8px 12px;color:#a49c93;font-size:11px}
#rLyricTitle{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.remoteApp #rLyricFull{min-height:32px;padding:5px 9px;border:1px solid #45403a;border-radius:8px;background:#ffffff06;color:#c9bfb4;white-space:nowrap;font-size:11px;touch-action:manipulation}
.remoteApp .rLyricViewport{position:relative;flex:1;min-height:0;overflow:hidden;mask-image:linear-gradient(transparent,#000 16%,#000 84%,transparent)}
.remoteApp .rLyricTrack{position:absolute;inset:0 0 auto;will-change:transform}
.remoteApp .rLyrics p{padding:9px 12px;margin:0;line-height:1.25}
.remoteApp .rLyricCurrent{font-size:clamp(22px,5.8vw,32px);font-weight:650;text-shadow:0 0 28px #f36b0a35}
.remoteApp .rLyricNear{font-size:16px;color:#8a8178;opacity:.55}
.remoteApp .rLyricStatus{position:static;display:block;flex:none;height:20px;text-align:right;padding-right:12px}
body.remoteLyricsFullscreen{overflow:hidden!important}
.remoteApp .rLyrics.is-fullscreen,.remoteApp .rLyrics:fullscreen{position:fixed;inset:0;z-index:200000;width:100%;max-width:none;height:100dvh;min-height:0;margin:0;border:0;border-radius:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:radial-gradient(ellipse at 50% 40%,#24211e,#090909 80%)}
.remoteApp .rLyrics.is-fullscreen .rLyricToolbar{padding:12px 16px;font-size:13px}
.remoteApp .rLyrics.is-fullscreen .rLyricCurrent{font-size:clamp(32px,7vw,100px);padding:18px 4vw}
.remoteApp .rLyrics.is-fullscreen .rLyricNear{font-size:clamp(20px,4vw,55px);padding:14px 4vw}
@media(orientation:landscape) and (max-height:520px){.remoteApp .rLyrics{height:170px}.remoteApp .rLyrics.is-fullscreen{height:100dvh}}

.lyricLine,.remoteApp .rLyrics p{font-family:var(--lyric-font-family,system-ui,sans-serif)}
.fontStatus{font-size:11px;color:#a99b90;margin:5px 0}
.settings #lyricFontImport{max-width:65%;min-width:0;font-size:11px}
.remoteApp [data-cmd="seek-back"],.remoteApp [data-cmd="seek-forward"]{flex:1;min-height:54px!important;padding:13px 10px!important;font-size:16px!important;border:1px solid #514135!important;border-radius:13px!important;background:#29221c!important}
.rSeekFeedback{position:absolute;z-index:5;inset:42% 0 auto;text-align:center;pointer-events:none;color:#ffb370;font-size:24px;font-weight:750;opacity:0}
.rSeekFeedback.show{animation:remoteSeekPulse .7s ease forwards}
@keyframes remoteSeekPulse{0%{opacity:0;transform:scale(.7)}20%{opacity:1;transform:scale(1.08)}100%{opacity:0;transform:translateY(-18px) scale(1)}}
.sunsetMEffects{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:0;border-radius:inherit;opacity:0;transition:opacity .8s linear}
.sunsetMEffects img{position:absolute;top:-130px;left:var(--x);width:var(--size);height:auto;opacity:.45;animation:sunsetFall var(--duration) linear var(--delay) infinite;will-change:transform}
.sunsetMEffects.paused img{animation-play-state:paused}
@keyframes sunsetFall{from{transform:translateY(-140px) rotate(0deg)}to{transform:translateY(calc(var(--effect-height,100dvh) + 280px)) rotate(var(--spin))}}
.lyricsTrack,.rLyricTrack{z-index:1}
@media(prefers-reduced-motion:reduce){.sunsetMEffects{display:none}.rSeekFeedback.show{animation:none;opacity:1}}

.remoteApp #rSeekBack,.remoteApp #rSeekForward{min-height:56px!important;padding:14px 12px!important;font-size:16px!important;border-radius:13px!important;background:#29221c!important;border:1px solid #514135!important}
.remoteApp .rDevicePanelHost{width:100%;margin:10px 0}
.rDevices{width:100%;border:1px solid #3c332b;border-radius:12px;background:#171513;text-align:left;font-size:13px}
.rDevices summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:10px 12px;cursor:pointer;list-style:none;color:#d7c9bb}
.rDevices summary::-webkit-details-marker{display:none}
.rDevices summary::after{content:'＋';color:#a89989;font-size:16px}
.rDevices[open] summary::after{content:'−'}
.rDevicesSummary{margin-left:auto;color:#a69888;font-size:11px;font-variant-numeric:tabular-nums}
.rDevicesBody{padding:0 10px 10px}
.rDevicesHelp{color:#978a7e;font-size:11px;line-height:1.65;margin:4px 2px 10px}
.rDeviceAdd{display:flex;align-items:flex-end;gap:8px;margin:12px 0 8px}
.rDeviceCodeLabel{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;color:#b7a89a;font-size:11px}
.rDeviceAdd input{box-sizing:border-box;width:100%;min-width:0;min-height:42px;border:1px solid #4a3d32;border-radius:9px;background:#0e0d0c;color:#eee;padding:9px 10px;font-size:16px;text-transform:uppercase}
.rDeviceAdd button{min-height:42px;border:1px solid #78512f;border-radius:9px;background:#51351f;color:#f6ddc5;padding:8px 12px;font-size:12px;white-space:nowrap}
.rDeviceTools{display:flex;gap:14px;margin:10px 2px}
.rDeviceTools button{border:0;background:none;color:#be9875;font-size:12px;min-height:30px;padding:2px}
.rDeviceList{display:grid;gap:7px}
.rDeviceRow{display:flex;align-items:center;gap:8px;padding:9px 7px;border:1px solid #332d27;border-radius:10px;background:#1d1916;min-width:0}
.rDeviceRow.is-primary{border-color:#705034;background:#241d17}
.rDeviceRow>input[type=checkbox]{flex:none;width:18px;height:18px;accent-color:#d69050}
.rDeviceInfo{flex:1;min-width:0;display:grid;gap:3px}
.rDeviceName{width:100%;min-width:0;box-sizing:border-box;border:0;background:transparent;color:#ead7c4;padding:4px 0;font-size:14px}
.rDeviceName::placeholder{color:#c2ad99;opacity:1}
.rDeviceState{font-size:10px;color:#9c8b7c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums}
.rDeviceState.is-online{color:#94af8d}
.rDevicePreview{flex:none;min-height:36px;padding:4px 8px;border:1px solid #504032;border-radius:8px;background:#30251c;color:#ccb296;font-size:11px}
.rDevicePreview[aria-pressed=true]{color:#ffd2a3;border-color:#855d37}
.rDeviceRemove{flex:none;width:30px;min-height:36px;border:0;border-radius:8px;background:transparent;color:#9c8570;font-size:20px}
.rDeviceRemove:disabled{opacity:.25}
.rDeviceNotice{margin:8px 2px 0;color:#e5bd8d;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.rDeviceNotice:empty{display:none}
.remoteApp .rFontRow{display:grid!important;grid-template-columns:40px auto minmax(0,1fr) 40px;gap:7px!important;align-items:center}
.remoteApp .rFontRow button{min-width:40px!important;padding:8px 4px!important}
.remoteApp .rFontRow>span{white-space:nowrap;font-size:12px!important}
.remoteApp .rFontRow #rFontSize{width:100%!important;min-width:0;max-width:none}
.remoteApp .rDeviceScan{display:block;width:100%;min-height:46px;margin:10px 0 8px;padding:10px 14px;border:1px solid #8b5d32;border-radius:10px;background:#51351f;color:#ffe0bf;font:inherit;font-size:14px;font-weight:650;touch-action:manipulation}
.rDeviceManual{border:1px solid #3b3027;border-radius:9px;margin:10px 0;padding:0 9px}
.rDeviceManual summary{display:list-item;min-height:40px;padding:10px 2px;color:#b09b87;font-size:12px;list-style:disclosure-closed}
.rDeviceManual summary::after{display:none}
.rDeviceManual[open] summary{list-style:disclosure-open}
.rDeviceManual .rDeviceAdd{margin-top:0}

/* Optional TaskbarLyrics connector lives only inside settings. */
.taskbarSync{margin:14px 0;padding:12px;border:1px solid #494035;border-radius:12px;background:#ffffff03;font-size:12px;line-height:1.6}
.taskbarSync summary{cursor:pointer;color:#e0ba91;list-style-position:inside;font-weight:600}
.taskbarSync label{font-size:12px!important;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0!important}
.taskbarSync label[for]{display:block}
.taskbarSync .syncSwitch{min-height:36px}
.taskbarSync .syncSwitch input{width:18px;height:18px;accent-color:#ef8b40}
.taskbarSync p{margin:8px 0;overflow-wrap:anywhere}
.taskbarSync .syncHint{color:#a79a8d;font-size:11px}
.taskbarSync a{color:#e0ba91;font-size:12px}
.taskbarSync select,.taskbarSync input[readonly]{width:100%;min-width:0;background:#25211e;color:#eee;border:1px solid #4d4237;border-radius:8px;padding:7px;font-size:12px}
.taskbarSync input[readonly]{font-family:ui-monospace,monospace;font-size:11px}
.taskbarSync .syncRow{display:flex;gap:7px;margin:8px 0;align-items:stretch}
.settings .taskbarSync button{width:auto;flex:1;min-width:0;min-height:34px;margin:0;padding:6px 9px;border:1px solid #514336;background:#30271f;color:#dfc7af;font-size:11px;line-height:1.4;border-radius:8px}
.taskbarSync .syncRow input{flex:3;width:0}
.taskbarSync .syncRow button{flex:1}
.taskbarSync .syncOffset{display:flex;align-items:center;gap:7px}
.taskbarSync output{white-space:nowrap;font-variant-numeric:tabular-nums}
.taskbarSync .syncDiagnostics{margin:10px 0;font-size:11px}
.taskbarSync pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px;color:#998a7a;max-height:180px;overflow:auto}
.taskbarSync #kgSyncCandidates{display:grid;gap:6px}
.taskbarSync #kgSyncOff{width:100%;background:transparent;color:#aaa}
.taskbarSync button:disabled{opacity:.4;cursor:default}
.taskbarSync [hidden]{display:none!important}

.settings .taskbarSync select,.settings .taskbarSync input[readonly]{max-width:none;font-size:12px}
