:root {
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1b2130;
  --border: #283044;
  --border-soft: #202737;
  --text: #e9edf6;
  --muted: #8c96ac;
  --primary: #6c7cff;
  --primary-2: #9a6bff;
  --ok: #3ecf95;
  --err: #ff6f77;
  --warn: #f2b544;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --border: #dbe1ee;
  --border-soft: #e7ecf5;
  --text: #1c2333;
  --muted: #66708a;
  --primary: #4b5bd6;
  --primary-2: #8253d8;
  --ok: #138a5c;
  --err: #d64550;
  --warn: #a9740b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }

.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-soft); }
.topbar-in { height: 60px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
.brand-mark { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.nav { display: flex; gap: 20px; font-size: 13px; color: var(--muted); flex: 1; }
.nav a:hover { color: var(--text); }
.top-ops { display: flex; align-items: center; gap: 9px; }
.points { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.btn { font: inherit; font-size: 13px; padding: 8px 16px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; transition: .16s ease; white-space: nowrap; }
.btn:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; font-weight: 500; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.icon-btn:hover { color: var(--text); }

.hero { padding-top: 54px; padding-bottom: 26px; }
.hero-chip { display: inline-block; font-size: 12px; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: 34px; line-height: 1.25; margin: 0 0 10px; font-weight: 600; letter-spacing: -.5px; }
.grad { background: linear-gradient(100deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: var(--muted); margin: 0; font-size: 14px; }

.qs-main { padding-bottom: 60px; }
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.card.pad { padding: 20px 22px; margin-top: 16px; }
.card.pad h3 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }

.notice { border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); color: var(--text); font-size: 12.5px; padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; }
.notice b { color: var(--warn); }

.qs-panel { padding: 16px; }
.qs-field { width: 100%; resize: vertical; min-height: 62px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 13px; line-height: 1.6; outline: none; }
.qs-field:focus { border-color: var(--primary); }
.qs-field::placeholder { color: var(--muted); opacity: .75; }
.qs-actions { display: flex; gap: 9px; margin-top: 11px; flex-wrap: wrap; }
.qs-loadbar { height: 2px; margin-top: 12px; border-radius: 2px; overflow: hidden; background: transparent; }
.qs-loadbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transition: width .25s ease; }
.qs-loadbar.active span { width: 100%; }

.qs-console { margin-top: 12px; min-height: 0; max-height: 220px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.9; display: none; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.qs-console.active { display: block; }
.qs-console .cl { display: flex; gap: 9px; white-space: pre-wrap; word-break: break-all; }
.qs-console .ts { color: var(--muted); flex: none; }
.qs-console .ic { flex: none; width: 12px; color: var(--muted); }
.qs-console .ok { color: var(--ok); }
.qs-console .err { color: var(--err); }
.qs-console .warn { color: var(--warn); }
.cl-final { margin-top: 8px; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); border-radius: 10px; padding: 10px 12px; }
.cl-final .fhead { display: flex; gap: 8px; align-items: center; color: var(--ok); font-size: 12px; }
.fbadge { width: 17px; height: 17px; border-radius: 50%; background: var(--ok); color: var(--bg); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.cl-final .fsong { font-family: var(--font); font-size: 15px; font-weight: 600; margin-top: 6px; }
.cl-final .fmeta, .cl-final .fthanks { font-family: var(--font); font-size: 12px; color: var(--muted); }

.qs-result { margin-top: 16px; padding: 18px; }
.qs-rhead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qs-cover { width: 78px; height: 78px; border-radius: 10px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border-soft); }
.qs-info { flex: 1; min-width: 200px; }
.qs-songtitle { font-size: 19px; font-weight: 600; }
.qs-artist { color: var(--muted); font-size: 13px; margin-top: 2px; }
.qs-meta { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.tag { font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border-soft); padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.qs-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.qs-player-shell { margin-top: 16px; border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; background: #05070d; }
#qsPlayer { display: block; width: 100%; height: 520px; border: 0; background: #05070d; }
/* 结果卡贴近参考页：歌手名高亮、标签描边、下载按钮强调 */
.qs-artist { color: var(--primary); font-weight: 600; }
.tag { border-color: color-mix(in srgb, var(--muted) 35%, transparent); }
.qs-acts .btn.primary { background: linear-gradient(135deg, #ff5e6c, #ff3d5a); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(255,61,90,.25); }
.qs-note { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.85; }

.qs-hist { margin-top: 30px; }
.section-title { font-size: 17px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.qs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.qs-gitem { display: flex; gap: 11px; align-items: center; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 11px; padding: 10px; min-width: 0; }
.qs-gitem img, .qs-gitem .no-cover { width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.g-body { min-width: 0; }
.g-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-meta { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-time { font-size: 11px; color: var(--muted); opacity: .72; margin-top: 2px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }

.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.steps li { margin-bottom: 5px; }
.faq-item { border-top: 1px solid var(--border-soft); padding: 11px 0; font-size: 13px; }
.faq-item:first-of-type { border-top: 0; }
.faq-item b { font-weight: 600; }
.faq-item p { color: var(--muted); margin: 4px 0 0; }
.disclaimer { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.seo p { color: var(--muted); font-size: 13px; margin: 0 0 9px; line-height: 1.9; }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border-soft); padding-top: 18px; padding-bottom: 30px; color: var(--muted); font-size: 12px; }

.modal-mask { position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 12, .68); display: grid; place-items: center; padding: 20px; }
.modal-mask[hidden] { display: none; }
.modal { width: min(540px, 100%); max-height: 78vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.modal h3 { font-size: 15px; margin: 0 0 12px; font-weight: 600; }
.modal-close { float: right; }
.mitem { display: flex; gap: 11px; align-items: center; border-top: 1px solid var(--border-soft); padding: 10px 0; }
.mitem:first-of-type { border-top: 0; }
.mitem img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.mitem .info { flex: 1; min-width: 0; }
.mitem .t { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem .m { font-size: 11.5px; color: var(--muted); }
.mitem .ops { display: flex; gap: 6px; }
.modal-foot { display: flex; justify-content: flex-end; margin-top: 12px; }

/* 播放器 iframe 内部 */
.player-body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
.player { display: flex; gap: 16px; padding: 16px; height: 320px; }
.player-cover { width: 132px; flex: none; }
.player-cover img { width: 132px; height: 132px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.player-meta { margin-top: 12px; }
.player-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.player-artist { font-size: 12px; color: var(--muted); margin-top: 4px; }
.player-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lrc-box { flex: 1; overflow: hidden; position: relative; margin-bottom: 10px; mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.lrc-list { transition: transform .35s ease; }
.lrc-line { font-size: 12.5px; color: var(--muted); padding: 5px 0; transition: color .2s ease; }
.lrc-line.on { color: var(--primary); font-weight: 600; }
.player-ctl { display: flex; align-items: center; gap: 10px; }
.player-ctl .time { font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress { flex: 1; height: 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; cursor: pointer; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.player-hint { font-size: 12px; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; }

@media (max-width: 700px) {
  .nav { display: none; }
  .hero h1 { font-size: 27px; }
  .qs-rhead { align-items: flex-start; }
  .qs-cover { width: 62px; height: 62px; }
  #qsPlayer { height: 440px; }
  .player { flex-direction: column; height: 360px; }
  .player-cover { display: none; }
}
