﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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 {
  /* 清爽浅色可信风设计系统变量 (Clean Light Trust Tokens) */
  --clean-bg: #f8fafc;            /* 纯净清爽浅灰底色 */
  --clean-surface: #ffffff;       /* 纯白卡片背景 */
  --clean-primary: #0f172a;       /* 稳重黑蓝标题色 */
  --clean-accent: #0284c7;        /* 专业信任海天蓝 */
  --clean-accent-hover: #0369a1;
  --clean-teal: #0d9488;          /* 辅助核验青绿 */
  
  --clean-border: #e2e8f0;        /* 细腻边框 */
  --clean-border-strong: #cbd5e1;
  
  --text-main: #0f172a;           /* 舒适深色标题 */
  --text-body: #334155;           /* 高对比度阅读正文 */
  --text-muted: #64748b;          /* 辅助说明灰 */
  
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background: var(--clean-bg);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
}

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

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

/* 顶部声明条 */
.clean-topbar {
  background: #f1f5f9;
  color: #475569;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid var(--clean-border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trust-badge {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.topbar-text strong { color: var(--clean-primary); }

/* 头部导航 */
.clean-header {
  background: #ffffff;
  border-bottom: 1px solid var(--clean-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  gap: 20px;
}
.clean-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clean-mark {
  width: 32px;
  height: 32px;
  background: #e0f2fe;
  color: var(--clean-accent);
  border: 1px solid #bae6fd;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.clean-title-group {
  display: flex;
  flex-direction: column;
}
.clean-main-title {
  font-size: 20px;
  font-weight: 950;
  color: var(--clean-primary);
  line-height: 1.2;
}
.clean-main-title span { color: var(--clean-accent); }
.clean-sub-title {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  color: var(--text-body);
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 14px;
  background: #f8fafc;
  border: 1px solid var(--clean-border);
  transition: all .2s ease;
}
.nav a:hover, .nav a.active {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: var(--clean-accent);
  text-decoration: none;
}

/* Hero 首屏 */
.hero {
  padding: 48px 0 40px;
  background: #ffffff;
  border-bottom: 1px solid var(--clean-border);
}
.hero-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 950;
  line-height: 1.35;
  color: var(--clean-primary);
  margin-bottom: 16px;
}
.hero p {
  font-size: 16.5px;
  color: var(--text-body);
  max-width: 960px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.hero strong { color: var(--clean-accent); }

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 5px;
  transition: all .2s ease;
}
.btn.primary {
  background: var(--clean-primary);
  color: #ffffff;
  border: 1px solid var(--clean-primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}
.btn.primary:hover {
  background: #1e293b;
  border-color: #1e293b;
  text-decoration: none;
}
.btn.secondary {
  background: #ffffff;
  color: var(--clean-primary);
  border: 1px solid var(--clean-border-strong);
}
.btn.secondary:hover {
  background: #f8fafc;
  color: var(--clean-accent);
  border-color: var(--clean-accent);
  text-decoration: none;
}

/* 权威可信核验条 */
.trust-metrics-bar {
  background: #f8fafc;
  border: 1px solid var(--clean-border);
  border-left: 4px solid var(--clean-accent);
  border-radius: 6px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  font-size: 13.5px;
}
.metric-item strong {
  display: block;
  font-size: 14px;
  color: var(--clean-primary);
  margin-bottom: 2px;
}
.metric-item span { color: var(--text-muted); font-size: 12.5px; }

/* 通用 Section */
.section {
  padding: 46px 0;
  border-bottom: 1px solid var(--clean-border);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 950;
  color: var(--clean-primary);
}
.section-note {
  max-width: 480px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 六宫格功能模块区 - 清爽卡片组件 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--clean-surface);
  border: 1px solid var(--clean-border);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--clean-accent);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.08);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #0369a1;
  background: #f0f9ff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bae6fd;
}
.card-num {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 700;
}
.card h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--clean-primary);
  margin-bottom: 8px;
}
.card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
  flex: 1;
}

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.intro-box {
  background: var(--clean-surface);
  border: 1px solid var(--clean-border);
  border-radius: 6px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.intro-box h3 {
  font-size: 20px;
  font-weight: 900;
  color: var(--clean-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-box p {
  font-size: 14.5px;
  color: var(--text-body);
  margin-bottom: 14px;
  line-height: 1.8;
}
.intro-box ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.intro-box li {
  font-size: 14px;
  color: var(--text-main);
  padding-left: 20px;
  position: relative;
}
.intro-box li::before {
  content: "✔";
  color: var(--clean-teal);
  position: absolute;
  left: 0;
  font-size: 12px;
}

/* 热门教程表格 */
.table-wrap {
  background: var(--clean-surface);
  border: 1px solid var(--clean-border);
  border-radius: 6px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th, td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--clean-border);
  font-size: 14px;
  vertical-align: middle;
}
th {
  background: #f8fafc;
  color: var(--clean-primary);
  font-weight: 900;
  border-bottom: 2px solid var(--clean-border-strong);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.level-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.level-badge.easy { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.level-badge.medium { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.level-badge.hard { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
}
details {
  background: var(--clean-surface);
  border: 1px solid var(--clean-border);
  border-radius: 6px;
  padding: 18px 22px;
  transition: all .2s ease;
}
details:hover {
  border-color: var(--clean-accent);
}
summary {
  font-size: 16px;
  font-weight: 900;
  color: var(--clean-primary);
  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: 18px;
  color: var(--clean-accent);
  font-weight: 900;
}
details[open] summary::after { content: "−"; }
details p {
  margin-top: 12px;
  color: var(--text-body);
  font-size: 14.5px;
  line-height: 1.8;
}

/* 子页面文章 */
.article {
  max-width: 900px;
  margin: 36px auto;
  background: var(--clean-surface);
  border: 1px solid var(--clean-border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.article h1 {
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 950;
  color: var(--clean-primary);
  margin-bottom: 16px;
  line-height: 1.35;
}
.article-lead {
  background: #f0f9ff;
  border-left: 4px solid var(--clean-accent);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14.5px;
  color: var(--text-body);
  border-radius: 0 4px 4px 0;
  line-height: 1.8;
}
.article h2 {
  font-size: 20px;
  font-weight: 900;
  color: var(--clean-primary);
  margin: 28px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--clean-border);
}
.article p, .article li {
  color: var(--text-body);
  font-size: 14.5px;
  margin-bottom: 12px;
  line-height: 1.8;
}
.article ul { margin-left: 20px; }

/* 页脚 */
.clean-footer {
  margin-top: 50px;
  background: #ffffff;
  color: var(--text-muted);
  padding: 44px 0 24px;
  border-top: 1px solid var(--clean-border);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 28px;
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 900;
  color: var(--clean-primary);
  margin-bottom: 8px;
}
.footer-brand p {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 440px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-nav a {
  color: var(--text-body);
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid var(--clean-border);
}
.footer-nav a:hover {
  background: #f0f9ff;
  color: var(--clean-accent);
  border-color: #bae6fd;
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid var(--clean-border);
  padding-top: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 960px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .grid-6, .intro-grid, .trust-metrics-bar, .footer-top { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .article { padding: 22px 16px; }
  .topbar-inner { flex-direction: column; align-items: flex-start; }
}
