/* 博客全局样式：干净现代 */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #2563eb;
  --border: #e5e7eb;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* 顶栏 */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; }
.site-header nav a { margin-left: 20px; color: var(--muted); text-decoration: none; font-size: 15px; }
.site-header nav a:hover { color: var(--brand); }

main.wrap { padding-top: 32px; padding-bottom: 60px; }

/* 首页文章卡片 */
.post-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px;
  text-decoration: none; color: inherit; transition: box-shadow .2s;
}
.post-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.07); }
.post-card h2 { margin: 0 0 8px; font-size: 20px; }
.post-card img.cover { width: 100%; border-radius: 8px; margin-bottom: 12px; }
.meta { color: var(--muted); font-size: 13px; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; color: var(--muted); }

/* 按钮与表单 */
button, .btn {
  background: var(--brand); color: #fff; border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 15px; cursor: pointer;
}
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { background: #eef2ff; color: var(--brand); }
input, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 15px; margin: 6px 0 14px; font-family: inherit; background: #fff;
}
textarea { min-height: 280px; resize: vertical; }
label { font-size: 14px; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }
.error { color: #dc2626; font-size: 14px; margin-top: 8px; }
.ok { color: #16a34a; font-size: 14px; margin-top: 8px; }

/* 文章正文 */
.article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.article h1 { margin-top: 0; font-size: 28px; }
.article img { max-width: 100%; border-radius: 8px; }
.article pre { background: #1f2937; color: #e5e7eb; padding: 16px; border-radius: 8px; overflow-x: auto; }
.article code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article pre code { background: none; padding: 0; color: inherit; }
.article blockquote { border-left: 3px solid var(--brand); margin: 16px 0; padding: 4px 16px; color: var(--muted); background: #f8fafc; }
.article ul { padding-left: 24px; }

/* 评论区 */
.comments { margin-top: 36px; }
.comments h3 { font-size: 18px; }
.comment { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.comment .who { font-weight: 600; font-size: 14px; }
.comment .when { color: var(--muted); font-size: 12px; margin-left: 8px; }
.comment p { margin: 8px 0 0; white-space: pre-wrap; }
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 24px; }
.form-card h3 { margin-top: 0; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* 后台 */
.admin-list { margin-top: 24px; }
.admin-list .item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 32px 0; }
