/* ========================================================================
   音乐播放器 · 官方站点样式
   设计原则：简洁大方 / 响应式 / 明暗自适应 / 统一图标风格
   ======================================================================== */

/* ---------- 主题变量 ---------- */
:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #d946ef;
  --grad: linear-gradient(120deg, #6366f1 0%, #8b5cf6 45%, #d946ef 100%);

  --bg: #f6f7fb;
  --bg-alt: #eef0f6;
  --surface: #ffffff;
  --surface-2: #f1f2f8;
  --border: #e4e6ef;
  --text: #14162b;
  --text-soft: #4a4e68;
  --text-mut: #767b95;
  --shadow: 0 10px 30px -12px rgba(28, 30, 60, .18);
  --shadow-sm: 0 4px 14px -8px rgba(28, 30, 60, .25);
  --ring: rgba(99, 102, 241, .35);

  --radius: 16px;
  --radius-sm: 11px;
  --maxw: 1160px;
  --hdr-h: 66px;
}

[data-theme="dark"] {
  --bg: #0a0b0f;
  --bg-alt: #0e1016;
  --surface: #14161d;
  --surface-2: #1b1e27;
  --border: #262a36;
  --text: #e9ebf2;
  --text-soft: #b3b8c9;
  --text-mut: #828aa3;
  --shadow: 0 18px 44px -18px rgba(0, 0, 0, .7);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .6);
  --ring: rgba(139, 92, 246, .45);
}

/* 跟随系统（未手动选择时） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0a0b0f; --bg-alt: #0e1016; --surface: #14161d; --surface-2: #1b1e27;
    --border: #262a36; --text: #e9ebf2; --text-soft: #b3b8c9; --text-mut: #828aa3;
    --shadow: 0 18px 44px -18px rgba(0, 0, 0, .7);
    --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .6);
    --ring: rgba(139, 92, 246, .45);
  }
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -.01em; margin: 0; }
code { font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.ico { width: 1.15em; height: 1.15em; fill: none; flex: none; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px -10px var(--accent-2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px var(--accent-2); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--hdr-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-sm);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.nav-links { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--text-soft); transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); display: grid; place-items: center; cursor: pointer;
  transition: color .2s, border-color .2s, transform .15s; box-shadow: var(--shadow-sm);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn:active { transform: scale(.94); }
.menu-btn { display: none; }
.theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .theme-toggle .ico-sun { display: none; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .theme-toggle .ico-moon { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(54px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); }
.hero-bg {
  position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: 0;
  background:
    radial-gradient(40% 55% at 18% 12%, rgba(99,102,241,.28), transparent 70%),
    radial-gradient(38% 50% at 82% 8%, rgba(217,70,239,.22), transparent 70%),
    radial-gradient(45% 60% at 55% 35%, rgba(139,92,246,.18), transparent 70%);
  filter: blur(8px); opacity: .9; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.hero-title { font-size: clamp(34px, 6.4vw, 62px); font-weight: 850; letter-spacing: -.03em; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-soft); margin: 20px auto 0; max-width: 660px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.hero-stats {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px, 5vw, 52px);
  margin: 46px 0 0; padding: 0;
}
.hero-stats li { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; }
.hero-stats span { font-size: 13px; color: var(--text-mut); margin-top: 2px; }

/* ---------- 区块通用 ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(34px, 5vw, 54px); }
.section-head h2 { font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; margin-top: 12px; }
.section-lead { color: var(--text-soft); font-size: 16px; margin-top: 12px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .25s ease, border-color .2s;
}
.card.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); margin-bottom: 16px;
}
.card-ico .ico { width: 24px; height: 24px; fill: none; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 15px; margin: 0; }

/* ---------- 分栏（Web / App） ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split-reverse .split-text { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 0; }
}
.split-text h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin: 12px 0 14px; }
.split-text > p { color: var(--text-soft); font-size: 16px; }
.check-list { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 11px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--text-soft); }
.check-list .ico { color: var(--accent); width: 20px; height: 20px; margin-top: 3px; fill: none; }
.note { font-size: 13.5px; color: var(--text-mut); margin: 14px 0 0; }
.note code, .panel-desc code, .card p code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; color: var(--text); }
.app-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 视觉 mock ---------- */
.mock { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.mock-web { aspect-ratio: 16 / 11; }
.mock-bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.mock-body { display: flex; gap: 20px; padding: 22px; align-items: center; }
.mock-cover { width: 38%; aspect-ratio: 1; border-radius: 14px; background: var(--grad); box-shadow: 0 12px 26px -12px var(--accent-2); flex: none; }
.mock-lines { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ml-title { font-weight: 700; font-size: 17px; }
.ml-sub { font-size: 13px; color: var(--text-mut); }
.ml-progress { height: 7px; border-radius: 99px; background: var(--surface-2); position: relative; margin-top: 6px; }
.ml-progress::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 46%; border-radius: 99px; background: var(--grad); }
.mock-ctrls, .phone-ctrls { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.mock-ctrls i, .phone-ctrls i { width: 12px; height: 12px; border-radius: 50%; background: var(--border); }
.mock-ctrls i:nth-child(2), .phone-ctrls i:nth-child(2) { width: 18px; height: 18px; background: var(--accent); }

.mock-phone { width: min(280px, 78%); aspect-ratio: 9 / 18; margin: 0 auto; border-radius: 30px; padding: 12px; background: var(--surface-2); }
.phone-notch { width: 42%; height: 7px; border-radius: 99px; background: var(--border); margin: 4px auto 14px; }
.phone-screen { background: var(--surface); border-radius: 20px; height: calc(100% - 30px); padding: 20px 18px; display: flex; flex-direction: column; align-items: center; }
.phone-cover { width: 100%; aspect-ratio: 1; border-radius: 16px; background: var(--grad); box-shadow: 0 14px 30px -14px var(--accent-2); }
.phone-meta { width: 100%; margin-top: 16px; display: grid; gap: 9px; }
.phone-meta span { height: 9px; border-radius: 99px; background: var(--surface-2); }
.phone-meta span:first-child { width: 70%; height: 13px; }
.phone-meta span:last-child { width: 46%; }
.phone-progress { width: 100%; height: 6px; border-radius: 99px; background: var(--surface-2); margin: 22px 0 14px; position: relative; }
.phone-progress::after { content: ""; position: absolute; inset: 0 54% 0 0; border-radius: 99px; background: var(--grad); }

/* ---------- 真实截图：浏览器框 / 手机框 ---------- */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.browser {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow); margin: 0;
}
.browser-bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.browser-bar > span {
  width: 11px; height: 11px; border-radius: 50%; background: var(--border);
}
.browser-bar > span:nth-child(1) { background: #ff5f57; }
.browser-bar > span:nth-child(2) { background: #febc2e; }
.browser-bar > span:nth-child(3) { background: #28c840; }
.browser-url {
  margin-left: 10px; flex: 1; font-size: 12.5px; color: var(--text-mut);
  background: var(--bg); border-radius: 7px; padding: 4px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-body { background: var(--bg-alt); line-height: 0; }
.browser-body img { width: 100%; height: auto; display: block; }
[data-theme="dark"] .browser-body { background: #0b0d13; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .browser-body { background: #0b0d13; }
}

.phone-frame {
  width: min(300px, 78%); margin: 0 auto; border-radius: 34px; padding: 10px;
  background: #0a0b0f; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.phone-frame img { width: 100%; display: block; border-radius: 24px; }
.phone-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.phone-duo .phone-frame { width: 100%; margin: 0; }
@media (max-width: 640px) { .phone-duo { grid-template-columns: 1fr; } }

/* 双图并排视觉 */
.split-visual { display: grid; gap: 18px; }
.browser-sm { max-width: 320px; margin-left: auto; }

/* ---------- 步骤列表 ---------- */
.step-list { list-style: none; counter-reset: step; padding: 0; margin: 18px 0 22px; display: grid; gap: 14px; }
.step-list li {
  counter-increment: step; position: relative; padding-left: 42px;
  font-size: 15px; color: var(--text-soft); line-height: 1.6;
}
.step-list li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 700;
}
.step-list code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; color: var(--text); }

.source-flow { margin: 30px 0 26px; }
.flow-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.step-inline { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .step-inline { grid-template-columns: 1fr; } }

/* ---------- 截图网格 ---------- */
.shot-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); margin-top: 26px; }
.shot-grid .browser-wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .shot-grid { grid-template-columns: 1fr; } }

/* ---------- 部署 Tabs ---------- */
.tabs { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.tab-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--text-soft);
  font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s;
}
.tab .ico { width: 18px; height: 18px; fill: none; }
.tab:hover { color: var(--accent); }
.tab.is-active { background: var(--surface); color: var(--accent); border-color: var(--border); box-shadow: var(--shadow-sm); }
.tab-panel { padding: clamp(20px, 3vw, 30px); }
.tab-panel[hidden] { display: none; }
.panel-desc { color: var(--text-soft); margin: 0 0 16px; font-size: 15px; }

.code-block { position: relative; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
[data-theme="dark"] .code-block { background: #0b0d13; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .code-block { background: #0b0d13; }
}
.code-block pre { margin: 0; padding: 18px 18px; overflow-x: auto; }
.code-block code { font-size: 13.5px; line-height: 1.65; color: var(--text); white-space: pre; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  display: grid; place-items: center; cursor: pointer; transition: color .2s, border-color .2s, transform .15s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.copied { color: #fff; background: var(--accent); border-color: var(--accent); }
.copy-btn .ico { width: 17px; height: 17px; fill: none; }

/* ---------- CTA band ---------- */
.cta-band { padding: clamp(50px, 7vw, 84px) 0; background: var(--grad); color: #fff; }
.cta-inner { text-align: center; }
.cta-band h2 { font-size: clamp(24px, 4vw, 38px); font-weight: 850; }
.cta-band p { margin: 12px 0 26px; opacity: .92; font-size: 16px; }
.cta-band .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 54px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--text-mut); font-size: 14px; margin: 12px 0 0; max-width: 280px; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.footer-col a { display: block; color: var(--text-soft); font-size: 14px; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--text-mut); font-size: 13px;
}

/* ---------- 滚动揭示动画（JS 门控：无 JS 时内容始终可见，利于 SEO） ---------- */
.reveal { transition: opacity .6s ease, transform .6s ease; }
html.reveal-ready .reveal:not(.in) { opacity: 0; transform: translateY(22px); }
@media (prefers-reduced-motion: reduce) {
  html.reveal-ready .reveal:not(.in) { opacity: 1; transform: none; }
  .reveal { transition: none; }
}

/* ---------- 移动端导航 ---------- */
@media (max-width: 860px) {
  .nav-links {
    position: fixed; left: 14px; right: 14px; top: calc(var(--hdr-h) + 8px);
    flex-direction: column; gap: 4px; padding: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 11px 12px; border-radius: 9px; }
  .nav-links a:hover { background: var(--surface-2); }
  .menu-btn { display: grid; }
  .github-link span { display: none; }
  .github-link { padding: 10px; }
}
@media (max-width: 420px) {
  .btn .label-full { display: none; }
}
