
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%); color: #111827; line-height: 1.75; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.layout { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; gap: 24px; padding: 24px; }
.sidebar { background: rgba(255,255,255,0.96); border: 1px solid rgba(226,232,240,0.9); border-radius: 28px; padding: 24px; position: sticky; top: 24px; align-self: start; height: calc(100vh - 48px); overflow-y: auto; box-shadow: 0 18px 50px rgba(15,23,42,0.06); }
.sidebar h1 { margin-top: 0; margin-bottom: 1rem; font-size: 1.45rem; letter-spacing: -0.02em; }
.sidebar h1 a { color: inherit; }
.nav-list, .friend-list { list-style: none; padding: 0; margin: 0; }
.nav-item { display: block; padding: 0.75rem 1rem; border-radius: 14px; color: #334155; transition: background 0.25s ease, color 0.25s ease; }
.nav-item:hover { background: #eff6ff; }
.nav-item.active { background: #dbeafe; font-weight: 700; color: #1d4ed8; }
.nav-group-title { display: block; margin: 1.5rem 0 0.5rem; font-size: 0.95rem; color: #475569; font-weight: 600; }
.content { background: rgba(255,255,255,0.98); border: 1px solid rgba(226,232,240,0.9); border-radius: 32px; padding: 32px; max-width: 1160px; width: 100%; margin: 0 auto; box-shadow: 0 18px 50px rgba(15,23,42,0.05); }
.page-header { margin-bottom: 2rem; }
.page-title-group h1 { margin: 0 0 0.75rem; font-size: clamp(2rem, 3vw, 3.2rem); line-height: 1.05; letter-spacing: -0.03em; }
.page-title-group p { margin: 0; color: #475569; font-size: 1rem; }
.page-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; color: #64748b; font-size: 0.95rem; }
.page-meta span { background: #f8fafc; padding: 0.55rem 0.85rem; border-radius: 999px; border: 1px solid #e2e8f0; }
.breadcrumbs { margin-bottom: 1.5rem; font-size: 0.95rem; color: #475569; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: ">"; margin: 0 0.5rem; color: #94a3b8; }
.breadcrumbs a { color: #2563eb; }
.breadcrumbs a:hover { text-decoration: underline; }
.section-panel { padding: 24px; border-radius: 28px; background: #f8fafc; border: 1px solid #e2e8f0; margin-bottom: 24px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; font-size: 1.35rem; }
.section-heading span { color: #64748b; }
.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.article-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.65rem; padding: 0.75rem 1rem; border-radius: 18px; background: #ffffff; border: 1px solid #e2e8f0; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.article-list li:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(15,23,42,0.08); }
.article-list li a { flex: 1; min-width: 0; color: #1e293b; font-weight: 600; }
.article-list li a:hover { color: #2563eb; }
.article-badge, .article-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.85rem; color: #334155; background: #eff6ff; border: 1px solid #dbeafe; }
.article-chip { white-space: nowrap; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { color: #111827; }
.markdown-body p { margin: 1rem 0; }
.markdown-body blockquote { border-left: 4px solid #2563eb; margin: 1.5rem 0; padding: 1rem 1.25rem; background: #f1f5ff; color: #1e293b; border-radius: 14px; }
.markdown-body pre { overflow: auto; background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 16px; margin: 1.5rem 0; }
.markdown-body code { background: #f8fafc; padding: 0.2rem 0.4rem; border-radius: 6px; }
.article-summary { margin: 1.5rem 0; padding: 1.25rem 1.5rem; border-radius: 20px; background: #eff6ff; border: 1px solid #dbeafe; }
.article-summary strong { display: block; margin-bottom: 0.75rem; color: #0f172a; }
.article-tags { margin-bottom: 1.5rem; }
.article-tags a { display: inline-flex; align-items: center; margin-right: 0.75rem; margin-bottom: 0.5rem; padding: 0.45rem 0.85rem; border-radius: 999px; background: #eff6ff; border: 1px solid #dbeafe; color: #1d4ed8; font-size: 0.95rem; }
.friend-card, .info-card { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #e2e8f0; }
.friend-card h2, .info-card h2 { margin-top: 0; font-size: 1rem; color: #0f172a; }
.friend-card a { color: #1d4ed8; }
.random-recommendations { margin-top: 2rem; }
.random-recommendations h3 { margin-top: 0; margin-bottom: 1rem; font-size: 1.1rem; }
.random-recommendations-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 0.75rem; }
.random-recommendations-grid a { display: block; padding: 1rem; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; color: #2563eb; transition: transform 0.2s ease, background 0.2s ease; }
.random-recommendations-grid a:hover { transform: translateY(-2px); background: #eff6ff; }
.pagination { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.pagination a, .pagination strong { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 999px; padding: 0 0.75rem; border: 1px solid #cbd5e1; background: #ffffff; color: #334155; }
.pagination strong { background: #2563eb; color: #ffffff; border-color: #2563eb; }
.article-navigation { display: grid; gap: 1rem; padding: 1rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; margin-top: 1.5rem; }
.article-navigation a { color: #2563eb; }
.tag-cloud-panel { background: #eff6ff; border: 1px solid #dbeafe; border-radius: 24px; padding: 18px; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.05); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 6px 0; }
.tag-cloud a { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; padding: 0.7rem 1rem; border-radius: 2rem 1.2rem 1.7rem 1.2rem; text-decoration: none; font-weight: 700; transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); border: 1px solid rgba(37, 99, 235, 0.15); background: rgba(255, 255, 255, 0.92); color: inherit; position: relative; }
.tag-cloud a:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14); background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1)); border-color: rgba(37, 99, 235, 0.3); }
.tag-cloud a::after { content: attr(data-count); margin-left: 0.4rem; padding: 0.18rem 0.55rem; border-radius: 999px; background: rgba(37, 99, 235, 0.1); color: #1e3a8a; font-size: 0.78rem; }
@media screen and (max-width: 720px) { .tag-cloud { justify-content: flex-start; } .tag-cloud a { min-width: 100px; padding: 0.6rem 0.9rem; } }
/* 移动端导航栏样式 */
.nav-toggle-checkbox { display: none; }
.nav-toggle-label { display: none; }
.sidebar-overlay { display: none; }
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .sidebar { position: static; top: auto; height: auto; max-height: none; margin-bottom: 16px; }
  .content { padding: 24px; }
  .nav-toggle-label { display: block; position: fixed; top: 16px; left: 16px; z-index: 1000; background: #2563eb; color: white; padding: 10px 16px; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
  .sidebar { position: fixed; top: 0; left: 0; width: 280px; height: 100vh; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 999; background: rgba(255,255,255,0.98); border-radius: 0; padding-top: 60px; overflow-y: auto; }
  .nav-toggle-checkbox:checked ~ .sidebar { transform: translateX(0); }
  .sidebar-content { padding: 0 24px 24px; }
  .nav-toggle-checkbox:checked + .nav-toggle-label { left: 296px; }
  .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 998; }
  .nav-toggle-checkbox:checked ~ .sidebar-overlay { display: block; }
}
@media (max-width: 640px) {
  .sidebar { width: 85%; max-width: 300px; padding: 18px; border-radius: 0; padding-top: 60px; }
  .nav-toggle-label { top: 12px; left: 12px; padding: 8px 14px; font-size: 0.95rem; }
  .nav-toggle-checkbox:checked + .nav-toggle-label { left: calc(85% - 60px); }
  .content { padding: 20px; }
  .page-title-group h1 { font-size: 1.75rem; }
  .page-title-group p { font-size: 0.95rem; }
  .page-meta { flex-direction: column; gap: 0.65rem; font-size: 0.9rem; }
  .breadcrumbs { font-size: 0.9rem; }
  .section-heading h2 { font-size: 1.2rem; }
  .article-list li a { font-size: 0.95rem; }
  .article-chip { font-size: 0.8rem; }
  .random-recommendations-grid { grid-template-columns: 1fr; }
  body { font-size: 15px; }
}
