﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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: #fbfbfe;
  --surface: #ffffff;
  --surface-hover: #f4f6fa;
  --text-main: #1e293b;
  --text-muted: #334155;
  --text-dim: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  
  --wp-blue: #1e3a8a;
  --wp-blue-hover: #172554;
  --wp-blue-light: #eff6ff;
  --wp-blue-border: #bfdbfe;
  
  --wp-slate: #475569;
  --wp-slate-light: #f8fafc;
  --wp-amber: #92400e;
  --wp-amber-light: #fef3c7;
  
  --navy-dark: #0f172a;
}

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

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Serif SC", Georgia, serif;
  line-height: 1.85;
}

a { color: var(--wp-blue); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; color: var(--wp-blue-hover); }

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

/* 顶部独立声明 */
.notice {
  background: #0f172a;
  color: #94a3b8;
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 1px solid #1e293b;
}
.notice-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice-badge {
  background: rgba(30, 58, 138, 0.4);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.3);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* 导航栏 */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid var(--wp-blue);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.header-inner {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-dark);
  font-size: 20px;
  font-weight: 900;
  border-bottom: none;
}
.brand-badge {
  background: var(--wp-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 4px;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  color: #334155;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  transition: all .2s ease;
}
.nav a:hover {
  background: var(--wp-blue-light);
  border-color: var(--wp-blue-border);
  color: var(--wp-blue);
  text-decoration: none;
}

/* 白皮书首屏 Hero */
.hero {
  padding: 56px 0 50px;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.wp-meta-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.wp-tag {
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
}
.hero h1 {
  font-size: clamp(30px, 4.8vw, 48px);
  font-weight: 950;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--navy-dark);
  margin-bottom: 20px;
  max-width: 980px;
}
.hero p {
  font-size: 18px;
  color: #334155;
  max-width: 900px;
  line-height: 1.85;
}
.hero strong { color: var(--wp-blue); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
  margin-bottom: 36px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 14px 26px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 16px;
  transition: all .2s ease;
}
.button.primary {
  background: var(--wp-blue);
  color: #ffffff;
  border: 1px solid var(--wp-blue);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}
.button.primary:hover {
  background: var(--wp-blue-hover);
  border-color: var(--wp-blue-hover);
  text-decoration: none;
}
.button.secondary {
  background: #ffffff;
  color: var(--navy-dark);
  border: 1px solid var(--line-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.button.secondary:hover {
  background: var(--wp-blue-light);
  border-color: var(--wp-blue);
  color: var(--wp-blue);
  text-decoration: none;
}

/* 白皮书核心摘要框 */
.wp-abstract-box {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-left: 6px solid var(--wp-blue);
  border-radius: 8px;
  padding: 26px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  margin-top: 10px;
}
.wp-abstract-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--navy-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wp-abstract-box p {
  font-size: 15px;
  color: #334155;
  line-height: 1.8;
}

/* 通用 Section */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(26px, 3.8vw, 36px);
  font-weight: 900;
  color: var(--navy-dark);
  letter-spacing: -0.03em;
}
.section-note {
  max-width: 480px;
  color: var(--text-dim);
  font-size: 15px;
}

/* 六宫格功能模块区 - 白皮书章节卡片 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  transition: all .2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--wp-blue);
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.08);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--wp-blue);
  background: var(--wp-blue-light);
  border: 1px solid var(--wp-blue-border);
  padding: 3px 8px;
  border-radius: 3px;
}
.card-num {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}
.card h3 {
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--navy-dark);
}
.card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
}
.card strong { color: var(--navy-dark); }

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.intro-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.intro-box h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-box p {
  color: #334155;
  font-size: 15px;
  margin-bottom: 14px;
  line-height: 1.8;
}
.intro-box ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.intro-box li {
  font-size: 14.5px;
  color: #334155;
  padding-left: 20px;
  position: relative;
}
.intro-box li::before {
  content: "📄";
  position: absolute;
  left: 0;
  font-size: 12px;
}
.intro-box strong { color: var(--navy-dark); }

/* 热门教程表格 - 白皮书学术风 */
.table-wrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: #f8fafc;
  color: var(--navy-dark);
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--line-strong);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
}
.level-badge.easy { background: #eff6ff; color: #1e3a8a; }
.level-badge.medium { background: #fef3c7; color: #92400e; }
.level-badge.hard { background: #fee2e2; color: #991b1b; }

/* FAQ 区域 */
.faq-list {
  display: grid;
  gap: 12px;
}
details {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
  transition: all .2s ease;
}
details:hover {
  border-color: var(--wp-blue);
}
summary {
  font-size: 17px;
  font-weight: 900;
  color: var(--navy-dark);
  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: 20px;
  color: var(--wp-blue);
  font-weight: 900;
}
details[open] summary::after {
  content: "−";
}
details p {
  margin-top: 14px;
  color: #334155;
  font-size: 15px;
  line-height: 1.8;
}

/* 子页面文章排版 - 白皮书长文友好 */
.article {
  max-width: 900px;
  margin: 44px auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 46px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.article h1 {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 950;
  color: var(--navy-dark);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.3;
}
.article-lead {
  font-size: 16px;
  color: #334155;
  border-left: 4px solid var(--wp-blue);
  padding: 14px 20px;
  margin-bottom: 30px;
  background: var(--wp-blue-light);
  border-radius: 0 6px 6px 0;
  line-height: 1.8;
}
.article h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--navy-dark);
  margin: 34px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.article p, .article li {
  color: #334155;
  font-size: 15.5px;
  margin-bottom: 16px;
  line-height: 1.85;
}
.article ul { margin-left: 20px; }
.article .wp-note {
  background: #f8fafc;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--wp-blue);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 22px 0;
  color: #1e293b;
  font-size: 14.5px;
  line-height: 1.8;
}
.article .wp-note strong { color: var(--wp-blue); }

/* 页脚 */
.site-footer {
  margin-top: 56px;
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 32px;
  border-top: 1px solid #1e293b;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-brand strong {
  display: block;
  font-size: 17px;
  color: #ffffff;
  margin: 8px 0 4px;
}
.footer-brand p {
  font-size: 13px;
  color: #64748b;
  max-width: 440px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-links a {
  color: #cbd5e1;
  background: #1e293b;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #334155;
}
.footer-links a:hover {
  background: var(--wp-blue);
  color: #ffffff;
  border-color: var(--wp-blue);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 13px;
  color: #475569;
  text-align: center;
}

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