/* 顶部横幅默认样式（无图） */
.top-banner.no-image {
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  padding: 40px 20px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 20px;
  color: #fff;
}
.top-banner.no-image h1 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #ffcc00;
}
.top-banner.no-image p {
  font-size: 14px;
  color: #ccc;
}
/* 栅格布局 */
.grid-layout {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
}

/* 主区域和侧栏宽度 */
.main-content {
  width: calc(100% - 300px);
}
.sidebar {
  width: 280px;
  margin-left: 20px;
}

/* 行式文章布局 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.article-row {
  display: flex;
  width: 100%;
  background: #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  transition: background 0.3s;
}
.article-row:hover {
  background: #222;
}
.article-row-thumb {
  width: 150px;
  height: 100px;
  flex-shrink: 0;
}
.article-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-row-body {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.article-row-title {
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.article-row-desc {
  font-size: 14px;
  color: #aaa;
  margin: 6px 0;
}
.article-row-meta {
  font-size: 12px;
  color: #666;
}
.read-more-btn {
  margin-top: 8px;
}
.read-more-btn a {
  font-size: 13px;
  color: #1e90ff;
  text-decoration: none;
}

/* 热门推荐 */
.hot-articles-box {
  background: #1c1c1c;
  border-radius: 6px;
  padding: 15px;
}
.hot-article-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.hot-article-thumb img {
  width: 50px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 10px;
}
.hot-article-title {
  font-size: 14px;
  color: #ddd;
  flex: 1;
  
}

/* 移动端适配 */
@media screen and (max-width: 992px) {
  .grid-layout {
    flex-wrap: wrap;
  }
  .main-content {
    width: 100%;
  }
  .sidebar {
    width: 100%;
    margin-left: 0;
    margin-top: 20px;
  }
}
@media screen and (max-width: 768px) {
  .article-row {
    flex-direction: column;
  }
  .article-row-thumb {
    width: 100%;
    height: 180px;
  }
}
/* 顶部横幅样式 */
.top-banner {
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}
.top-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

/* 筛选栏样式 */
.filter-bar {
  background: #1e1e1e;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
}
.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.filter-label {
  color: #ffcc00;
  margin-right: 10px;
  font-weight: bold;
}
.filter-group a {
  color: #ccc;
  background: #2a2a2a;
  padding: 6px 12px;
  margin-right: 10px;
  margin-bottom: 6px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}
.filter-group a:hover {
  background: #1e90ff;
  color: #fff;
}
.filter-group a.active {
  background: #1e90ff;
  color: #fff;
  font-weight: bold;
}
footer{
    text-align: center;
    font-size: 16px;
    color: #555;
}
.pagination {
  margin: 10px 0;
  text-align: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pagination::-webkit-scrollbar {
  display: none;
}
.pagination ul {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0;
  margin: 0 auto;
  list-style: none;
}

.pagination li {
  display: inline-block;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  text-decoration: none;
  min-width: 36px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.pagination a:hover {
  background: #ff6b81;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,107,129,0.4);
}

.pagination li.active span {
  background: #ff4757;
  color: #fff;
  font-weight: bold;
  cursor: default;
}

.pagination li.disabled span {
  color: #666;
  background: rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
}

.pagination li.hidden-xs {
  display: inline-block;
}

.pagination li.visible-xs {
  display: none;
}

/* 移动端适配：隐藏多余页码，仅保留当前页/总页数 */
@media screen and (max-width: 768px) {
  .pagination ul {
    gap: 6px;
    justify-content: flex-start;
    padding: 0 10px;
    
  }

  .pagination li.hidden-xs {
    display: none;
  }

  .pagination li.visible-xs {
    display: inline-block;
  }

  .pagination a,
  .pagination span {
    padding: 5px 10px;
    font-size: 12px;
    min-width: auto;
  }
}