:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --line: #e7e9f2;
  --ink: #0f1222;
  --ink-soft: #3d4257;
  --muted: #6b7186;
  --brand: #fe2c55;
  --brand-2: #7c5cff;
  --cyan: #12d3d3;
  --ok: #0f9d58;
  --warn: #b45309;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 18, 34, 0.06), 0 4px 14px rgba(15, 18, 34, 0.05);
  --shadow-lg: 0 24px 60px -24px rgba(15, 18, 34, 0.28), 0 2px 8px rgba(15, 18, 34, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(254, 44, 85, 0.7);
  flex: none;
}

.brand-mark svg {
  width: 17px;
  height: 17px;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: 8px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.nav a:hover {
  color: var(--brand);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: 0.18s ease;
}

.lang-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 40px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -220px 0 auto 0;
  height: 520px;
  background: radial-gradient(46% 60% at 50% 40%, rgba(254, 44, 85, 0.13), transparent 70%),
    radial-gradient(38% 52% at 22% 30%, rgba(124, 92, 255, 0.16), transparent 70%),
    radial-gradient(34% 48% at 78% 26%, rgba(18, 211, 211, 0.14), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--ink-soft);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(15, 157, 88, 0.14);
}

h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 20px 0 14px;
  font-weight: 800;
}

h1 .grad {
  background: linear-gradient(100deg, var(--brand), var(--brand-2) 62%, #12a3d3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 17px;
  color: var(--muted);
  margin: 0 auto;
  max-width: 620px;
}

/* ---------- parser card ---------- */
.parser {
  position: relative;
  margin: 32px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  text-align: left;
}

.parser label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 8px 2px;
}

.field {
  position: relative;
}

textarea#url-input,
input#url-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 15px;
  resize: vertical;
  min-height: 54px;
  outline: none;
  transition: 0.18s ease;
}

textarea#url-input {
  min-height: 92px;
  line-height: 1.55;
}

textarea#url-input:focus,
input#url-input:focus {
  border-color: rgba(254, 44, 85, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(254, 44, 85, 0.1);
}

.parser-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  transition: 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #ff5c7a 40%, var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(254, 44, 85, 0.85);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -12px rgba(254, 44, 85, 0.9);
}

.btn-primary[disabled] {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: #cfd3e2;
  background: var(--bg-soft);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13.5px;
  border-radius: 10px;
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-left: auto;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.8px;
  color: var(--ink-soft);
}

.chip .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

/* ---------- results ---------- */
.results {
  margin-top: 26px;
  text-align: left;
}

.result-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  animation: rise 0.35s ease both;
}

.result-card + .result-card {
  margin-top: 14px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.cover {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 3 / 4;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover .badge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(15, 18, 34, 0.72);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.result-body {
  min-width: 0;
}

.result-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.plat-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(254, 44, 85, 0.1);
  color: var(--brand);
}

.result-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.8px;
  color: var(--muted);
  margin-bottom: 14px;
}

.result-meta b {
  color: var(--ink-soft);
  font-weight: 650;
}

.author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  transition: 0.16s ease;
}

.dl:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.dl.alt {
  background: #fff;
  color: var(--ink-soft);
  border-color: var(--line);
}

.dl svg {
  width: 14px;
  height: 14px;
}

.img-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.img-strip a {
  width: 62px;
  height: 62px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}

.img-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notice {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13.5px;
  margin-top: 14px;
  border: 1px solid;
}

.notice.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: var(--warn);
}

.notice.err {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

/* skeleton */
.skeleton {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.sk {
  background: linear-gradient(90deg, #eef0f6 25%, #f7f8fc 37%, #eef0f6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  to {
    background-position: -400% 0;
  }
}

.sk-cover {
  aspect-ratio: 3 / 4;
}

.sk-line {
  height: 14px;
  margin-bottom: 10px;
}

/* ---------- sections ---------- */
section.block {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 34px;
}

.section-eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
  margin: 10px 0 8px;
  font-weight: 780;
}

.section-sub {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: 0.2s ease;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #dfe2ee;
}

.f-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 19px;
  margin-bottom: 14px;
  background: var(--bg-soft);
}

.feature h3 {
  font-size: 15.5px;
  margin: 0 0 6px;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.6;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  display: block;
  margin-bottom: 10px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
}

.step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.faq {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
  padding: 4px 2px;
}

details summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  font-weight: 640;
  font-size: 15.5px;
  position: relative;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--muted);
  font-weight: 400;
  transition: 0.2s ease;
}

details[open] summary::after {
  content: "−";
  color: var(--brand);
}

details p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.3px;
  line-height: 1.75;
  padding-right: 40px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 44px 0 30px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-grid h4 {
  font-size: 13px;
  margin: 0 0 12px;
  color: var(--ink);
}

.footer-grid p,
.footer-grid a {
  font-size: 13.2px;
  color: var(--muted);
  display: block;
  margin: 0 0 8px;
}

.footer-grid a:hover {
  color: var(--brand);
}

.legal {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.3px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- toast ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.toast {
  background: rgba(15, 18, 34, 0.92);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  animation: rise 0.25s ease both;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-4,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav {
    display: none;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 40px 0 24px;
  }
  .result-card,
  .skeleton {
    grid-template-columns: 108px 1fr;
    gap: 12px;
  }
  .grid-4,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hint {
    margin-left: 0;
    width: 100%;
  }
  .btn-primary.grow {
    width: 100%;
  }
  section.block {
    padding: 40px 0;
  }
}
