/* ==========================================================
   小雫音乐搜索 · 样式
   主题：柔和紫粉（猫娘风）+ 玻璃拟态
   ========================================================== */

:root {
  --bg: #f7f4ff;
  --bg-2: #fff5fa;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #ffffff;
  --text: #2f2b40;
  --text-2: #5b5573;
  --muted: #9791ad;
  --border: rgba(139, 124, 246, .14);
  --primary: #8b7cf6;
  --primary-soft: #b3a8ff;
  --pink: #f7a1cd;
  --pink-soft: #ffd6ea;
  --hover: rgba(139, 124, 246, .08);
  --active: rgba(139, 124, 246, .14);
  --shadow: 0 8px 30px rgba(120, 100, 200, .10);
  --shadow-lg: 0 18px 50px rgba(120, 100, 200, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --player-h: 84px;
}

[data-theme="dark"] {
  --bg: #16141f;
  --bg-2: #1d1a2a;
  --card: rgba(38, 34, 54, .72);
  --card-solid: #262236;
  --text: #ece9f7;
  --text-2: #b8b2cd;
  --muted: #8b85a3;
  --border: rgba(160, 145, 255, .16);
  --primary: #a394ff;
  --primary-soft: #7d6cf0;
  --pink: #f79ccb;
  --pink-soft: #5a3550;
  --hover: rgba(163, 148, 255, .10);
  --active: rgba(163, 148, 255, .18);
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Segoe UI", "Noto Sans SC", sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 0;
  transition: background .3s, color .3s;
  -webkit-font-smoothing: antialiased;
}

body.has-player { padding-bottom: calc(var(--player-h) + 12px); }

/* ==========================================================
 *  ⚠️ 关键修复：让 [hidden] 真的生效
 *  原因：HTML 的 hidden 属性是靠 UA 样式 [hidden]{display:none} 生效的，
 *  优先级极低，会被作者样式里的 .modal{display:grid} / .player{display:grid}
 *  / .drawer{display:flex} 这类声明直接覆盖 —— 结果就是「关不掉的弹窗」
 *  「一直显示的播放器/抽屉/登录页」。这里用 !important 强制兜底。
 * ========================================================== */
[hidden] { display: none !important; }

/* ---------- 背景光斑 ---------- */
.bg-blobs { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.b1 { width: 480px; height: 480px; background: #c8b6ff; top: -140px; left: -120px; animation: float1 22s ease-in-out infinite; }
.b2 { width: 420px; height: 420px; background: #ffc2e0; bottom: -160px; right: -100px; animation: float2 26s ease-in-out infinite; }
.b3 { width: 360px; height: 360px; background: #b5e5ff; top: 45%; right: 12%; animation: float3 30s ease-in-out infinite; }
[data-theme="dark"] .blob { opacity: .28; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px, 50px) scale(1.12); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-70px, -40px) scale(1.08); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px, -60px) scale(1.15); } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 26px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; flex-shrink: 0; }
.logo {
  width: 46px; height: 46px; border-radius: 15px;
  display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 6px 18px rgba(139, 124, 246, .35);
  transition: transform .3s;
}
.brand:hover .logo { transform: rotate(-8deg) scale(1.06); }
.brand-text h1 { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.brand-text p { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ---------- 搜索框 ---------- */
.search-wrap { flex: 1; position: relative; max-width: 620px; }
.searchbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--card-solid);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.searchbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(139,124,246,.14), var(--shadow); }
.icon-search { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
#kw {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: var(--text); padding: 8px 0; font-family: inherit;
}
#kw::-webkit-search-cancel-button { display: none; }
.btn-clear {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 6px 8px; border-radius: 50%;
}
.btn-clear:hover { background: var(--hover); color: var(--text); }
.btn-search {
  border: 0; cursor: pointer; font-family: inherit;
  padding: 10px 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(139,124,246,.3);
  transition: transform .15s, box-shadow .2s;
}
.btn-search:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(139,124,246,.42); }
.btn-search:active { transform: translateY(0); }

/* 联想下拉 */
.suggest {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: var(--card-solid); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 50; max-height: 380px; overflow-y: auto;
}
.sg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; cursor: pointer; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.sg-item:last-child { border-bottom: 0; }
.sg-item:hover, .sg-item.sel { background: var(--hover); }
.sg-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 6px; flex-shrink: 0;
  background: var(--active); color: var(--primary); font-weight: 600;
}
.sg-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-sub { font-size: 12px; color: var(--muted); flex-shrink: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar-right { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- 通用按钮 ---------- */
.icon-btn {
  width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--card-solid); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; font-size: 15px; text-decoration: none;
  transition: all .18s; font-family: inherit;
}
.icon-btn:hover { background: var(--hover); color: var(--primary); transform: translateY(-1px); }

/* ---------- 标签栏 ---------- */
.tabs {
  position: sticky; top: 75px; z-index: 30;
  display: flex; gap: 8px; padding: 12px 26px;
  overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; border: 1px solid var(--border); cursor: pointer;
  background: var(--card-solid); color: var(--text-2);
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px;
  font-family: inherit; transition: all .18s; white-space: nowrap;
}
.tab:hover { background: var(--hover); color: var(--primary); }
.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--pink));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(139,124,246,.3);
}

/* ---------- 主体 ---------- */
.main { position: relative; z-index: 1; padding: 20px 26px 40px; max-width: 1400px; margin: 0 auto; }

.section { margin-bottom: 34px; }
.section-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px;
  padding-left: 4px;
}
.section-head h2 { font-size: 17px; font-weight: 700; }
.section-head .count { font-size: 12px; color: var(--muted); }
.section-head .more {
  margin-left: auto; font-size: 12.5px; color: var(--primary);
  cursor: pointer; background: none; border: 0; font-family: inherit;
}
.section-head .more:hover { text-decoration: underline; }

/* ---------- 歌曲列表 ---------- */
.song-list { display: flex; flex-direction: column; gap: 2px; }
.song {
  display: grid; grid-template-columns: 44px 1fr 1.1fr 130px 74px 58px;
  align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s;
}
.song:hover { background: var(--hover); }
.song.playing { background: var(--active); }
.song.playing .s-name { color: var(--primary); font-weight: 700; }
.s-idx { font-size: 13px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.s-song-wrap { display: flex; align-items: center; gap: 11px; min-width: 0; }
.s-cover {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  object-fit: cover; background: var(--hover);
}
.s-meta { min-width: 0; }
.s-name { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-artist { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.s-artist span:hover { color: var(--primary); text-decoration: underline; }
.s-album { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 6px; font-weight: 600;
  background: var(--active); color: var(--primary); display: inline-block;
}
.s-tag.vip { background: linear-gradient(135deg, #ffd76e, #ffb347); color: #7a4b00; }
.s-tag.invalid { background: rgba(150,150,150,.2); color: var(--muted); }
.s-dur { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.s-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.song:hover .s-actions { opacity: 1; }
.s-act {
  width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 13px;
  display: grid; place-items: center;
}
.s-act:hover { background: var(--card-solid); color: var(--primary); box-shadow: var(--shadow); }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 16px; }
.grid.g-artist { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.grid.g-album { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
.grid.g-playlist { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  backdrop-filter: blur(10px);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft); }
.card-img {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--hover); display: block; margin-bottom: 10px;
}
.card-img.round { border-radius: 50%; }
.card-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-sub { font-size: 12px; color: var(--muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-badge {
  position: absolute; top: 20px; right: 20px;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(4px);
}
.card-wrap { position: relative; }

/* ---------- 首页 ---------- */
.hot-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px; cursor: pointer; font-size: 13.5px;
  background: var(--card); border: 1px solid var(--border);
  transition: all .18s;
}
.chip:hover { background: var(--active); border-color: var(--primary-soft); transform: translateY(-2px); color: var(--primary); }
.chip .rank { font-size: 11px; font-weight: 800; color: var(--pink); }
.chip .hot { font-size: 11px; color: var(--muted); }

/* ---------- 榜单 ---------- */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tl-card {
  display: flex; gap: 12px; align-items: center; padding: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all .18s;
}
.tl-card:hover { transform: translateX(3px); border-color: var(--primary-soft); background: var(--hover); }
.tl-card img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.tl-name { font-size: 13.5px; font-weight: 600; }
.tl-freq { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 加载 / 空状态 ---------- */
.loading, .empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 70px 20px; color: var(--muted); font-size: 14px;
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-icon { font-size: 46px; opacity: .65; }

/* 骨架屏 */
.skel { background: linear-gradient(90deg, var(--hover) 25%, var(--active) 37%, var(--hover) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 播放条 ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--player-h);
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.6fr) minmax(180px, 1fr);
  align-items: center; gap: 20px; padding: 0 24px;
  background: color-mix(in srgb, var(--card-solid) 88%, transparent);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(120,100,200,.10);
  animation: up .3s ease;
}
@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.p-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.p-cover { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.p-cover img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; position: relative; z-index: 1; }
.p-disc {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px dashed var(--primary-soft); opacity: 0; transition: opacity .3s;
}
.player.playing .p-disc { opacity: 1; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.p-info { min-width: 0; }
.p-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-artist { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.p-btns { display: flex; align-items: center; gap: 8px; }
.p-btn {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%; font-size: 15px;
  display: grid; place-items: center; transition: all .16s;
}
.p-btn:hover { background: var(--hover); color: var(--primary); }
.p-btn.p-play {
  width: 44px; height: 44px; font-size: 17px;
  background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff;
  box-shadow: 0 5px 16px rgba(139,124,246,.36);
}
.p-btn.p-play:hover { transform: scale(1.07); color: #fff; }
.p-btn.small { font-size: 12px; opacity: .75; }
.p-btn.small.on { opacity: 1; color: var(--primary); }

.p-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.p-progress span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.bar { flex: 1; height: 5px; background: var(--active); border-radius: 999px; cursor: pointer; position: relative; }
.bar::after { content: ''; position: absolute; inset: -8px 0; }
.bar-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--pink)); position: relative; transition: width .1s linear; }
.bar-fill i {
  position: absolute; right: -5px; top: 50%; transform: translateY(-50%);
  width: 11px; height: 11px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.28); opacity: 0; transition: opacity .16s;
}
.bar:hover .bar-fill i { opacity: 1; }

.p-right { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.p-vol { display: flex; align-items: center; gap: 8px; width: 96px; }
.p-vol span { font-size: 14px; cursor: pointer; }
.vol-bar { height: 4px; }

/* ---------- 抽屉 ---------- */
.drawer {
  position: fixed; top: 0; bottom: 0; width: 380px; max-width: 92vw; z-index: 70;
  background: var(--card-solid); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slideIn .28s ease;
}
.drawer-lyric { right: 0; border-left: 1px solid var(--border); }
.drawer-list { left: 0; border-right: 1px solid var(--border); animation: slideInLeft .28s ease; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.drawer-head h3 { font-size: 15px; font-weight: 700; }
.drawer-head .muted { font-size: 12px; color: var(--muted); font-weight: 400; }

.lyric-body { flex: 1; overflow-y: auto; padding: 26px 22px 45vh; scroll-behavior: smooth; }
.ly-line { font-size: 15px; line-height: 1.65; color: var(--muted); padding: 8px 0; transition: color .25s, transform .25s; transform-origin: left center; }
.ly-line .tr { font-size: 12.5px; color: var(--muted); opacity: .75; margin-top: 3px; }
.ly-line.active { color: var(--primary); font-weight: 700; transform: scale(1.04); }
.ly-line.active .tr { color: var(--primary-soft); opacity: .95; }
.ly-empty { color: var(--muted); text-align: center; padding: 50px 0; }

.queue-body { flex: 1; overflow-y: auto; padding: 10px; }
.q-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background .15s;
}
.q-item:hover { background: var(--hover); }
.q-item.playing { background: var(--active); }
.q-item.playing .q-name { color: var(--primary); font-weight: 700; }
.q-idx { font-size: 12px; color: var(--muted); width: 20px; text-align: center; }
.q-meta { min-width: 0; flex: 1; }
.q-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-artist { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 模态弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(30, 25, 50, .45); backdrop-filter: blur(6px); padding: 24px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--card-solid); border-radius: 24px; padding: 26px;
  width: min(880px, 100%); max-height: 84vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); position: relative; animation: pop .25s ease;
  border: 1px solid var(--border);
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 2; }

.m-head { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 22px; }
.m-cover { width: 168px; height: 168px; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow-lg); flex-shrink: 0; }
.m-cover.round { border-radius: 50%; }
.m-info { flex: 1; min-width: 0; padding-bottom: 6px; }
.m-type { font-size: 11.5px; color: var(--primary); font-weight: 700; letter-spacing: 1px; }
.m-title { font-size: 25px; font-weight: 800; margin: 8px 0 10px; line-height: 1.25; }
.m-sub { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.m-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--border); background: var(--card-solid); color: var(--text);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-size: 13.5px;
  font-family: inherit; transition: all .18s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--hover); border-color: var(--primary-soft); color: var(--primary); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--pink)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(139,124,246,.3); }
.btn.primary:hover { transform: translateY(-1px); color: #fff; }

/* ---------- 接口文档页 ---------- */
.api-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px; transition: all .18s;
}
.api-card:hover { border-color: var(--primary-soft); background: var(--hover); }
.api-path { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13.5px; color: var(--primary); font-weight: 600; }
.api-desc { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.api-try { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; bottom: calc(var(--player-h) + 24px); left: 50%; transform: translateX(-50%);
  background: rgba(45, 40, 65, .94); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 13.5px; z-index: 100; box-shadow: var(--shadow-lg); animation: toastIn .3s ease;
  max-width: 82vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 公告条 ---------- */
.announce {
  position: relative; z-index: 25;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 26px; font-size: 13.5px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 14%, transparent),
                                     color-mix(in srgb, var(--pink) 16%, transparent));
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.announce-icon { flex-shrink: 0; }
#announce-text { flex: 1; line-height: 1.6; }
.announce-close {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 4px 8px; border-radius: 8px; flex-shrink: 0;
}
.announce-close:hover { background: var(--hover); color: var(--text); }

/* ---------- 页脚（友链） ---------- */
.site-footer {
  position: relative; z-index: 1;
  max-width: 1400px; margin: 0 auto; padding: 8px 26px 46px;
}
.footer-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; backdrop-filter: blur(10px);
}
.footer-title { font-size: 13.5px; font-weight: 700; margin-bottom: 14px; color: var(--text-2); }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.friend-item {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--hover); border: 1px solid transparent; transition: all .18s;
}
.friend-item:hover { border-color: var(--primary-soft); transform: translateY(-2px); box-shadow: var(--shadow); }
.friend-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, transparent),
                                     color-mix(in srgb, var(--pink) 26%, transparent));
}
.friend-name { font-size: 13.5px; font-weight: 600; }
.friend-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-meta {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); line-height: 1.8;
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
}
.footer-meta .dot { opacity: .5; }
.footer-admin { margin-left: auto; color: var(--muted); text-decoration: none; }
.footer-admin:hover { color: var(--primary); }

@media (max-width: 560px) {
  .footer-meta { flex-direction: column; align-items: flex-start; }
  .footer-admin { margin-left: 0; }
}

@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: 100%; }
  .brand-text p { display: none; }
  .tabs { top: 130px; padding: 10px 16px; }
  .main { padding: 16px; }
  .song { grid-template-columns: 36px 1fr 90px 52px; }
  .s-album, .s-actions { display: none; }
  .player { grid-template-columns: 1fr auto; height: auto; padding: 10px 14px; gap: 10px; }
  .p-center { grid-column: 1 / -1; width: 100%; }
  .p-right { display: none; }
  .m-head { flex-direction: column; align-items: center; text-align: center; }
  .m-title { font-size: 20px; }
}
@media (max-width: 560px) {
  .song { grid-template-columns: 30px 1fr 46px; }
  .s-tag { display: none; }
  .grid.g-playlist { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ==========================================================
 *  🎧 沉浸式播放界面（类似网易云的听歌页）
 *  深色氛围 + 模糊封面背景 + 大字滚动歌词
 * ========================================================== */
.immersive {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column;
  overflow: hidden; color: #fff;
  animation: imIn .38s cubic-bezier(.22,.8,.3,1);
}
@keyframes imIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }

/* 背景：专辑封面放大 + 模糊 + 暗化 */
.im-bg {
  position: absolute; inset: -12%;
  background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.7) brightness(.5);
  transform: scale(1.2);
  transition: background-image .5s ease;
}
.im-mask {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 75%),
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.12) 45%, rgba(0,0,0,.62) 100%);
}
.immersive > *:not(.im-bg):not(.im-mask) { position: relative; z-index: 1; }

/* ---------- 顶栏 ---------- */
.im-top {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 26px; flex-shrink: 0;
}
.im-icon {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10); color: #fff; cursor: pointer;
  display: grid; place-items: center; font-size: 18px;
  backdrop-filter: blur(8px); transition: all .18s;
}
.im-icon:hover { background: rgba(255,255,255,.22); transform: scale(1.06); }
.im-title { flex: 1; min-width: 0; text-align: center; }
.im-song {
  font-size: 16px; font-weight: 700; letter-spacing: .3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.im-artist { font-size: 12.5px; opacity: .72; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 主体：封面 + 歌词 ---------- */
.im-body {
  flex: 1; display: flex; align-items: center; gap: 5vw;
  padding: 0 6vw; min-height: 0;
}

.im-cover-wrap {
  position: relative; flex-shrink: 0;
  width: clamp(190px, 30vh, 330px); aspect-ratio: 1;
  cursor: pointer;
}
.im-cover {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  box-shadow: 0 22px 60px rgba(0,0,0,.55), 0 0 0 10px rgba(255,255,255,.06);
  background: rgba(255,255,255,.08);
}
.im-disc {
  position: absolute; inset: -18px; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.18); opacity: 0; transition: opacity .4s;
}
.immersive.playing .im-cover { animation: imSpin 22s linear infinite; }
.immersive.playing .im-disc { opacity: 1; animation: imSpin 30s linear infinite reverse; }
@keyframes imSpin { to { transform: rotate(360deg); } }

.im-lyric-wrap {
  flex: 1; min-width: 0; height: 100%;
  overflow-y: auto; scrollbar-width: none;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.im-lyric-wrap::-webkit-scrollbar { display: none; }
.im-lyric { padding: 38vh 0; display: flex; flex-direction: column; gap: 20px; }
.im-line {
  font-size: clamp(15px, 1.9vh, 19px); line-height: 1.5;
  color: rgba(255,255,255,.38); cursor: pointer;
  transition: color .3s, font-size .3s, transform .3s;
  transform-origin: left center;
}
.im-line:hover { color: rgba(255,255,255,.72); }
.im-line .tr { font-size: .82em; opacity: .62; margin-top: 4px; }
.im-line.active {
  color: #fff; font-weight: 800;
  font-size: clamp(19px, 2.7vh, 27px);
  text-shadow: 0 3px 24px rgba(255,255,255,.35);
  transform: scale(1.01);
}
.im-line.active .tr { opacity: .8; font-weight: 500; }
.im-lyric-empty { text-align: center; color: rgba(255,255,255,.5); font-size: 14px; padding: 30px 0; }

/* ---------- 底部控制 ---------- */
.im-foot { flex-shrink: 0; padding: 10px 6vw 30px; }
.im-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.im-act {
  padding: 9px 20px; border-radius: 999px; cursor: pointer; font-size: 13px; font-family: inherit;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12);
  color: #fff; backdrop-filter: blur(8px); transition: all .18s;
}
.im-act:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }

.im-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.im-progress span { font-size: 12px; opacity: .68; font-variant-numeric: tabular-nums; min-width: 36px; text-align: center; }
.im-bar { flex: 1; height: 5px; background: rgba(255,255,255,.2); }
.im-bar .bar-fill { background: #fff; }

.im-controls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.im-ctrl {
  border: 0; background: transparent; color: rgba(255,255,255,.82); cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%; font-size: 17px;
  display: grid; place-items: center; transition: all .18s;
}
.im-ctrl:hover { background: rgba(255,255,255,.16); color: #fff; transform: scale(1.08); }
.im-ctrl.small { width: 36px; height: 36px; font-size: 14px; opacity: .7; }
.im-ctrl.small:hover { opacity: 1; }
.im-ctrl.im-play {
  width: 58px; height: 58px; font-size: 22px;
  background: #fff; color: #1a1a1a;
  box-shadow: 0 8px 26px rgba(0,0,0,.4);
}
.im-ctrl.im-play:hover { transform: scale(1.08); background: #fff; color: #1a1a1a; }
.im-vol { width: 90px; height: 4px; accent-color: #fff; cursor: pointer; opacity: .8; }
.im-vol:hover { opacity: 1; }

/* ---------- 横屏（宽屏）：三栏对称布局 ----------
 *  左栏(封面)  |  中栏(歌词，绝对居中)  |  右栏(歌曲信息)
 *  左右等宽 → 歌词恒定居中，与顶栏标题同一 X 轴；
 *  封面跟着屏幕高度放大，右栏放歌曲资料 + 快捷操作 + 接下来播放，不留空白。
 * ------------------------------------------------- */
@media (min-width: 1100px) {
  /* 右侧已有下载按钮，底部这份就不重复显示了 */
  .im-actions { display: none; }
  .im-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 540px) minmax(0, 1fr);
    align-items: center;
    gap: 2vw;
    padding: 0 2.5vw;
  }
  .im-cover-wrap {
    grid-column: 1;
    justify-self: center;
    /* 封面尽量占满左栏（≈屏宽 1/4），高度不够时靠 max-height 自动缩 */
    width: min(100%, 460px);
    max-height: 94%;
  }
  .im-lyric-wrap {
    grid-column: 2;
    width: 100%;
    height: 100%;
  }
  .im-lyric { text-align: center; align-items: center; }
  .im-line { transform-origin: center; }
  .im-lyric-empty { text-align: center; }
  .im-side {
    grid-column: 3;
    justify-self: center;
    width: min(100%, 310px);
    display: flex;
  }
}

/* 中等宽度横屏：藏着信息栏，封面 + 歌词两栏（歌词依旧居中） */
@media (min-width: 821px) and (max-width: 1099px) {
  .im-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 2vw;
    padding: 0 3vw;
  }
  .im-cover-wrap { grid-column: 1; justify-self: center; width: min(100%, 320px); max-height: 94%; }
  .im-lyric-wrap { grid-column: 2 / span 2; height: 100%; }
  .im-side { display: none; }
  .im-lyric { text-align: left; }
  .im-line { transform-origin: left center; }
}

/* 特别矮的横屏：封面收一点，别挤到歌词 */
@media (min-width: 821px) and (max-height: 560px) {
  .im-cover-wrap { width: min(100%, clamp(90px, 20vh, 190px)); }
  .im-lyric { padding: 28vh 0; gap: 14px; }
}

/* ---------- 右侧信息栏 ---------- */
.im-side { display: flex; flex-direction: column; gap: 16px; align-self: center;
  max-height: 100%; overflow-y: auto; scrollbar-width: none; }
.im-side::-webkit-scrollbar { display: none; }

.im-meta {
  display: flex; flex-direction: column; gap: 11px;
  padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: 0 10px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.10);
}
.im-meta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; }
.im-meta-label { color: rgba(255,255,255,.55); flex-shrink: 0; }
.im-meta-label .fa-solid { margin-right: .45em; opacity: .85; }
.im-meta-value {
  color: #fff; font-weight: 500; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.im-side-actions { display: flex; flex-direction: column; gap: 8px; }
.im-side-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  font-size: 12.5px; font-family: inherit; text-align: left;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  color: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .18s;
}
.im-side-btn .fa-solid { width: 16px; text-align: center; opacity: .85; }
.im-side-btn:hover { background: rgba(255,255,255,.22); color: #fff; transform: translateX(3px); }

.im-upnext { display: flex; flex-direction: column; gap: 8px; }
.im-upnext-title { font-size: 12px; color: rgba(255,255,255,.55); padding-left: 2px; }
.im-upnext-title .fa-solid { margin-right: .45em; }
.im-upnext-list { display: flex; flex-direction: column; gap: 2px; }
.im-upnext-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 9px; cursor: pointer;
  transition: background .15s;
}
.im-upnext-item:hover { background: rgba(255,255,255,.14); }
.im-upnext-no { font-size: 11px; color: rgba(255,255,255,.4); width: 14px; text-align: center; }
.im-upnext-meta { min-width: 0; flex: 1; }
.im-upnext-name { font-size: 12.5px; color: rgba(255,255,255,.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-upnext-artist { font-size: 11px; color: rgba(255,255,255,.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.im-upnext-empty { font-size: 12px; color: rgba(255,255,255,.4); padding: 8px 10px; }

@media (max-width: 1099px) {
  .im-upnext, .im-side-actions, .im-meta { display: none; }
}

/* ---------- 响应式：窄屏竖排 ---------- */
@media (max-width: 820px) {
  .im-side { display: none; }
  .im-body { flex-direction: column; gap: 18px; padding: 0 20px; justify-content: center; }
  .im-cover-wrap { width: clamp(140px, 26vh, 220px); }
  .im-lyric-wrap { width: 100%; flex: 1; min-height: 120px; }
  .im-lyric { padding: 16vh 0; gap: 15px; text-align: center; }
  .im-line { transform-origin: center; }
  .im-top { padding: 14px 16px; }
  .im-foot { padding: 8px 18px 24px; }
  .im-controls { gap: 10px; }
  .im-vol { display: none; }
}
@media (max-height: 620px) {
  .im-lyric { padding: 22vh 0; }
}

/* ---------- Font Awesome 图标微调 ---------- */
.fa-solid, .fa-regular, .fa-brands { line-height: 1; }
/* 关键：图标不接收点击，事件冒泡到按钮本身，事件委托才不会被 <i> 挡住 */
.fa-solid, .fa-regular, .fa-brands { pointer-events: none; }
/* 图标与文字间距 */
button .fa-solid, .tab .fa-solid, .section-head .fa-solid { margin-right: .35em; }
.tab .fa-solid:only-child, button .fa-solid:only-child { margin-right: 0; }
.p-btn .fa-solid, .icon-btn .fa-solid, .im-ctrl .fa-solid, .im-icon .fa-solid, .im-act .fa-solid { margin-right: 0; }
.s-act .fa-solid, .q-item .fa-solid, .announce-close .fa-solid { margin-right: 0; }
.section-head h2 .fa-solid { margin-right: .4em; }
.footer-title .fa-solid, .footer-admin .fa-solid, .footer-meta .fa-solid { margin-right: .35em; }
.empty-icon .fa-solid { font-size: 3.2rem; opacity: .5; }
.s-idx .fa-solid { color: var(--primary); }
