:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface2: #1e232d;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #2a3140;
  --radius: 12px;
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.brand-sub { font-size: 0.78rem; color: var(--muted); }

.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
}
.nav a:hover, .nav a.active {
  color: var(--text);
  background: var(--surface2);
}

.search-form { display: flex; gap: 6px; }
.search-form input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  width: 180px;
  font-size: 0.9rem;
}
.search-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
.search-form button:hover { background: var(--accent-hover); }

.hero {
  margin: 28px 0 24px;
  padding: 28px;
  background: linear-gradient(135deg, #1a2332 0%, #171a21 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hero h1 { font-size: 1.6rem; margin-bottom: 8px; }
.hero p { color: var(--muted); max-width: 640px; }

.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title a.more { font-size: 0.85rem; color: var(--muted); font-weight: normal; }

.card-list { display: flex; flex-direction: column; gap: 14px; }

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.article-card:hover {
  border-color: #3d4a63;
  transform: translateY(-1px);
}
.article-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent-hover); }
.article-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.article-card .summary { color: #b8bcc4; font-size: 0.92rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.sidebar .box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.sidebar ul { list-style: none; }
.sidebar li { margin: 8px 0; }
.sidebar li a { color: var(--muted); }
.sidebar li a:hover { color: var(--text); }

.announ-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}
.announ-list li:last-child { border: none; }

.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 32px;
}
.article-body h1 { font-size: 1.75rem; line-height: 1.35; margin-bottom: 12px; }
.article-body .meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 24px; }
.article-body .content { font-size: 1rem; }
.article-body .content p { margin: 1em 0; }
.article-body .content ul, .article-body .content ol { margin: 1em 0 1em 1.4em; }
.article-body .content blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--accent);
  background: var(--surface2);
  color: #c5c9d0;
}
.article-body .content code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.article-body .content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 20px 0 12px;
}
.breadcrumb a { color: var(--muted); }

.message-form label { display: block; margin: 12px 0 6px; font-size: 0.9rem; color: var(--muted); }
.message-form input, .message-form textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
}
.message-form textarea { min-height: 120px; resize: vertical; }
.message-form button {
  margin-top: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
}
.message-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.message-item .who { font-weight: 600; font-size: 0.95rem; }
.message-item .when { font-size: 0.8rem; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pagination button, .pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination .current { background: var(--accent); border-color: var(--accent); }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.9rem;
}
.alert-error { background: #3f1d1d; color: #fca5a5; border: 1px solid #7f1d1d; }
.alert-success { background: #1a2e1a; color: #86efac; border: 1px solid #166534; }

.loading { text-align: center; padding: 40px; color: var(--muted); }
