:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #2d2d2d;
  --muted: #6c757d;
  --primary: #2f80ed;
  --border: #e7e9ee;
  --shadow: 0 4px 18px rgba(17, 24, 39, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Lato", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.read-more:hover,
.post-title a:hover {
  color: var(--primary);
}

.layout-two-column {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  padding: 24px 0 32px;
}

.post-layout { padding: 24px 0 32px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.hero-card {
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff, #f6f9ff);
}

.hero-subtitle {
  margin: 0;
  color: var(--primary);
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-title {
  margin: 8px 0 4px;
}

.section-title { margin-bottom: 8px; }

.post-item {
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}

.post-item:last-child { border-bottom: 0; }
.post-title { margin: 0 0 2px; }
.post-title a { color: var(--text); text-decoration: none; }
.post-meta { margin: 0; font-size: 0.9rem; }
.read-more { color: var(--primary); font-size: 0.95rem; text-decoration: none; }

.profile-card h3,
.card h3 { margin-top: 0; }

.clean-list {
  padding-left: 18px;
  margin: 8px 0 0;
}

.muted { color: var(--muted); }
.space-between { display: flex; justify-content: space-between; align-items: center; }

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 14px 0;
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  background: #e5e7eb;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.danger { background: #dc2626; color: #fff; }
.btn.ghost { background: #fff; border-color: var(--border); }

input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.row { display: flex; gap: 8px; align-items: center; }

.markdown {
  line-height: 1.85;
  margin-top: 8px;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  margin-top: 1.2em;
}

.markdown pre {
  background: #0f172a;
  color: #f8fafc;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
}

.post-card {
  max-width: 860px;
  margin: 0 auto;
}

.post-page-title {
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .layout-two-column {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 12px;
    font-size: 0.92rem;
  }
}

.markdown img,
.preview-box img,
.editor img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.admin-state-card {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  background: #fafcff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.admin-state-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  font-size: 20px;
}

.admin-state-empty h3,
.admin-state-error h3 {
  margin: 0;
}

.admin-state-error {
  background: #fff8f8;
  border-color: #ffd8d8;
}

.home-state-card {
  margin-top: 10px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fafcff;
}

.home-state-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  font-size: 20px;
}

.home-state-card h3 {
  margin: 0;
}

.home-state-error {
  background: #fff8f8;
  border-color: #ffd8d8;
}
