/* 板材智库 独立站样式 */
:root {
  --bg: #0f1117;
  --bg-card: #181b24;
  --bg-card-hover: #1e2230;
  --border: #2a2e3a;
  --text: #e4e6ed;
  --text-secondary: #9498a4;
  --text-muted: #636780;
  --accent: #4f8cff;
  --accent-dim: #3a6fd8;
  --green: #3ecf8e;
  --red: #f06565;
  --orange: #f0a060;
  --radius: 8px;
  --max-width: 860px;
}

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

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

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

/* 布局 */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* 页头 */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 48px;
  position: sticky; top: 0; background: rgba(15,17,23,0.95);
  backdrop-filter: blur(12px); z-index: 100;
}
.site-header .container {
  display: flex; justify-content: space-between; align-items: center;
}
.site-logo { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.site-logo:hover { text-decoration: none; color: var(--accent); }
.site-logo span { color: var(--accent); }
.site-nav { display: flex; gap: 24px; list-style: none; }
.site-nav a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* 首页 Hero */
.hero { padding: 60px 0 40px; }
.hero h1 { font-size: 32px; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.hero p { font-size: 17px; color: var(--text-secondary); max-width: 600px; }

/* 分类卡片 */
.section-title { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin: 48px 0 16px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 40px; }
.category-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: background 0.15s, border-color 0.15s;
  display: block;
}
.category-card:hover { background: var(--bg-card-hover); border-color: var(--accent-dim); text-decoration: none; }
.category-card .cat-count { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.category-card .cat-name { font-size: 16px; font-weight: 600; color: var(--text); }

/* 文章列表 */
.article-list { margin: 24px 0 48px; }
.article-item {
  display: block; padding: 20px 0; border-bottom: 1px solid var(--border);
  transition: padding-left 0.15s;
}
.article-item:hover { padding-left: 8px; text-decoration: none; }
.article-item:first-child { padding-top: 0; }
.article-item .art-category { font-size: 12px; color: var(--accent); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.article-item .art-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.article-item:hover .art-title { color: var(--accent); }
.article-item .art-meta { font-size: 13px; color: var(--text-muted); }

/* 文章正文 */
.article-header { margin: 32px 0 40px; }
.article-header .art-category { font-size: 12px; color: var(--accent); font-weight: 500; letter-spacing: 0.5px; margin-bottom: 8px; }
.article-header h1 { font-size: 28px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.article-header .art-meta { font-size: 14px; color: var(--text-muted); }
.article-body { max-width: 720px; margin: 0 auto 64px; }
.article-body h2 { font-size: 22px; font-weight: 700; margin: 40px 0 16px; padding-top: 8px; }
.article-body h3 { font-size: 18px; font-weight: 600; margin: 28px 0 12px; color: var(--text-secondary); }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 8px 0 20px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--text); }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.article-body th { text-align: left; padding: 10px 14px; background: var(--bg-card); color: var(--text-secondary); font-weight: 600; border-bottom: 2px solid var(--border); }
.article-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.article-body tr:hover td { background: var(--bg-card-hover); }
.article-body blockquote {
  border-left: 3px solid var(--accent); padding: 12px 20px; margin: 20px 0;
  background: var(--bg-card); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary); font-size: 15px;
}
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.article-body code {
  background: var(--bg-card); padding: 2px 6px; border-radius: 4px;
  font-family: "SF Mono", "Fira Code", monospace; font-size: 14px;
}

/* 页脚 */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 64px; text-align: center; }
.site-footer p { font-size: 13px; color: var(--text-muted); }

/* 标签 */
.tag { display: inline-block; background: var(--bg-card); color: var(--text-secondary); padding: 4px 10px; border-radius: 4px; font-size: 12px; margin-right: 6px; margin-bottom: 4px; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-secondary); }

/* 响应式 */
@media (max-width: 640px) {
  .site-nav { gap: 14px; }
  .hero h1 { font-size: 24px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .article-body h2 { font-size: 20px; }
}
