﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (Smoothness & Performance Optimization)
   ========================================================== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* 硬件加速与流畅悬停 */
a, button, .media-news-card, .btn-media-primary, .btn-media-secondary, .faq-card, .intro-panel {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 移动端平滑滚动与防抖 */
.table-wrapper, .table-container, .code-box, pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* 媒体图片防溢出与自适应 */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 消除点击高亮延迟 */
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #ffffff;
  --bg-subtle: #f9fafb;
  --surface: #ffffff;
  --text-main: #111827;
  --text-muted: #374151;
  --text-dim: #6b7280;
  --line: #e5e7eb;
  --line-strong: #111827;
  
  --brand-black: #111827;
  --brand-dark: #1f2937;
  --brand-light: #f3f4f6;
  --brand-border: #d1d5db;
}

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

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Charter", "Bitstream Charter", "Sitka Text", "Cambria", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  line-height: 1.8;
  font-size: 16px;
}

a { color: var(--brand-black); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
a:hover { color: #4b5563; }

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

/* 顶部独立声明 */
.notice {
  background: #f9fafb;
  color: #4b5563;
  font-size: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.notice-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice-badge {
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}

/* 导航栏 */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid #111827;
  position: sticky;
  top: 0;
  z-index: 50;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.header-inner {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  color: var(--brand-black);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a {
  color: #374151;
  padding: 6px 12px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.nav a:hover {
  border-color: #111827;
  color: #111827;
  background: #f9fafb;
}

/* 首屏 Hero */
.hero {
  padding: 60px 0 46px;
  border-bottom: 1px solid var(--line);
}
.editorial-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4b5563;
  margin-bottom: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border-bottom: 1px solid #111827;
  padding-bottom: 2px;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--brand-black);
  margin-bottom: 20px;
  max-width: 960px;
}
.hero p {
  font-size: 18px;
  color: #374151;
  max-width: 860px;
  line-height: 1.8;
}
.hero strong { color: var(--brand-black); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
  margin-bottom: 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 14px 26px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: all .15s ease;
}
.button.primary {
  background: #111827;
  color: #ffffff;
  border: 2px solid #111827;
}
.button.primary:hover {
  background: #374151;
  border-color: #374151;
  color: #ffffff;
}
.button.secondary {
  background: #ffffff;
  color: #111827;
  border: 2px solid #111827;
}
.button.secondary:hover {
  background: #f3f4f6;
  color: #111827;
}

/* 纯文字极简高可信对比面板 */
.trust-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.trust-card {
  background: #ffffff;
  padding: 26px;
  border: 1px solid var(--line);
}
.trust-card.official {
  border-top: 3px solid #111827;
}
.trust-card.warning {
  border-top: 3px solid #6b7280;
  background: #fafafa;
}
.trust-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.trust-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-black);
}
.trust-label {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border: 1px solid var(--brand-border);
}

.trust-list { list-style: none; display: grid; gap: 10px; }
.trust-list li {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  position: relative;
  padding-left: 16px;
}
.trust-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #6b7280;
}
.trust-list li strong { color: var(--brand-black); }

/* 通用 Section */
.section {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
}
.section-head h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 900;
  color: var(--brand-black);
  letter-spacing: -0.02em;
}
.section-note {
  max-width: 460px;
  color: var(--text-dim);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 六宫格功能模块区 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 22px;
  transition: all .15s ease;
}
.card:hover {
  border-color: #111827;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.card-badge {
  font-size: 11px;
  font-weight: 800;
  color: #111827;
  border: 1px solid var(--line);
  padding: 2px 6px;
}
.card-num {
  font-size: 12px;
  color: var(--text-dim);
}
.card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--brand-black);
}
.card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}
.card strong { color: var(--brand-black); }

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.intro-box {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 28px;
}
.intro-box h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--brand-black);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.intro-box p {
  color: #374151;
  font-size: 15px;
  margin-bottom: 12px;
}
.intro-box ul {
  list-style: none;
  display: grid;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.intro-box li {
  font-size: 14px;
  color: #374151;
  padding-left: 16px;
  position: relative;
}
.intro-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #111827;
  font-weight: 900;
}

/* 热门教程表格 */
.table-wrap {
  border: 1px solid var(--line);
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
}
th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: #f9fafb;
  color: var(--brand-black);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.level-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.level-badge.easy { background: #f3f4f6; color: #111827; }
.level-badge.medium { background: #f9fafb; color: #374151; }
.level-badge.hard { background: #111827; color: #ffffff; }

/* FAQ 区域 */
.faq-list {
  display: grid;
  gap: 12px;
}
details {
  border: 1px solid var(--line);
  padding: 16px 20px;
  background: #ffffff;
}
details:hover {
  border-color: #111827;
}
summary {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-black);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "[展开]";
  font-size: 12px;
  color: #6b7280;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
details[open] summary::after {
  content: "[收起]";
}
details p {
  margin-top: 12px;
  color: #374151;
  font-size: 15px;
  line-height: 1.75;
}

/* 子页面文章排版 */
.article {
  max-width: 820px;
  margin: 40px auto;
  padding: 0 10px;
}
.article h1 {
  font-size: clamp(26px, 3.8vw, 38px);
  font-weight: 900;
  color: var(--brand-black);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.3;
}
.article-lead {
  font-size: 16px;
  color: #4b5563;
  border-left: 3px solid #111827;
  padding: 10px 16px;
  margin-bottom: 26px;
  background: #f9fafb;
}
.article h2 {
  font-size: 21px;
  font-weight: 900;
  color: var(--brand-black);
  margin: 30px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.article p, .article li {
  color: #374151;
  font-size: 15.5px;
  margin-bottom: 14px;
  line-height: 1.8;
}
.article ul { margin-left: 20px; }
.article .text-note {
  border: 1px solid var(--line);
  background: #f9fafb;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: #374151;
}
.article .text-note strong { color: #111827; }

/* 页脚 */
.site-footer {
  margin-top: 50px;
  background: #f9fafb;
  color: #4b5563;
  padding: 44px 0 28px;
  border-top: 2px solid #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 26px;
  margin-bottom: 26px;
}
.footer-brand strong {
  display: block;
  font-size: 16px;
  color: #111827;
  margin-bottom: 6px;
}
.footer-brand p {
  font-size: 13px;
  color: #6b7280;
  max-width: 440px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-links a {
  color: #374151;
  background: #ffffff;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  text-decoration: none;
}
.footer-links a:hover {
  border-color: #111827;
  color: #111827;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

/* 响应式适配 */
@media (max-width: 860px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .trust-text-grid, .grid-6, .intro-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-top { flex-direction: column; }
  .notice-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}
