/* 基础变量与主题 */
:root {
  --bg: #ffffff;
  --fg: #121212;
  --muted: #646a73;
  --primary: #2b6cb0;
  --border: #e5e7eb;
  --card: #f7f8fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #e6e6e6;
    --muted: #9aa0a6;
    --primary: #63b3ed;
    --border: #1f2937;
    --card: #121212;
  }
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.container {
  max-width: 900px;
  padding: 0 16px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-title {
  margin: 0;
  font-size: 24px;
  padding: 16px 0;
}

.header-actions {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.intro {
  margin: 24px 0 8px;
}

.search {
  margin: 8px 0 24px;
}

.search input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
}

.post-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  transition: box-shadow .2s ease, transform .1s ease;
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}

.post-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 16px;
}

.post-title {
  margin: 0 0 6px;
  font-size: 20px;
}

.post-excerpt {
  margin: 0 0 10px;
  color: var(--muted);
}

.post-date {
  font-size: 12px;
  color: var(--muted);
}

.empty-hint {
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  padding: 16px 0 32px;
}

/* 文章页样式 */
.post-content {
  margin-top: 16px;
}

.post-content h1, .post-content h2, .post-content h3 {
  line-height: 1.35;
}

.post-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
}

.post-content code {
  background: rgba(125,125,125,.12);
  padding: 2px 6px;
  border-radius: 6px;
}

a { color: var(--primary); }


