/* 帖子板块列表容器样式 */
.post-board-list-container {
  position: relative;
  padding: 0 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

/* 核心修复：替换 absolute 为 relative，保留宽度和位置效果 */
.post-board-container {
  position: relative;  /* 关键：从 absolute 改为 relative，回归文档流 */
  margin: 0 auto;      /* 替代 left:10%，实现水平居中 */
  width: 80%;          /* 保留你想要的宽度 */
  /* 新增：确保容器高度自适应内容，不塌陷 */
  height: auto;
  /* 新增：与上方内容分隔，视觉更清晰 */
  margin-top: 2rem;
}

/* 列表组包装器 */
.list-group-wrapper {
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  width: 100%;
}

/* 隐藏滚动条 */
.list-group-wrapper::-webkit-scrollbar {
  display: none;
}

/* 滚动箭头按钮样式 */
.post-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 12px;
  color: #333;
  transition: all 0.2s ease-in-out;
  padding: 0;
}

/* 向左箭头 */
.post-scroll-left {
  left: 0;
}

/* 向右箭头 */
.post-scroll-right {
  right: 0;
}

/* 箭头悬停效果 */
.post-scroll-btn:hover {
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

/* 箭头禁用状态 */
.post-scroll-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateY(-50%) scale(1);
}

/* 顶部板块导航 - 强制横向布局，紧凑长条 */
.list-group {
  /* 毛玻璃效果保留 */
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  /* 核心：紧凑内边距，仅横向留空间 */
  padding: 8px 15px;
  /* 强制横向flex布局（覆盖Bootstrap默认的column），优先级拉满 */
  display: flex !important;
  flex-direction: row !important;
  /* 明确指定横向排列 */
  flex-wrap: nowrap;
  /* 板块过多时不换行，使用滚动 */
  gap: 10px;
  /* 板块之间的间距，更舒适 */
  justify-content: center;
  /* 居中排列 */
  align-items: center;
  /* 垂直居中，让板块对齐 */
  /* 清除默认样式，让容器贴合内容 */
  list-style: none !important;
  margin: 0 auto !important;
  /* 居中显示 */
  min-width: fit-content;
  white-space: nowrap;
  /* 移除可能导致竖向的样式 */
  position: static;
  top: auto;
  align-self: auto;
}

/* 板块链接样式 - 短横条，横向并排 */
.list-group-item {
  /* 毛玻璃效果保留 */
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  /* 核心：强制行内flex，仅占文字宽度，覆盖Bootstrap默认 */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  /* 紧凑内边距，保持短横条 */
  padding: 6px 12px !important;
  /* 清除Bootstrap默认的block/竖向样式 */
  float: none !important;
  width: auto !important;
  /* 仅占文字宽度 */
  height: auto !important;
  margin: 0 !important;
  /* 清除默认外边距 */
  /* 文字样式 */
  color: #333333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  /* 可选：去掉最小宽度，完全贴合文字 */
  /* min-width: 60px; */
}

/* 激活状态样式 */
.list-group-item.active {
  background-color: rgba(66, 133, 244, 0.8) !important;
  color: white !important;
  border-color: rgba(66, 133, 244, 0.9) !important;
}

/* 悬浮效果 */
.list-group-item:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 帖子容器 */

/* --- 2. 帖子列表与卡片设计 --- */

/* 移除列表项的默认样式 */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 每个帖子项作为一个卡片 */
.post-list>li {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  /* 圆角设计 */
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  /* 卡片之间的间距 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* 动画过渡效果 */
}

/* 鼠标悬停在卡片上的效果 */
.post-list>li:hover {
  transform: translateY(-5px);
  /* 向上轻微移动 */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  /* 阴影加深，悬浮感更强 */
}

/* 帖子信息组布局 */
.post-info-group {
  /* 使用 CSS Grid 布局，自动将 "标题：" 和内容分成两列 */
  display: grid;
  grid-template-columns: auto 1fr;
  /* 第一列宽度自适应，第二列占据剩余空间 */
  gap: 0.75rem 1rem;
  /* 行间距 0.75rem，列间距 1rem */
  align-items: center;
  /* 垂直居中对齐 */
}

/* 帖子信息标题样式 */
.post-info-title {
  font-weight: 600;
  color: #6c757d;
  /* 次要文字颜色 */
  white-space: nowrap;
  /* 防止标题换行 */
}

/* 帖子信息内容样式 */
.post-info-content {
  color: #212529;
  /* 主要文字颜色 */
}

/* 帖子详情链接样式 */
.post-info-content a {
  color: #0d6efd;
  /* 链接颜色 */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.post-info-content a:hover {
  color: #0a58ca;
  /* 链接悬停颜色 */
  text-decoration: underline;
}

/* --- 3. 分页控件样式 --- */

/* 确保分页链接居中显示 */
.pagination {
  display: flex;
  justify-content: center;
  padding-left: 0;
  list-style: none;
  margin-top: 2rem;
  /* 与帖子列表保持间距 */
}

.pagination .page-link {
  color: #333333;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin: 0 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
}

.pagination .page-link:hover {
  color: #333333;
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination .page-item.active .page-link {
  z-index: 3;
  color: #ffffff;
  background-color: rgba(93, 127, 229, 0.8);
  border-color: rgba(93, 127, 229, 0.8);
  box-shadow: 0 2px 8px rgba(93, 127, 229, 0.3);
}

.post-more-btn {
  width: 100%;
}
/* --- 4. 响应式布局调整 --- */

/* 针对中型及以下屏幕 (< 992px) */
@media (max-width: 991.98px) {

  /* 优化小屏幕下的帖子信息布局 */
  .post-info-group {
    grid-template-columns: 1fr;
    /* 改为单列布局 */
    gap: 0.5rem;
    /* 减小行间距 */
  }

  .post-info-title {
    color: #212529;
    /* 标题颜色变深 */
  }
}