﻿/* 电商将军令 - LearnBuffett 经典金融风 V2 */
:root {
  --bg-page: #f5f0e8;
  --bg-card: #ffffff;
  --bg-sidebar: #1a2332;
  --bg-code: #f0ece4;
  --navy: #1a2332;
  --navy-light: #2a3a4a;
  --gold: #c9a85c;
  --gold-light: #e8d5a0;
  --gold-hover: #b8943e;
  --text: #2c3e50;
  --text-light: #7a8a9a;
  --text-dark: #1a1a2e;
  --text-on-navy: #c8d0d8;
  --border: #e0d8cc;
  --border-light: #ede8e0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 6px;
  --max-width: 1400px;
  --sidebar-width: 260px;
  --header-height: 0px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Serif SC', 'Source Han Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.8;
  display: flex;
  min-height: 100vh;
}

a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

/* ======== 侧边栏 ======== */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-on-navy);
  z-index: 100;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.sidebar-logo {
  padding: 24px 20px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo a {
  color: white !important;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}
.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--gold);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.sidebar-nav { padding: 12px 0; flex: 1; overflow-y: auto; min-height: 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  color: var(--text-on-navy) !important;
  font-size: 14px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--gold) !important;
}
.sidebar-nav a.active {
  background: rgba(255,255,255,0.08);
  border-left-color: var(--gold);
  color: var(--gold) !important;
}
.sidebar-sub-item {
  padding-left: 48px !important;
  font-size: 13px !important;
  opacity: 0.85;
}
.sidebar-sub-item .nav-icon {
  font-size: 14px !important;
  width: 16px !important;
}

/* 分类条目 */
.sidebar-cat { gap: 6px !important; }
.sidebar-cat-num { font-size: 11px; color: rgba(255,255,255,0.3); min-width: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.sidebar-cat-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-cat-count { font-size: 11px; color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.08); padding: 1px 7px; border-radius: 8px; }
.sidebar-nav .nav-icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.sidebar-nav .nav-label { flex: 1; }
.sidebar-nav .nav-count {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  padding: 1px 8px;
  border-radius: 10px;
}
.sidebar-section-label {
  padding: 16px 24px 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.sidebar-section-divider { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 8px 20px; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  text-align: center;
  color: rgba(255,255,255,0.35);
}
/* 侧边栏搜索 */
.sidebar-search {
  padding: 10px 16px 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-search form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0 10px;
  transition: background 0.2s;
}
.sidebar-search form:focus-within {
  background: rgba(255,255,255,0.14);
}
.sidebar-search-icon {
  font-size: 14px;
  opacity: 0.5;
  flex-shrink: 0;
}
.sidebar-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 8px 8px;
  font-size: 13px;
  color: var(--text-on-navy);
  font-family: inherit;
}
.sidebar-search-input::placeholder {
  color: rgba(255,255,255,0.3);
}

/* ======== 主内容区 ======== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--bg-page);
}
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 60px;
}

/* ======== Hero 区域 ======== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #243342 100%);
  padding: 48px 40px;
  margin: -40px -40px 32px;
  color: white;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}
.hero-desc {
  font-size: 15px;
  opacity: 0.8;
  max-width: 600px;
  line-height: 1.6;
}

/* 统计条 */
.stats-bar {
  display: flex;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
}
.stat-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* ======== 首页索引卡片 ======== */
.home-index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
.home-index-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: all 0.25s;
  color: var(--text) !important;
}
.home-index-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.home-index-card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: var(--bg-page);
  border-radius: 8px;
  flex-shrink: 0;
}
.home-index-card-info h3 { font-size: 16px; margin-bottom: 2px; }
.home-index-card-info p { font-size: 13px; color: var(--text-light); }

/* ======== Section ======== */
.section { margin-bottom: 36px; }
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-light) !important;
}

/* ======== 内容网格 - Top 条目 ======== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.entry-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text) !important;
  transition: all 0.2s;
}
.entry-item:hover {
  border-color: var(--gold);
  background: #faf6ee;
}
.entry-item .entry-count {
  font-size: 11px;
  color: var(--text-light);
  background: var(--bg-page);
  padding: 1px 7px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ======== 分类网格 ======== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
  color: var(--text) !important;
}
.category-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.category-card-icon { font-size: 28px; width: 44px; text-align: center; }
.category-card-info h3 { font-size: 15px; margin-bottom: 2px; }
.category-card-info .count { font-size: 12px; color: var(--text-light); }

/* ======== 文章详情 ======== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}
.article-page { min-width: 0; }

/* 文章正文 — 视觉增强 */
.article-body {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text);
}
/* 首段放大 */
.article-body > p:first-child {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-dark);
}
/* 首字下沉 */
.article-body > p:first-child::first-letter {
  font-size: 3em;
  float: left;
  line-height: 1;
  margin-right: 8px;
  margin-top: 2px;
  color: var(--gold);
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
}

/* H2 — 带装饰线 */
.article-body h2 {
  font-size: 22px;
  margin: 36px 0 14px;
  color: var(--navy);
  font-weight: 700;
  position: relative;
  padding-left: 16px;
}
.article-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: var(--gold);
  border-radius: 2px;
}
.article-body h3 {
  font-size: 18px;
  margin: 28px 0 10px;
  color: var(--navy);
  font-weight: 600;
}
.article-body h3::before {
  content: '▸ ';
  color: var(--gold);
  font-weight: 400;
}

/* 段落间距 */
.article-body p { margin-bottom: 14px; }
.article-body p:last-child { margin-bottom: 0; }

/* 列表增强 */
.article-body ul, .article-body ol { margin: 8px 0 14px 24px; }
.article-body li { margin-bottom: 6px; line-height: 1.7; }
.article-body ul li::marker { color: var(--gold); }

/* 引用块 — 藏蓝底金线（类 learnbuffett） */
.article-body blockquote {
  margin: 16px 0;
  padding: 14px 20px;
  background: var(--navy);
  color: #e8dcd0;
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.8;
}
.article-body blockquote p { margin-bottom: 6px; color: #e8dcd0; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body blockquote a {
  color: var(--gold-light) !important;
  border-bottom: 1px dotted rgba(201,168,92,0.4);
}
.article-body blockquote a:hover { color: var(--gold) !important; }

/* 信息卡片 */
.article-body .info-box {
  margin: 16px 0;
  padding: 14px 18px;
  background: #f0f6f0;
  border-left: 4px solid #5a9e5a;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  line-height: 1.7;
}
.article-body .info-box-title {
  font-weight: 700;
  color: #3a7a3a;
  margin-bottom: 4px;
}

/* 提示卡片 */
.article-body .tip-box {
  margin: 16px 0;
  padding: 14px 18px;
  background: #faf6ee;
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  line-height: 1.7;
}

/* 表格 */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-body th {
  background: var(--navy);
  color: white;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
}
.article-body td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-light);
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: #f8f6f2; }
.article-body table a { color: var(--gold) !important; }

/* 代码 */
.article-body code {
  background: var(--bg-code);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 13px;
  color: #8a6d3b;
}
.article-body pre {
  background: #1a1a2e;
  color: #e0d8cc;
  padding: 18px 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.6;
  border: none;
}
.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* 图片 */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 16px 0;
  box-shadow: var(--shadow);
}

/* Wiki 链接 */
.article-body .wiki-link {
  color: var(--gold) !important;
  font-weight: 500;
  border-bottom: 1px dotted rgba(201,168,92,0.3);
}
.article-body .wiki-link:hover {
  border-bottom-color: var(--gold);
}

/* 水平分割线 */
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* 导航 */
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding: 20px 0 0;
  border-top: 2px solid var(--border);
  font-size: 14px;
}
.article-nav-link {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text) !important;
  transition: all 0.2s;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-nav-link:hover {
  border-color: var(--gold);
  color: var(--gold) !important;
  background: #faf6ee;
}

/* 返回顶部 */
.article-body + .back-to-top {
  display: block;
  text-align: right;
  margin-top: 20px;
}
.back-to-top a {
  font-size: 12px;
  color: var(--text-light);
  padding: 4px 12px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: all 0.15s;
}
.back-to-top a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* 文章页脚统计 */
.article-footer-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-light);
}
.article-footer-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ======== 反向引用面板 ======== */
.backlinks-panel {
  position: sticky;
  top: 24px;
}
.backlinks-panel h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.backlinks-list {
  list-style: none;
  max-height: 60vh;
  overflow-y: auto;
}
.backlinks-list li {
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.backlinks-list li:last-child { border-bottom: none; }

/* 反向引用增强样式 */
.backlink-item {
  padding: 8px 0 !important;
}
.backlink-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  text-decoration: none;
}
.backlink-title:hover {
  color: var(--gold);
}
.backlink-count {
  display: inline-block;
  font-size: 11px;
  color: var(--text-light);
  margin-left: 6px;
}
.backlink-context {
  margin: 4px 0;
}
.backlink-context-item {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
  margin: 2px 0;
  padding: 4px 8px;
  background: var(--bg);
  border-radius: 3px;
  border-left: 2px solid var(--gold-light);
}
.backlink-context-item mark {
  background: #fce8c8;
  color: #8a6d3b;
  padding: 0 2px;
  border-radius: 2px;
}
.backlink-context-item .bl-highlight {
  background: #fce8c8;
  color: #8a6d3b;
  font-weight: 600;
  padding: 0 3px;
  border-radius: 2px;
}
.backlink-readmore {
  font-size: 11px;
  color: var(--gold);
  text-decoration: none;
}
.backlink-readmore:hover {
  text-decoration: underline;
}

/* ======== 索引页 ======== */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 26px; color: var(--navy); margin-bottom: 4px; }
.page-header .page-count { font-size: 13px; color: var(--text-light); }
.page-header .page-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 4px;
}

.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
}
.alpha-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text) !important;
  transition: all 0.15s;
}
.alpha-link:hover { background: var(--navy); color: white !important; border-color: var(--navy); }
.glossary-group { margin-bottom: 24px; }
.glossary-char { font-size: 18px; margin-bottom: 8px; color: var(--navy); border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.glossary-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; }
.glossary-item { display: block; padding: 5px 10px; font-size: 13px; border: 1px solid transparent; border-radius: 4px; transition: all 0.15s; }
.glossary-item:hover { border-color: var(--gold); background: #faf6ee; }

/* ======== 搜索 ======== */
.search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-card);
  outline: none;
  transition: border-color 0.2s;
  color: var(--text);
}
.search-input:focus { border-color: var(--gold); }
.search-result-item {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text) !important;
  transition: background 0.15s;
}
.search-result-item:hover { background: #faf6ee; }
.search-result-title { font-size: 15px; font-weight: 600; }
.search-result-cat { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.search-empty { text-align: center; padding: 40px; color: var(--text-light); }
mark { background: #fef3c7; padding: 1px 3px; border-radius: 2px; }

/* ======== 聊天 ======== */
.chat-container { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; }
.chat-messages { height: 450px; overflow-y: auto; padding: 20px; }
.chat-message { display: flex; gap: 10px; margin-bottom: 16px; }
.chat-message.user { flex-direction: row-reverse; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-page); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.chat-message.user .chat-avatar { background: var(--navy); color: white; }
.chat-bubble { padding: 10px 14px; border-radius: 10px; max-width: 80%; background: var(--bg-page); font-size: 14px; line-height: 1.6; }
.chat-message.user .chat-bubble { background: var(--navy); color: white; }
.chat-input-area { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--bg-card); }
.chat-input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; outline: none; background: var(--bg-page); }
.chat-input:focus { border-color: var(--gold); }

/* ======== 知识图谱 ======== */
#graph-container { width: 100%; height: 550px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow:hidden; cursor:grab }
.graph-tooltip { position:fixed;padding:8px 14px;background:var(--navy);color:white;border-radius:6px;font-size:13px;pointer-events:none;z-index:1000;box-shadow:0 4px 16px rgba(0,0,0,.15);max-width:280px;line-height:1.5;backdrop-filter:blur(4px) }
  position: absolute; padding: 8px 12px; background: var(--navy); color: white; border-radius: 4px; font-size: 13px; pointer-events: none; z-index: 10;
}

/* ======== 变现页面 ======== */
.book-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #243342 100%);
  color: white;
  padding: 48px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  text-align: center;
}
.book-hero h1 { font-size: 28px; margin-bottom: 8px; }
.book-hero .price { font-size: 36px; color: var(--gold); font-weight: 700; margin: 8px 0; }
.book-hero .price-note { font-size: 13px; opacity: 0.7; }
.book-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.book-feature-card {
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  text-align: center;
}
.book-feature-card .feature-icon { font-size: 32px; margin-bottom: 8px; }
.book-feature-card h3 { font-size: 15px; margin-bottom: 4px; }
.book-feature-card p { font-size: 13px; color: var(--text-light); }
.pricing-table { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.pricing-card {
  padding: 28px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid var(--border-light);
  text-align: center;
  transition: all 0.2s;
}
.pricing-card:hover { border-color: var(--gold); }
.pricing-card.featured { border-color: var(--gold); background: #fdfaee; }
.pricing-card h3 { font-size: 18px; margin-bottom: 4px; }
.pricing-card .price { font-size: 30px; font-weight: 700; color: var(--navy); }
.pricing-card .price-period { font-size: 13px; color: var(--text-light); }
.pricing-card ul { list-style: none; margin: 16px 0; text-align: left; }
.pricing-card ul li { padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border-light); }
.pricing-card ul li:last-child { border-bottom: none; }

/* ======== 按钮 ======== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}
.btn-gold { background: var(--gold); color: white !important; }
.btn-gold:hover { background: var(--gold-hover); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: white !important; }
.btn-navy:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold) !important; }
.btn-outline:hover { background: var(--gold); color: white !important; }
.btn-white { background: white; color: var(--navy) !important; }
.btn-white:hover { background: #f0ece4; }
.btn-block { display: block; width: 100%; }

/* ======== 页脚 ======== */
.site-footer {
  text-align: center;
  padding: 20px 0;
  color: var(--text-light);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.site-footer a { color: var(--text-light); }
.site-footer a:hover { color: var(--gold); }

/* ======== 知识体系总览 - 架构板块 ======== */
.cat-search-area {
  margin-bottom: 24px;
}
.cat-search-hint {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  padding-left: 2px;
}
.kb-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kb-block {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.kb-block:hover {
  box-shadow: var(--shadow-hover);
}
.kb-block-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text) !important;
}
.kb-block-header:hover {
  background: #faf6ee;
}
.kb-icon {
  font-size: 32px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  border-radius: 10px;
  flex-shrink: 0;
}
.kb-info {
  flex: 1;
  min-width: 0;
}
.kb-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.kb-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
}
.kb-arrow {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-light);
  padding: 4px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.kb-block-header:hover .kb-arrow {
  color: var(--gold);
  border-color: var(--gold);
}
.kb-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 22px 12px;
}
.kb-sub {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-light);
}
.kb-sub small {
  color: var(--gold);
  font-size: 11px;
}
.kb-preview {
  list-style: none;
  padding: 0 22px 12px;
}
.kb-preview li {
  padding: 6px 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kb-preview li:first-child { border-top: none; }
.kb-article-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.kb-article-excerpt {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-more {
  display: block;
  padding: 8px 22px 14px;
  font-size: 13px;
  color: var(--gold) !important;
  border-top: 1px solid var(--border-light);
}
.kb-more:hover {
  color: var(--gold-hover) !important;
}
.kb-grid.hidden, .cat-search-results.hidden {
  display: none;
}
.cat-search-results {
  margin-top: 10px;
}
.cat-search-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cat-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: all 0.15s;
  color: var(--text) !important;
}
.cat-search-item:hover {
  border-color: var(--gold);
  background: #faf6ee;
}
.cat-search-cat {
  font-size: 11px;
  color: var(--gold);
  background: var(--bg-page);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.cat-search-title {
  font-size: 14px;
}

/* ======== 分类详情页 - 文章卡片网格 ======== */
.cat-sub-section {
  margin-bottom: 24px;
}
.cat-sub-title {
  font-size: 15px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}
.cat-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.cat-article-card {
  display: block;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: all 0.2s;
  color: var(--text) !important;
}
.cat-article-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.cat-cloud-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  margin-top: 20px;
}
.cat-cloud-wrap .cat-tag {
  display: inline-block;
  color: var(--gold) !important;
  font-weight: 600;
  transition: all 0.25s;
  text-decoration: none;
  line-height: 1.6;
}
.cat-cloud-wrap .cat-tag:hover {
  color: var(--navy) !important;
  transform: scale(1.08);
}
.cat-article-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}
.cat-article-card:hover .cat-article-card-title {
  color: var(--gold);
}

.cat-article-card-excerpt {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  margin: 6px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-article-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-light);
}
.cat-article-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.cat-article-card-link:hover {
  text-decoration: none;
}

.cat-article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
}
.mini-tag {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg-page);
  border-radius: 3px;
  font-size: 10px;
  color: var(--text-light);
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .sidebar-mobile-btn { display: block; position: fixed; top: 12px; left: 12px; z-index: 200; width: 40px; height: 40px; background: var(--navy); color: white; border: none; border-radius: 6px; font-size: 20px; cursor: pointer; }
  .sidebar.open { display: flex; width: 100%; z-index: 300; }
  .main-wrapper { margin-left: 0; }
  .main-content { padding: 24px 16px; }
  .hero { margin: -24px -16px 24px; padding: 32px 20px; }
  .hero h1 { font-size: 26px; }
  .stats-bar { flex-wrap: wrap; gap: 8px; }
  .stat-item { flex: 1 1 45%; border: none; }
  .home-index-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .pricing-table { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .kb-block-header { flex-wrap: wrap; }
  .kb-arrow { width: 100%; text-align: center; }
}
@media (min-width: 901px) {
  .sidebar-mobile-btn { display: none; }
}

/* ===== 全屏页面（如生命余额） ===== */
body.fullscreen-page .sidebar,
body.fullscreen-page .sidebar-mobile-btn,
body.fullscreen-page .site-footer { display: none !important; }
body.fullscreen-page .main-wrapper { margin-left: 0; }
body.fullscreen-page .main-content { padding: 0; max-width: 100%; min-height: 100vh; }

/* 侧边栏折叠 */
.sidebar-section-label { cursor: pointer; user-select: none; }
.sidebar-section-label:hover { opacity: 0.8; }
.collapse-icon { float: right; font-size: 14px; font-weight: 300; opacity: 0.5; transition: transform 0.2s; }
.sidebar-section-items { transition: all 0.2s ease; }

/* ===== 首页新样式 ===== */
/* Hero meta */
.hero-meta { font-size: 12px; color: var(--text-light); margin-bottom: 6px; letter-spacing: 1px; }
.hero-meta a { color: var(--text-light); text-decoration: none; }
.hero-meta a:hover { color: var(--gold); }
.hero-meta .hm-sep { margin: 0 8px; opacity: 0.3; }

/* 快速链接栏 */
.home-quick-links { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.ql-link { display: flex; align-items: center; gap: 4px; padding: 6px 14px; border: 1px solid var(--border-light); border-radius: 20px; color: var(--text) !important; text-decoration: none; font-size: 13px; transition: all 0.15s; background: var(--bg-card); }
.ql-link:hover { border-color: var(--gold); color: var(--gold) !important; }
.ql-arrow { font-size: 11px; transition: transform 0.15s; }
.ql-link:hover .ql-arrow { transform: translateX(3px); }

/* 索引卡片箭头 */
.home-index-card { position: relative; }
.card-arrow { display: block; font-size: 12px; color: var(--gold); margin-top: 6px; opacity: 0; transition: all 0.2s; font-weight: 600; }
.home-index-card:hover .card-arrow { opacity: 1; }

/* 功能卡片（AI、生命） */
.home-feature-card { background: linear-gradient(135deg, var(--bg-card), #faf6ee); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 20px; transition: border-color 0.2s; }
.home-feature-card:hover { border-color: var(--gold); }
.home-feature-card.life-card { background: linear-gradient(135deg, #0a0a12, #1a1520); border-color: rgba(200,168,110,0.15); }
.home-feature-card.life-card:hover { border-color: rgba(200,168,110,0.4); }
.home-feature-card.life-card .hfc-content h3 { color: #f0d890; }
.home-feature-card.life-card .hfc-content p { color: rgba(200,168,110,0.6); }
.home-feature-card.life-card .hfc-eyebrow { color: rgba(200,168,110,0.3); }
.hfc-eyebrow { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-light); margin-bottom: 4px; }
.hfc-content h3 { font-size: 20px; color: var(--navy); margin-bottom: 6px; }
.hfc-content p { font-size: 14px; color: var(--text-light); line-height: 1.7; margin-bottom: 14px; max-width: 500px; }

/* TOP 标签云 */
.kb-block { scroll-margin-top: 24px; }
.top-cloud { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 8px; line-height: 1.5; }
.top-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; color: var(--navy) !important; text-decoration: none; transition: all 0.15s; }
.top-tag:hover { background: rgba(200,168,110,0.08); transform: translateY(-1px); }
.top-tag.rank-1 { color: var(--gold) !important; font-weight: 700; }
.top-tag.rank-2 { font-weight: 600; }
.top-tag.rank-3 { font-weight: 600; }
.top-count { font-size: 10px; color: var(--text-light); background: var(--bg-page); padding: 0 5px; border-radius: 3px; line-height: 1.6; }
.top-tag.term-tag { color: var(--text) !important; }
.top-tag.term-tag:hover { color: var(--gold) !important; }

/* 平台案例网格 */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.pl-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 6px; text-decoration: none; color: var(--text) !important; font-size: 13px; transition: all 0.15s; }
.pl-item:hover { border-color: var(--gold); transform: translateY(-1px); }
.pl-count { font-size: 10px; color: var(--text-light); background: var(--bg-page); padding: 0 6px; border-radius: 3px; }

/* 分类标签 */
.cat-tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 20px; text-decoration: none; color: var(--text) !important; font-size: 13px; transition: all 0.15s; }
.cat-tag:hover { border-color: var(--gold); color: var(--gold) !important; transform: translateY(-1px); }
.cat-tag-count { font-size: 10px; color: var(--text-light); background: var(--bg-page); padding: 0 6px; border-radius: 3px; }

/* 首页底部 */
.home-footer { text-align: center; padding: 28px 0 10px; border-top: 1px solid var(--border-light); margin-top: 8px; }
.home-footer .hf-item { font-size: 13px; margin-bottom: 8px; }
.home-footer .hf-item a { color: var(--text-light); text-decoration: none; }
.home-footer .hf-item a:hover { color: var(--gold); }
.home-footer .hf-update { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.home-footer .hf-update a { color: var(--gold); text-decoration: none; }
.home-footer .hf-about { font-size: 12px; color: var(--text-light); max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* 完整版卡片（Bound Edition） */
.home-promo-card { display: flex; align-items: center; gap: 24px; padding: 28px 32px; background: linear-gradient(135deg, #1a1a2e, #2d1f3d); border: 1px solid rgba(200,168,110,.2); border-radius: 12px; margin-bottom: 20px; transition: border-color .2s; }
.home-promo-card:hover { border-color: rgba(200,168,110,.5); }
.hpc-left { flex-shrink: 0; text-align: center; }
.hpc-icon { font-size: 48px; line-height: 1; margin-bottom: 4px; }
.hpc-label { font-size: 11px; color: var(--gold); letter-spacing: 2px; }
.hpc-body { flex: 1; min-width: 0; }
.hpc-eyebrow { font-size: 10px; letter-spacing: 3px; color: rgba(200,168,110,.4); text-transform: uppercase; margin-bottom: 2px; }
.hpc-body h3 { font-size: 18px; color: #f0d890; margin-bottom: 4px; }
.hpc-meta { font-size: 12px; color: rgba(200,168,110,.5); letter-spacing: 1px; }
.hpc-action { flex-shrink: 0; }

/* 关于本站 */
.home-about-section { display: flex; gap: 40px; padding: 28px 32px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; margin-bottom: 20px; align-items: flex-start; }
.ha-left { flex: 1; min-width: 0; }
.ha-left h3 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.ha-desc { font-size: 13px; color: var(--text-light); line-height: 1.8; margin-bottom: 14px; max-width: 480px; }
.ha-link { display: inline-block; font-size: 13px; color: var(--gold) !important; text-decoration: none; margin-right: 20px; }
.ha-link:hover { text-decoration: underline; }
.ha-right { flex-shrink: 0; text-align: center; }
.ha-qr-grid { display: flex; gap: 16px; justify-content: center; align-items: flex-start; }
.ha-qr-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ha-qr-img { width: 120px; height: 120px; border-radius: 8px; border: 1px solid var(--border-light); object-fit: cover; transition: transform .2s; }
.ha-qr-img:hover { transform: scale(1.05); }
.ha-qr-label { font-size: 12px; color: var(--navy); font-weight: 500; letter-spacing: 1px; }
.ha-qr-tagline { font-size: 11px; color: var(--text-light); letter-spacing: 2px; margin-top: 8px; } color: var(--text-light); letter-spacing: 2px; }

/* ===== 技能商店 ===== */
.skill-cta{margin:24px 0;background:linear-gradient(135deg,var(--bg-card),#f8f4ea);border:1px solid var(--gold);border-radius:12px;padding:20px 24px}
.skill-cta-inner{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.skill-cta-icon{font-size:36px;flex-shrink:0}
.skill-cta-text{flex:1;min-width:200px}
.skill-cta-text h3{font-size:16px;color:var(--navy);margin-bottom:2px}
.skill-cta-text p{font-size:13px;color:var(--text-light);line-height:1.6;margin:0}
.skill-buy-btn{padding:10px 24px;font-size:14px;flex-shrink:0}
.skill-modal-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(10,10,18,.7);z-index:1000;justify-content:center;align-items:center}
.skill-modal-overlay.active{display:flex}
.skill-modal{background:var(--bg-card);border:1px solid var(--gold);border-radius:12px;padding:32px;max-width:420px;width:90%;text-align:center;position:relative;animation:modalFadeIn .3s}
@keyframes modalFadeIn{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
.skill-modal-close{position:absolute;top:12px;right:16px;background:none;border:none;font-size:18px;color:var(--text-light);cursor:pointer}
.skill-modal-close:hover{color:var(--gold)}
.skill-modal-icon{font-size:48px;margin-bottom:8px}
.skill-modal-title{font-size:18px;color:var(--navy);margin-bottom:4px}
.skill-modal-price{font-size:24px;font-weight:700;color:var(--gold);margin-bottom:12px}
.skill-modal-desc{font-size:13px;color:var(--text-light);line-height:1.7;margin-bottom:16px}
.skill-modal-methods{display:flex;align-items:center;gap:16px;justify-content:center;margin-bottom:12px}
.smm-item{text-align:center}
.smm-qr-placeholder{width:100px;height:100px;border:2px dashed var(--border-light);border-radius:8px;display:flex;align-items:center;justify-content:center;margin:0 auto 6px;background:var(--bg-page)}
.smm-qr-icon{font-size:24px;display:block}
.smm-qr-text{font-size:9px;color:var(--text-light);line-height:1.4;display:block}
.smm-item p{font-size:12px;color:var(--text-light);margin:0}
.smm-qr-img{text-align:center;margin-bottom:6px}
.smm-or{font-size:12px;color:var(--text-light)}
.skill-modal-footnote{font-size:11px;color:var(--text-light);opacity:.7}

/* ════════════════════════════════════════
   文章页样式增强
   ════════════════════════════════════════ */

/* 1. 阅读进度条 — 固定顶部 */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #f0d080, var(--gold));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease;
  box-shadow: 0 0 8px rgba(201,168,92,0.3);
}

/* 2. 引用块增强 — 装饰性引号 */
.article-body blockquote {
  position: relative;
  overflow: hidden;
}
.article-body blockquote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 6px;
  font-size: 64px;
  font-family: serif;
  color: rgba(201,168,92,0.15);
  line-height: 1;
  pointer-events: none;
}
.article-body blockquote::after {
  content: '\201D';
  position: absolute;
  bottom: -24px;
  right: 10px;
  font-size: 48px;
  font-family: serif;
  color: rgba(201,168,92,0.12);
  line-height: 1;
  pointer-events: none;
}

/* 3. 正文排版微调 */
/* 首字下沉增强 — 更优雅 */
.article-body > p:first-child::first-letter {
  font-size: 3.4em;
  padding-right: 6px;
  background: linear-gradient(135deg, var(--gold), #b89450);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* 图片悬停效果 */
.article-body img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.article-body img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* 代码块 — 圆角增强 */
.article-body pre {
  border: 1px solid rgba(201,168,92,0.08);
  border-left: 3px solid var(--gold);
}

/* 文章头部 — 精细调整 */
.article-header h1 {
  font-size: 30px;
  letter-spacing: -0.3px;
  position: relative;
  padding-bottom: 6px;
}
.article-header h1::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}

/* 返回顶部 — 悬浮按钮 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--navy);
  color: var(--gold) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 100;
}
.back-to-top.visible {
  opacity: 1;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
