:root {
  --bg-primary: #f0f5f9;
  --bg-secondary: #fff;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --accent-color: #4d9fff;
  --accent-hover: #3a8cff;
  --danger: #dc3545;
  --success: #198754;
  --warning: #ffc107;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 16px rgba(0,0,0,0.12);
  --base-font: 16px;
  --lh: 1.6;
  --sidebar-w: 280px;
  --header-h: 60px;
  --tableth:#F6F6F6;
}

[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #bbb;
  --text-muted: #888;
  --border-color: #333;
  --accent-color: #4d9fff;
  --accent-hover: #3a8cff;
  --danger: #ff6b6b;
  --success: #51cf66;
  --warning: #ffca3a;
  --tableth:#121212;
  --shadow: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-hover: 0 6px 16px rgba(0,0,0,0.3);
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--lh);
  font-size: var(--base-font);
  min-height: 100vh;
  padding-top: var(--header-h);
  transition: background 0.3s ease;
}

/* 头部固定 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
}

/* 搜索框 */
.nav-search {
  flex: 0 1 280px;
  position: relative;
  margin: 0 16px;
}
.nav-search input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}
.nav-search input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(77,159,255,0.2);
}

/* 主题切换按钮 */
.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.theme-toggle:hover {
  background: rgba(0,0,0,0.05);
}

/* 主布局 */
.main-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  gap: 24px;
}

.nav-menu {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 0 16px;
}
.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 0.95rem;
}
.nav-link:hover {
  color: var(--accent-color);
  background: rgba(0,0,0,0.05);
}
.nav-link.active {
  color: white !important;
  background: var(--accent-color) !important;
  font-weight: 500;
}


/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  padding: 20px;
  height: calc(100vh - var(--header-h) - 40px);
  position: sticky;
  top: calc(var(--header-h) + 20px);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.categories-list {
  list-style: none;
  margin-bottom: 24px;
}
.categories-list li {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.categories-list a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 4px;
  display: block;
  transition: background 0.2s;
  flex: 1;
}
.categories-list a:hover {
  background: rgba(0,0,0,0.05);
  color: var(--accent-color);
}
.category-count {
  background: rgba(0,0,0,0.05);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 8px;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud a {
  padding: 4px 12px;
  background: rgba(0,0,0,0.03);
  border-radius: 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.tag-cloud a:hover {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
  opacity: 0.9;
}

.content {
  flex: 1;
}
.container {
  width: 100%;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

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

/* 文章列表卡片 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.article-item {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  display: flex;
  align-items: stretch;
  padding: 8px !important;
  gap: 0 !important;
}
.article-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.article-cover, .article-cover-placeholder {
  width: 160px !important;
  flex-shrink: 0;
  height: 120px !important;
  object-fit: cover !important;
  object-position: center !important;
  margin: 0 !important;
  margin-right: 16px !important;
  border-radius: 8px !important;
}
.article-cover-placeholder {
  background: var(--bg-primary);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-muted);
  font-size: 1rem;
}
.article-info {
  padding: 0 !important;
  padding-right: 8px !important;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  line-height: 1.4;
}
.sticky-tag {
  display: inline-block;
  background: #4d9fff;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}
.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.article-title a:hover {
  color: var(--accent-color) !important;
}
.article-preview {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.8rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 15px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow: hidden;
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
}

/* 按钮啥的 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--accent-color);
  color: white;
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* 复刻现代感表格样式 */
.md-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.md-table th {
    background-color: var(--tableth);
    color: var(--text-primary);
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    /* 添加浅色右边框作为竖线 */
    border-right: 1px solid rgba(0, 0, 0, 0.05); 
    font-size: 0.95rem;
}

.md-table td {
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    /* 添加浅色右边框作为竖线 */
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

/* 最后一列去掉右边框，防止边框重叠或溢出圆角 */
.md-table th:last-child,
.md-table td:last-child {
    border-right: none;
}

/* 最后一列不需要底边框 */
.md-table tr:last-child td {
    border-bottom: none;
}

.md-table tr:hover td {
    background-color: rgba(77, 159, 255, 0.04);
}

/* 适配暗色模式的竖线颜色 */
html[data-theme="dark"] .md-table th,
html[data-theme="dark"] .md-table td {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* 提示toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 240px;
  padding: 14px 20px;
  border-radius: 8px;
  color: white;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger);  }
.toast.info    { background: var(--accent-color); }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 2.5rem 0 1rem;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.18s ease;
}
.page-btn:hover:not(.disabled):not(.active) {
  background: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
}
html:not([data-theme="dark"]) .page-btn.active {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(77,159,255,0.25) !important;
}
html[data-theme="dark"] .page-btn:hover:not(.disabled):not(.active),
html[data-theme="dark"] .page-btn.active {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
}
.page-btn.active {
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(13,110,253,0.25);
  background: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
}
.page-btn.disabled {
  color: var(--text-muted);
  background: var(--bg-primary);
  cursor: not-allowed;
  opacity: 0.65;
}
.page-ellipsis {
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0 6px;
  user-select: none;
}

/* 上一篇下一篇 */
.prev-next {
  display:flex;
  justify-content:space-between;
  margin:2.5rem 0;
  font-size:1rem;
}

/* 评论区域 */
.comment-section {
  margin-top:3rem;
  border-top:1px solid var(--border-color);
  padding-top:2rem;
}
.comment-form textarea {
  width:100%;
  min-height:100px;
  padding:10px;
  border:1px solid var(--border-color);
  border-radius:6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  resize: vertical;
}

/* 图片自适应 */
.content img {
  max-width: 100%;
  max-width: 760px;
  width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

/* 暗色覆盖 */
html[data-theme="dark"] {
  --bg-primary: #121212 !important;
  --bg-secondary: #1e1e1e !important;
  --text-primary: #e0e0e0 !important;
  --text-secondary: #bbb !important;
  --text-muted: #888 !important;
  --border-color: #333 !important;
  --card-bg: rgba(30,30,30,0.9) !important;
}
html[data-theme="dark"] .article-item,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .card {
  background-color: rgba(30,30,30,0.85) !important;
  border-color: #333 !important;
}

/* 主题定制表单 */
.theme-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  border: 1px solid var(--border-color);
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}
.theme-form-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 24px;
  flex-wrap: wrap;
}
.theme-form-row:last-of-type {
  border-bottom: none;
  margin-bottom: 12px;
}
.theme-form-label {
  flex-shrink: 0;
  width: 180px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 36px;
  font-size: 0.95rem;
}
.theme-form-control {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  position: relative;
}
.color-input-native {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}
.color-track {
  flex: 1;
  height: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}
.color-confirm-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.color-confirm-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
.color-preview-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--border-color);
}
.range-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.range-input {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.range-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  cursor: pointer;
}
.range-input::-moz-range-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  cursor: pointer;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  margin-top: -5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: all 0.2s;
}
.range-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: all 0.2s;
}
.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.range-input::-moz-range-thumb:hover {
  transform: scale(1.15);
}
.range-value {
  flex-shrink: 0;
  min-width: 45px;
  text-align: right;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.field-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.file-upload-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  position: relative;
}
.file-input-native {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}
.file-select-btn {
  flex-shrink: 0;
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.file-select-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
.file-name {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.bg-image-preview-wrap {
  margin-bottom: 8px;
}
.bg-image-preview {
  max-width: 200px;
  max-height: 100px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
}
.image-remove-check {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.theme-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.btn-save-theme, .btn-reset-theme {
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-save-theme {
  background: var(--accent-color);
  color: white;
}
.btn-reset-theme {
  background: var(--danger);
  color: white;
}
.btn-save-theme:hover, .btn-reset-theme:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 移动端响应式 */
@media (max-width: 576px) {
  .nav-search {
    display: none;
  }
  .search-form {
    display: flex;
  }
  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  .article-meta {
    gap: 12px;
    font-size: 0.85rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
  }
  .article-meta {
    flex-direction: row !important;
    align-items: center !important;
  }
}
@media (max-width: 600px) {
  .like-container {
    justify-content: space-between;
  }
}
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    padding: 16px;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    margin-bottom: 20px;
  }
  .article-item {
    flex-direction: column;
  }
  .article-cover, .article-cover-placeholder {
    width: 100% !important;
    height: 200px !important;
    max-width: 100% !important;
    max-height: 200px !important;
    margin-right: 0 !important;
    margin-bottom: 12px !important;
  }
  .nav-search {
    flex: 0 1 200px;
  }
  .header {
    padding: 0 12px;
  }
  .logo {
    font-size: 1rem;
  }
  .nav-menu {
    gap: 8px;
    margin: 0 8px;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 0.85rem;
  }

  .sidebar {
    width: 100%;
    position: static !important;
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: none;
    background: transparent;
  }
  .main-container {
    flex-direction: column;
    padding: 16px;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    margin-bottom: 0;
    order: 2;
  }
  .content {
    order: 1;
  }
  .article-item {
    flex-direction: column;
  }
  .article-cover, .article-cover-placeholder {
    width: 100% !important;
    height: 200px !important;
    max-width: 100% !important;
    max-height: 200px !important;
    margin-right: 0 !important;
    margin-bottom: 12px !important;
  }
  .nav-search {
    flex: 0 1 200px;
  }
  .header {
    padding: 0 12px;
  }
  .logo {
    font-size: 1rem;
  }
  .article-meta {
    gap: 12px;
    font-size: 0.85rem;
  }
  .article-meta .meta-cat,
  .article-meta .meta-comments {
    display: none !important;
  }
  .article-meta .meta-date,
  .article-meta .meta-views {
    display: flex !important;
  }
  .theme-card {
    padding: 20px 16px;
    border-radius: 12px;
  }
  .theme-form-row {
    flex-direction: column;
    gap: 12px;
  }
  .theme-form-label {
    width: 100%;
    line-height: 1.4;
  }
  .theme-form-control {
    width: 100%;
    min-width: unset;
  }
  .theme-form-actions {
    flex-direction: column;
  }
  .btn-save-theme, .btn-reset-theme {
    width: 100%;
    text-align: center;
  }
}
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 240px;
  }
}
[data-theme="dark"] .color-track {
  border-color: #444;
}
[data-theme="dark"] .color-confirm-btn,
[data-theme="dark"] .file-select-btn {
  background: #2a2a2a;
  border-color: #444;
}

/* 表格响应式容器（核心：滑动条 + 移动端修复） */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
}
/* 表格基础样式 */
.md-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95rem;
    min-width: 600px; /* 强制触发滑动，避免变形 */
}
.md-table th {
    background-color: var(--tableth);
    font-weight: 600;
    color: var(--text-primary);
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}
.md-table td {
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}
/* 最后一列去掉右边框 */
.md-table th:last-child,
.md-table td:last-child {
    border-right: none;
}
.md-table tr:last-child td {
    border-bottom: none;
}
.md-table tr:hover td {
    background-color: rgba(77, 159, 255, 0.04);
}
/* 暗色模式竖线 */
html[data-theme="dark"] .md-table th,
html[data-theme="dark"] .md-table td {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
/* 自定义滑动条 */
.table-wrapper::-webkit-scrollbar {
    height: 6px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

/* === 全局滚动条美化开始 === */

/* 1. 定义滚动条整体部分 */
::-webkit-scrollbar {
    width: 8px; /* 竖向滚动条的宽度 */
    height: 8px; /* 横向滚动条的高度（如果需要） */
}

/* 2. 定义滚动条轨道（背景） */
::-webkit-scrollbar-track {
    background: transparent; /* 设置为透明，或者你页面的背景色 */
    /* 如果你想让它更像 macOS，可以设置一点圆角 */
    border-radius: 4px;
}

/* 3. 定义滚动条滑块（那个可以拖动的块） */
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* 滑块颜色，使用半透明黑色 */
    border-radius: 4px; /* 滑块圆角 */
    border: 2px solid transparent; /* 可选：增加一点内边距让滑块看起来更细 */
    background-clip: padding-box; /* 配合上面的border使用 */
}

/* 4. 鼠标悬停时的样式 */
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4); /* 鼠标放上去颜色变深 */
}

/* === 针对 Firefox 的兼容 (可选) === */
/* Firefox 使用不同的属性 */
* {
    scrollbar-width: thin; /* "auto" | "thin" | "none" */
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* 滑块颜色 轨道颜色 */
}


/* 鼠标悬停封面图片区域时的整体效果 */
.article-item:hover .article-cover,
.article-item:hover .article-cover-placeholder {
  filter: brightness(0.6); /* 图片略微变暗，更柔和的效果 */
  transition: filter 0.3s ease;
}