:root {
  --bg: #0f1c24;
  --bg-2: #163040;
  --panel: #f4f7f5;
  --ink: #142028;
  --muted: #5b6b74;
  --accent: #1f7a6c;
  --accent-2: #e07a3d;
  --line: #d5e0dc;
  --danger: #b42318;
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #2a6f63 0%, transparent 55%),
    radial-gradient(900px 420px at 90% 0%, #c96b3a 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 42%, #eef3f0 42%, #eef3f0 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #f5faf8;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f5faf8;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

.top nav {
  display: flex;
  gap: 1rem;
}

.top nav a {
  color: #d7ebe5;
  font-size: 0.95rem;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.hero {
  text-align: center;
  color: #f5faf8;
  padding: 2.5rem 0 2rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
}

.lead {
  margin: 0.75rem 0 1.5rem;
  opacity: 0.9;
}

.parse-box {
  display: flex;
  gap: 0.6rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.parse-box input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
}

.parse-box button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  background: var(--accent-2);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  min-width: 5.5rem;
}

.parse-box button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.hint {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.status,
.result,
.info,
.faq {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-top: 1.25rem;
}

.status.error {
  color: var(--danger);
  border-color: #f0b4ae;
  background: #fff5f4;
}

.status.loading {
  color: var(--muted);
}

.result-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
}

.result-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  background: #dde7e3;
}

.badge {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #d9efe9;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.meta h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  line-height: 1.4;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.links {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.batch-row {
  background: #f7faf8;
  border-color: #cfe0da;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.link-row span {
  flex: 1;
  min-width: 140px;
  font-size: 0.92rem;
}

.link-row a,
.link-row button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.link-row a.primary,
.link-row button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.link-row a.ghost,
.link-row button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  text-decoration: none;
}

.link-row a.ghost:hover,
.link-row button.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.link-row button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.dl-progress {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20, 32, 40, 0.06);
}

.dl-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink);
}

.dl-progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e4ece9;
  overflow: hidden;
}

.dl-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #2fa894);
  transition: width 0.12s ease-out;
}

.dl-progress-bar.indeterminate {
  width: 35% !important;
  animation: dl-indeterminate 1.1s ease-in-out infinite;
}

@keyframes dl-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.dl-progress-detail {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.info h2,
.faq h2 {
  margin-top: 0;
}

.info ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0;
}

.faq details:first-of-type {
  border-top: 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem;
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .parse-box {
    flex-direction: column;
    border-radius: 16px;
  }

  .parse-box input,
  .parse-box button {
    border-radius: 12px;
    width: 100%;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-card img {
    width: 100%;
    height: 200px;
  }

  .top nav {
    gap: 0.6rem;
    font-size: 0.85rem;
  }
}

.hero-compact {
  padding: 1.25rem 0 0.5rem;
}

.hero-compact h1 {
  font-size: clamp(1.45rem, 3.5vw, 2rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: #d7ebe5;
  font-size: 0.9rem;
  margin: 0.25rem 0 0.75rem;
}

.breadcrumb a {
  color: #d7ebe5;
}

.seo-article {
  margin-top: 0.5rem;
}

.seo-article h1 {
  margin-top: 0;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.seo-links {
  margin-top: 1rem;
}

.steps {
  margin: 0.75rem 0 1rem 1.2rem;
  padding: 0;
  color: var(--ink);
  line-height: 1.7;
}

.cta-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
}

.cta-btn:hover {
  opacity: 0.92;
}

.top nav a[aria-current="page"] {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 720px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .top nav {
    flex-wrap: wrap;
    gap: 0.65rem 0.9rem;
  }
}
