/* 可乐小窝 · 简约版 */
:root {
  --bg: #fafaf8;
  --card: #ffffff;
  --text: #2b2b2b;
  --muted: #8a8a8a;
  --accent: #b96a75;
  --accent-soft: #f3e7e9;
  --border: #ececea;
  --code-bg: #f4f3f1;
  --nav-bg: rgba(255,255,255,.92);
}
html.dark {
  --bg: #141314;
  --card: #1e1d1c;
  --text: #e6e4e1;
  --muted: #8f8d8a;
  --accent: #d48d96;
  --accent-soft: #2c2628;
  --border: #2a2927;
  --code-bg: #100f0e;
  --nav-bg: rgba(30,29,28,.92);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 22px; }

/* 顶栏：只留标题 */
header { padding: 26px 0 0; }
.logo {
  font-size: .95rem; font-weight: 600; letter-spacing: .08em;
  color: var(--text); opacity: .75;
}
.logo:hover { opacity: 1; color: var(--accent); }

/* 页面头 */
.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: .02em; }
.page-head > p { color: var(--muted); font-size: .88rem; margin-top: 4px; }

/* hero */
.hero { padding: 72px 0 52px; text-align: center; }
.hero h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: .03em; margin-bottom: 10px; }
.hero p { color: var(--muted); font-size: .92rem; }

/* 文章卡片 */
.post-list { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 56px; }
.card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-cover { height: 148px; background-size: cover; background-position: center; }
.card-body { padding: 18px 22px 20px; }
.card-title { font-size: 1.08rem; font-weight: 600; display: block; letter-spacing: .01em; }
.card-title:hover { color: var(--accent); }
.card-meta { font-size: .78rem; color: var(--muted); margin: 8px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.card-meta span:not(:last-child)::after { content: "·"; margin-left: 10px; color: var(--border); }
.card-desc { font-size: .88rem; color: var(--muted); line-height: 1.7; }
.tag { color: var(--accent); font-size: .78rem; }
.tag:hover { text-decoration: underline; }

/* 文章页 */
.post { padding: 40px 0 56px; }
.back { color: var(--accent); font-size: .84rem; display: inline-block; margin-bottom: 20px; }
.back:hover { text-decoration: underline; }
.post-cover { height: 220px; background-size: cover; background-position: center; border-radius: 12px; margin-bottom: 28px; }
.post h1 { font-size: 1.55rem; font-weight: 700; margin: 6px 0 14px; line-height: 1.45; letter-spacing: .01em; }
.post-meta { color: var(--muted); font-size: .82rem; margin-bottom: 34px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-meta span:not(:last-child)::after { content: "·"; margin: 0 6px; color: var(--border); }

.post-body { font-size: 1rem; }
.post-body h1 { font-size: 1.35rem; margin: 34px 0 12px; }
.post-body h2 { font-size: 1.2rem; margin: 30px 0 12px; padding-left: 12px; border-left: 3px solid var(--accent); }
.post-body h3 { font-size: 1.05rem; margin: 24px 0 10px; }
.post-body p { margin: 15px 0; }
.post-body a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.post-body a:hover { border-color: var(--accent); }
.post-body blockquote {
  background: var(--accent-soft); padding: 12px 18px; border-radius: 8px;
  color: var(--accent); margin: 18px 0; font-size: .95rem;
}
.post-body ul { margin: 14px 0; padding-left: 24px; }
.post-body li { margin: 7px 0; }
.post-body code {
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
  font-size: .88em; font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.post-body pre {
  background: var(--code-bg); padding: 18px; border-radius: 10px;
  overflow-x: auto; margin: 18px 0; line-height: 1.6; border: 1px solid var(--border);
}
.post-body pre code { background: none; padding: 0; border: none; }
.post-body img { margin: 18px 0; border-radius: 10px; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }

/* 目录 */
.toc {
  position: sticky; top: 20px; float: right; width: 180px; margin-left: 18px;
  font-size: .8rem; color: var(--muted); max-height: 62vh; overflow-y: auto;
  padding-left: 12px; border-left: 2px solid var(--border);
}
.toc-title { font-weight: 600; color: var(--text); font-size: .82rem; margin-bottom: 8px; letter-spacing: .05em; }
.toc ul { list-style: none; }
.toc li { margin: 5px 0; line-height: 1.5; }
.toc a:hover { color: var(--accent); }
.toc-l3 { padding-left: 12px; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 56px; }
.tag-big {
  background: var(--card); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 999px; font-size: .88rem;
  transition: all .2s;
}
.tag-big:hover { border-color: var(--accent); color: var(--accent); }
.tag-big span { color: var(--muted); font-size: .78rem; margin-left: 4px; }

/* 归档 */
.archive-year { font-size: 1.15rem; font-weight: 700; margin: 28px 0 10px; letter-spacing: .03em; }
.archive-list { list-style: none; padding-bottom: 16px; }
.archive-list li { display: flex; gap: 18px; padding: 9px 0; border-bottom: 1px dashed var(--border); align-items: baseline; }
.archive-date { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.archive-list a:hover { color: var(--accent); }

/* 搜索 */
.search-box { margin: 18px 0 24px; }
.search-box input {
  width: 100%; padding: 13px 18px; font-size: .95rem; letter-spacing: .02em;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text); outline: none;
  transition: border-color .2s;
}
.search-box input:focus { border-color: var(--accent); }
.search-item {
  display: block; padding: 16px 20px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  transition: all .2s;
}
.search-item:hover { border-color: var(--accent); }
.search-item-title { font-weight: 600; font-size: 1rem; }
.search-item-desc { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.search-highlight { background: var(--accent-soft); color: var(--accent); padding: 0 2px; border-radius: 3px; }
.empty { color: var(--muted); text-align: center; padding: 36px 0; }

/* 评论 */
.comments { margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border); }
.comments h3 { font-size: 1rem; font-weight: 600; margin-bottom: 18px; letter-spacing: .03em; }

/* 页脚 */
footer {
  text-align: center; padding: 30px 0 10px; color: var(--muted);
  font-size: .78rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.footer-links a:hover { color: var(--accent); }

/* 底部导航栏 */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; text-align: center; font-size: .76rem; color: var(--muted);
  padding: 11px 0 10px; letter-spacing: .04em;
  transition: color .2s; position: relative;
}
.bottom-nav a:hover { color: var(--text); }
.bottom-nav a.active { color: var(--accent); font-weight: 600; }
.bottom-nav a.active::after {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 2px; background: var(--accent); border-radius: 2px;
}
.theme-btn {
  flex: 0 0 44px; border: none; background: none; cursor: pointer;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.theme-btn:hover { color: var(--accent); }

/* 移动端 */
@media (max-width: 640px) {
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 1.4rem; }
  .post h1 { font-size: 1.35rem; }
  .toc { display: none; }
  .post-layout { display: block; }
  .card-cover { height: 120px; }
  .bottom-nav a { font-size: .72rem; }
}
