:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border: #e0e0e0;
  --border-hover: #333333;
  --accent: #000000;
  --tag-bg: #f0f0f0;
  --tag-text: #555555;
  --tag-bg-hover: #e4e4e4;
  --tag-active-bg: #1a1a1a;
  --tag-active-text: #ffffff;
  --link: #1a1a1a;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", "Monaco", monospace;
  --max-width-main: 1040px;
  --max-width-article: 720px;
  --nav-height: 56px;
  --toc-width: 220px;
  --sidebar-width: 260px;
  --blue-bg: #e8f4fd;
  --blue-text: #0369a1;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width-main);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link svg {
  flex-shrink: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  font-weight: 600;
}

.container {
  max-width: var(--max-width-main);
  margin: 0 auto;
  padding: 0 24px 60px;
  flex: 1;
  width: 100%;
}

/* ---------- 首页布局 ---------- */
.home-layout {
  display: flex;
  gap: 48px;
  padding-top: 40px;
  align-items: flex-start; /* 确保 sticky 不因 stretch 失效 */
}

.home-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 20px;
  position: sticky;
  top: calc(var(--nav-height) + 20px); /* 留出导航栏高度 + 视觉间距 */
}

.home-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tag-bg);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.home-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--text);
}

.home-signature {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.home-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.home-stats .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 18px;
  border-right: 1px solid var(--border);
}

.home-stats .stat-item:last-child {
  border-right: none;
}

.home-stats .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.home-social {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.home-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  background: transparent;
}

.home-social-link:hover {
  color: var(--text);
  background: var(--tag-bg);
}

.home-social-link svg {
  width: 18px;
  height: 18px;
}

.home-main {
  flex: 1;
  min-width: 0;
  padding-top: 8px;
  padding-bottom: 40px;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
  align-items: stretch;
}
.article-nav-links {
  display: flex;
  width: 100%;
}
#next-link {
  margin-left: auto;
}
.nav-article-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
}
.nav-article-link:hover {
  color: var(--accent);
}

.nav-article-link .nav-title {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
  display: flex;         
  align-items: center;
  gap: 4px;
}

.nav-title-text {
  display: inline-block;
  max-width: 12em;        
  white-space: nowrap;
  overflow: hidden;
  mask-image: linear-gradient(to right, black calc(100% - 1.5em), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 1.5em), transparent 100%);
}

.nav-article-link .nav-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
  width: 17px;
  height: 17px;
}

.search-box {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: none;
  border-bottom: 2px solid var(--border);
  font-size: 0.9rem;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
}

.search-box:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.search-box::placeholder {
  color: var(--text-muted);
}

.tag-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  max-height: 74px;
  overflow: hidden;
  position: relative;
}

.tag-btn {
  background: var(--tag-bg);
  border: none;
  padding: 7px 15px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--tag-text);
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  white-space: nowrap;
  border-radius: 6px;
  line-height: 1.3;
}

.tag-btn:hover {
  background: var(--tag-bg-hover);
  color: var(--text);
}

.tag-btn.active {
  background: var(--tag-active-bg);
  color: var(--tag-active-text);
}

.tag-btn.all-tags-btn {
  background: var(--blue-bg);
  color: var(--blue-text);
  font-weight: 500;
}

.tag-btn.all-tags-btn:hover {
  background: #d6edfb;
  color: #0c4a6e;
}

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

.card {
  display: block;
  padding: 22px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
  cursor: pointer;
  /* 移除动画 */
}

.card:first-child {
  padding-top: 0;
}

.card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.card:hover .card-title {
  color: var(--accent);
}

.card-tags {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  mask-image: linear-gradient(to right, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
  margin-bottom: 8px;
  gap: 6px;
}

.card-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-item svg {
  flex-shrink: 0;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 仅保留骨架屏动画 */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-list-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-list-item:first-child { padding-top: 0; }
.skeleton-list-item:last-child { border-bottom: none; padding-bottom: 0; }

.skeleton-line {
  height: 13px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-line.short { width: 30%; }
.skeleton-line.medium { width: 55%; }
.skeleton-line.long { width: 85%; }
.skeleton-line.title-placeholder { height: 18px; width: 65%; margin-bottom: 2px; }

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.modal-title {
  font-weight: 700;
  margin-bottom: 18px;
  font-size: 1.1rem;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.modal-tags .tag-btn { font-size: 0.82rem; }

/* 文章页 */
.article-page {
  display: flex;
  gap: 40px;
  position: relative;
  padding-top: 32px;   /* 新增，为导航栏留出舒适间距 */
}
.article-main {
  flex: 1;
  max-width: var(--max-width-article);
  width: 100%;
}

.article-toc {
  width: var(--toc-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
  border-left: 1px solid var(--border);
  padding-left: 16px;
  font-size: 0.85rem;
}

.toc-title {
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding-left: 4px;
}

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

.toc-list li {
  margin-bottom: 0;
}

.toc-link {
  display: block;
  padding: 4px 8px 4px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.83rem;
  line-height: 1.4;
  transition: all 0.2s ease;
  word-break: break-word;
}

.toc-link:hover {
  background: var(--tag-bg);
  color: var(--text);
  border-left-color: var(--border-hover);
}

.toc-link.active {
  border-left-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}

.toc-link.toc-h3 {
  padding-left: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.toc-link.toc-h3:hover,
.toc-link.toc-h3.active {
  color: var(--text);
}

.article-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  margin-bottom: 27px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-meta .reading-time {
  background: var(--tag-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}
.article-body p { margin-bottom: 22px; }
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  scroll-margin-top: calc(var(--nav-height) + 24px);
  margin: 40px 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.article-body h1 {
	scroll-margin-top: calc(var(--nav-height) + 24px);
}
.article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 28px 0 12px;scroll-margin-top: calc(var(--nav-height) + 24px); }
.article-body blockquote {
  border-left: 3px solid var(--border);
  margin: 20px 0;
  padding: 8px 0 8px 20px;
  color: var(--text-secondary);
}
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body pre { background: var(--tag-bg); padding: 16px; overflow-x: auto; margin: 20px 0; border-radius: 6px; }
.article-body code { font-family: var(--font-mono); font-size: 0.88em; }
.article-body img { max-width: 100%; }

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }
.article-nav {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 6px;
  transition: border-color 0.15s, color 0.15s;
}
.nav-btn-filled {
  background: var(--text);         
  color: #fff;                      
  border-color: var(--text);
}

.nav-btn-filled:hover {
  background: #fff;
  border-color: #1a1a1a;
  color: #fff;
}

.article-nav .back-link {
  color: inherit;
  text-decoration: none;
  font-size: inherit;
}
.nav-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.nav-btn svg {
  flex-shrink: 0;
}
.about-container {
  max-width: 640px;
  margin: 0 auto;
  padding-top: 20px;
}

.about-header {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 36px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tag-bg);
  object-fit: cover;
}

.about-name { font-size: 1.6rem; font-weight: 700; }
.about-signature { color: var(--text-secondary); margin-top: 6px; }

.about-section { margin-bottom: 28px; }
.about-section h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.contact-list { list-style: none; }
.contact-list li { margin-bottom: 8px; font-size: 0.95rem; }
.contact-list a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.contact-list a:hover { color: var(--accent); }

/* 友链页 */
.friends-container {
  max-width: 640px;
  margin: 0 auto;
  padding-top: 20px;
}
.friends-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 28px;
}
.friends-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.friend-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  background: var(--surface);
  transition: box-shadow 0.15s;
}
.friend-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.friend-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.friend-name a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.friend-name a:hover { color: var(--accent); }
.friend-desc { font-size: 0.85rem; color: var(--text-muted); }

.site-footer {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state svg { opacity: 0.5; }
.empty-state p { font-size: 0.95rem; }

/* 响应式保留原逻辑，仅移除动画相关 */
@media (max-width: 860px) {
  .home-layout {
    height: auto;
    overflow: visible;
  }
  .home-sidebar {
    position: static;
    height: auto;
  }
  .home-main {
    overflow-y: visible;
    height: auto;
  }
  .article-page { flex-direction: column; }
  .article-toc {
    position: static;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 16px;
    margin-top: 24px;
    max-height: none;
  }
}
.nav-link {
  position: relative;
  padding-bottom: 2px;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: currentColor;
}
.article-meta {
  display: flex;
  flex-direction: column;     
  align-items: center;        
  gap: 14px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-info-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.meta-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: none;
  padding: 0;
}

.meta-info svg {
  width: 14px;
  height: 14px;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.article-tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .home-layout {
    flex-direction: column;
    gap: 24px;
    padding-top: 24px;
  }
  .home-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 18px;
    padding-top: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .home-avatar { width: 64px; height: 64px; margin-bottom: 0; }
  .home-info { flex: 1; }
  .home-name { font-size: 1.15rem; margin-bottom: 2px; }
  .home-signature { font-size: 0.82rem; margin-bottom: 8px; }
  .home-stats { justify-content: flex-start; margin-bottom: 8px; }
  .home-social { justify-content: flex-start; gap: 10px; }
  .home-social-link { width: 30px; height: 30px; }
  .home-social-link svg { width: 15px; height: 15px; }
  .home-main { padding-top: 0; }
}

@media (max-width: 640px) {
  .card { padding: 18px 0; }
  .card-title { font-size: 1.05rem; }
  .card-desc { font-size: 0.82rem; }
  .about-header { flex-direction: column; align-items: flex-start; }
  .container { padding: 0 16px 40px; }
  .nav-inner { padding: 0 16px; }
}
.article-body pre.hljs {
  background: var(--tag-bg);
  padding: 16px;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 6px;
  line-height: 1.5;
}

.article-body pre.hljs code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: none;
  padding: 0;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--tag-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

.article-body pre.hljs code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

.article-body mark {
  background: #fff3b0;
  color: inherit;
  padding: 1px 4px;
  border-radius: 3px;
}

.article-body dl {
  margin: 16px 0;
}

.article-body dt {
  font-weight: 700;
  margin-top: 12px;
}

.article-body dd {
  margin-left: 20px;
  color: var(--text-secondary);
}

.article-body .warning {
  border-left: 4px solid #f0ad4e;
  background: #fff8eb;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  color: #8a6d14;
}

.article-body .info {
  border-left: 4px solid #5bc0de;
  background: #e8f4fd;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  color: #31708f;
}

.article-body .tip {
  border-left: 4px solid #5cb85c;
  background: #e8f5e9;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  color: #3c763d;
}

.article-body .footnote-ref {
  font-size: 0.75em;
  vertical-align: super;
  text-decoration: none;
  color: var(--accent);
}

.article-body .footnote-item {
  font-size: 0.85em;
  color: var(--text-muted);
}

.article-body .footnote-backref {
  text-decoration: none;
  color: var(--accent);
  margin-left: 4px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.article-body table th {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-weight: 600;
  text-align: left;
}

.article-body table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
}

.article-body table tr:nth-child(even) {
  background: var(--bg);
}

.article-body input[type="checkbox"] {
  margin-right: 6px;
  accent-color: var(--accent);
}

.article-body ul.task-list {
  list-style: none;
  padding-left: 4px;
}
.nav-title-text {
    display: inline-block;
    max-width: calc(14 * 1em);  
    white-space: nowrap;
    overflow: hidden;
    vertical-align: bottom;
    mask-image: linear-gradient(to right, black calc(100% - 1.5em), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 1.5em), transparent 100%);
}
.article-body ul.task-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.article-body ul.task-list li input[type="checkbox"] {
  margin-top: 0.3em;
  flex-shrink: 0;
}

.article-body pre {
  position: relative;
  background: var(--tag-bg);
  padding: 40px 16px 16px;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 6px;
  line-height: 1.5;
}

.article-body pre code {
  display: block;
  background: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: inherit;
}

.code-lang-tag {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  padding: 3px 12px;
  border-bottom-right-radius: 6px;
  pointer-events: none;
  text-transform: uppercase;
}

.copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.7rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: var(--font-sans);
  line-height: 1.4;
  backdrop-filter: blur(4px);
}

.copy-btn:hover {
  background: var(--surface);
  border-color: var(--border-hover);
  color: var(--text);
}

.copy-btn svg {
  width: 12px;
  height: 12px;
}

.copy-btn.copied {
  color: #1a7f37;
  border-color: #1a7f37;
  background: #dafbe1;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
  margin-top: var(--nav-height);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
