/* WeiboVideo — SnapWC-inspired multi-page layout */
:root {
  --brand: #0b6bcb;
  --brand-dark: #084e96;
  --brand-soft: #e8f2fc;
  --accent: #0d9488;
  --accent-soft: #e6fffa;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f4f7fb;
  --bg-mesh-1: #dbeafe;
  --bg-mesh-2: #ccfbf1;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --font: "DM Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Sora", "Noto Sans SC", "PingFang SC", sans-serif;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--bg-mesh-1), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, var(--bg-mesh-2), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Top bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(244, 247, 251, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover { text-decoration: none; color: var(--brand); }

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--accent));
  box-shadow: 0 6px 16px rgba(11, 107, 203, 0.28);
}

.site-nav {
    display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar { display: none; }

.site-nav__link {
    white-space: nowrap;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav__link:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.site-nav__link.is-active {
  background: var(--brand);
  color: #fff;
}

.nav-more {
  position: relative;
  flex-shrink: 0;
  /* 向下延伸可悬停区域，避免按钮与菜单之间的空隙导致菜单消失 */
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.nav-more__btn,
.nav-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-more__btn:hover,
.nav-toggle:hover {
  border-color: #cbd5e1;
  color: var(--ink);
}

.nav-more__panel {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 180px;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 40;
}

.nav-more__panel::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-more:hover .nav-more__panel,
.nav-more:focus-within .nav-more__panel {
  display: grid;
  gap: 0.15rem;
}

.nav-more__panel .site-nav__link {
  border-radius: 8px;
}

.nav-toggle { display: none; }

.nav-drawer {
  display: none;
  padding: 0.75rem 0 1rem;
  border-top: 1px solid var(--line);
}

.nav-drawer.is-open { display: grid; gap: 0.35rem; }

.nav-drawer .site-nav__link {
  display: block;
  border-radius: 10px;
}

/* Hero / parse */
.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
  max-width: 18ch;
}

.hero__title--wide { max-width: 22ch; }

.hero__desc {
  color: var(--ink-2);
  font-size: 1.05rem;
  max-width: 48ch;
  margin-bottom: 1.4rem;
}

.parse-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 0.7rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: stretch;
}

.parse-box__field {
    display: flex;
    align-items: center;
  gap: 0.55rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0.9rem;
  min-height: 54px;
}

.parse-box__field i { color: var(--ink-3); }

.parse-box__field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  min-width: 0;
}

.parse-actions {
  display: flex;
  gap: 0.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: var(--radius);
  padding: 0 1.15rem;
  min-height: 54px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 107, 203, 0.28);
}

.btn--primary:hover { box-shadow: 0 10px 22px rgba(11, 107, 203, 0.36); }

.btn--primary.is-loading,
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  min-width: 54px;
  padding: 0;
}

.hero__support {
  margin-top: 0.85rem;
  color: var(--ink-3);
  font-size: 0.92rem;
}

/* Loading */
.loading {
  margin: 1.25rem 0;
    text-align: center;
  color: var(--ink-2);
}

.loading[hidden] { display: none !important; }

.apple-loader {
  display: inline-flex;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.loader-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  animation: bounce 1s infinite ease-in-out;
}

.loader-circle:nth-child(2) { animation-delay: 0.15s; background: var(--accent); }
.loader-circle:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.45; }
  40% { transform: scale(1); opacity: 1; }
}

/* Result */
#contentBox { margin: 1.25rem 0 0.5rem; }

.result-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  animation: rise 0.35s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.result-panel--error { color: var(--danger); }

.result-panel__title {
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.result-panel__thumb {
  margin-bottom: 0.9rem;
  border-radius: var(--radius-sm);
    overflow: hidden;
  max-width: 420px;
}

.result-panel__thumb img {
  width: 100%;
  object-fit: cover;
  max-height: 240px;
}

.result-panel__player {
    position: relative;
    padding-top: 56.25%;
  margin-bottom: 1rem;
  background: #0f172a;
  border-radius: var(--radius-sm);
    overflow: hidden;
}

.result-panel__player video {
    position: absolute;
  inset: 0;
    width: 100%;
    height: 100%;
  background: #000;
}

.result-panel__formats h3 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: var(--ink-2);
}

.format-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.format-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.format-btn {
    display: inline-flex;
    align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: #0f766e;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
    text-decoration: none;
}

.format-btn:hover {
  background: #ccfbf1;
  border-color: #99f6e4;
  text-decoration: none;
}

.format-btn--ghost {
  background: #f8fafc;
  color: var(--ink-2);
}

.format-btn--ghost:hover {
  background: var(--brand-soft);
  border-color: #bfdbfe;
  color: var(--brand-dark);
}

.format-btn:disabled { opacity: 0.6; cursor: wait; }

.result-hint {
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.result-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.result-gallery__item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.result-gallery__item img {
    width: 100%;
  aspect-ratio: 1;
    object-fit: cover;
}

.muted { color: var(--ink-3); }

/* Sections */
.section {
  padding: 2rem 0;
}

.section__title {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.section__desc {
  color: var(--ink-2);
  margin-bottom: 1.2rem;
  max-width: 54ch;
}

.feature-grid,
.platform-grid,
.steps {
  display: grid;
  gap: 0.9rem;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-item {
  padding: 1.1rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.feature-item i {
  color: var(--brand);
  margin-bottom: 0.55rem;
  font-size: 1.15rem;
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.feature-item p {
  color: var(--ink-2);
  font-size: 0.92rem;
}

.platform-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.platform-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0.95rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.platform-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.platform-card__name {
  font-weight: 700;
  font-family: var(--display);
}

.platform-card__hint {
  color: var(--ink-3);
  font-size: 0.82rem;
}

.platform-card--more {
  background: linear-gradient(160deg, var(--brand-soft), var(--accent-soft));
}

.steps {
  grid-template-columns: repeat(3, 1fr);
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.1rem 1rem 1.1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.step p {
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* FAQ */
.faq-list { display: grid; gap: 0.55rem; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item__q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0.95rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
    display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item__q::after {
  content: "+";
  color: var(--ink-3);
  font-weight: 400;
}

.faq-item.is-open .faq-item__q::after { content: "–"; }

.faq-item__a {
  display: none;
  padding: 0 1rem 1rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.faq-item.is-open .faq-item__a { display: block; }

.faq-item__a ul {
  margin: 0.4rem 0 0 1.1rem;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 2.2rem 0 1.5rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer h4 {
  font-family: var(--display);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

.site-footer a {
  display: block;
  color: var(--ink-2);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  text-decoration: none;
}

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

.footer-bottom {
    display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.footer-bottom a { display: inline; color: var(--ink-3); }

.disclaimer {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.88rem;
}

/* Toast */
.wv-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  z-index: 1000;
  box-shadow: var(--shadow);
  max-width: min(90vw, 420px);
  text-align: center;
  animation: rise 0.25s ease;
}

/* Responsive */
@media (max-width: 900px) {
  .site-nav,
  .nav-more { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .feature-grid,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .parse-box {
    grid-template-columns: 1fr;
  }
  .parse-actions { display: grid; grid-template-columns: auto 1fr; }
  .btn--primary { width: 100%; }
  .hero { padding-top: 1.6rem; }
}

/* 站内推广位（非 AdSense） */
.wv-promo {
  display: block;
  margin: 0.75rem 0 0.35rem;
  padding: 0.85rem 1.05rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: #fff;
  background:
    linear-gradient(115deg, #0b6bcb 0%, #0d8a9c 48%, #0d9488 100%);
  box-shadow: 0 8px 22px rgba(11, 107, 203, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wv-promo:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(11, 107, 203, 0.34);
  color: #fff;
}
.wv-promo__inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.wv-promo__badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  line-height: 1.2;
}
.wv-promo__text {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
}
.wv-promo__text span {
  font-weight: 500;
  opacity: 0.92;
}
.wv-promo__cta {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  color: #0b6bcb;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .wv-promo { padding: 0.75rem 0.85rem; }
  .wv-promo__inner { gap: 0.55rem; }
  .wv-promo__text { font-size: 0.88rem; }
  .wv-promo__cta { width: 100%; text-align: center; margin-left: 0; }
}

.wv-ad-strip {
  padding: 0;
  margin: 0;
}
.wv-ad-strip > .container {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.wv-ad {
  display: block;
  width: 100%;
  margin: 1.25rem 0;
  box-sizing: border-box;
}
.wv-ad--top { margin-top: 0.85rem; margin-bottom: 1rem; }
.wv-ad--mid {
  margin-top: 1.35rem; /* 与解析按钮拉开，降低误点 */
  margin-bottom: 1.25rem;
}
.wv-ad--bottom { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.wv-ad.is-empty {
  display: none !important;
  margin: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}
.wv-ad-label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 6px;
  text-align: center;
}
.wv-ad-box {
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
  box-sizing: border-box;
}
.wv-ad.is-filled .wv-ad-box {
  min-height: 0;
}
.wv-ad:not(.is-filled):not(.is-empty) .wv-ad-box {
  /* 加载中轻微占位，无灰色大框 */
  min-height: 0;
}
.wv-ad ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-height: 0;
}
/* 结果区与广告间距 */
#contentBox {
  margin-top: 0.35rem;
}
#contentBox .result-panel {
  margin-top: 0.75rem;
}
.parse-box + .hero__support + .wv-ad--mid,
.parse-actions {
  /* 解析按钮与 mid 广告隔离 */
}
