/* ============================================
   NetcCheck 前台页面样式（首页/文档/注册登录）
   依赖 style.css 的设计 token 与基础组件
   ============================================ */

/* ---------- 顶部导航 ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 247, 245, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 26px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 15px;
  padding: 7px 14px; border-radius: 9px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: #eeeeea; }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nav-cta a.login-link { color: var(--text); text-decoration: none; font-size: 15px; padding: 7px 12px; border-radius: 9px; }
.nav-cta a.login-link:hover { background: #eeeeea; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1100px; margin: 0 auto; padding: 90px 24px 70px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.15; font-weight: normal; }
.hero h1 em { font-style: normal; background: var(--text); color: var(--card); padding: 0 12px; border-radius: 14px; display: inline-block; }
.hero-sub { color: var(--muted); font-size: 17px; margin: 22px 0 30px; max-width: 460px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-row .btn { padding: 13px 28px; font-size: 16px; border-radius: 13px; }
.hero-meta { margin-top: 26px; color: var(--muted); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; }

/* 伪终端卡片 */
.code-card {
  background: #17171a; color: #e8e8e4;
  border-radius: 16px; padding: 0; overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.9;
  transform: rotate(1.5deg);
  transition: transform .4s var(--ease);
}
.code-card:hover { transform: rotate(0deg) translateY(-4px); }
.code-card-bar {
  display: flex; gap: 7px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid #2c2c30;
}
.code-card-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a40; display: inline-block; }
.code-card-bar span { margin-left: 8px; color: #8a8a8e; font-size: 12px; font-family: var(--font-cute); }
.code-card-body { padding: 18px 20px; white-space: pre; overflow-x: auto; }
.code-card .c-dim { color: #77777c; }
.code-card .c-key { color: #ffffff; font-weight: bold; }
.code-card .c-ok { color: #b5e0b0; }
.code-card .c-str { color: #d9c89e; }

/* ---------- 通用区块 ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 60px 24px; }
.section-title { font-size: 30px; font-weight: normal; text-align: center; }
.section-sub { color: var(--muted); text-align: center; margin: 10px auto 40px; max-width: 560px; font-size: 15px; }

/* 特性 */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--text); color: var(--card);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 14px; }

/* 三步接入 */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: relative; box-shadow: var(--shadow-sm);
}
.step b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--text); color: var(--card); margin-bottom: 12px; font-weight: normal;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* 定价 */
.pricing-note {
  text-align: center; margin: -16px 0 28px;
}
.pricing-note span {
  display: inline-block; background: var(--text); color: var(--card);
  padding: 6px 18px; border-radius: 999px; font-size: 14px;
}
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-items: stretch; }
.price-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 24px; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  display: flex; flex-direction: column;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.price-card .tier { color: var(--muted); font-size: 15px; }
.price-card .price { font-size: 40px; margin: 8px 0 2px; }
.price-card .price small { font-size: 15px; color: var(--muted); }
.price-card .price-note { color: var(--muted); font-size: 13px; min-height: 22px; }
.price-card ul { list-style: none; margin: 16px 0 20px; flex: 1; }
.price-card li { padding: 5px 0; color: var(--muted); font-size: 14px; }
.price-card li::before { content: "✓ "; color: var(--text); }
.price-card.featured { background: var(--text); color: var(--card); border-color: var(--text); }
.price-card.featured .tier, .price-card.featured li { color: #b9b9bd; }
.price-card.featured li::before { color: var(--card); }
.price-card.featured .price-note { color: #b9b9bd; }
.price-card .btn.ghost-on-dark { background: transparent; color: var(--card); border: 1px solid #4a4a50; }
.price-card.featured .btn.ghost-on-dark:hover { border-color: var(--card); }

/* ---------- 首页套餐区个性化 ---------- */
.price-card { position: relative; }
.price-card.current { border-color: var(--text); box-shadow: var(--shadow-md); }
.current-badge {
  position: absolute; top: -12px; right: 16px;
  background: var(--text); color: var(--card);
  padding: 3px 14px; border-radius: 999px; font-size: 12px;
  box-shadow: var(--shadow-sm);
}
.price-card.featured .current-badge { background: var(--card); color: var(--text); border: 1px solid var(--border); }
a.is-current, button.is-current { opacity: .55; cursor: default; pointer-events: none; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 34px 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px;
}
.footer-inner a { color: var(--muted); text-decoration: none; margin-right: 18px; }
.footer-inner a:hover { color: var(--text); }

/* ---------- 文档页 ---------- */
.docs-hero { max-width: 1100px; margin: 0 auto; padding: 52px 24px 10px; }
.docs-hero h1 { font-size: 34px; font-weight: normal; }
.docs-hero p { color: var(--muted); margin: 8px 0 14px; }
.hero-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-chips span {
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--muted);
}
.hero-chips code { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.docs-wrap {
  max-width: 1100px; margin: 0 auto; padding: 34px 24px 80px;
  display: grid; grid-template-columns: 210px 1fr; gap: 40px;
}
.docs-side { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.docs-side .side-title { color: var(--muted); font-size: 13px; padding: 10px 12px 4px; }
.docs-side a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 7px 12px; border-radius: 9px;
  transition: color .2s, background .2s;
}
.docs-side a:hover { color: var(--text); background: #eeeeea; }
.docs-side a.active { background: var(--text); color: var(--card); }
.docs-side a.active:hover { background: var(--text); color: var(--card); }
.docs-main { min-width: 0; }
.doc-section { margin-bottom: 50px; scroll-margin-top: 88px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.doc-section:last-child { border-bottom: none; }
.doc-section > h2 { font-size: 24px; margin-bottom: 12px; padding-left: 12px; border-left: 4px solid var(--text); line-height: 1.2; }
.doc-section h3 { font-size: 17px; margin: 22px 0 10px; }
.doc-section p { color: #4c4c52; font-size: 15px; margin: 8px 0; }
.doc-section p code, .doc-section td code, .doc-section li code, .hero-chips code {
  background: #ededea; border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 7px; font-family: var(--font-mono); font-size: 13px;
}
.doc-method {
  display: inline-block; background: var(--text); color: var(--card);
  font-family: var(--font-mono); font-size: 12px;
  padding: 2px 10px; border-radius: 8px; vertical-align: 4px; margin-right: 8px;
}
.doc-formula {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--card); border: 1px dashed var(--border-strong);
  border-radius: 10px; padding: 12px 16px;
}
.doc-list { padding-left: 4px; list-style: none; }
.doc-list li { padding: 6px 0; color: #4c4c52; font-size: 15px; }
.doc-list li::before { content: "· "; color: var(--text); font-weight: bold; }
.codeblock { position: relative; margin: 16px 0; }
.codeblock pre {
  background: #17171a; color: #e8e8e4;
  border-radius: 12px; padding: 46px 20px 18px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.85;
  overflow-x: auto;
}
.codeblock::before {
  content: attr(data-label);
  position: absolute; top: 0; left: 0; right: 0;
  padding: 10px 16px 8px;
  color: #8a8a8e; font-size: 12px;
  border-bottom: 1px solid #2c2c30;
}
.code-copy {
  position: absolute; top: 7px; right: 10px;
  background: #2c2c30; color: #b9b9bd; border: none; cursor: pointer;
  font: inherit; font-size: 12px; padding: 3px 12px; border-radius: 8px;
  opacity: 0; transition: opacity .2s, color .2s;
}
.codeblock:hover .code-copy { opacity: 1; }
.code-copy:hover { color: #fff; }
.doc-table, table.doc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.doc-table th, .doc-table td { border-bottom: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table th { background: #fafaf7; color: var(--muted); font-weight: normal; }
.doc-table tbody tr:nth-child(even) td { background: #fafaf8; }

/* ---------- 注册/登录页 ---------- */
.auth-wrap {
  min-height: calc(100vh - 64px);
  background-image: radial-gradient(#e3e3df 1px, transparent 1px);
  background-size: 22px 22px;
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.auth-card {
  width: 400px; max-width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 22px; padding: 34px 32px 26px;
  box-shadow: var(--shadow-md);
  animation: pop-in .5s var(--ease) both;
}
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 24px; margin-bottom: 6px; }
.auth-brand .logo-mark { width: 42px; height: 42px; font-size: 23px; border-radius: 13px; }
.auth-desc { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: #f0f0ed; padding: 4px; border-radius: 11px; }
.auth-tab { flex: 1; text-align: center; padding: 8px 0; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 14px; transition: all .2s var(--ease); user-select: none; }
.auth-tab.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.auth-switch a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
a.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 滚动入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.features .reveal:nth-child(3n+2), .steps .reveal:nth-child(2), .pricing .reveal:nth-child(2) { transition-delay: .08s; }
.features .reveal:nth-child(3n+3), .steps .reveal:nth-child(3), .pricing .reveal:nth-child(3) { transition-delay: .16s; }
.pricing .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 50px; gap: 36px; }
  .code-card { transform: none; }
  .nav-links { display: none; }
  .docs-wrap { grid-template-columns: 1fr; }
  .docs-side { position: static; flex-direction: row; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
}
