/**
 * shared.css — 子页面公共样式（About / Blog / Compare / 404）
 *
 * 首页 index.html 用 style.css（已包含公共变量）
 * 文档 docs/ 用 style.css + docs.css
 * 子页面引用此文件 + 页面专属 <style> 块
 *
 * 响应式 Nav 由 nav.js 动态注入，此处只定义基础布局。
 */

/* === CSS 变量 === */
:root {
  --bg: #0a0a0f;
  --bg-card: #14141e;
  --border: #1e1e2e;
  --text: #e4e4ef;
  --text-dim: #9a9ab4;
  --text-muted: #55556a;
  --accent: #d4a017;
  --accent-glow: rgba(212, 160, 23, 0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* === Reset === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Nav 基础布局（响应式由 nav.js 注入） === */
nav { position: relative; z-index: 100; }
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.logo .icon { width: 28px; height: 28px; }
.logo .icon img { width: 100%; height: 100%; }
.links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.links a:hover, .links a.active { color: var(--text); }
.btn-github {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.btn-github:hover { border-color: var(--text-muted); }
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: 0.3s;
}

/* === Footer === */
.page-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.page-footer a { color: var(--text-muted); }
.page-footer a:hover { color: var(--text-dim); }

/* === Blog 文章公共样式 === */
.article h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.article-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.article-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb .sep { margin: 0 0.4rem; }

/* === Docs 手机端 sidebar toggle 指示器 === */
.docs-mobile-menu::after {
  content: ' ▸';
  font-size: 0.8em;
  transition: transform 0.2s;
}

/* === 中文本地化 === */
html[lang="zh-CN"] body,
html[lang="zh"] body { line-height: 1.85; }
