﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --line: #e2e8f0;
  --border: #cbd5e1;
  
  --office-blue: #0284c7;
  --office-bg: #f0f9ff;
  --office-border: #bae6fd;
  
  --study-green: #059669;
  --study-bg: #ecfdf5;
  --study-border: #a7f3d0;
  
  --code-purple: #7c3aed;
  --code-bg: #f5f3ff;
  --code-border: #ddd6fe;
  
  --write-amber: #d97706;
  --write-bg: #fffbeb;
  --write-border: #fde68a;
  
  --brand-primary: #2563eb;
  --brand-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", Arial, sans-serif;
  line-height: 1.7;
}

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

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

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

/* 导航栏 */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 20px;
  font-weight: 900;
  border-bottom: none;
}
.brand-icon {
  font-size: 22px;
  color: #f59e0b;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a {
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: all .2s ease;
}
.nav a:hover {
  background: #f1f5f9;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  text-decoration: none;
}

/* 首屏 Hero */
.hero {
  padding: 56px 0 44px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--line);
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #eff6ff;
  color: var(--brand-primary);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 950;
  line-height: 1.16;
  letter-spacing: -0.04em;
  color: var(--brand-dark);
  margin-bottom: 18px;
  max-width: 960px;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 860px;
  line-height: 1.7;
}
.hero strong { color: var(--brand-dark); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
  margin-bottom: 38px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 16px;
  transition: all .2s ease;
}
.button.primary {
  background: var(--brand-primary);
  color: #ffffff;
  border: 1px solid var(--brand-primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.button.primary:hover {
  background: #1d4ed8;
  text-decoration: none;
}
.button.secondary {
  background: #ffffff;
  color: var(--brand-dark);
  border: 2px solid var(--border);
}
.button.secondary:hover {
  background: #f8fafc;
  border-color: var(--brand-dark);
  text-decoration: none;
}

/* 四大场景并列展示区 (办公/学习/编程/写作) */
.scenario-parallel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}
.scenario-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.scenario-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
.scenario-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.scenario-card.office::before { background: var(--office-blue); }
.scenario-card.study::before { background: var(--study-green); }
.scenario-card.code::before { background: var(--code-purple); }
.scenario-card.write::before { background: var(--write-amber); }

.scenario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.scenario-icon {
  font-size: 26px;
  display: inline-flex;
  padding: 8px;
  border-radius: 10px;
}
.scenario-card.office .scenario-icon { background: var(--office-bg); }
.scenario-card.study .scenario-icon { background: var(--study-bg); }
.scenario-card.code .scenario-icon { background: var(--code-bg); }
.scenario-card.write .scenario-icon { background: var(--write-bg); }

.scenario-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}
.scenario-card.office .scenario-tag { background: var(--office-bg); color: var(--office-blue); }
.scenario-card.study .scenario-tag { background: var(--study-bg); color: var(--study-green); }
.scenario-card.code .scenario-tag { background: var(--code-bg); color: var(--code-purple); }
.scenario-card.write .scenario-tag { background: var(--write-bg); color: var(--write-amber); }

.scenario-card h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-dark);
  margin-bottom: 8px;
}
.scenario-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  flex-grow: 1;
}
.scenario-features {
  list-style: none;
  display: grid;
  gap: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.scenario-features li {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.scenario-features li strong { color: var(--text-main); }

/* 通用 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(--brand-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: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-primary);
  background: #eff6ff;
  padding: 3px 8px;
  border-radius: 4px;
}
.card-num {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}
.card h3 {
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--brand-dark);
}
.card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.card strong { color: var(--text-main); }

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.intro-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}
.intro-box h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--brand-dark);
  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: 20px;
  position: relative;
}
.intro-box li::before {
  content: "✨";
  position: absolute;
  left: 0;
  font-size: 12px;
}

/* 热门教程表格 */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 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(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fbfcfe; }
.level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.level-badge.easy { background: #dcfce7; color: #166534; }
.level-badge.medium { background: #fef3c7; color: #92400e; }
.level-badge.hard { background: #fee2e2; color: #991b1b; }

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

/* 子页面文章样式 */
.article {
  max-width: 900px;
  margin: 44px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 42px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
}
.article h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 950;
  color: var(--brand-dark);
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  line-height: 1.25;
}
.article-lead {
  font-size: 16px;
  color: var(--text-muted);
  border-left: 4px solid var(--brand-primary);
  padding: 12px 18px;
  margin-bottom: 28px;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
}
.article h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-dark);
  margin: 32px 0 14px;
  padding-top: 18px;
  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 .scenario-highlight {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  color: #1e40af;
  font-size: 14px;
}
.article .scenario-highlight strong { color: #1e3a8a; }

/* 页脚 */
.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: #94a3b8;
  max-width: 440px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-links a {
  color: #cbd5e1;
  background: #1e293b;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #334155;
}
.footer-links a:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

/* 响应式断点 */
@media (max-width: 960px) {
  .scenario-parallel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 14px 0; }
  .scenario-parallel-grid { grid-template-columns: 1fr; }
  .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; }
}
