/* ==========================================================================
   倒带音乐 · 样式表
   设计方向：深墨黑磁带底 + 磁带白文字 + 橙红渐变（卷轴 / 倒带符号）
   首页一个搜索框；详情页内嵌播放器 + 频谱 + 歌词逐行高亮 + 三档下载
   ========================================================================== */

:root {
  --bg: #faf7f2;
  --bg-2: #f1ece3;
  --card: #ffffff;
  --card-2: #fffdf9;
  --ink: #1d1b17;
  --ink-2: #6f6a60;
  --ink-3: #a39d92;
  --line: rgba(29, 27, 23, 0.08);
  --line-2: rgba(29, 27, 23, 0.16);
  --accent: #ff4a1f;
  --accent-2: #e63e17;
  --grad: linear-gradient(135deg, #ff5a2d 0%, #ff7a45 100%);
  --accent-soft: rgba(255, 74, 31, 0.10);
  --radius: 12px;
  --radius-lg: 18px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; }

.wrap { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 22px; }

::selection { background: var(--accent); color: #fff; }

/* ───────────────────────────── 头部（非首页） ───────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; gap: 22px; height: 92px; }
.logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo-mark { color: var(--ink); }
.logo-word { font-size: 34px; font-weight: 800; letter-spacing: 0.02em; line-height: 1; }
.head-search {
  margin-left: auto;
  position: relative; display: flex; align-items: center;
  width: 240px; height: 38px;
  color: var(--ink-3);
}
.head-search svg { position: absolute; left: 12px; pointer-events: none; }
.head-search input {
  width: 100%; height: 100%;
  padding: 0 14px 0 38px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 13.5px; outline: none;
  transition: border-color 0.18s;
}
.head-search input:focus { border-color: var(--accent); }
.head-search input::placeholder { color: var(--ink-3); }

/* ───────────────────────────── 首页 ───────────────────────────── */
body.bare main { display: flex; align-items: center; }
.home { width: 100%; }
.home-inner {
  max-width: 620px; margin: 0 auto; padding: 48px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.home-logo { color: var(--ink); margin-bottom: 20px; filter: drop-shadow(0 8px 26px rgba(255, 74, 31, 0.22)); }
.home-title {
  font-size: clamp(30px, 6vw, 42px); font-weight: 800;
  letter-spacing: 0.04em; margin: 0;
}
.home-slogan { color: var(--ink-2); margin: 10px 0 34px; font-size: 15px; letter-spacing: 0.04em; }

.hero-search {
  position: relative; width: 100%; max-width: 540px;
  display: flex; align-items: center;
}
.hero-search svg { position: absolute; left: 20px; color: var(--ink-3); pointer-events: none; }
.hero-search input {
  width: 100%; height: 56px;
  padding: 0 22px 0 52px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 16px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.hero-search input:focus {
  border-color: var(--accent);
  background: var(--card-2);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 12px 40px -12px rgba(255, 74, 31, 0.4);
}
.hero-search input::placeholder { color: var(--ink-3); }

.hot-search { margin-top: 34px; width: 100%; }
.hot-label { display: block; color: var(--ink-3); font-size: 13px; margin-bottom: 14px; letter-spacing: 0.06em; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hot-tag {
  padding: 8px 18px; border-radius: 999px;
  border: none; color: #fff; font-size: 13.5px; font-weight: 500;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  box-shadow: 0 3px 12px -4px rgba(0, 0, 0, 0.22);
}
.hot-tag:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.3); }
.hot-tag.hot-g0 { background: linear-gradient(135deg, #ff6b35, #ff9068); }
.hot-tag.hot-g1 { background: linear-gradient(135deg, #ff5e7e, #ff8aa8); }
.hot-tag.hot-g2 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.hot-tag.hot-g3 { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.hot-tag.hot-g4 { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.hot-tag.hot-g5 { background: linear-gradient(135deg, #10b981, #34d399); }
.hot-tag.hot-g6 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.hot-tag.hot-g7 { background: linear-gradient(135deg, #ec4899, #f472b6); }

/* ───────────────────────────── 面包屑 / 页标题 ───────────────────────────── */
.crumb { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; margin-bottom: 18px; }
.crumb a:hover { color: var(--accent-2); }
.crumb i { font-style: normal; opacity: 0.5; }
.page-title { font-size: clamp(22px, 4vw, 30px); font-weight: 800; letter-spacing: 0.01em; }
.page-intro { color: var(--ink-2); margin: 8px 0 0; }

/* ───────────────────────────── 歌曲详情页 ───────────────────────────── */
.song-page { padding-bottom: 60px; }

/* 播放器卡片 */
.player {
  display: flex; gap: 28px; align-items: center;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 22px;
}
.player-cv { position: relative; flex-shrink: 0; }
.cv-wrap {
  width: 168px; height: 168px; border-radius: 14px; overflow: hidden;
  position: relative; z-index: 2;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.35);
}
.cv-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cv-wrap .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 700; color: var(--ink-3); background: var(--bg-2);
}
.no-cover .ph { display: flex; }

/* 黑胶圆盘：默认藏在封面后面，播放时滑出并旋转 */
.vinyl {
  position: absolute; left: 120px; bottom: -14px; z-index: 1;
  width: 96px; height: 96px; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #141416 0 3px, #242429 3px 5px);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.vinyl span { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); }
.player.playing .vinyl { transform: translateX(-14px); }
.player.playing .vinyl.spin { animation: spin 8s linear infinite; }
@keyframes spin { to { transform: translateX(-14px) rotate(360deg); } }

.player-body { flex: 1; min-width: 0; }
.player-kicker { color: var(--ink-3); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.player-name { font-size: clamp(24px, 4.4vw, 34px); font-weight: 800; margin: 6px 0 2px; line-height: 1.2; }
.player-artist { color: var(--ink-2); font-size: 15px; }
.player-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px;
  color: var(--ink-3); font-size: 13px;
}
.player-meta a:hover { color: var(--accent-2); }
.player-meta span::before { content: "·"; margin-right: 8px; color: var(--ink-3); }
.player-meta a:first-child::before, .player-meta span:first-child::before { content: none; }

/* 频谱 */
.spectrum { height: 56px; margin: 16px 0 14px; }
.spectrum canvas { width: 100%; height: 100%; display: block; }

/* 播放控制条 */
.player-ctrl { display: flex; align-items: center; gap: 14px; }
.pp-play {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px -6px rgba(255, 74, 31, 0.55);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pp-play:hover { transform: scale(1.05); }
.pp-play svg { width: 20px; height: 20px; }
.pp-play.loading svg { animation: pp-spin 0.8s linear infinite; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
.pp-progress {
  flex: 1; height: 6px; border-radius: 99px; background: var(--bg-2);
  position: relative; cursor: pointer;
}
.pp-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  border-radius: 99px; background: var(--grad);
}
.pp-knob {
  position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid #fff;
  transform: translate(-50%, -50%);
  left: 0; opacity: 0; transition: opacity 0.15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.pp-progress:hover .pp-knob { opacity: 1; }
.pp-time { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* 下载区 */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 34px; }
.dl-item {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 15px;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.dl-item:hover { border-color: var(--line-2); background: var(--card-2); transform: translateY(-2px); }
.dl-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); color: var(--ink-2);
}
.dl-item.is-mp3 .dl-icon { color: var(--accent-2); background: var(--accent-soft); }
.dl-item.is-flac .dl-icon { color: #f5a623; background: rgba(245, 166, 35, 0.12); }
.dl-item.is-lrc .dl-icon { color: #2f9fd8; background: rgba(47, 159, 216, 0.12); }
.dl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-title { font-weight: 700; font-size: 14.5px; }
.dl-note { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-go { color: var(--ink-3); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.dl-go svg { display: block; transition: color 0.18s; }
.dl-item:hover .dl-go { color: var(--accent-2); }
/* 悬停：下载图标放大淡出循环（涟漪效果） */
.dl-item:hover .dl-go svg { animation: dl-pulse 1.1s ease-out infinite; }
@keyframes dl-pulse {
  0% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.dl-empty { grid-column: 1 / -1; color: var(--ink-3); text-align: center; padding: 24px; }

/* 歌词 */
.lyric-sec { margin-bottom: 40px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sec-head h2 { font-size: 19px; font-weight: 800; }
.sec-count { color: var(--ink-3); font-size: 12.5px; }
.lyric-box {
  position: relative;
  max-height: 420px; overflow-y: auto;
  padding: 8px 4px;
  scroll-behavior: smooth;
}
.lyric-line {
  position: relative;
  padding: 7px 14px; border-radius: 8px;
  border-left: 3px solid transparent;
  color: var(--ink-2); font-size: 15px; line-height: 1.7;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.lyric-line.on {
  color: var(--accent-2); font-weight: 700;
  background: linear-gradient(90deg, rgba(255, 74, 31, 0.16), rgba(255, 74, 31, 0.04));
  border-left-color: var(--accent);
  transform: translateX(3px);
}
.lyric-empty { color: var(--ink-3); padding: 12px; }

/* 相关歌曲 */
.related { margin-bottom: 20px; }
.song-list { display: flex; flex-direction: column; }
.song-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: var(--radius);
  cursor: pointer; transition: background 0.15s;
}
.song-row:hover { background: var(--card); }
.song-row.on { background: var(--accent-soft); }
.song-row.on .s-name { color: var(--accent-2); }
.s-cover { width: 46px; height: 46px; flex-shrink: 0; }
.s-cv-in { width: 100%; height: 100%; border-radius: 9px; overflow: hidden; }
.s-cv-in img { width: 100%; height: 100%; object-fit: cover; }
.s-cv-in .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); color: var(--ink-3); font-weight: 700;
}
.s-main { flex: 1; min-width: 0; }
.s-name { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-sub { color: var(--ink-3); font-size: 12.5px; }
.s-meta { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 12.5px; flex-shrink: 0; }
.s-dur { font-variant-numeric: tabular-nums; }
.s-play { color: var(--ink-3); flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.song-row:hover .s-play { opacity: 1; color: var(--accent-2); }
.song-row .s-play svg { width: 18px; height: 18px; }
.empty { color: var(--ink-3); padding: 30px; text-align: center; }

/* 搜索页 */
.searchbar input {
  width: 100%; height: 48px; padding: 0 16px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 12px;
  font-size: 15px; outline: none;
}
.searchbar input:focus { border-color: var(--accent); }
.search-hit {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: var(--radius);
  transition: background 0.15s;
}
.search-hit:hover { background: var(--card); }
.sh-cv { width: 44px; height: 44px; flex-shrink: 0; border-radius: 9px; overflow: hidden; }
.sh-cv img { width: 100%; height: 100%; object-fit: cover; }
.sh-cv .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-2); color: var(--ink-3); font-weight: 700; }
.sh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sh-name { font-weight: 600; }
.sh-sub { color: var(--ink-3); font-size: 12.5px; }
.sh-dur { color: var(--ink-3); font-size: 12.5px; }

/* 标签云 / 列表页 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: 13.5px;
  transition: all 0.18s;
}
.tag-cloud a:hover { border-color: var(--accent); color: var(--ink); }
.tag-cloud span { color: var(--ink-3); font-size: 12px; }

.pager { display: flex; gap: 8px; justify-content: center; margin: 30px 0; }
.pager a, .pager span { padding: 7px 13px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; }
.pager .cur { background: var(--grad); border-color: transparent; color: #fff; }
.pager a:hover { border-color: var(--accent); color: var(--ink); }

/* 关于页 prose */
.prose { max-width: 720px; }
.prose h2 { font-size: 18px; margin: 26px 0 10px; }
.prose p { color: var(--ink-2); }
.prose ul { padding-left: 20px; color: var(--ink-2); }
.prose a { color: var(--accent-2); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 26px -10px rgba(255, 74, 31, 0.6);
  transition: transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }

/* 404 */
.nf-mark { color: var(--ink); margin-bottom: 14px; }
.nf-code { font-size: 54px; font-weight: 800; color: var(--accent); }
.nf-text { color: var(--ink-2); margin: 8px 0 26px; }

/* ───────────────────────────── 页脚 ───────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 34px 0 40px; margin-top: 40px;
  color: var(--ink-3); font-size: 12.5px;
  text-align: center;
}
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 15px; }
.foot-slogan { margin: 8px 0 14px; }
.foot-note { line-height: 1.7; }
.foot-note a { color: var(--ink-2); }

/* ───────────────────────────── 二维码弹窗 ───────────────────────────── */
.qr-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.qr-modal.open { opacity: 1; visibility: visible; }
.qr-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 18, 15, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.qr-dialog {
  position: relative; z-index: 1;
  background: #fff; border-radius: 18px;
  padding: 28px 32px 24px; width: 320px; max-width: 90vw;
  text-align: center;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.4);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s;
}
.qr-modal.open .qr-dialog { transform: translateY(0) scale(1); }
.qr-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 26px; line-height: 1; color: var(--ink-3);
  padding: 4px;
}
.qr-close:hover { color: var(--ink); }
.qr-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.qr-sub { color: var(--ink-3); font-size: 13px; margin: 4px 0 16px; }
.qr-box { display: flex; justify-content: center; }
.qr-box svg { width: 200px; height: 200px; border-radius: 6px; }
.qr-tip { color: var(--ink-2); font-size: 13px; margin: 14px 0 16px; }
.qr-download {
  display: inline-block; padding: 9px 28px; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 20px -8px rgba(255, 74, 31, 0.6);
  transition: transform 0.15s;
}
.qr-download:hover { transform: translateY(-1px); }

/* ───────────────────────────── 响应式 ───────────────────────────── */
@media (max-width: 720px) {
  .player { flex-direction: column; align-items: flex-start; gap: 20px; padding: 20px; }
  .cv-wrap { width: 132px; height: 132px; }
  .vinyl { left: 92px; width: 78px; height: 78px; }
  .downloads { grid-template-columns: 1fr; }
  .s-album { display: none; }
  .head-search { width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
