/* Muse Music · 手机端（H5）— 参考 QQ 音乐 / 酷狗的信息层级与交互习惯 */
:root {
  --brand: #31c27c;
  --brand-2: #23a869;
  --brand-soft: #e8f8f0;
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #12161c;
  --ink-2: #5a636e;
  --ink-3: #929aa5;
  --line: #eef0f3;
  --tab-h: 56px;
  --mini-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overscroll-behavior-y: none;
}
img { display: block; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input { font: inherit; }
.is-hidden { display: none !important; }

.app { min-height: 100%; padding-bottom: calc(var(--tab-h) + var(--mini-h) + 16px + var(--safe-b)); }

/* ================= 顶栏 ================= */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  background: linear-gradient(180deg, #fff 40%, rgba(255,255,255,.92));
  backdrop-filter: saturate(160%) blur(10px);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.brand-dot {
  width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), #7fe0b3);
  color: #fff; font-size: 14px; font-weight: 800;
}
.tb-btn { width: 34px; height: 34px; border-radius: 50%; background: #f1f3f5; display: grid; place-items: center; }
.tb-btn svg { width: 18px; height: 18px; color: var(--ink-2); }

/* ================= 通用 ================= */
.view { padding: 0 16px; }
.sec { margin: 22px 0 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.sec-title { font-size: 16.5px; font-weight: 700; letter-spacing: .2px; }
.sec-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.sec-more { font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 2px; }

/* ================= 推荐页 ================= */
.greet { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 16px; }
.greet h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.greet p { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #d8f3e6, #b6e8d2); color: #1c7d52;
  font-weight: 700; font-size: 15px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(20,30,25,.08);
}

.daily-card {
  position: relative; overflow: hidden; border-radius: 20px; padding: 18px 18px 16px;
  background: linear-gradient(135deg, #31c27c 0%, #1fa96a 52%, #15915a 100%);
  color: #fff; box-shadow: 0 10px 26px rgba(31, 169, 106, .26);
}
.daily-card::after {
  content: ""; position: absolute; right: -46px; top: -58px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255,255,255,.16);
}
.daily-card::before {
  content: ""; position: absolute; right: 26px; bottom: -66px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,.1);
}
.daily-kicker { font-size: 11.5px; opacity: .88; letter-spacing: 1.2px; }
.daily-title { font-size: 25px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.5px; }
.daily-desc { font-size: 12px; opacity: .92; max-width: 74%; }
.daily-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.daily-play {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 18px;
  background: #fff; color: #178a56; border-radius: 18px; font-size: 13px; font-weight: 700;
}
.daily-play svg { width: 15px; height: 15px; }
.daily-count { font-size: 11.5px; opacity: .9; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 4px; border-radius: 16px; background: #fff;
  box-shadow: 0 1px 2px rgba(16,22,28,.04);
}
.quick i { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-style: normal; font-size: 17px; }
.quick span { font-size: 11.5px; color: var(--ink-2); }
.qi-green { background: #e6f8ef; color: #1f9c66; }
.qi-blue { background: #e9f1ff; color: #3a72d8; }
.qi-orange { background: #fff1e6; color: #d1782a; }
.qi-pink { background: #ffe9ef; color: #d24a76; }

/* ================= 歌曲行 ================= */
.track {
  display: flex; align-items: center; gap: 11px; padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.track:last-child { border-bottom: 0; }
.track .cov {
  width: 48px; height: 48px; border-radius: 11px; flex: none; overflow: hidden;
  position: relative; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 16px; background: #dfe3e8;
}
.track .cov img { width: 100%; height: 100%; object-fit: cover; }
.track .cov.sm { width: 42px; height: 42px; border-radius: 10px; font-size: 14px; }
.track-main { min-width: 0; flex: 1; }
.track-title {
  font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-sub {
  font-size: 11.5px; color: var(--ink-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-title .sq {
  display: inline-block; margin-left: 5px; padding: 0 4px; border-radius: 3px;
  font-size: 9px; font-weight: 700; line-height: 14px; vertical-align: 1px;
  color: #17a76a; border: 1px solid #bfe9d5; background: #f2fcf7;
}
.track-act { display: flex; align-items: center; gap: 2px; flex: none; }
.t-act {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3);
}
.t-act svg { width: 19px; height: 19px; }
.t-act.on { color: var(--brand-2); }
.t-act.on svg { fill: currentColor; stroke: currentColor; }

/* ================= 搜索页 ================= */
.search-bar { display: flex; align-items: center; gap: 10px; padding: 2px 0 10px; }
.s-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px;
  background: #fff; border-radius: 20px; box-shadow: 0 1px 3px rgba(16,22,28,.06);
}
.s-input-wrap svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.s-input-wrap input { flex: 1; border: 0; outline: 0; background: none; font-size: 14px; min-width: 0; }
.s-cancel { font-size: 13.5px; color: var(--brand-2); font-weight: 600; padding: 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 7px 13px; border-radius: 16px; background: #fff; font-size: 12.5px; color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(16,22,28,.04); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip.hot { background: var(--brand-soft); color: #178a56; }
.chip-ghost { background: #eef0f3; color: var(--ink-2); }

/* ================= 我的 ================= */
.mine-head {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #f0fbf5); border: 1px solid #e6f4ec;
}
.mine-avatar {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #cdf0e0, #a5e3c8); color: #17784f;
  font-size: 23px; font-weight: 800;
}
.mine-name { font-size: 18px; font-weight: 700; }
.mine-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.mine-login {
  margin-left: auto; height: 32px; padding: 0 16px; border-radius: 16px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
}
.mine-stats { display: flex; margin: 16px 0 4px; }
.mine-stat { flex: 1; text-align: center; padding: 12px 0; background: #fff; border-radius: 14px; margin-right: 8px; box-shadow: 0 1px 2px rgba(16,22,28,.04); }
.mine-stat:last-child { margin-right: 0; }
.mine-stat b { display: block; font-size: 19px; font-weight: 800; }
.mine-stat span { font-size: 11px; color: var(--ink-3); }

.menu { margin-top: 14px; background: #fff; border-radius: 16px; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px;
  border-bottom: 1px solid var(--line); text-align: left;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item i { font-style: normal; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; }
.menu-item span { flex: 1; font-size: 14px; }
.menu-item em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.menu-item svg { width: 16px; height: 16px; color: #c3c8cf; }

/* 音质选择（我的页） */
.q-row { display: flex; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.q-chip {
  padding: 6px 13px; border-radius: 14px; font-size: 12px; color: var(--ink-2);
  background: #f2f4f6; border: 1px solid transparent;
}
.q-chip.on { color: #178a56; background: var(--brand-soft); border-color: #b6e8d2; font-weight: 600; }

/* ================= 二级页 ================= */
.page { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; padding-bottom: calc(24px + var(--safe-b)); }
.page-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: rgba(245,246,248,.94); backdrop-filter: blur(10px);
}
.page-back { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(16,22,28,.06); }
.page-back svg { width: 18px; height: 18px; }
.page-title { font-size: 16px; font-weight: 700; flex: 1; }
.page-body { padding: 0 16px; }
.page-hero { padding: 6px 16px 4px; }
.page-hero h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.page-hero p { margin: 5px 0 0; font-size: 12px; color: var(--ink-3); }
.page-actions { display: flex; gap: 10px; margin: 14px 0 4px; }

/* ================= 迷你播放条 & Tab ================= */
.mini {
  position: fixed; left: 10px; right: 10px; bottom: calc(var(--tab-h) + 8px + var(--safe-b));
  z-index: 30; display: flex; align-items: center; gap: 10px; height: var(--mini-h);
  padding: 8px 10px; border-radius: 15px; background: rgba(255,255,255,.97);
  box-shadow: 0 6px 22px rgba(16,22,28,.13); backdrop-filter: blur(12px);
}
.mini-cover {
  width: 42px; height: 42px; border-radius: 12px; flex: none; overflow: hidden;
  background: linear-gradient(145deg, #cfe9dd, #a9dcc4); display: grid; place-items: center;
  color: #fff; font-weight: 700;
}
.mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-meta { min-width: 0; flex: 1; }
.mini-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 11px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.mini-btn svg { width: 20px; height: 20px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b); display: flex; background: rgba(255,255,255,.98);
  border-top: 1px solid var(--line); backdrop-filter: blur(12px);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 10.5px;
}
.tab svg { width: 21px; height: 21px; }
.tab.is-active { color: var(--brand-2); }

/* ================= 全屏播放器 ================= */
.player { position: fixed; inset: 0; z-index: 60; overflow: hidden; color: #fff; }
.player-bg {
  position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(34px) saturate(140%) brightness(.55); transform: scale(1.15);
  background-color: #1c2a24;
}
.player-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,14,.35), rgba(10,16,14,.88)); }
.player-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: calc(10px + env(safe-area-inset-top, 0px)) 22px calc(20px + var(--safe-b)); }
.player-head { display: flex; align-items: center; justify-content: space-between; }
.p-head-mid { font-size: 11.5px; color: rgba(255,255,255,.7); letter-spacing: 1px; }
.p-icon { width: 38px; height: 38px; display: grid; place-items: center; color: rgba(255,255,255,.92); border-radius: 50%; }
.p-icon svg { width: 21px; height: 21px; }
.p-icon.on svg { fill: currentColor; color: var(--brand); }

.p-body { flex: 1; display: grid; place-items: center; padding: 8px 0; min-height: 0; }
.p-cover {
  width: min(72vw, 290px); aspect-ratio: 1; border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.42); display: grid; place-items: center;
  background: rgba(255,255,255,.1); font-size: 46px; font-weight: 800;
}
.p-cover img { width: 100%; height: 100%; object-fit: cover; }
.p-lyric {
  width: 100%; max-height: 100%; overflow-y: auto; text-align: center;
  font-size: 15px; line-height: 2.15; color: rgba(255,255,255,.55);
  scrollbar-width: none;
}
.p-lyric::-webkit-scrollbar { display: none; }
.p-lyric .line { transition: .2s; }
.p-lyric .line.on { color: #fff; font-weight: 700; transform: scale(1.04); }
.p-lyric .muted { font-size: 12.5px; opacity: .7; }

.p-info { display: flex; align-items: center; gap: 12px; padding: 6px 0 2px; }
.p-text { min-width: 0; flex: 1; }
.p-title { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artist { font-size: 12.5px; color: rgba(255,255,255,.66); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 播放页歌词预览行：不用点按钮也能看见歌词，点一下切到整屏歌词 */
.p-peek {
  margin: 9px 0 0; height: 22px; line-height: 22px; text-align: center;
  font-size: 13px; color: rgba(255,255,255,.55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .25s ease, opacity .25s ease;
}
.p-peek.is-on { color: rgba(255,255,255,.92); }
.p-peek.is-empty { opacity: .45; font-size: 12px; }
.p-peek:active { opacity: .6; }

.p-prog { margin-top: 14px; }
.p-prog input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255,255,255,.26) var(--p, 0%));
  outline: 0;
}
.p-prog input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.p-times { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }

.p-controls { display: flex; align-items: center; justify-content: center; gap: 34px; margin: 18px 0 6px; }
.p-ctrl svg { width: 26px; height: 26px; }
.p-play {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #123;
}
.p-play svg { width: 26px; height: 26px; }

.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.p-q { display: flex; gap: 7px; flex-wrap: wrap; }
.p-q button {
  padding: 5px 11px; border-radius: 12px; font-size: 11px; color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.12);
}
.p-q button.on { background: var(--brand); color: #fff; font-weight: 600; }
.p-textbtn { font-size: 12px; color: rgba(255,255,255,.8); padding: 6px 4px; }

/* ================= 弹层 / toast ================= */
.mask { position: fixed; inset: 0; z-index: 70; background: rgba(10,14,18,.45); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  background: #fff; border-radius: 22px 22px 0 0; padding: 8px 20px calc(22px + var(--safe-b));
  box-shadow: 0 -8px 30px rgba(12,20,16,.16);
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 38px; height: 4px; border-radius: 3px; background: #e2e5e9; margin: 4px auto 14px; }
.sheet h3 { margin: 0 0 14px; font-size: 17px; }
.auth-tabs { display: flex; gap: 4px; padding: 3px; background: #f2f4f6; border-radius: 11px; margin-bottom: 14px; }
.auth-tab { flex: 1; height: 34px; border-radius: 9px; font-size: 13px; color: var(--ink-2); }
.auth-tab.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(16,22,28,.1); }
#authForm { display: flex; flex-direction: column; gap: 10px; }
.m-input {
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #f7f8fa; outline: 0; font-size: 14px;
}
.m-input:focus { border-color: #b6e8d2; background: #fff; }
.m-btn { height: 44px; border-radius: 12px; font-size: 14.5px; font-weight: 600; }
.m-btn.primary { background: var(--brand); color: #fff; }
.m-btn.ghost { background: #f2f4f6; color: var(--ink-2); }
.auth-err { margin: 0; padding: 8px 11px; border-radius: 9px; font-size: 12px; color: #8c2f22; background: #fbeeec; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--mini-h) + 34px + var(--safe-b));
  transform: translate(-50%, 12px); z-index: 90;
  max-width: 78vw; padding: 10px 16px; border-radius: 12px;
  background: rgba(18,22,28,.9); color: #fff; font-size: 12.5px; line-height: 1.5;
  opacity: 0; pointer-events: none; transition: .22s; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.empty { padding: 46px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty svg { width: 46px; height: 46px; margin-bottom: 12px; color: #d7dce2; }
/* 骨架屏：结构和真实结果行一致，带流光 */
.sk-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; }
.sk {
  background: linear-gradient(100deg, #eef1f4 20%, #f7f9fb 42%, #eef1f4 64%);
  background-size: 220% 100%;
  animation: sk 1.25s ease-in-out infinite;
  border-radius: 7px;
}
.sk-cov { width: 48px; height: 48px; border-radius: 11px; flex: none; }
.sk-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.sk-line { height: 12px; }
.sk-line.thin { height: 9px; opacity: .75; }
@keyframes sk { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* 结果行：来源小标 + 时长 */
.src-dot {
  display: inline-block; margin-left: 5px; padding: 0 4px;
  font-size: 9px; line-height: 14px; border-radius: 3px; vertical-align: 1px;
  color: var(--ink-3); background: #f1f3f5; border: 1px solid #e6e9ec;
}
.track-dur { font-size: 11px; color: var(--ink-3); margin-right: 2px; font-variant-numeric: tabular-nums; }

@media (min-width: 520px) {
  /* 桌面浏览器打开时也别撑成满屏，居中成手机宽度 */
  body { background: #e9ebee; }
  .app, .tabbar, .mini { max-width: 430px; margin-inline: auto; }
  .tabbar, .mini { left: 50%; right: auto; transform: translateX(-50%); width: 430px; }
  .player-inner { max-width: 430px; margin: 0 auto; }
  .page { max-width: 430px; margin-inline: auto; left: 50%; transform: translateX(-50%); width: 430px; }
}

/* ================= 更新横幅 & 加载更多 ================= */

.update-banner {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  text-align: left; border: 0; cursor: pointer;
  background: #eaf6ef; border: 1px solid #cfe7d8; border-radius: 14px;
  padding: 10px 14px; margin-bottom: 12px; color: #23634a;
}
.update-banner b { font-size: 13px; }
.update-banner span { font-size: 11.5px; color: #4a8166; }

.load-more { display: flex; justify-content: center; padding: 14px 0 4px; }
.load-more .m-btn { min-width: 180px; }

.rel-item { background: #f7f8f7; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.rel-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rel-head b { font-size: 14px; color: var(--ink); }
.rel-title { font-size: 13px; }
.rel-notes-view {
  margin: 8px 0 0; padding: 8px 10px; font-size: 12px; line-height: 1.7;
  color: var(--ink-2); background: #fff; border-radius: 10px;
  white-space: pre-wrap; font-family: inherit;
}
