/* ═══════════════════════════════════════════════════════════════
   SONAR · 页面级样式
   ═══════════════════════════════════════════════════════════════ */

/* ── 首页 Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: center;
  margin: 8px 0 44px;
  padding: clamp(26px, 4vw, 54px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 88% 12%, var(--accent-soft), transparent 55%),
    linear-gradient(160deg, var(--surface), var(--bg-deep));
  box-shadow: var(--shadow-s);
}
.hero__rings {
  position: absolute;
  right: -110px; top: 50%;
  width: 520px; height: 520px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.55;
}
.hero__rings circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.8;
  transform-origin: center;
}
.hero__rings circle:nth-child(1) { animation: pulseRing 6s var(--ease) infinite; }
.hero__rings circle:nth-child(2) { animation: pulseRing 6s var(--ease) 1.5s infinite; }
.hero__rings circle:nth-child(3) { animation: pulseRing 6s var(--ease) 3s infinite; }
.hero__rings circle:nth-child(4) { animation: pulseRing 6s var(--ease) 4.5s infinite; }

.hero__text { position: relative; z-index: 1; min-width: 0; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 8px 0 14px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero__lead {
  font-size: clamp(13.5px, 1.3vw, 15px);
  color: var(--ink-2);
  max-width: 40ch;
  line-height: 1.7;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__stats {
  display: flex;
  gap: 26px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.hero__stat b {
  display: block;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero__stat span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero__disc {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(100%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #111;
  display: grid;
  place-items: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  animation: spinSlow 26s linear infinite;
}
.hero__disc.is-paused { animation-play-state: paused; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.hero__disc::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 5px);
}
.hero__disc-art {
  width: 62%;
  height: 62%;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid #16181c;
  position: relative;
  z-index: 1;
}
.hero__disc-art img { width: 100%; height: 100%; object-fit: cover; }
.hero__disc-hole {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 2;
}
.hero__disc-btn {
  position: absolute;
  right: 4%; bottom: 4%;
  z-index: 3;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
  animation: none;
}
.hero__disc-btn svg { width: 22px; height: 22px; }

.genre-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }

/* ── 搜索结果 ── */
.search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
.search-head h1 { font-size: clamp(22px, 2.6vw, 30px); }
.search-head__text { min-width: 0; }
.search-head__meta {
  margin-top: 6px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 10.5px;
  color: var(--ink-3);
}
.source-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.source-strip .chip { font-size: 11.5px; height: 27px; }
.source-strip .chip i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.6;
  margin-left: 2px;
}

.search-suggest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}
.suggest-block {
  padding: 16px 18px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
}
.suggest-block h4 {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  font-weight: 500;
}
.suggest-block .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest-block .tag {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface-2);
  transition: all var(--dur);
}
.suggest-block .tag:hover { background: var(--accent-soft); color: var(--accent); }

/* ── 歌单 / 专辑详情头 ── */
.detail-head {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: end;
  margin: 6px 0 28px;
}
.detail-head__art {
  aspect-ratio: 1;
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-l);
  position: relative;
}
.detail-head__art img { width: 100%; height: 100%; object-fit: cover; }
.detail-head__ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent-soft), var(--teal-soft));
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 46px;
}
.detail-head__body { min-width: 0; padding-bottom: 6px; }
.detail-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
  overflow-wrap: anywhere;
}
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.detail-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.detail-desc { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); max-width: 70ch; line-height: 1.7; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }

/* ── 音乐库 ── */
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative;
  padding: 10px 15px;
  font-size: 13.5px;
  font-weight: 520;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color var(--dur);
}
.tabs button:hover { color: var(--ink); }
.tabs button.is-active { color: var(--ink); font-weight: 650; }
.tabs button.is-active::after {
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.tabs button i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-left: 5px;
}

.library-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; align-items: start; }
.side-panel {
  padding: 18px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: calc(var(--topbar-h) + 10px);
}
.side-panel h4 { font-size: 13px; margin-bottom: 10px; }
.mini-list { display: flex; flex-direction: column; gap: 2px; }
.mini-list a, .mini-list button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  text-align: left;
  width: 100%;
}
.mini-list a:hover, .mini-list button:hover { background: var(--surface-2); color: var(--ink); }
.mini-list b { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); font-weight: 400; }

/* ── 登录页 ── */
.auth-wrap {
  min-height: calc(100vh - var(--player-h) - var(--topbar-h) - 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 0 40px;
}
.auth-aside { position: relative; }
.auth-aside h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 10px 0 16px;
}
.auth-aside p { color: var(--ink-2); max-width: 40ch; line-height: 1.8; font-size: 14px; }
.auth-points { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.auth-point { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.auth-point span:first-child {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-top: 1px;
}
.auth-point span:first-child svg { width: 13px; height: 13px; }
.auth-point b { color: var(--ink); font-weight: 600; }

.auth-card {
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: var(--elev);
  box-shadow: var(--shadow-m);
}
.auth-card h2 { font-size: 21px; margin-bottom: 4px; }
.auth-card > p { font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.auth-switch button { color: var(--accent); font-weight: 600; }
.auth-card .btn--primary { margin-top: 4px; }
.auth-tip {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  line-height: 1.6;
}

/* ── 我的 ── */
.profile-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface), var(--bg-deep));
  margin-bottom: 24px;
}
.profile-avatar {
  width: 76px; height: 76px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { min-width: 0; flex: 1; }
.profile-info h1 { font-size: 24px; margin-bottom: 4px; }
.profile-info p { font-size: 12.5px; color: var(--ink-3); }
.profile-stats { display: flex; gap: 22px; margin-top: 12px; }
.profile-stats b { display: block; font-family: var(--font-serif); font-size: 19px; font-weight: 500; }
.profile-stats span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.panel {
  padding: 18px 20px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
}
.panel h3 { font-size: 14px; margin-bottom: 4px; }
.panel > p { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.panel__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.panel__row:last-child { border-bottom: 0; }
.panel__row .hint { max-width: 60%; text-align: right; }

/* ── 管理台 ── */
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.admin-tabs { margin-bottom: 18px; }
.source-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 8px;
}
.source-item__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); margin: 0 auto; }
.source-item__dot.is-ok { background: #2e9e6b; box-shadow: 0 0 0 4px rgba(46, 158, 107, 0.14); }
.source-item__dot.is-off { background: var(--surface-3); }
.source-item__dot.is-err { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.source-item__main { min-width: 0; }
.source-item__main b { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.source-item__main span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-item__act { display: flex; align-items: center; gap: 4px; }
.source-item__act .icon-btn { width: 30px; height: 30px; }
.source-item__act .icon-btn svg { width: 15px; height: 15px; }

.crawl-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  margin-bottom: 6px;
}
.crawl-result.is-ok { border-color: rgba(46, 158, 107, 0.35); background: rgba(46, 158, 107, 0.06); }
.crawl-result.is-bad { opacity: 0.6; }
.crawl-result .mono { margin-left: auto; font-size: 10px; }

/* ── 导入向导 ── */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 18px; }
.wizard-steps span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--surface-3);
}
.wizard-steps span.is-done { background: var(--accent); }
.wizard-steps span.is-now { background: var(--ink); }
.import-drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-m);
  padding: 22px;
  text-align: center;
  transition: all var(--dur);
  background: var(--surface-2);
}
.import-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.import-drop b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.import-drop span { font-size: 12px; color: var(--ink-3); }
.match-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.match-row:last-child { border-bottom: 0; }
.match-row .src { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row .arrow { color: var(--ink-3); text-align: center; }
.match-row .dst { min-width: 0; }
.match-row .dst b { display: block; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row .dst span { display: block; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row.is-none .dst b { color: var(--ink-3); font-weight: 400; }

/* ── 正在播放：移动端歌词视图切换 ── */
.now__tabs { display: flex; gap: 4px; justify-content: center; margin-bottom: 8px; }

/* ── 底部安全区 ── */
@supports (padding: max(0px)) {
  .player { padding-bottom: env(safe-area-inset-bottom, 0); height: calc(var(--player-h) + env(safe-area-inset-bottom, 0px)); }
}

/* ── 小屏桌面 ── */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .hero__disc { display: none; }
  .library-split { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .admin-grid { grid-template-columns: 1fr; }
  .player__inner { grid-template-columns: minmax(140px, 1fr) minmax(280px, 1.6fr) auto; }
}

@media (max-width: 980px) {
  .now__body { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 20px; overflow-y: auto; padding-bottom: 10px; }
  .now__art { width: min(56vw, 280px); }
  .now__side { align-items: center; }
  .now__lyrics { max-height: 30vh; }
  .auth-wrap { grid-template-columns: 1fr; max-width: 460px; }
  .auth-aside { display: none; }
  .detail-head { grid-template-columns: 160px minmax(0, 1fr); }
  .tracklist__head, .track-row { grid-template-columns: 28px minmax(0, 1fr) 66px 40px; }
  .track-row__album, .tracklist__head > :nth-child(3) { display: none; }
}
