/* PC + Mobile 通用覆盖（仅在需要的页面引入，避免影响原有 index_wap.css） */

/* 顶部头部/导航条：与内容区同宽（1000px）并居中 */
.header,
.top-nav {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* 顶部广告位：PC 1000x100；手机端隐藏 */
.top-ad {
  width: 100%;
  max-width: 1000px;
  height: 100px;
  margin: 0 auto;
  background: #f5f5f5;
  overflow: hidden;
}

.top-ad-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
  border: 1px solid #e6e6e6;
  box-sizing: border-box;
}

@media screen and (max-width: 767px) {
  .top-ad {
    display: none;
  }
}

/* 手机：导航自动换行，容器高度不要写死 */
.top-nav {
  height: auto;
}

/* PC：内容区最大宽度 1000px（手机端仍保持自适应全宽） */
@media screen and (min-width: 768px) {
  .container {
    max-width: 1000px;
  }

  /* 精华热帖：PC 一排 2 个；手机保持一排 1 个（只影响非 thread-list） */
  .post-list:not(.thread-list) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 6px;
  }

  .post-list:not(.thread-list) .post-item {
    margin-bottom: 0;
  }

  /* PC：顶部导航尽量单行展示（放不下就横向滚动，不换行） */
  .top-nav {
    /* 12 个一排，均分；间隙 1px，颜色 #FFCC00 */
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 30px;
    gap: 1px;
    background: #FFCC00; /* 间隙颜色 */
    padding: 1px; /* 让四周也有 1px 间隙效果 */
    overflow: hidden;
    height: auto;
  }

  .nav-item {
    width: auto;
    font-size: 14px;
    line-height: 30px;
    height: 30px;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* 底部分页条（原来在 main.html 内联，这里抽出来便于复用/维护） */
body {
  padding-bottom: 64px;
}

.pagination-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 1000;
}

.pagination-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.pagination-bar .current {
  font-weight: 600;
  font-size: 15px;
  color: #666;
}

.pagination-bar a:active {
  opacity: 0.6;
}

/* 站点页脚（分页条之上） */
.site-footer {
  padding: 10px 15px 12px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.site-footer-links a {
  color: #666;
  text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-links a:active {
  color: #ff6600;
  text-decoration: underline;
}

.site-footer-copy {
  margin-top: 6px;
  text-align: center;
  color: #777;
  font-size: 13px;
}

/* 排行榜表格（main_order.html 使用，不影响其它页面） */
.rank-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.rank-table th,
.rank-table td {
  border: 1px solid #eee;
  padding: 10px 12px;
  vertical-align: top;
}

.rank-table thead th {
  background: #f8f8f8;
  color: #333;
  font-weight: 700;
  text-align: center;
}

.rank-table .rank-col {
  width: 72px;
  text-align: center;
  white-space: nowrap;
  color: #666;
  font-weight: 700;
}

.rank-table .title-col {
  text-align: left;
}

.rank-table tbody tr:nth-child(even) td {
  background: #fcfcfc;
}

.rank-table a {
  text-decoration: none;
  font-size: 14px;
}

.rank-table a:hover {
  text-decoration: underline;
}

@media screen and (max-width: 480px) {
  .rank-table th,
  .rank-table td {
    padding: 8px 10px;
  }

  .rank-table .rank-col {
    width: 52px;
  }
}

/* PC/大屏：分页条与内容区对齐，最大宽度 1000px */
@media screen and (min-width: 768px) {
  .pagination-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 1000px;
    max-width: 100%;
    box-sizing: border-box;
  }
}

