* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background:
    linear-gradient(rgba(12, 17, 29, 0.58), rgba(12, 17, 29, 0.58)),
    url("/img/top_img.jpg") center/cover fixed no-repeat;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 文章内容中的链接需要有明显样式 */
.post-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover {
  color: #1d4ed8;
}
.post-content strong,
.post-content b {
  font-weight: 700;
  color: #111827;
}
.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}
.sidebar {
  padding: 24px;
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.96), rgba(15, 23, 42, 0.88));
  color: #f8fafc;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.main-shell {
  min-width: 0;
  padding: 32px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
    rgba(245, 247, 250, 0.94);
}

.mobile-header { display: none; margin-bottom: 24px; }
.mobile-brand { font-size: 1.2rem; font-weight: 700; color: #e2e8f0; }

.sidebar-inner, .hero, .post-card, .post-single, .archive-year, .term-item {
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.sidebar-inner {
  background: rgba(18, 25, 40, 0.55);
  border-color: rgba(255,255,255,0.12);
  color: #f1f5f9;
}

.profile-card { padding: 20px; text-align: center; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.12); }
.site-title { margin: 12px 0 4px; font-size: 1.4rem; color: #fff; }
.site-subtitle { margin: 0; color: #94a3b8; }

.sidebar-section h2 { color: #e2e8f0; }
.sidebar-section ul { padding-left: 18px; }
.sidebar-section ul li a { color: #cbd5e1; }
.sidebar-section ul li a:hover { color: #fff; }
.tag-cloud a { background: rgba(255,255,255,0.10); color: #e2e8f0; }

.nav-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: #e2e8f0;
  border: 1px solid rgba(148,163,184,0.14);
}
.nav-links a:hover { background: rgba(255,255,255,0.16); color: #fff; text-decoration: none; }

.sidebar-section { margin-top: 22px; }
.sidebar-section h2, .hero h1, .post-single h1, .archive-year h2 { margin-top: 0; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a, .post-tags span, .post-tags a {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148,163,184,0.12);
  font-size: 0.9rem;
}

.hero, .post-single, .post-card, .archive-year, .term-item { padding: 24px; margin-bottom: 24px; }
.hero { background: rgba(255,255,255,0.90); }
.hero.compact { padding-bottom: 12px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.12em; color: #64748b; font-size: 0.78rem; }
.hero-text { color: #475569; }
.post-list, .archive-list, .term-list { display: grid; gap: 20px; }
.post-meta, .archive-date { color: #64748b; font-size: 0.9rem; }
.post-id {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  font-size: 0.85em;
  font-weight: 600;
}
.post-card h2, .post-single h1 { margin-bottom: 10px; }
.post-summary { line-height: 1.75; color: #475569; }
.post-summary p { margin: 0 0 0.8rem 0; }
.post-summary p:last-child { margin-bottom: 0; }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: #2563eb;
  font-weight: 600;
}
.post-content { line-height: 1.85; overflow-wrap: anywhere; }
.post-content img { max-width: 100%; height: auto; border-radius: 12px; }
.post-content pre {
  overflow: auto;
  padding: 16px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,0.12);
}
.post-content code {
  background: rgba(148,163,184,0.12);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  font-size: 0.95em;
}
.post-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.post-content table {
  display: block;
  width: 100%;
  overflow: auto;
  border-collapse: collapse;
}
.post-content table th,
.post-content table td {
  border: 1px solid rgba(148,163,184,0.24);
  padding: 0.55rem 0.75rem;
  vertical-align: top;
}
.page-body { line-height: 1.8; }
.term-item { display: flex; justify-content: space-between; align-items: center; }
.site-footer { color: #475569; padding: 12px 2px 0; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 32px 0 16px; padding: 0; list-style: none; }
.pagination li, .page-item { display: inline-flex; }
.pagination a, .pagination span, .page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 10px; background: rgba(255,255,255,0.85);
  border: 1px solid rgba(148,163,184,0.25); color: #475569;
  font-weight: 500; transition: all 0.15s ease;
}
.pagination a:hover, .page-link:hover {
  background: rgba(255,255,255,0.98); border-color: rgba(100,116,139,0.4);
  color: #1f2937; transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,23,42,0.08);
}
.pagination .active span, .page-item.active .page-link {
  background: rgba(30,41,59,0.9); border-color: rgba(30,41,59,0.9); color: #fff;
}
.page-item.disabled .page-link {
  opacity: 0.5; cursor: not-allowed;
}

@media (max-width: 1100px) {
  .page-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: -20px -20px 20px;
    background: rgba(15, 23, 42, 0.94);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
  }
  .main-shell { padding: 20px; }
  .pagination { flex-wrap: wrap; gap: 6px; }
  .pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 10px; font-size: 0.9rem; }
}
