:root {
  --bg: #0a0a12;
  --bg-soft: #10101c;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #f2f2f7;
  --text-dim: #9a9ab0;
  --red: #ff3d5a;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "Space Grotesk", sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---------- 背景装饰 ---------- */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(139, 92, 246, 0.14), transparent 60%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.orb-red {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255, 61, 90, 0.5), transparent 65%);
  top: -120px; left: -100px;
  animation: drift 22s ease-in-out infinite alternate;
}
.orb-violet {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.42), transparent 65%);
  top: 30%; right: -180px;
  animation: drift 28s ease-in-out infinite alternate-reverse;
}
.orb-cyan {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.32), transparent 65%);
  bottom: -140px; left: 28%;
  animation: drift 25s ease-in-out infinite alternate;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, 70px) scale(0.95); }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
}

/* ---------- 通用 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
}

.gradient-text {
  background: linear-gradient(92deg, var(--red), var(--violet) 55%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 导航 ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--violet));
  box-shadow: 0 4px 18px rgba(255, 61, 90, 0.35);
}
.brand-mark svg { width: 20px; height: 20px; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ---------- 语言切换 ---------- */
.lang-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.lang-btn {
  padding: 5px 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: linear-gradient(120deg, var(--red), var(--violet));
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 88px 24px 40px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.hero-eyebrow svg { width: 15px; height: 15px; color: var(--cyan); }

.hero-title {
  margin-top: 26px;
  font-size: clamp(38px, 6.5vw, 64px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 16.5px;
}

/* ---------- 下载输入框 ---------- */
.grab-box {
  display: flex;
  gap: 12px;
  margin: 40px auto 0;
  max-width: 720px;
}

.grab-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.grab-icon {
  position: absolute;
  left: 18px;
  width: 18px; height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

#urlInput {
  width: 100%;
  padding: 17px 52px 17px 48px;
  font-size: 15.5px;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  outline: none;
  backdrop-filter: blur(14px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#urlInput::placeholder { color: var(--text-dim); }
#urlInput:focus {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16), 0 0 28px rgba(139, 92, 246, 0.18);
}

.paste-btn {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.paste-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.paste-btn svg { width: 17px; height: 17px; }

.grab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 28px;
  min-width: 148px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(120deg, var(--red), var(--violet));
  box-shadow: 0 6px 26px rgba(255, 61, 90, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.grab-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(255, 61, 90, 0.45); }
.grab-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.grab-btn-label { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.grab-btn-label svg { width: 18px; height: 18px; }

.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.detect-hint {
  margin-top: 14px;
  font-size: 14px;
  color: var(--cyan);
}
.detect-hint.error { color: var(--red); }

/* ---------- 平台标识 ---------- */
.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 14px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s, color 0.2s, border-color 0.2s;
}
.platform-chip svg { width: 16px; height: 16px; }
.platform-chip .brand-icon { width: 16px; height: 16px; }
.platform-chip:hover { transform: translateY(-3px); color: var(--text); }
.platform-chip.yt:hover { border-color: rgba(255, 61, 90, 0.6); }
.platform-chip.tt:hover { border-color: rgba(34, 211, 238, 0.6); }
.platform-chip.ig:hover { border-color: rgba(139, 92, 246, 0.6); }

/* ---------- 解析结果 ---------- */
.result-zone {
  max-width: 960px;
  margin: 26px auto 0;
  padding: 0 24px;
}

.result-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 22px;
  animation: rise 0.45s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.thumb-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.duration-badge {
  position: absolute;
  right: 8px; bottom: 8px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12.5px;
  font-family: "Space Grotesk", monospace;
}

.res-info h3 {
  margin: 8px 0 4px;
  font-size: 19px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-platform {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.res-uploader { color: var(--text-dim); font-size: 14px; }

.format-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 12px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.tab svg { width: 15px; height: 15px; }
.tab.active {
  background: linear-gradient(120deg, rgba(255, 61, 90, 0.22), rgba(139, 92, 246, 0.22));
  border-color: rgba(139, 92, 246, 0.55);
  color: var(--text);
}

.format-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}
.format-list::-webkit-scrollbar { width: 6px; }
.format-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }

.format-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, background 0.2s;
}
.format-item:hover { border-color: rgba(34, 211, 238, 0.4); background: rgba(255, 255, 255, 0.06); }

.format-meta { display: flex; align-items: center; gap: 12px; font-size: 14.5px; }
.format-quality { font-weight: 700; font-family: "Space Grotesk", sans-serif; }
.format-ext {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
}
.format-size { color: var(--text-dim); font-size: 13px; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(120deg, var(--red), var(--violet));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.2s;
}
.dl-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255, 61, 90, 0.4); }
.dl-btn svg { width: 15px; height: 15px; }

.format-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.dl-link:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.08);
}
.dl-link svg { width: 15px; height: 15px; }

/* ---------- 区块 ---------- */
.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 90px 24px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 44px;
}

/* ---------- 功能 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.feature {
  padding: 28px 24px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.14);
}
.feature > svg {
  width: 30px; height: 30px;
  color: var(--cyan);
  margin-bottom: 16px;
}
.feature:nth-child(1) > svg { color: var(--red); }
.feature:nth-child(2) > svg { color: var(--violet); }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 14.5px; }

/* ---------- 步骤 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.step {
  position: relative;
  padding: 32px 24px 28px;
  text-align: center;
  transition: transform 0.25s, border-color 0.25s;
}
.step:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.45); }

.step-num {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, var(--red), var(--violet));
  box-shadow: 0 4px 16px rgba(255, 61, 90, 0.4);
}

.step > svg {
  width: 34px; height: 34px;
  color: var(--cyan);
  margin: 8px 0 14px;
}
.step h3 { font-size: 17.5px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq { overflow: hidden; }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  width: 17px; height: 17px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.25s;
}
.faq[open] summary svg { transform: rotate(180deg); color: var(--cyan); }

.faq p {
  padding: 0 22px 18px;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 110px;
  padding: 36px 24px 44px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-size: 13.5px;
}
.footer-dim { margin-top: 6px; opacity: 0.55; font-size: 12.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero { padding-top: 60px; }
  .grab-box { flex-direction: column; }
  .grab-btn { padding: 16px 28px; }
  .result-card { grid-template-columns: 1fr; }
  .thumb-wrap { aspect-ratio: 16 / 9; }
  .format-item { flex-wrap: wrap; }
}

/* ---------- 页脚链接 ---------- */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 18px;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* ---------- 法律/说明页正文 ---------- */
.legal {
  max-width: 760px;
  padding-top: 60px;
}
.legal h2 {
  margin: 40px 0 12px;
  font-size: 21px;
}
.legal p, .legal ul {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 12px;
}
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--cyan); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal-updated {
  text-align: center;
  font-size: 13.5px;
  margin-top: -28px;
  margin-bottom: 10px;
  opacity: 0.7;
}