/* ===== 全民K歌风格主题 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg1: #1a0b2e;
  --bg2: #2d1b69;
  --accent: #ff4fd8;
  --accent2: #7c4dff;
  --cyan: #37e6ff;
  --text: #f0e9ff;
  --text-dim: #b8a8e0;
  --card: rgba(40, 22, 80, 0.55);
  --radius: 16px;
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: radial-gradient(1200px 800px at 20% -10%, var(--bg2), transparent 60%),
              radial-gradient(1000px 700px at 110% 30%, #3a1060, transparent 55%),
              linear-gradient(160deg, var(--bg1), #12082a 60%, #0b0620);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
}

#app-desktop { display: flex; height: 100vh; }

/* ===== 左栏 ===== */
#sidebar {
  width: 300px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  background: rgba(15, 6, 40, 0.7);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 18px 20px; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; box-shadow: 0 0 18px rgba(255, 79, 216, 0.5);
}
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.search-box { padding: 0 16px 12px; }
.search-box input {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.07);
  color: var(--text); font-size: 13px; outline: none;
}
.search-box input:focus { border-color: var(--accent); }

.song-list { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.song-list::-webkit-scrollbar { width: 6px; }
.song-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.song-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; margin-bottom: 6px; border-radius: 12px;
  background: rgba(255,255,255,0.04); cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
}
.song-item:hover { background: rgba(255,255,255,0.09); }
.song-item.active {
  background: linear-gradient(90deg, rgba(255,79,216,0.22), rgba(124,77,255,0.18));
  border-color: rgba(255,79,216,0.5);
}
.song-title { font-size: 14px; font-weight: 600; }
.song-artist { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.song-badges { display: flex; gap: 4px; }
.match-tag { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.4; }
.match-tag.t-title { color: var(--cyan); }
.match-tag.t-artist { color: #ffb347; }
.match-tag.t-lyrics { color: #ff9de2; }
.match-tag mark, .song-title mark, .song-artist mark {
  background: rgba(255,79,216,0.28); color: #fff; border-radius: 3px; padding: 0 2px;
}
.search-empty { padding: 24px 16px; text-align: center; color: var(--text-dim); font-size: 13px; }
.badge {
  font-size: 10px; padding: 2px 6px; border-radius: 6px;
  background: rgba(55,230,255,0.15); color: var(--cyan);
}
.sidebar-footer {
  padding: 12px; text-align: center; font-size: 11px; color: rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ===== 主区 ===== */
#main { flex: 1; display: flex; flex-direction: column; padding: 20px 28px; min-width: 0; }

#topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* 进度定位条 */
#seekRow { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
#seekRow input[type="range"] { flex: 1; -webkit-appearance: none; appearance: none; height: 6px;
  border-radius: 3px; background: rgba(255,255,255,0.15); outline: none; }
#seekRow input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--accent)); cursor: pointer;
  box-shadow: 0 0 10px rgba(55,230,255,0.5);
}
.time-tag { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; }

.panel-actions { display: flex; gap: 8px; align-items: center; }
.btn.small { padding: 6px 14px; font-size: 12px; border-radius: 16px; box-shadow: none; }
#btnSmartMix { background: linear-gradient(135deg, var(--cyan), var(--accent2)); }
.np-title { font-size: 22px; font-weight: 800; text-shadow: 0 0 20px rgba(255,79,216,0.35); }
.np-artist { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.controls { display: flex; gap: 10px; }
.btn {
  padding: 10px 22px; border: none; border-radius: 30px; cursor: pointer;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  box-shadow: 0 4px 18px rgba(124,77,255,0.35); transition: all .15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.accent { background: linear-gradient(135deg, var(--accent), #ff8a3d); box-shadow: 0 4px 18px rgba(255,79,216,0.4); }
.btn.big { padding: 12px 26px; font-size: 15px; }
.controls .btn.active {
  background: linear-gradient(135deg, var(--cyan), var(--accent2));
  box-shadow: 0 4px 18px rgba(55, 230, 255, 0.35);
}
.btn.singing { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,79,216,0.6);} 50% { box-shadow: 0 0 0 12px rgba(255,79,216,0);} }

/* 歌词舞台 */
#stage {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  position: relative; min-height: 260px;
  background:
    radial-gradient(600px 300px at 50% 40%, rgba(124,77,255,0.12), transparent 70%);
  border-radius: var(--radius); margin: 18px 0 12px;
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}
.lyrics-hint { position: absolute; top: 14px; font-size: 12px; color: rgba(255,255,255,0.35); }
.lyrics-box {
  transition: transform 0.4s ease;
  text-align: center; font-size: 26px; font-weight: 700; line-height: 1.35;
  text-shadow: 0 2px 20px rgba(255,79,216,0.25);
}
.lyric-empty { color: rgba(255,255,255,0.25); font-size: 16px; font-weight: 400; }
.lyric-line { color: rgba(255,255,255,0.28); padding: 2px 0; transition: all .2s; }
.lyric-line.past { color: rgba(255,255,255,0.12); font-size: 0.82em; }
.lyric-line.current { color: #fff; font-size: 1.06em; }
.lyric-smooth {
  background: linear-gradient(90deg, var(--accent) 0%, #fff var(--p), rgba(255,255,255,0.28) var(--p) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .lyric-smooth { color: var(--accent); background: none; }
}

/* 评分 */
#scorePanel {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); padding: 12px 20px; margin-bottom: 12px;
  backdrop-filter: blur(8px);
}
.score-num {
  font-size: 40px; font-weight: 900; min-width: 110px; text-align: center;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.score-num.live { animation: glow 1s infinite alternate; }
@keyframes glow { from { filter: drop-shadow(0 0 4px rgba(55,230,255,0.4)); } to { filter: drop-shadow(0 0 14px rgba(255,79,216,0.8)); } }
.score-meta { flex: 1; }
.score-detail { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.score-bar-bg { height: 10px; border-radius: 5px; background: rgba(255,255,255,0.1); overflow: hidden; }
.score-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  border-radius: 5px; transition: width .3s;
}

/* 音符跑道 */
#runway {
  height: 190px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 6px 8px;
  backdrop-filter: blur(8px);
}
#scoreCanvas { width: 100%; height: 100%; display: block; }

.pb-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.btn.mini { padding: 4px 12px; font-size: 12px; border-radius: 14px; box-shadow: none;
  background: rgba(255,255,255,0.08); color: var(--text-dim); border: 1px solid rgba(255,255,255,0.12); }
.btn.mini.active { background: rgba(55,230,255,0.18); color: var(--cyan); border-color: var(--cyan); }
.btn.share { background: linear-gradient(135deg, #ffb347, var(--accent)); }
#btnSmartMix.applied {
  background: linear-gradient(135deg, #2ecc71, var(--cyan));
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.6);
}

/* 分享成绩模态框 */
.modal { position: fixed; inset: 0; background: rgba(10,5,25,0.8); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: var(--card); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px;
  padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.modal-box canvas { display: block; border-radius: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

/* 调音面板 */
#tuningPanel {
  background: var(--card); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); padding: 16px 20px;
  backdrop-filter: blur(8px);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-head select {
  padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15); color: var(--text); font-size: 13px;
}
.knobs { display: flex; gap: 22px; flex-wrap: wrap; }
.knob { flex: 1; min-width: 110px; max-width: 150px; }
.knob label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.knob input[type="range"] {
  width: 100%; -webkit-appearance: none; appearance: none; height: 5px;
  border-radius: 3px; background: rgba(255,255,255,0.15); outline: none;
}
.knob input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--accent)); cursor: pointer;
}
.knob span { display: block; text-align: center; font-size: 12px; color: var(--cyan); margin-top: 4px; font-variant-numeric: tabular-nums; }
.knob.toggle { display: flex; align-items: flex-end; }
.btn.toggle {
  width: 100%; background: rgba(255,255,255,0.08); color: var(--text-dim);
  box-shadow: none; border: 1px solid rgba(255,255,255,0.12);
}
.btn.toggle.active { background: rgba(55,230,255,0.18); color: var(--cyan); border-color: var(--cyan); }

/* 授权面板 */
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.auth-card {
  background: #1c2130; border: 1px solid rgba(55,230,255,0.3);
  border-radius: 14px; padding: 32px 36px; width: 360px;
  text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.auth-card h2 { color: var(--cyan); margin: 0 0 10px; font-size: 20px; }
.auth-card p { color: var(--text-dim); font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
.auth-card input {
  width: 100%; box-sizing: border-box; padding: 10px 14px;
  background: rgba(255,255,255,0.06); color: var(--text);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  font-size: 14px; outline: none; margin-bottom: 12px;
}
.auth-card input:focus { border-color: var(--cyan); }
.auth-card button {
  width: 100%; padding: 11px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.auth-hint { color: #ff6b6b; font-size: 12px; margin-top: 10px; min-height: 16px; }

/* 授权面板: 双登录切换 */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tab { flex: 1; padding: 8px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: var(--text-dim); border-radius: 8px; cursor: pointer; font-size: 13px; }
.auth-tab.on { background: rgba(55,230,255,0.15); color: var(--cyan); border-color: var(--cyan); }
.auth-fields input { margin-bottom: 10px; }

/* ===== 三视图导航: 全部 / 歌手 / 搜索 ===== */
.side-nav { display: flex; gap: 6px; padding: 0 14px 12px; }
.nav-btn {
  flex: 1; padding: 9px 4px; border: 1px solid transparent; border-radius: 11px;
  background: rgba(255,255,255,0.05); color: var(--text-dim); font-size: 12.5px;
  cursor: pointer; transition: all .15s;
}
.nav-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(255,79,216,0.25), rgba(124,77,255,0.25));
  border-color: rgba(255,79,216,0.4); color: #fff; font-weight: 600;
  box-shadow: 0 2px 12px rgba(255,79,216,0.15);
}
.side-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 14px 8px; padding: 7px 12px; border-radius: 10px;
  background: rgba(255,79,216,0.12); border: 1px solid rgba(255,79,216,0.3);
  font-size: 12.5px; color: var(--text);
}
.filter-bar b { color: #fff; }
.filter-bar button { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.filter-bar button:hover { color: #fff; }
.artist-list { flex: 1; overflow-y: auto; padding: 4px 10px 10px; scrollbar-width: thin; }
.artist-list::-webkit-scrollbar { width: 6px; }
.artist-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.artist-index {
  position: sticky; top: 0; z-index: 2; display: flex; gap: 4px;
  padding: 6px 2px; background: rgba(15,6,40,0.85); backdrop-filter: blur(6px);
  border-radius: 10px; margin-bottom: 6px;
}
.artist-index span {
  flex: 1; text-align: center; font-size: 11px; padding: 4px 0; border-radius: 6px;
  color: var(--text-dim); cursor: pointer; transition: all .12s;
}
.artist-index span:hover { background: rgba(255,79,216,0.2); color: #fff; }
.artist-sec { margin-bottom: 6px; }
.artist-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 12px; cursor: pointer; transition: background .15s, transform .1s;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05);
}
.artist-head:hover { background: rgba(255,255,255,0.09); }
.artist-head:active { transform: scale(0.98); }
.artist-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 16px;
}
.artist-meta { flex: 1; min-width: 0; }
.artist-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-count { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.artist-arrow { color: var(--text-dim); font-size: 18px; }
.search-empty { text-align: center; color: var(--text-dim); padding: 30px 10px; font-size: 13px; }

/* ===== KTV 点歌台风格: 竖排分类 + 大列表 ===== */
#sidebar { width: 380px; min-width: 380px; }
.side-nav { flex-direction: column; padding: 0 14px 10px; gap: 6px; }
.nav-btn { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 13.5px; }
.nav-ico { font-size: 16px; width: 20px; text-align: center; }
.nav-btn.active .nav-ico { filter: drop-shadow(0 0 6px var(--accent)); }
.song-list { padding: 2px 10px 10px; }
.song-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; margin-bottom: 4px;
  border-radius: 14px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer; transition: all .15s;
}
.song-item:hover { background: rgba(255,255,255,0.09); transform: translateX(2px); }
.song-item.active {
  background: linear-gradient(135deg, rgba(255,79,216,0.2), rgba(124,77,255,0.2));
  border-color: rgba(255,79,216,0.45);
}
.song-info { flex: 1; min-width: 0; }
.song-title { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist { font-size: 12px; color: var(--text-dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-badges { display: flex; gap: 4px; }
.song-play {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.08); color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all .15s;
}
.song-item:hover .song-play { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 0 14px rgba(255,79,216,0.4); }
.artist-head { padding: 13px 12px; }
.artist-avatar { width: 46px; height: 46px; font-size: 18px; }
.artist-name { font-size: 15px; }
.artist-count { font-size: 12px; }
.search-box { padding: 0 14px 12px; }
.search-box input { padding: 12px 16px; border-radius: 13px; font-size: 13.5px; }

/* ===== 手机端响应式(<=860px) ===== */
.menu-btn {
  display: none; position: fixed; top: 10px; left: 10px; z-index: 300;
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(20, 10, 50, 0.9); color: #fff; font-size: 20px; cursor: pointer;
  backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.sidebar-mask { display: none; }
@media (max-width: 860px) {
  body { overflow: auto; }
  #app { display: block; height: auto; }
  #main { padding: 14px 12px 90px; }
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 82vw; max-width: 340px;
    z-index: 250; transform: translateX(-105%); transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
  }
  #sidebar.open { transform: translateX(0); }
  .menu-btn { display: block; }
  .sidebar-mask.show {
    display: block; position: fixed; inset: 0; z-index: 240;
    background: rgba(0,0,0,0.55);
  }
  /* 顶栏: 给汉堡按钮留空间 */
  #topbar { padding-left: 58px; flex-wrap: wrap; gap: 6px; }
  #topbar .spacer { display: none; }
  /* 歌曲列表/歌手列表触屏友好 */
  .song-item { padding: 15px 14px; }
  .song-play { width: 40px; height: 40px; font-size: 15px; }
  /* 歌词/评分/调音区自适应 */
  #lyricsBox { font-size: 17px; }
  .player-row, .tune-row { flex-wrap: wrap; gap: 8px; }
  input[type="range"] { min-width: 80px; }
  /* 授权面板 */
  .auth-card { width: 88vw; margin: 10vh auto; }
}

/* ==================================================================
   移动端全新 UI(<=860px): 独立布局, 非桌面适配
   ================================================================== */
html.is-desktop #app-mobile,
html.is-mobile #app-desktop { display: none !important; }

html.is-mobile body { overflow: hidden; }
#app-mobile {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  position: relative; overflow: hidden;
}
.m-page { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---- 顶部条 ---- */
.m-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 2px; flex-shrink: 0;
}
.m-icon-btn {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  color: var(--text); font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-icon-btn:active { background: rgba(255,255,255,0.16); }
.m-np { flex: 1; min-width: 0; text-align: center; }
.m-np-title {
  font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 0 16px rgba(255,79,216,0.35);
}
.m-np-artist { font-size: 12px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 歌词舞台 ---- */
.m-stage {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  justify-content: center; align-items: center; position: relative;
  margin: 8px 10px 2px; border-radius: var(--radius);
  background: radial-gradient(600px 300px at 50% 40%, rgba(124,77,255,0.14), transparent 70%);
  border: 1px solid rgba(255,255,255,0.05); overflow: hidden;
}
.m-stage .lyrics-box { font-size: 19px; line-height: 1.4; padding: 0 12px; max-width: 100%; }

/* ---- 进度条 ---- */
.m-seek { display: flex; align-items: center; gap: 8px; padding: 4px 12px; flex-shrink: 0; }
.m-seek input[type="range"] {
  flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; height: 7px;
  border-radius: 4px; background: rgba(255,255,255,0.15); outline: none;
}
.m-seek input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--accent)); cursor: pointer;
  box-shadow: 0 0 10px rgba(55,230,255,0.5);
}

/* ---- 评分(紧凑) ---- */
.m-score {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  margin: 6px 10px 0; padding: 8px 12px;
  background: var(--card); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); backdrop-filter: blur(8px);
}
.m-score .score-num { font-size: 26px; min-width: 58px; }
.m-score .score-detail { margin-bottom: 5px; font-size: 11px; }
.m-score .pb-row { margin-top: 6px; gap: 6px; }
.m-score .btn.mini { padding: 4px 10px; }

/* ---- 跑道 ---- */
.m-runway { height: 108px; flex-shrink: 0; margin: 6px 10px 0; padding: 4px 6px; }

/* ---- 主控制按钮 ---- */
.m-controls { display: flex; gap: 10px; padding: 10px 12px 4px; flex-shrink: 0; }
.m-btn {
  flex: 1; padding: 14px 0; border: none; border-radius: 30px; cursor: pointer;
  font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  box-shadow: 0 4px 18px rgba(124,77,255,0.35);
  -webkit-tap-highlight-color: transparent;
}
.m-btn:active { transform: scale(0.97); filter: brightness(1.08); }
.m-btn:disabled { opacity: 0.4; }
.m-btn-main { flex: 1.45; font-size: 17px; }
.m-btn-mini { flex: 0.7; font-size: 14px; background: rgba(255,255,255,0.1); box-shadow: none; }
.m-btn-accent { background: linear-gradient(135deg, var(--accent), #ff8a3d); box-shadow: 0 4px 18px rgba(255,79,216,0.4); }
.m-btn.active { background: linear-gradient(135deg, var(--cyan), var(--accent2)); }
.m-btn.singing { animation: pulse 1.2s infinite; }

/* ---- 底部导航(常驻) ---- */
#mBottomNav {
  display: flex; flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,6,40,0.94); backdrop-filter: blur(10px);
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
}
.m-nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 0 6px; border: none; background: none;
  color: var(--text-dim); font-size: 11px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-nav-btn span { font-size: 20px; line-height: 1; }
.m-nav-btn.active { color: var(--accent); }
.m-nav-btn.active span { filter: drop-shadow(0 0 6px var(--accent)); }

/* ---- 列表页 ---- */
.m-list-head { padding: 10px 12px 6px; flex-shrink: 0; }
.m-search input {
  width: 100%; padding: 12px 16px; border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.07);
  color: var(--text); font-size: 14px; outline: none;
}
.m-search input:focus { border-color: var(--accent); }
.m-tabs { display: flex; gap: 6px; padding: 2px 12px 8px; flex-shrink: 0; }
.m-tabs .nav-btn { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 11.5px; }
.m-tabs .nav-ico { font-size: 16px; }
.m-list-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.m-list-body .side-view { flex: 1; min-height: 0; }
.m-list-body .song-list, .m-list-body .artist-list { padding-bottom: 12px; }
.m-list-body .song-item { padding: 15px 14px; }
.m-list-body .song-play { width: 40px; height: 40px; font-size: 15px; }

/* ---- 调音抽屉 ---- */
.m-sheet { position: fixed; inset: 0; z-index: 500; }
.m-sheet-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.m-sheet-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 76vh; overflow-y: auto;
  background: #1a0f38; border-radius: 18px 18px 0 0;
  padding: 8px 14px calc(24px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.m-sheet-grip {
  width: 42px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.22); margin: 6px auto 10px;
}
.m-sheet-body .knobs { gap: 14px; }
.m-sheet-body .knob { min-width: 100px; max-width: 136px; }
.m-sheet-body .panel-head { flex-wrap: wrap; gap: 8px; }
.m-sheet-body .panel-actions { flex-wrap: wrap; }

/* ---- 分享卡片 / 授权面板 手机缩放 ---- */
.modal-box canvas { max-width: 82vw; height: auto; }
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
}
