/* ===== AutoBuddy智能助手 · 个人站点（浅色版，结构沿用 daniu-ai-official 主题）===== */
:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e4e9f0;
  --line-soft: #eef2f7;
  --text: #1f2937;
  --text-sub: #5b6573;
  --text-mute: #8b95a3;
  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-soft: #eff4ff;
  --accent: #0d9488;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, .08), 0 2px 4px rgba(16, 24, 40, .04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  line-height: 1.78;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部 ===== */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 14px 0; }
.site-branding { display: flex; align-items: center; }
.site-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 9px; letter-spacing: .2px; }
.site-title .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.site-title .mark svg { width: 17px; height: 17px; color: #fff; }
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--brand); }
.main-navigation ul { list-style: none; display: flex; gap: 26px; }
.main-navigation li a { color: var(--text-sub); font-size: 14.5px; position: relative; padding: 4px 0; }
.main-navigation li a:hover, .main-navigation li a.on { color: var(--brand); }
.main-navigation li a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--brand); border-radius: 2px; }

/* ===== 站点简介条 ===== */
.site-intro {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-bottom: 1px solid var(--line);
  padding: 34px 0 30px;
}
.site-intro h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; letter-spacing: .2px; }
.site-intro p { color: var(--text-sub); max-width: 720px; font-size: 14.8px; }
.site-intro .chips { margin-top: 16px; display: flex; gap: 9px; flex-wrap: wrap; }
.site-intro .chips span {
  border: 1px solid var(--line); background: #fff; color: var(--text-sub);
  border-radius: 20px; padding: 3px 12px; font-size: 12.5px;
}

/* ===== 布局 ===== */
.content-area { display: flex; gap: 30px; flex-wrap: wrap; padding: 30px 0 0; align-items: flex-start; }
main { flex: 1 1 640px; min-width: 0; }
aside { flex: 0 0 280px; min-width: 0; }

/* ===== 文章卡片 ===== */
.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #d6e0ef; }
.article-title { font-size: 19px; margin-bottom: 9px; line-height: 1.5; font-weight: 650; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--brand); }
.article-meta { font-size: 12.8px; color: var(--text-mute); margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article-meta span {
  display: inline-flex; align-items: center; gap: 5px;
  background: #f7f9fc; border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 2px 9px;
}
.article-meta span.cat { background: var(--brand-soft); border-color: #dbe7ff; color: var(--brand); }
.article-meta svg { width: 12.5px; height: 12.5px; flex: none; }
.article-excerpt { color: var(--text-sub); font-size: 14.5px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--brand); color: #fff;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13.8px; font-weight: 600;
  transition: background .2s, box-shadow .2s;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { background: var(--brand-deep); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .25); }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 30px 0 6px; }
.pagination span, .pagination a {
  display: inline-block; padding: 6px 13px; font-size: 13.5px;
  background: #fff; border: 1px solid var(--line); border-radius: 7px; color: var(--text-sub);
}
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ===== 侧边栏 ===== */
.widget-area {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 14.5px; font-weight: 650; margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 7px; color: var(--text);
}
.widget-title svg { width: 15px; height: 15px; color: var(--brand); flex: none; }
.widget-area p { color: var(--text-sub); font-size: 13.8px; }
.widget-area ul { list-style: none; }
.widget-area li {
  padding: 8px 0; border-bottom: 1px dashed var(--line-soft);
  font-size: 13.8px; display: flex; justify-content: space-between;
  gap: 10px; align-items: flex-start;
}
.widget-area li:last-child { border-bottom: none; padding-bottom: 2px; }
.widget-area li a { color: var(--text-sub); min-width: 0; word-break: break-word; line-height: 1.6; flex: 1 1 auto; }
.widget-area li a:hover { color: var(--brand); }
.widget-area li .n { color: var(--text-mute); font-size: 12.5px; flex: none; }
.widget-area .more { display: inline-block; margin-top: 10px; font-size: 13.5px; }
/* 最近笔记：纯标题列表，块级换行不贴边 */
.widget-area ul.recent li { display: block; padding: 8px 0; }
.widget-area ul.recent li a { display: block; padding-right: 12px; font-size: 13.4px; line-height: 1.65; }

/* ===== 正文 ===== */
.article-content { margin-top: 18px; }
.article-content p { margin: 0 0 14px; }
.article-content h3 {
  font-size: 16.5px; margin: 24px 0 10px; padding-left: 10px;
  border-left: 3px solid var(--brand); line-height: 1.4;
}
.article-content ul { margin: 0 0 14px; padding-left: 20px; color: var(--text-sub); }
.article-content li { margin-bottom: 5px; }
.article-content code {
  background: #f1f5fb; color: #1e40af; border-radius: 4px;
  padding: 1px 6px; font-size: 13.5px; font-family: Consolas, Monaco, monospace;
}
.article-content pre {
  background: #f8fafc; border: 1px solid var(--line);
  border-radius: 9px; padding: 14px 16px; overflow-x: auto;
  font-size: 13px; line-height: 1.75; margin: 0 0 14px; color: #334155;
}
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content strong { color: var(--text); font-weight: 650; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-sub); font-size: 14px; margin-bottom: 14px; }
.back-link:hover { color: var(--brand); }
.back-link svg { width: 14px; height: 14px; }
.about-block p { color: var(--text-sub); margin-bottom: 14px; }
.about-block ul { list-style: none; padding: 0; }
.about-block li { color: var(--text-sub); padding: 7px 0 7px 20px; position: relative; }
.about-block li::before {
  content: ''; position: absolute; left: 3px; top: 16px;
  width: 6px; height: 6px; border-radius: 50%; border: 1.6px solid var(--brand);
}

/* ===== 页脚 ===== */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 28px 0 24px;
  margin-top: 40px;
  text-align: center;
}
.footer-info { color: var(--text-mute); font-size: 12.8px; line-height: 2.2; }
.footer-info a { color: var(--text-sub); border-bottom: 1px dotted #c8d1dd; }
.footer-info a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.footer-info .sep { margin: 0 7px; color: #cfd6e0; }
.footer-decl { margin-top: 12px; font-size: 12px; color: #9aa4b2; line-height: 1.95; }

@media (max-width: 860px) {
  aside { flex: 1 1 100%; }
  .site-intro { padding: 26px 0 22px; }
  .site-intro h2 { font-size: 19px; }
}
@media (max-width: 640px) {
  .header-inner { flex-direction: column; text-align: center; gap: 10px; }
  .main-navigation ul { gap: 20px; }
  .article-title { font-size: 17px; }
  .article-card { padding: 18px 16px; }
  .content-area { gap: 20px; padding-top: 22px; }
}
