/* =========================================================
   kk音乐 · 玻璃拟态 + 安卓移动端
   加载顺序在 app.css 之后，用覆盖的方式改造外观
   ========================================================= */

/* ---------- 深色玻璃主题 ---------- */
html[data-theme='dark'] {
  --red: #ff4d67;
  --red-strong: #e63955;
  --red-soft: rgba(255, 77, 103, 0.14);
  --bg: #08080d;
  --bg-soft: #0d0d14;
  --sidebar: rgba(16, 16, 24, 0.55);
  --elev: rgba(28, 28, 40, 0.62);
  --text: #f6f6fa;
  --text-2: #a9a9b9;
  --text-3: #6f6f81;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --hover: rgba(255, 255, 255, 0.07);
  --glass: rgba(22, 22, 34, 0.55);
  --glass-strong: rgba(14, 14, 22, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 40px 90px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

html[data-theme='light'] {
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(0, 0, 0, 0.08);
}

body {
  background: var(--bg);
  overflow: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -10%, rgba(122, 82, 255, 0.28), transparent 62%),
    radial-gradient(760px 520px at 92% 12%, rgba(0, 190, 210, 0.18), transparent 62%),
    radial-gradient(700px 600px at 50% 108%, rgba(255, 60, 110, 0.16), transparent 62%),
    var(--bg);
}
html[data-theme='light'] body::before {
  background:
    radial-gradient(900px 620px at 12% -10%, rgba(150, 120, 255, 0.22), transparent 62%),
    radial-gradient(760px 520px at 92% 12%, rgba(90, 200, 220, 0.18), transparent 62%),
    radial-gradient(700px 600px at 50% 108%, rgba(255, 120, 150, 0.18), transparent 62%),
    var(--bg);
}

.ambient {
  position: fixed;
  inset: -18%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(90px) saturate(1.5) brightness(0.42);
  opacity: 0.55;
  transform: scale(1.05);
  transition: opacity 0.6s ease, background-image 0.6s ease;
  pointer-events: none;
}
html[data-theme='light'] .ambient {
  filter: blur(90px) saturate(1.2) brightness(0.95);
  opacity: 0.22;
}

.app,
.main-wrap,
.view {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* ---------- 玻璃表面 ---------- */
.sidebar {
  background: linear-gradient(180deg, rgba(20, 20, 30, 0.58), rgba(10, 10, 16, 0.66));
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border-right: 1px solid var(--glass-border);
}
html[data-theme='light'] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(248, 248, 252, 0.72));
}

.topbar {
  background: linear-gradient(180deg, rgba(8, 8, 13, 0.55), rgba(8, 8, 13, 0));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html[data-theme='light'] .topbar {
  background: linear-gradient(180deg, rgba(245, 245, 248, 0.6), rgba(245, 245, 248, 0));
}

.search-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}
html[data-theme='light'] .search-box {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.07);
}
.search-box:focus-within {
  background: rgba(255, 255, 255, 0.12);
}

.playerbar {
  background: rgba(16, 16, 24, 0.72);
  backdrop-filter: blur(34px) saturate(1.5);
  -webkit-backdrop-filter: blur(34px) saturate(1.5);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.45);
}
html[data-theme='light'] .playerbar {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 -20px 50px rgba(30, 30, 50, 0.12);
}

.queue-panel {
  background: rgba(14, 14, 22, 0.88);
  backdrop-filter: blur(36px) saturate(1.4);
  border-left: 1px solid var(--glass-border);
}
html[data-theme='light'] .queue-panel {
  background: rgba(255, 255, 255, 0.9);
}

.chart-card,
.me-settings,
.me-hero,
.search-links,
.search-block {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--glass-border);
}

.song-head {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  margin-bottom: 6px;
}
html[data-theme='light'] .song-head {
  background: rgba(255, 255, 255, 0.55);
}

.card-cover {
  border-radius: 20px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
}
.card:hover .card-cover {
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
}
.card-title {
  font-size: 13px;
  color: var(--text);
}

.hero-cover {
  border-radius: 22px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}
.hero-cover-ring {
  border-radius: 26px;
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-item.active {
  background: rgba(255, 77, 103, 0.16);
  color: #ff7189;
  box-shadow: inset 0 0 0 1px rgba(255, 77, 103, 0.18);
}

.modal {
  background: rgba(22, 22, 32, 0.92);
  backdrop-filter: blur(30px);
  border-color: var(--glass-border);
  border-radius: 22px;
}
html[data-theme='light'] .modal {
  background: rgba(255, 255, 255, 0.92);
}
.context-menu {
  background: rgba(24, 24, 34, 0.92);
  backdrop-filter: blur(26px);
  border-color: var(--glass-border);
  border-radius: 14px;
}
html[data-theme='light'] .context-menu {
  background: rgba(255, 255, 255, 0.94);
}

.btn-primary {
  background: linear-gradient(135deg, #ff5f78, #e33250);
  box-shadow: 0 10px 26px rgba(255, 77, 103, 0.32);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}
html[data-theme='light'] .btn-ghost {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
}

/* ---------- 侧栏账号卡 ---------- */
.side-account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}
.side-account:hover { background: rgba(255, 255, 255, 0.08); }
.side-account .avatar { width: 26px; height: 26px; font-size: 12px; flex: none; }
.side-account-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-logout {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-3);
  flex: none;
}
.side-logout:hover { color: #ff7189; background: rgba(255, 77, 103, 0.12); }
.side-logout .icon { width: 13px; height: 13px; }

/* ---------- 听歌识曲入口 ---------- */
.recognize-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  transition: 0.18s;
}
.recognize-btn:hover {
  color: #ff7189;
  border-color: rgba(255, 77, 103, 0.4);
  background: rgba(255, 77, 103, 0.12);
}
.recognize-btn .icon { width: 17px; height: 17px; }

/* ---------- 听歌识曲面板 ---------- */
.recog-overlay {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 4, 8, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.2s ease;
}
.recog-sheet {
  width: min(440px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(20, 20, 30, 0.92);
  border: 1px solid var(--glass-border);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text);
  animation: recogIn 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
}
@keyframes recogIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.recog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.recog-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.recog-head p { margin: 6px 0 0; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.recog-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.06);
  flex: none;
}
.recog-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.12); }
.recog-close .icon { width: 15px; height: 15px; }

.recog-visual {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 22px auto 10px;
  display: grid;
  place-items: center;
}
.recog-visual .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 77, 103, 0.28);
  opacity: 0;
}
.recog-visual.listening .ring { animation: recogRing 2.2s ease-out infinite; }
.recog-visual.listening .ring:nth-child(2) { animation-delay: 0.55s; }
.recog-visual.listening .ring:nth-child(3) { animation-delay: 1.1s; }
@keyframes recogRing {
  0% { transform: scale(0.55); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}
.recog-core {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ff6b80, #d92c4c);
  box-shadow: 0 20px 50px rgba(255, 77, 103, 0.35);
  transition: 0.25s;
}
.recog-core .icon { width: 34px; height: 34px; }
.recog-visual.listening .recog-core { animation: recogPulse 1.2s ease-in-out infinite; }
@keyframes recogPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 20px 50px rgba(255, 77, 103, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 26px 60px rgba(255, 77, 103, 0.55); }
}
.recog-status {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  min-height: 20px;
  line-height: 1.6;
}
.recog-hint {
  text-align: center;
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 8px;
  line-height: 1.7;
}
.recog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.recog-actions[hidden] { display: none; }
.recog-primary {
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff5f78, #e33250);
  box-shadow: 0 12px 30px rgba(255, 77, 103, 0.3);
}
.recog-primary:disabled { opacity: 0.55; }
.recog-secondary {
  height: 42px;
  border-radius: 13px;
  font-size: 12.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}
.recog-secondary:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }

.recog-result {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}
.recog-song { display: flex; align-items: center; gap: 12px; }
.recog-song img {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  background: var(--hover);
}
.recog-song-info { min-width: 0; }
.recog-song-info h3 { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recog-song-info p { margin: 5px 0 0; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recog-song-actions { display: flex; gap: 8px; margin-top: 12px; }
.recog-song-actions button { flex: 1; height: 38px; border-radius: 11px; font-size: 12px; }
.recog-song-actions .play { color: #fff; background: linear-gradient(135deg, #ff5f78, #e33250); }
.recog-song-actions .search { color: var(--text-2); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--glass-border); }
.recog-again {
  width: 100%;
  height: 32px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-3);
  border-radius: 10px;
}
.recog-again:hover { color: #ff7189; background: rgba(255, 77, 103, 0.08); }
.recog-again .icon { width: 13px; height: 13px; }

/* ---------- 歌手链接 / 歌手页 ---------- */
.artist-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.artist-link:hover { color: var(--red); text-decoration: underline; }
.artist-avatar { border-radius: 50%; }
.artist-page .hero-desc { max-width: 760px; }

/* ---------- 用户头像按钮 ---------- */
.user-chip {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
}
.user-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.avatar {
  background: linear-gradient(140deg, #ff8da1, #e02b4a);
}

/* ---------- 启动闪屏 ---------- */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 460;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(600px 400px at 50% 30%, rgba(120, 80, 255, 0.2), transparent 70%), #08080d;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.boot-splash.hide {
  opacity: 0;
  visibility: hidden;
}
.boot-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ff6b80, #d92c4c);
  box-shadow: 0 20px 50px rgba(255, 77, 103, 0.4);
}
.boot-logo .icon { width: 26px; height: 26px; }
.boot-name { font-size: 15px; font-weight: 700; letter-spacing: 0.08em; color: #f4f4f8; }
.boot-dots { display: flex; gap: 5px; }
.boot-dots i {
  width: 5px; height: 5px; border-radius: 50%; background: #ff6b80;
  animation: bootPulse 1s infinite ease-in-out;
}
.boot-dots i:nth-child(2) { animation-delay: 0.15s; }
.boot-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bootPulse { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* ---------- 登录 / 注册 ---------- */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: #08080d;
}
.auth-screen[hidden] { display: none; }
.auth-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(600px 500px at 20% 10%, rgba(130, 80, 255, 0.35), transparent 65%),
    radial-gradient(600px 500px at 80% 80%, rgba(255, 70, 110, 0.28), transparent 65%),
    radial-gradient(500px 400px at 70% 10%, rgba(0, 200, 220, 0.16), transparent 65%);
  filter: blur(70px);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: min(430px, 100%);
  padding: 34px 30px 26px;
  border-radius: 30px;
  background: rgba(22, 22, 32, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  color: #f6f6fa;
  animation: authIn 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.auth-card.shake { animation: authShake 0.35s ease; }
@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.auth-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff6b80, #d92c4c);
  box-shadow: 0 10px 26px rgba(255, 77, 103, 0.4);
}
.auth-logo .icon { width: 17px; height: 17px; }
.auth-title {
  font-size: 26px;
  line-height: 1.35;
  margin: 24px 0 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.auth-sub {
  margin: 0 0 22px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}
.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  height: 38px;
  border-radius: 11px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  transition: 0.2s;
}
.auth-tab.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field[hidden] { display: none; }
.auth-field span { font-size: 11.5px; color: rgba(255, 255, 255, 0.5); padding-left: 4px; }
.auth-field input {
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  outline: 0;
  transition: 0.2s;
}
.auth-field input::placeholder { color: rgba(255, 255, 255, 0.3); }
.auth-field input:focus {
  border-color: rgba(255, 77, 103, 0.6);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(255, 77, 103, 0.14);
}
.auth-error {
  min-height: 16px;
  font-size: 12px;
  color: #ff8095;
  padding-left: 4px;
}
.auth-submit {
  height: 48px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff5f78, #e33250);
  box-shadow: 0 14px 34px rgba(255, 77, 103, 0.32);
  transition: 0.18s;
}
.auth-submit:hover { transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.6; }
.auth-note {
  margin: 18px 0 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.32);
  text-align: center;
}
body.auth-open .app { filter: blur(2px); }

/* ---------- 我的页面 ---------- */
.me-page { padding-top: 10px; }
.me-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  margin-bottom: 16px;
}
.me-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #ff8ba0, #d92c4c);
  box-shadow: 0 16px 38px rgba(255, 77, 103, 0.35);
  flex: none;
}
.me-info { flex: 1; min-width: 0; }
.me-info h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-info p { margin: 0; font-size: 11.5px; color: var(--text-3); }
.me-logout {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  flex: none;
}
.me-logout:hover { color: #ff7189; border-color: rgba(255, 77, 103, 0.4); }
.me-logout .icon { width: 14px; height: 14px; }
.me-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.me-stat {
  padding: 14px 8px;
  border-radius: 18px;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  transition: 0.18s;
}
.me-stat:hover { transform: translateY(-2px); border-color: rgba(255, 77, 103, 0.35); }
.me-stat b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; margin-bottom: 3px; }
.me-stat span { font-size: 10.5px; color: var(--text-3); }
.me-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.me-tabs::-webkit-scrollbar { display: none; }
.me-tab {
  position: relative;
  padding: 8px 2px 13px;
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
}
.me-tab span { font-size: 10.5px; color: var(--text-3); margin-left: 4px; }
.me-tab.active { color: var(--text); font-weight: 700; }
.me-tab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff5f78, #ff9aae);
}
.me-content { margin-bottom: 22px; }
.me-pl-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.me-pl {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: 0.18s;
}
.me-pl:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--glass-border); }
.me-pl-cover {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ff8da1, #c72647);
  flex: none;
}
.me-pl-info { flex: 1; min-width: 0; }
.me-pl-info b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-pl-info small { display: block; margin-top: 4px; font-size: 11px; color: var(--text-3); }
.me-pl-arrow { width: 16px; height: 16px; color: var(--text-3); }
.me-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 0 4px;
  font-size: 12px;
  color: var(--text-3);
}
.me-more:hover { color: #ff7189; }
.me-settings { border-radius: 22px; padding: 6px 18px; margin-bottom: 20px; }
.me-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.me-setting-row:last-child { border-bottom: 0; }
.me-setting-row b { display: block; font-size: 13px; font-weight: 600; }
.me-setting-row small { display: block; margin-top: 3px; font-size: 11px; color: var(--text-3); }
.btn-ghost.danger { color: #ff7189; border-color: rgba(255, 77, 103, 0.3); }

/* ---------- 搜索入口页 ---------- */
.search-landing h1 { font-size: 28px; margin: 14px 0 18px; letter-spacing: -0.02em; }
.big-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 8px 0 16px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
}
.big-search .icon { color: var(--text-3); width: 19px; height: 19px; }
.big-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}
.big-search button {
  height: 38px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  background: linear-gradient(135deg, #ff5f78, #e33250);
  box-shadow: 0 8px 20px rgba(255, 77, 103, 0.3);
}
.search-block { margin-top: 24px; padding: 16px; border-radius: 20px; }
.search-block h3 { font-size: 13px; color: var(--text-2); margin: 0 0 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}
.chip:hover { color: #ff7189; border-color: rgba(255, 77, 103, 0.35); background: rgba(255, 77, 103, 0.1); }
.search-links {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
}
.search-block .search-links {
  background: transparent;
  border: 0;
  backdrop-filter: none;
  margin: 0 -6px;
}
.search-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.search-links a:last-child { border-bottom: 0; }
.search-links a:hover { background: rgba(255, 255, 255, 0.05); }
.search-links .icon { width: 18px; height: 18px; color: var(--text-3); }

/* ---------- 移动端专属元素 ---------- */
.mobile-brand { display: none; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.mobile-back { display: none !important; }
.mobile-brand .brand-mark { width: 28px; height: 28px; }
.mobile-greeting { display: none; align-items: center; justify-content: space-between; padding: 10px 2px 16px; }
.home-search { display: none; }.mg-hi { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.mg-name { margin-top: 3px; font-size: 12px; color: var(--text-3); }
.mg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #ff8ba0, #d92c4c);
  box-shadow: 0 10px 24px rgba(255, 77, 103, 0.3);
}
.mobile-only { display: none !important; }

/* =========================================================
   平板 / 手机
   ========================================================= */
@media (max-width: 820px) {
  :root { --player-h: 62px; --sidebar-w: 0px; }
  html, body { height: 100%; }
  body { overflow: hidden; }

  .app {
    display: block;
    height: 100dvh;
    padding-bottom: 0;
  }
  .main-wrap {
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  .topbar {
    height: 54px;
    flex: none;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top);
    background: linear-gradient(180deg, rgba(8, 8, 13, 0.7), rgba(8, 8, 13, 0));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .topbar-left { gap: 0; align-items: center; }
  .mobile-back {
    display: grid !important;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    color: var(--text);
  }
  .mobile-back[hidden] { display: none !important; }
  .mobile-back .icon { width: 18px; height: 18px; }
  .mobile-brand { display: flex; }
  .topbar-left .round-btn,
  .topbar-left .search-box { display: none; }
  .topbar-right { display: flex !important; gap: 0; }
  .topbar-right .user-chip { display: none; }
  .recognize-btn {
    width: 40px;
    height: 40px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
  }
  .recognize-btn .icon { width: 19px; height: 19px; }

  .recog-overlay { align-items: flex-end; padding: 0; }
  .recog-sheet {
    width: 100%;
    max-height: 92dvh;
    border-radius: 26px 26px 0 0;
    padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
    animation: recogUp 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
  }
  @keyframes recogUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: none; }
  }
  .recog-visual { width: 128px; height: 128px; margin: 16px auto 8px; }
  .recog-core { width: 74px; height: 74px; }
  .recog-core .icon { width: 30px; height: 30px; }

  .view {
    flex: 1;
    padding: 0 16px calc(190px + env(safe-area-inset-bottom));
    scroll-padding-bottom: 200px;
  }
  .page { max-width: none; animation: none; }

  /* 底部导航 */
  .sidebar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: 64px;
    min-height: 0;
    z-index: 90;
    flex-direction: row;
    align-items: center;
    padding: 6px;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    background: var(--glass-strong);
    backdrop-filter: blur(32px) saturate(1.5);
    -webkit-backdrop-filter: blur(32px) saturate(1.5);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: visible;
  }
  .brand, .sidebar-foot, .nav-label, .nav-playlists { display: none !important; }
  .nav {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 2px;
    padding: 0;
    overflow: visible;
  }
  .nav-item {
    display: none;
    flex: 1;
    height: 52px;
    min-width: 0;
    padding: 0;
    margin: 0;
    border-radius: 18px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    line-height: 1;
  }
  .nav-item[data-mobile] { display: flex; }
  .nav-item.mobile-only[data-mobile] { display: flex !important; }
  .nav-item span { display: block; font-size: 10px; }
  .nav-item .icon { width: 22px; height: 22px; }
  .nav-item.active {
    background: rgba(255, 77, 103, 0.14);
    color: #ff7189;
  }

  /* 迷你播放器 */
  .playerbar {
    left: 12px;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    height: 62px;
    z-index: 88;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px;
    padding: 0 10px;
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    border-radius: 20px;
    background: var(--glass-strong);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
  .pb-left { gap: 10px; }
  .pb-cover { width: 44px; height: 44px; border-radius: 12px; }
  .pb-title { font-size: 12.5px; }
  .pb-artist { font-size: 10.5px; margin-top: 2px; }
  .pb-like { display: none; }
  .pb-center { flex-direction: row; }
  .pb-center .pb-progress { display: none; }
  .pb-controls { gap: 2px; }
  #pb-prev { display: none; }
  .pb-play { width: 36px; height: 36px; }
  .pb-play .icon { width: 16px; height: 16px; }
  .pb-right { gap: 0; }
  .pb-right #pb-mode,
  .pb-right .volume,
  .pb-right #pb-lyrics { display: none; }
  .pb-right .icon-btn { width: 32px; height: 32px; }

  .queue-badge { top: 0; right: 0; }

  /* 首页 */
  .mobile-greeting { display: flex; }
  .home-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 10px 0 8px;
    margin: 0 0 14px;
    border-radius: 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(22px);
  }
  .home-search .hs-btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--text-3);
    flex: none;
  }
  .home-search .hs-btn:hover { color: #ff7189; background: rgba(255, 77, 103, 0.1); }
  .home-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13.5px;
    color: var(--text);
  }
  .home-search input::placeholder { color: var(--text-3); }
  .home-search input::-webkit-search-cancel-button { display: none; }
  .banner {
    height: 232px;
    border-radius: 24px;
    margin-top: 2px;
  }
  .banner-content { padding: 22px 118px 22px 20px; }
  .banner-title { font-size: 21px; margin-bottom: 8px; }
  .banner-desc { display: none; }
  .banner-tag { margin-bottom: 10px; }
  .banner-play { height: 32px; padding: 0 14px; font-size: 12px; }
  .banner-cover-wrap {
    display: flex !important;
    position: absolute;
    right: 14px;
    bottom: 20px;
    width: auto !important;
    padding: 0 !important;
    z-index: 3;
  }
  .banner-cover { width: 88px; height: 88px; border-radius: 16px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5); }
  .banner-mask { background: linear-gradient(90deg, rgba(12, 8, 14, 0.9) 0%, rgba(12, 8, 14, 0.62) 62%, rgba(12, 8, 14, 0.35) 100%); }
  .banner-dots { right: auto; left: 20px; bottom: 12px; }

  .section { margin-top: 26px; }
  .section-title { font-size: 19px; }
  .section-head { margin-bottom: 13px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .card-cover { border-radius: 18px; }
  .card-title { font-size: 12.5px; }
  .card-sub { font-size: 10.5px; }

  .new-songs { display: flex; flex-direction: column; gap: 2px; }
  .new-song { grid-template-columns: 22px 42px minmax(0, 1fr) auto; padding: 8px 6px; }
  .new-song:hover .dur { display: block; }
  .new-song .quick { display: none !important; }

  .charts-grid { grid-template-columns: 1fr; }
  .chart-card { padding: 14px; }

  /* 歌单 / 搜索 / 歌曲列表 */
  .hero { flex-direction: column; gap: 16px; padding: 8px 0; }
  .hero-cover { width: 132px; height: 132px; border-radius: 18px; }
  .hero-cover-wrap { align-self: flex-start; }
  .hero-title { font-size: 22px; margin: 8px 0 10px; }
  .hero-desc { font-size: 11.5px; }
  .hero-actions { margin-top: 14px; gap: 8px; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { height: 34px; padding: 0 14px; font-size: 12px; }
  .hero-stats { margin-top: 12px; }

  .search-head { padding: 8px 0 4px; }
  .search-head h1 { font-size: 21px; }
  .search-tabs { margin: 14px 0 4px; gap: 18px; }

  .song-table { margin-top: 6px; }
  .song-head, .song-row {
    grid-template-columns: 26px minmax(0, 1fr) 46px 30px;
    gap: 8px;
    padding: 0 8px;
  }
  .song-head { height: 30px; }
  .song-row { height: 54px; }
  .song-head .c-ops { display: none; }
  .song-head .c-album { display: none; }
  .song-head > div:last-child { display: none; }
  .song-row .c-album { display: none; }
  .song-row .c-dur { font-size: 11px; }
  .song-row .c-ops { opacity: 1; }
  .song-row .c-ops [data-like] { display: none; }
  .song-row .c-ops .icon-btn { width: 26px; height: 26px; }
  .song-name { font-size: 13px; }
  .song-sub { font-size: 10.5px; }

  /* 全屏播放 */
  .fullplayer { z-index: 140; }
  .fp-inner { padding: calc(12px + env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom)); }
  .fp-head { gap: 10px; }
  .fp-head-name { font-size: 13px; }
  .fp-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 4px;
    align-items: center;
    align-content: start;
    padding: 0;
  }
  .fp-left { flex-direction: column; gap: 10px; }
  .fp-disc { width: min(210px, 54vw); height: min(210px, 54vw); }
  .fp-song { display: block; }
  .fp-song-name { font-size: 19px; }
  .fp-song-artist { font-size: 12px; margin-top: 5px; }
  .fp-song-album { display: none; }
  .fp-right { width: 100%; height: auto; }
  .fp-lyrics {
    height: 36vh;
    padding: 5vh 8px 9vh;
  }
  .lyric-line { font-size: 14px; padding: 7px 0; }
  .lyric-line.active { font-size: 16px; }
  .fp-bottom { width: 100%; }
  .fp-progress-row { gap: 8px; }
  .fp-controls { gap: 20px; margin-top: 8px; }
  .fp-play { width: 52px; height: 52px; }
  .fp-ctl { width: 38px; height: 38px; }

  /* 队列全屏 */
  .queue-panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-left: 0;
    border-radius: 0;
    z-index: 130;
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .toast-wrap { bottom: calc(170px + env(safe-area-inset-bottom)); }
  .modal { top: 46%; border-radius: 24px; }
  .context-menu { min-width: 180px; }

  /* 登录卡片 */
  .auth-screen { padding: 16px; align-items: center; }
  .auth-card { padding: 26px 22px 20px; border-radius: 26px; }
  .auth-title { font-size: 23px; margin-top: 20px; }

  /* 我的 */
  .me-hero { padding: 18px; border-radius: 22px; gap: 14px; }
  .me-avatar { width: 58px; height: 58px; font-size: 23px; }
  .me-info h1 { font-size: 20px; }
  .me-logout span { display: inline; }
  .me-logout { width: auto; padding: 0 12px; gap: 5px; justify-content: center; }
  .me-stats { gap: 8px; }
  .me-stat { padding: 12px 4px; border-radius: 16px; }
  .me-stat b { font-size: 17px; }
  .me-stat span { font-size: 10px; }
  .me-tab { font-size: 13px; }
  .me-settings { padding: 4px 14px; }
  .me-setting-row { padding: 14px 0; }
  .me-setting-row .btn-ghost { height: 32px; padding: 0 12px; font-size: 11.5px; }

  .search-landing h1 { font-size: 25px; }
}

/* 小屏手机 */
@media (max-width: 380px) {
  .nav-item { font-size: 9px; }
  .pb-title { font-size: 12px; }
  .banner-title { font-size: 19px; }
  .banner-cover-wrap { display: none !important; }
  .banner-content { padding-right: 18px; }
}

/* 横屏时给安卓一点呼吸空间 */
@media (max-height: 520px) and (max-width: 900px) {
  .fp-disc { width: 150px; height: 150px; }
  .fp-lyrics { height: 26vh; padding: 10vh 8px; }
}
