/* 速下 · 无水印下载工具站 —— 全站样式 */
:root {
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --card: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #4f46e5;
  --brand-2: #9333ea;
  --grad: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  --ok: #12b76a;
  --err: #d92d20;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 24px -6px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 20px 50px -12px rgba(79, 70, 229, 0.25);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e16;
    --bg-soft: #141826;
    --card: #161a29;
    --ink: #e8eaf2;
    --muted: #9aa1b5;
    --line: #262c40;
    --shadow-md: 0 6px 24px -6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.flex-spacer { flex: 1; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo b { font-weight: 700; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav > a, .nav .lang-switch {
  color: var(--muted); padding: 7px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500;
}
.nav > a:hover, .nav > a.on { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.lang-switch { border: 1px solid var(--line); }
.dropdown { position: relative; }
.dropdown summary {
  list-style: none; cursor: pointer; color: var(--muted); padding: 7px 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; user-select: none;
}
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary:hover { color: var(--ink); background: var(--bg-soft); }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 8px; min-width: 150px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.dropdown-menu a { color: var(--ink); font-size: 14px; padding: 7px 10px; border-radius: 8px; }
.dropdown-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.dropdown-menu a.on { color: var(--brand); font-weight: 600; }

/* ---------- Hero 与下载组件 ---------- */
.hero { padding: 64px 0 40px; }
.hero-inner { text-align: center; max-width: 820px; }
.hero-title {
  font-size: clamp(26px, 4.4vw, 44px); line-height: 1.28; font-weight: 800;
  letter-spacing: -0.5px; margin: 0 0 14px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { color: var(--muted); font-size: clamp(14.5px, 1.8vw, 17px); margin: 0 auto 30px; max-width: 640px; }

.dl-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 14px; text-align: left;
}
#dl-input {
  width: 100%; border: none; outline: none; resize: none;
  font: inherit; font-size: 15px; color: var(--ink); background: transparent;
  padding: 10px 8px 6px; min-height: 44px; max-height: 160px; line-height: 1.5;
}
#dl-input::placeholder { color: var(--muted); opacity: 0.75; }
.dl-actions { display: flex; align-items: center; gap: 8px; padding-top: 8px; }
.btn {
  border: none; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: 11px; padding: 9px 18px; font-size: 14.5px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.5); }
.btn.primary:hover { box-shadow: 0 12px 26px -6px rgba(79, 70, 229, 0.6); }
.btn.ghost { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--line); }
.btn.sm { padding: 7px 13px; font-size: 13.5px; border-radius: 9px; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.dl-hint { color: var(--muted); font-size: 12.5px; padding: 8px 6px 2px; border-top: 1px dashed var(--line); margin-top: 10px; }

.dl-result { max-width: 820px; margin: 22px auto 0; text-align: left; }

/* 解析状态 / 错误 */
.parse-msg {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
}
.parse-msg .spinner {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 3px solid var(--bg-soft); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.parse-msg.error { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.parse-msg .emoji { font-size: 22px; }
.parse-msg p { margin: 0; font-size: 14.5px; }

/* 结果卡片 */
.res-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.res-head { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); align-items: center; }
.res-cover {
  width: 74px; height: 74px; border-radius: 12px; object-fit: cover; flex: none;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.res-meta { min-width: 0; flex: 1; }
.res-title { font-weight: 700; font-size: 15.5px; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-sub { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.tag {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 2px 9px; letter-spacing: 0.3px;
}
.tag.platform { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.tag.type { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tag.nowm { background: color-mix(in srgb, var(--brand-2) 12%, transparent); color: var(--brand-2); }

.res-body { padding: 16px 18px 20px; }
.res-body video { width: 100%; max-height: 460px; border-radius: 12px; background: #000; outline: none; }
.res-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.res-actions .hint { color: var(--muted); font-size: 12.5px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.m-item {
  position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 3/4; background: var(--bg-soft); display: block;
}
.m-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-item .m-dl {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(16, 24, 40, 0.72); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; opacity: 0; transition: opacity 0.15s ease;
}
.m-item:hover .m-dl { opacity: 1; }
.m-item .m-live {
  position: absolute; left: 8px; top: 8px; font-size: 10.5px; font-weight: 700;
  background: rgba(147, 51, 234, 0.9); color: #fff; border-radius: 7px; padding: 2px 7px;
}
.m-item .m-no { position: absolute; left: 8px; bottom: 8px; font-size: 11px; color: #fff; background: rgba(16,24,40,.55); border-radius: 6px; padding: 1px 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; color: var(--ink); font-weight: 500;
}
.chip:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow-sm); }
.chip i {
  font-style: normal; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11.5px; font-weight: 700;
}

/* ---------- 通用区块 ---------- */
.section { padding: 46px 0; }
.section:nth-of-type(even) { background: color-mix(in srgb, var(--bg-soft) 55%, var(--bg)); }
.sec-head { margin-bottom: 26px; }
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--brand); text-transform: uppercase; margin-bottom: 6px;
}
.sec-head h2 { font-size: clamp(20px, 2.6vw, 27px); margin: 0; font-weight: 800; letter-spacing: -0.3px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 14px; box-shadow: var(--shadow-sm);
}
.step-no {
  font-size: 15px; font-weight: 800; color: var(--brand); flex: none;
  width: 38px; height: 38px; border-radius: 11px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 2px 0 6px; font-size: 15.5px; }
.step p { margin: 0; color: var(--muted); font-size: 13.8px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.p-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--ink); display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.p-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.p-letter {
  width: 40px; height: 40px; border-radius: 12px; color: #fff; font-style: normal;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
  margin-bottom: 4px;
}
.p-card strong { font-size: 16px; }
.p-desc { color: var(--muted); font-size: 13px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature span { font-size: 26px; }
.feature h3 { margin: 8px 0 6px; font-size: 15.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 0 18px; box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; font-weight: 650; font-size: 15px; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-weight: 700; font-size: 18px; }
.faq details[open] summary::after { content: '–'; }
.faq-a { padding: 0 0 15px; }
.faq-a p { margin: 0; color: var(--muted); font-size: 14px; }

.links-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.link-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px;
  color: var(--ink); display: flex; flex-direction: column; gap: 3px;
}
.link-card:hover { text-decoration: none; border-color: var(--brand); }
.link-card strong { font-size: 14.5px; }
.link-card span { color: var(--muted); font-size: 12.8px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 36px 0 30px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; margin-bottom: 24px; }
.footer-grid b { display: block; margin-bottom: 10px; font-size: 13.5px; }
.footer-grid a { display: block; color: var(--muted); font-size: 13.5px; padding: 3.5px 0; }
.footer-grid a:hover { color: var(--ink); }
.disclaimer { color: var(--muted); font-size: 12.5px; margin: 0 0 6px; max-width: 760px; }
.copy { color: var(--muted); font-size: 12.5px; margin: 0; }

/* 模式切换标签 */
.dl-tabs {
  display: inline-flex; gap: 2px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin: 4px 6px 2px;
}
.dl-tab {
  border: none; background: transparent; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 5px 14px; border-radius: 8px; transition: background 0.12s ease, color 0.12s ease;
}
.dl-tab:hover { color: var(--ink); }
.dl-tab.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); }

/* 批量结果 */
.batch-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden; text-align: left;
}
.batch-bar {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  border-bottom: 1px solid var(--line); background: var(--bg-soft);
  flex-wrap: wrap;
}
.dl-type {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 10px; cursor: pointer; outline: none;
}
.dl-type:focus { border-color: var(--brand); }
.batch-sum { font-size: 14px; font-weight: 700; }
.batch-list { max-height: 640px; overflow-y: auto; }
.b-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.b-item:last-child { border-bottom: none; }
.b-item[data-state="ok"] { background: color-mix(in srgb, var(--ok) 4%, transparent); }
.b-item[data-state="fail"] { background: color-mix(in srgb, var(--err) 4%, transparent); }
.b-no {
  flex: none; width: 24px; height: 24px; border-radius: 7px; font-size: 12px; font-weight: 700;
  background: var(--bg-soft); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.b-status { flex: none; font-size: 15px; width: 20px; text-align: center; }
.b-item[data-state="run"] .b-status { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.b-thumb {
  flex: none; width: 44px; height: 58px; border-radius: 8px; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--muted); font-size: 15px;
}
.b-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-meta { flex: 1; min-width: 0; }
.b-title {
  margin: 0 0 3px; font-size: 13.8px; font-weight: 650; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.b-sub { margin: 0; font-size: 12.3px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.b-sub.err { color: var(--err); }
.b-actions { flex: none; display: flex; gap: 8px; align-items: center; }

@media (max-width: 640px) {
  .b-item { flex-wrap: wrap; }
  .b-actions { width: 100%; justify-content: flex-end; }
  .b-thumb { width: 36px; height: 48px; }
}

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 10px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 99; box-shadow: var(--shadow-md);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero { padding: 40px 0 28px; }
  .nav > a:not(.lang-switch) { display: none; }
  .res-head { flex-wrap: wrap; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .section { padding: 34px 0; }
}
