﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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 {
  --search-blue: #1a73e8;
  --search-blue-hover: #1557b0;
  --search-border: #dfe1e5;
  --search-shadow: 0 1px 6px rgba(32, 33, 36, 0.12);
  --search-shadow-hover: 0 4px 16px rgba(32, 33, 36, 0.16);
  
  --bg-page: #fdfdfd;
  --bg-card: #ffffff;
  --text-main: #202124;
  --text-sub: #4d5156;
  --text-muted: #70757a;
  
  --border-light: #eaedf1;
  --badge-bg: #f1f3f4;
}

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

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

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

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

/* 顶部声明 */
.search-top-notice {
  background: #f8f9fa;
  border-bottom: 1px solid var(--border-light);
  font-size: 12.5px;
  color: var(--text-sub);
  padding: 8px 0;
}
.top-notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-tag {
  background: #e8f0fe;
  color: var(--search-blue);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.notice-text strong { color: var(--text-main); }

/* 极简导航头 */
.search-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand-logo .logo-text {
  font-size: 22px;
  font-weight: 900;
  color: #202124;
  letter-spacing: -0.03em;
}
.brand-logo .logo-text span {
  color: var(--search-blue);
}
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-links a {
  color: var(--text-sub);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 18px;
  transition: all .15s ease;
}
.nav-links a:hover, .nav-links a.active {
  background: #f1f3f4;
  color: var(--search-blue);
  text-decoration: none;
}

/* 极简搜索页首屏 (Hero) */
.search-hero {
  padding: 46px 0 36px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-bottom: 1px solid var(--border-light);
}
.search-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}
.search-hero h1 {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 16px;
}
.search-hero p {
  font-size: 15.5px;
  color: var(--text-sub);
  margin-bottom: 26px;
  line-height: 1.75;
}
.search-hero strong { color: var(--search-blue); }

/* 模拟极简搜索框 */
.search-box-container {
  margin: 20px auto 26px;
  max-width: 680px;
}
.fake-search-bar {
  background: #ffffff;
  border: 1px solid var(--search-border);
  box-shadow: var(--search-shadow);
  border-radius: 28px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s ease;
}
.fake-search-bar:hover {
  box-shadow: var(--search-shadow-hover);
  border-color: rgba(223, 225, 229, 0);
}
.search-icon { font-size: 18px; color: var(--text-muted); }
.fake-input {
  flex: 1;
  font-size: 15px;
  color: #3c4043;
  text-align: left;
}
.search-action-btn {
  background: var(--search-blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 16px;
}

/* 搜索快捷标签 */
.search-quick-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13px;
}
.quick-label { color: var(--text-muted); padding: 4px 6px; }
.quick-tag {
  background: #f1f3f4;
  color: #3c4043;
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.quick-tag:hover {
  background: #e8f0fe;
  color: var(--search-blue);
  text-decoration: none;
}

/* 首页双入口 CTA 按钮 */
.search-hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 4px;
  background: #f8f9fa;
  color: #3c4043;
  border: 1px solid #f8f9fa;
  transition: all .15s ease;
}
.search-btn:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-color: #dadce0;
  color: #202124;
  text-decoration: none;
}
.search-btn.primary {
  background: var(--search-blue);
  color: #ffffff;
  border-color: var(--search-blue);
}
.search-btn.primary:hover {
  background: var(--search-blue-hover);
  color: #ffffff;
}

/* 通用模块 */
.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
}
.section-title-wrap {
  margin-bottom: 22px;
}
.section-title-wrap h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.section-title-wrap p {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* 六宫格功能模块 - 搜索索引卡片 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.search-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all .2s ease;
}
.search-card:hover {
  border-color: #dadce0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-tag {
  background: #f1f3f4;
  color: var(--search-blue);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}
.card-idx { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.search-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.search-card p {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.65;
  flex: 1;
}

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.intro-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 24px;
}
.intro-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-card p {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 12px;
}
.intro-list {
  list-style: none;
  display: grid;
  gap: 8px;
}
.intro-list li {
  font-size: 13.5px;
  color: var(--text-sub);
  padding-left: 18px;
  position: relative;
}
.intro-list li::before {
  content: "🔍";
  position: absolute;
  left: 0;
  font-size: 11px;
}

/* 热门教程表格 */
.table-wrap {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
th {
  background: #f8f9fa;
  color: var(--text-main);
  font-weight: 800;
  border-bottom: 2px solid var(--border-light);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }
.level-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}
.level-badge.easy { background: #e6f4ea; color: #137333; }
.level-badge.medium { background: #fef7e0; color: #b06000; }
.level-badge.hard { background: #fce8e6; color: #c5221f; }

/* FAQ */
.faq-list {
  display: grid;
  gap: 10px;
}
details {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 16px 20px;
  transition: all .15s ease;
}
details:hover { border-color: var(--search-blue); }
summary {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
  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: 17px;
  color: var(--search-blue);
  font-weight: 800;
}
details[open] summary::after { content: "−"; }
details p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* 子页文章 */
.article {
  max-width: 860px;
  margin: 32px auto;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 36px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}
.article h1 {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.35;
}
.article-lead {
  background: #f8f9fa;
  border-left: 4px solid var(--search-blue);
  padding: 12px 16px;
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 22px;
}
.article h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}
.article p, .article li {
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 10px;
  line-height: 1.75;
}
.article ul { margin-left: 20px; }

/* 页脚 */
.search-footer {
  margin-top: 40px;
  background: #f8f9fa;
  border-top: 1px solid var(--border-light);
  padding: 36px 0 20px;
  color: var(--text-muted);
}
.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.footer-brand strong { color: var(--text-main); font-size: 15px; }
.footer-brand p { font-size: 13px; margin-top: 4px; max-width: 440px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-nav a { color: var(--text-sub); font-size: 13.5px; }
.footer-nav a:hover { color: var(--search-blue); }
.footer-bottom-row {
  border-top: 1px solid #eaedf1;
  padding-top: 14px;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 860px) {
  .header-inner, .footer-top-row { flex-direction: column; align-items: flex-start; }
  .grid-6, .intro-grid { grid-template-columns: 1fr; }
  .article { padding: 20px 16px; }
  .top-notice-inner { flex-direction: column; align-items: flex-start; }
}
