﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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: #fcfdfd;
  --surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;
  --line: #e2e8f0;
  --border-subtle: #cbd5e1;
  
  --brand-blue: #0284c7;
  --brand-navy: #0f172a;
  --tag-bg: #f0f9ff;
  --tag-border: #bae6fd;
  --accent-red: #e11d48;
}

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

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

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

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

/* 顶部声明栏 */
.notice {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: #475569;
  font-size: 13px;
  padding: 10px 0;
}
.notice-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice-badge {
  background: #334155;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* 导航栏 */
.site-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-navy);
  font-size: 19px;
  font-weight: 900;
  border-bottom: none;
}
.brand-badge {
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 3px 6px;
  border-radius: 4px;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a {
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all .2s ease;
}
.nav a:hover {
  background: #f1f5f9;
  border-color: var(--line);
  color: var(--brand-blue);
  text-decoration: none;
}

/* 首屏 Hero */
.hero {
  padding: 54px 0 42px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.digest-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--tag-bg);
  color: var(--brand-blue);
  border: 1px solid var(--tag-border);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 4.8vw, 50px);
  font-weight: 950;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--brand-navy);
  margin-bottom: 18px;
  max-width: 940px;
}
.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 860px;
  line-height: 1.75;
}
.hero strong { color: var(--brand-navy); font-weight: 800; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  margin-bottom: 34px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  transition: all .2s ease;
}
.button.primary {
  background: var(--brand-navy);
  color: #ffffff;
  border: 1px solid var(--brand-navy);
}
.button.primary:hover {
  background: #1e293b;
  text-decoration: none;
}
.button.secondary {
  background: #ffffff;
  color: var(--brand-navy);
  border: 1px solid var(--border-subtle);
}
.button.secondary:hover {
  background: #f8fafc;
  border-color: var(--brand-navy);
  text-decoration: none;
}

/* 资讯栏目快报区 */
.news-digest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}
.digest-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.digest-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.digest-col-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.digest-date {
  font-size: 12px;
  color: var(--text-dim);
}
.digest-card h3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--brand-navy);
  margin-bottom: 8px;
  line-height: 1.4;
}
.digest-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 通用 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.5vw, 34px);
  font-weight: 900;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
}
.section-note {
  max-width: 480px;
  color: var(--text-dim);
  font-size: 14px;
}

/* 六宫格功能模块区 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}
.card:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-blue);
  background: var(--tag-bg);
  padding: 2px 7px;
  border-radius: 4px;
}
.card-num {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}
.card h3 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--brand-navy);
}
.card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}
.card strong { color: var(--brand-navy); }

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.intro-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}
.intro-box h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-box p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 14px;
}
.intro-box ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.intro-box li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}
.intro-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--brand-blue);
  font-size: 18px;
  line-height: 1;
}

/* 热门教程表格 */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th, td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: #f8fafc;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 900;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fbfcfe; }
.level-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}
.level-badge.easy { background: #ecfdf5; color: #047857; }
.level-badge.medium { background: #fffbeb; color: #b45309; }
.level-badge.hard { background: #fff1f2; color: #be123c; }

/* FAQ 区域 */
.faq-list {
  display: grid;
  gap: 10px;
}
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
}
summary {
  font-size: 16px;
  font-weight: 900;
  color: var(--brand-navy);
  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(--brand-blue);
  font-weight: 800;
}
details[open] summary::after {
  content: "−";
}
details p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* 子页面文章样式 */
.article {
  max-width: 880px;
  margin: 40px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
}
.article h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 950;
  color: var(--brand-navy);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.25;
}
.article-lead {
  font-size: 16px;
  color: var(--text-muted);
  border-left: 3px solid var(--brand-blue);
  padding: 10px 16px;
  margin-bottom: 26px;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
}
.article h2 {
  font-size: 21px;
  font-weight: 900;
  color: var(--brand-navy);
  margin: 30px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.article p, .article li {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 14px;
  line-height: 1.8;
}
.article ul { margin-left: 20px; }
.article .digest-note {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0;
  color: #0369a1;
  font-size: 14px;
}
.article .digest-note strong { color: #0c4a6e; }

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

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