/* ==================== 榜单页面样式 ==================== */

/* PC端2列布局容器 */
.rank-default {
  display: flex;
  justify-content: space-between;
  width: 1200px;
  margin: 20px auto 0;
  gap: 12px;
  align-items: flex-start;
}

/* ==================== 左侧导航 ==================== */

.rank-nav {
  width: 242px;
  background: #fff;
  border-radius: 12px;
  padding: 29px 24px 0;
  height: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 128px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  flex-shrink: 0;
}

/* 顶部热榜 */
.rank-nav-popularity {
  background-image: url('/css/img/rank_hot.png');
  background-position: left 7px;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  padding-left: 20px;
  padding-bottom: 15px;
  line-height: 36px;
  margin-bottom: 0;
}

.rank-nav-popularity-link {
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rank-nav-popularity-link:hover {
  color: #e60000;
}

/* 导航分组 */
.rank-nav-item {
  border-top: 1px solid #f1f2f4;
  padding: 12px 0;
}

.rank-nav-item:first-child {
  border-top: none;
  padding-top: 0;
}

.rank-nav-item-title {
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 36px;
  margin-bottom: 6px;
}

.rank-nav-item-link {
  display: block;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 30px;
  padding-left: 17px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.rank-nav-item-link:hover {
  color: #e60000;
  background: rgba(230, 0, 0, .05);
  border-radius: 4px;
}

.rank-nav-item-link.currNavLink {
  background: rgba(230, 0, 0, 0.05);
  border-radius: 4px;
  color: #e60000;
}

.shuku-filter-tabs {
  display: flex;
  position: relative;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #f3f4f6;
}

.shuku-filter-tabs::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  content: "";
  transition: transform 0.25s ease;
}

.shuku-filter-tabs.tags-active::before {
  transform: translateX(100%);
}

.shuku-filter-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 9px 4px;
  border: 0;
  background: transparent;
  color: #666;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.shuku-filter-tab.active {
  color: #d5587d;
  font-weight: 600;
}

.shuku-filter-panel[hidden] {
  display: none;
}

.shuku-filter-panel > .rank-nav-item {
  padding: 0 0 12px;
  border-top: 0;
}

@media (min-width: 1025px) {
  .shuku-tag-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 6px;
  }

  .shuku-tag-filter > .rank-nav-item-title,
  .shuku-tag-filter > .tag-filter-more {
    flex: 0 0 100%;
  }

  .shuku-tag-filter > .rank-nav-item-link {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    padding: 2px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-bottom: 1px solid #dcdddf;
    border-radius: 2px;
    font-size: 13px;
  }
}

/* ==================== 右侧内容 ==================== */

.rank-content {
  background: #fff;
  border-radius: 12px;
  width: 948px;
  min-height: calc(100vh - 112px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* 标题区 */
.rank-content-title {
  position: relative;
  height: 100px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.rank-content-title img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 155px;
  z-index: 1;
}

.rank-content-title-info {
  position: relative;
  z-index: 2;
  text-align: left;
}

.rank-content-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 2px;
  color: #d4547a;
}

.rank-content-desc {
  margin: 8px 0 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #888;
  display: none;
}

/* 标题切换框 */
.rank-content-title-switch {
  position: relative;
  z-index: 3;
}

.switch-box {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #f1f2f4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.switch-box-item {
  display: block;
  padding: 8px 20px;
  background: #fff;
  color: #666;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  border: none;
}

.switch-box-item:hover {
  background: #f5f5f5;
}

.switch-box-item.active {
  background: var(--pink-d);
  color: #fff;
  font-weight: 500;
}

/* 主内容区 */
.rank-content-main {
  margin-top: -31px;
  padding: 0 48px 0 20px;
  position: relative;
  z-index: 20;
}

/* ==================== 榜单列表 ==================== */

.rank-modules-works {
  padding: 32px 0 0;
}

.rank-modules-works-item {
    display: flex;
    margin-bottom: 5px;
    padding-left: 35px;
    position: relative;
    transition: background 0.2s ease;
    padding-bottom: 10px;
}

.rank-modules-works-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* 排名号 */
.rank-modules-works-item-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 27px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 排名号图标 - 与 index.html 中的 rank-no 一致 */
.rank-modules-works-item-num .rank-no {
  display: inline-block;
  width: 27px;
  height: 36px;
  background-image: url('/css/img/week_top.png');
  background-size: 81px 36px;
  background-repeat: no-repeat;
}

.rank-modules-works-item-num .rank-no.rank-1 {
  background-position: 0 0;
}

.rank-modules-works-item-num .rank-no.rank-2 {
  background-position: -27px 0;
}

.rank-modules-works-item-num .rank-no.rank-3 {
  background-position: -54px 0;
}

/* 排名号文本（第4名及以后） */
.rank-modules-works-item-num .rank-no-text {
  font-weight: 700;
  font-family: 'DIN Alternate', 'DIN-Alternate', sans-serif;
  font-size: 20px;
  color: #c6c4c4;
  width: 27px;
  text-align: center;
}

/* 书籍封面 */
.rank-modules-works-item-cover {
  width: 96px;
  height: 128px;
  margin-right: 16px;
  margin-top: 5px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  background: #f6f8fa;
  box-shadow: inset 0 0 1px 0 rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.rank-modules-works-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 书籍信息 */
.rank-modules-works-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 36px 6px 0;
  min-width: 0;
}

.rank-modules-works-item-title {
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  text-decoration: none;
  transition: color 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.rank-modules-works-item-title:hover {
  color: #e60000;
}

.rank-modules-works-item-author {
  color: #999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.rank-modules-works-item-author a {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rank-modules-works-item-author a:hover {
  color: #e60000;
}

/* 分类标签装饰 */
.rank-category-tag {
  display: inline-block;
  color: #b29f77 !important;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid #f1f2f4;
}


/* 字数标签装饰 */
.rank-word-count {
  display: inline-block;
    color: #5b9587;
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #f1f2f4;
    background: #fff;

}

.rank-modules-works-item-desc {
  color: #666;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  text-decoration: none;
  transition: color 0.2s ease;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-modules-works-item-desc:hover {
  color: #e60000;
}

.rank-modules-works-item-chapter {
  display: flex;
  color: #999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.rank-modules-works-item-chapter-name {
  margin-right: 16px;
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-modules-works-item-chapter-name a {
  color: #999;
  text-decoration: none;
}

.rank-modules-works-item-chapter-name a:hover {
  color: #e60000;
}

.rank-modules-works-item-chapter-time {
  flex-shrink: 0;
}

/* 右侧按钮和数据 */
.rank-modules-works-item-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  text-align: center;
  flex-shrink: 0;
  min-width: 108px;
}

.rank-modules-works-item-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: #999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.rank-modules-works-item-stat-value {
  color: var(--sub);
  font-family: 'DIN Alternate', 'DIN-Alternate', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.rank-modules-works-item-stat-label {
  font-style: normal;
  margin-top: 1px;
  font-size: 12px;
  color: #ee6262;
}

.rank-modules-works-item-btn-read {
  background: linear-gradient(331deg, #ee99c8, #c9452e);
  background-image: linear-gradient(331deg, var(--pink), #b22d61);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  font-weight: 500;
  height: 33px;
  line-height: 33px;
  width: 108px;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
  text-align: center;
}

.rank-modules-works-item-btn-read:hover {
  background: linear-gradient(331deg, #d40000, #ff5000);
  background: linear-gradient(331deg, #d40000, var(--pink));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 0, 0, 0.2);
}

.rank-modules-works-item-btn-collect {
  color: #999;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  transition: color 0.2s ease;
}

.btn-add-shelf:hover {
    cursor: pointer;
    border-color: #e60000;
    color: #e60000;
}

.btn-add-shelf {
    border: 1px solid #dcdddf;
    border-radius: 4px;
    color: #333;
    display: inline-block;
    height: 26px;
    line-height: 26px;
    padding: 0 12px;
    text-align: center;
    background-color: #fff;
}

.rank-modules-works-item-btn-collect:hover {
  color: #e60000;
}

/* 空状态 */
.rank-modules-works-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 430px;
  color: #999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

/* ==================== 分页 ==================== */

.rank-content-pagination {
  margin: 24px auto 34px;
  display: flex;
  justify-content: center;
}

.el-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 5px;
}

.el-pager-item {
  display: flex;
  align-items: center;
}

.el-pager-link {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.el-pager-link:hover {
  border-color: #e60000;
  color: #e60000;
}

.el-pager-page-info {
  font-size: 14px;
  color: #666;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  white-space: nowrap;
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==================== 响应式设计 ==================== */

.tag-filter-more {
  display: none;
}

@media (max-width: 1200px) {
  .rank-default {
    width: auto;
    margin: 30px 0;
  }
}

@media (max-width: 1024px) {
  .rank-default {
    flex-direction: column;
    gap: 20px;
  }

  .rank-nav {
    width: 100%;
    height: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 15px 0;
  }

  .rank-nav-popularity {
    padding: 0 15px 15px;
    margin: 0 15px 15px;
    line-height: 32px;
    font-size: 16px;
  }

  .rank-nav-item {
    display: none;
  }

  .shuku-filter-tabs {
    display: none;
  }

  .shuku-filter-panel,
  .shuku-filter-panel[hidden] {
    display: block;
  }

  .shuku-filter-panel > .rank-nav-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 15px;
    border: none;
  }

  .rank-nav-item-title {
    display: none;
  }

  .rank-nav-item-link {
    flex: 0 1 calc(50% - 8px);
    padding: 8px 12px;
    line-height: 28px;
    margin: 0 8px 8px 0;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
  }

  .rank-nav-item-link.currNavLink {
    background: rgba(230, 0, 0, 0.05);
    color: #e60000;
  }

  .rank-content {
    width: 100%;
    min-height: auto;
  }

  .rank-content-title {
    height: 120px;
  }

  .rank-content-title img {
    height: 120px;
  }

  .rank-content-name {
    font-size: 24px;
  }

  .rank-content-main {
    padding: 0 30px;
  }

  .rank-modules-works-item-cover {
    width: 80px;
    height: 107px;
  }

  .rank-modules-works-item-title {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .rank-default {
    flex-direction: column;
    gap: 10px;
  }

  /* 手机端导航优化 */
  .rank-nav {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .rank-nav-popularity {
    display: none;
  }

  .rank-nav-item {
    display: none;
    border: none;
    padding: 0;
  }

  .shuku-filter-tabs {
    display: none;
  }

  .shuku-filter-panel,
  .shuku-filter-panel[hidden] {
    display: block;
  }

  .shuku-filter-panel > .rank-nav-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 8px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
  }

  .shuku-tag-filter > .rank-nav-item-link:nth-of-type(n+12):not(.currNavLink) {
    display: none;
  }

  .shuku-tag-filter.expanded > .rank-nav-item-link:nth-of-type(n+12) {
    display: block;
  }

  .tag-filter-more {
    display: block;
    flex: 0 0 100%;
    padding: 8px;
    border: 0;
    background: transparent;
    color: #e60000;
    font: inherit;
    cursor: pointer;
  }

  .rank-nav-item-title {
    display: none;
  }

  .rank-nav-item-link {
    flex: 1;
    padding: 8px 6px;
    line-height: 28px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    margin: 0 4px 4px 0;
    min-width: 0;
  }

  .rank-nav-item-link:nth-child(4n) {
    margin-right: 0;
  }

  .rank-nav-item-link.currNavLink {
    background: rgba(230, 0, 0, 0.05);
    color: #e60000;
  }

  .rank-content {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .rank-content-title {
    height: 90px;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
  }

  .rank-content-title img {
    height: 90px;
  }

  .rank-content-name {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .rank-content-title-switch {
    position: relative;
  }

  .switch-box {
    gap: 0;
  }

  .switch-box-item {
    padding: 6px 12px;
    font-size: 12px;
  }

  .rank-content-name {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .rank-content-desc {
    font-size: 11px;
    margin-top: 4px;
  }

  .rank-content-main {
    padding: 0 12px;
    margin-top: -15px;
  }

  .rank-modules-works {
    padding: 20px 0;
  }

  .rank-modules-works-item {
    margin-bottom: 16px;
    padding-left: 40px;
    flex-wrap: wrap;
  }

  .rank-modules-works-item-num {
    width: 27px;
    height: 36px;
  }

  .rank-modules-works-item-num .rank-no {
    width: 27px;
    height: 36px;
    background-size: 81px 36px;
  }

  .rank-modules-works-item-num .rank-no.rank-1 {
    background-position: 0 0;
  }

  .rank-modules-works-item-num .rank-no.rank-2 {
    background-position: -27px 0;
  }

  .rank-modules-works-item-num .rank-no.rank-3 {
    background-position: -54px 0;
  }

  .rank-modules-works-item-cover {
    width: 50px;
    height: 67px;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .rank-modules-works-item-content {
    flex: 1;
    min-width: 120px;
    padding: 2px 0;
  }

  .rank-modules-works-item-title {
    font-size: 13px;
    line-height: 18px;
    margin-bottom: 3px;
  }

  .rank-modules-works-item-author {
    font-size: 10px;
    line-height: 16px;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rank-modules-works-item-desc {
    font-size: 11px;
    line-height: 16px;
    -webkit-line-clamp: 1;
    margin-bottom: 3px;
  }


  .rank-modules-works-item-chapter-name {
    margin-right: 8px;
    max-width: 200px;
  }

  .rank-modules-works-item-btn {
    min-width: 75px;
    padding: 8px 0 10px;
    gap: 4px;
  }

  .rank-modules-works-item-stat {
    gap: 2px;
  }

  .rank-modules-works-item-stat-value {
    font-size: 16px;
  }

  .rank-modules-works-item-stat-label {
    font-size: 10px;
    margin-top: 2px;
  }

  .rank-modules-works-item-btn-read {
    width: 75px;
    font-size: 12px;
    height: 32px;
    line-height: 32px;
    padding: 0;
  }

  .rank-modules-works-item-btn-collect {
    font-size: 10px;
    line-height: 12px;
  }

  .rank-content-pagination {
    margin: 30px auto 20px;
  }

  .el-pagination {
    gap: 8px;
  }

  .el-pager-link {
    padding: 6px 10px;
    font-size: 12px;
  }

  .el-pager-page-info {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .rank-default {
    gap: 0;
    margin: 20px auto;
  }

  /* 手机端导航优化 */
  .rank-nav {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .rank-nav-popularity {
    display: none;
  }

  .rank-nav-item {
    display: none;
    border: none;
    padding: 0;
  }

  .rank-nav-item:nth-child(2),
  .rank-nav-item:nth-child(3) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 6px;
  }

  .rank-nav-item-title {
    display: none;
  }

  .rank-nav-item-link {
    padding: 7px 6px;
    line-height: 24px;
    font-size: 11px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #fff;
    margin: 0;
  }

  .rank-nav-item-link.currNavLink {
    background: rgba(230, 0, 0, 0.05);
    color: #e60000;
  }

  .rank-content {
    border-radius: 4px;
    min-height: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .rank-content-title {
    height: 75px;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
  }

  .rank-content-title img {
    height: 75px;
  }

  .rank-content-title-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .rank-content-title-switch {
    position: relative;
  }

  .switch-box {
    gap: 0;
  }

  .switch-box-item {
    padding: 5px 10px;
    font-size: 11px;
  }

  .rank-content-name {
    font-size: 16px;
    letter-spacing: 0;
    margin: 0;
  }

  .rank-content-desc {
    font-size: 10px;
    margin-top: 2px;
  }

  .rank-content-main {
    padding: 0 10px;
    margin-top: -12px;
  }

  .rank-modules-works {
    padding: 15px 0;
  }

  .rank-modules-works-item {
    margin-bottom: 12px;
    padding-left: 38px;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .rank-modules-works-item-num {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 14px;
    left: 0;
  }

  .rank-num-icon {
    width: 28px;
    height: 28px;
    background-size: 84px 28px;
  }

  .rank-num-icon.rank-num-1 {
    background-position: 0 0;
  }

  .rank-num-icon.rank-num-2 {
    background-position: -28px 0;
  }

  .rank-num-icon.rank-num-3 {
    background-position: -56px 0;
  }

  .rank-modules-works-item-cover {
    width: 45px;
    height: 60px;
    margin-right: 8px;
  }

  .rank-modules-works-item-content {
    flex: 1;
    padding: 0;
  }

  .rank-modules-works-item-title {
    font-size: 12px;
    line-height: 16px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rank-modules-works-item-author {
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rank-modules-works-item-desc {
    display: none;
  }

  .rank-modules-works-item-chapter-name {
    margin-right: 4px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rank-modules-works-item-chapter-time {
    white-space: nowrap;
  }

  .rank-modules-works-item-btn {
    min-width: 70px;
    padding: 6px 0 8px;
    gap: 3px;
  }

  .rank-modules-works-item-stat {
    gap: 1px;
        flex-direction: row;
  }

  .rank-modules-works-item-stat-value {
    font-size: 9px;
  }


  .rank-modules-works-item-btn-read {
    width: 70px;
    font-size: 11px;
    height: 28px;
    line-height: 28px;
    margin-right: 3px;
  }


  .rank-modules-works-empty {
    height: 200px;
    font-size: 12px;
  }

  .rank-content-pagination {
    margin: 20px auto 15px;
  }

  .el-pagination {
    gap: 6px;
    flex-wrap: wrap;
  }

  .el-pager-link {
    padding: 5px 8px;
    font-size: 10px;
  }

  .rank-modules-works-item {
    padding: 0 0 14px 15px;
 }
}


/* =========================================================
   响应式增强补丁
   目标：保持桌面端原有布局；平板导航不再隐藏；手机端提升字号与触控尺寸。
   放在原 CSS 末尾，覆盖旧的响应式规则。
   ========================================================= */

/* 避免 padding / border 把元素撑出容器 */
.rank-default,
.rank-default *,
.rank-default *::before,
.rank-default *::after {
  box-sizing: border-box;
}

.rank-nav {
  flex: 0 0 242px;
  min-width: 0;
}

.rank-content {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.rank-content-title img {
  object-fit: cover;
}

.rank-modules-works-item-content {
  min-width: 0;
}

.rank-modules-works-item-desc,
.rank-modules-works-item-title,
.rank-modules-works-item-chapter-name {
  overflow-wrap: anywhere;
}

/* 中小型桌面 / 横屏平板 */
@media (max-width: 1200px) {
  .rank-default {
    width: calc(100% - 32px);
    margin: 24px auto;
    gap: 16px;
  }

  .rank-nav {
    flex-basis: clamp(200px, 24vw, 242px);
    padding-left: 18px;
    padding-right: 18px;
  }

  .rank-content-main {
    padding-left: clamp(20px, 3vw, 40px);
    padding-right: clamp(20px, 3vw, 40px);
  }

  .rank-modules-works-item {
    padding-left: 48px;
  }

  .rank-modules-works-item-content {
    padding-right: 12px;
  }

  .rank-modules-works-item-btn {
    min-width: 88px;
  }

  .rank-modules-works-item-btn-read {
    width: 88px;
  }
}

/* 平板：上下布局，导航分组全部可见，不再只显示第一组 */
@media (max-width: 1024px) {
  .rank-default {
    width: calc(100% - 32px);
    flex-direction: column;
    gap: 16px;
    margin: 24px auto;
  }

  .rank-nav {
    display: block;
    flex: none;
    width: 100%;
    height: auto;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    position: static;
    top: auto;
    max-height: none;
    overflow-y: visible;
  }

  .rank-nav-popularity {
    display: block;
    margin: 0 0 10px;
    padding: 0 0 10px 28px;
    background-position: left 6px;
    background-size: 20px 20px;
    border-bottom: 1px solid #f1f2f4;
    font-size: 17px;
    line-height: 32px;
  }

  .rank-nav-item,
  .rank-nav-item:first-child,
  .rank-nav-item:nth-child(2),
  .rank-nav-item:nth-child(3) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin: 0;
    border-top: 1px solid #f1f2f4;
  }

  .rank-nav-item:first-child {
    border-top: none;
  }

  .rank-nav-item-title {
    display: block;
    flex: 0 0 100%;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
  }

  .rank-nav-item-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    min-height: 40px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid #e1e3e6;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .rank-nav-item-link.currNavLink {
    background: rgba(230, 0, 0, 0.05);
    color: #e60000;
  }

  .rank-content {
    width: 100%;
    min-height: 0;
  }

  .rank-content-title {
    height: 120px;
    padding: 0 28px;
  }

  .rank-content-title img {
    height: 120px;
  }

  .rank-content-main {
    padding: 0 28px;
  }

  .rank-modules-works-item-cover {
    width: 76px;
    height: 102px;
  }

  .rank-modules-works-item-title {
    font-size: 17px;
    line-height: 1.5;
  }

  .rank-modules-works-item-author,
  .rank-modules-works-item-chapter {
    font-size: 13px;
    line-height: 1.5;
  }

  .rank-modules-works-item-desc {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* 手机与竖屏平板：减少无效留白，提升可读性 */
@media (max-width: 768px) {
  .rank-default {
    width: calc(100% - 14px);
    margin: 14px auto 24px;
    gap: 12px;
  }

  .rank-nav {
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
    position: static;
    top: auto;
    max-height: none;
    overflow-y: visible;
  }

  .rank-nav-popularity {
    display: block;
    margin: 0 0 8px;
    padding: 0 0 8px 27px;
    font-size: 16px;
    line-height: 30px;
  }

  .rank-nav-item,
  .rank-nav-item:first-child,
  .rank-nav-item:nth-child(2),
  .rank-nav-item:nth-child(3) {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 0;
    margin: 0;
  }

  .rank-nav-item-title {
    display: block;
    flex: 0 0 100%;
    font-size: 14px;
    line-height: 1.5;
  }

  .rank-nav-item-link {
    flex: 0 1 auto;
    min-height: 27px;
    padding: 2px 10px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 6px;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
  }

  .rank-content {
    border-radius: 10px;
  }

  .rank-content-title {
    height: 100px;
    padding: 0 16px;
    gap: 10px;
  }

  .rank-content-title img {
    height: 100px;
  }

  .rank-content-name {
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: 0;
  }

  .rank-content-desc {
    display: block;
    font-size: 13px;
    line-height: 1.45;
  }

  .switch-box {
    max-width: 48vw;
  }

  .switch-box-item {
    min-height: 26px;
    padding: 6px 9px;
    font-size: 12px;
}

  .rank-content-main {
    padding: 0 8px;
    margin-top: -10px;
  }

  .rank-modules-works {
    padding: 18px 0;
  }

  .rank-modules-works-item {
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    margin-bottom: 16px;
    padding: 0 0 14px 30px;
    border-bottom: 1px solid #f2f2f2;
  }

  .rank-modules-works-item-num {
    top: 4px;
    width: 27px;
    height: 36px;
  }

  .rank-num-icon {
    width: 27px;
    height: 36px;
    background-size: 81px 36px;
  }

  .rank-num-icon.rank-num-1 { background-position: 0 0; }
  .rank-num-icon.rank-num-2 { background-position: -27px 0; }
  .rank-num-icon.rank-num-3 { background-position: -54px 0; }

  .rank-modules-works-item-cover {
    width: 70px;
    height: 95px;
    margin-right: 12px;
  }

  .rank-modules-works-item-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 8px 0 0;
    gap: 4px;
  }

  .rank-modules-works-item-title {
    font-size: 16px;
    line-height: 1.45;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .rank-modules-works-item-author {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
  }

  .rank-modules-works-item-desc {
    display: -webkit-box;
    font-size: 13px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin: 0;
    display: none;
  }

  .rank-modules-works-item-chapter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    line-height: 1.5;
  }

  .rank-modules-works-item-chapter-name {
    max-width: 100%;
    min-width: 0;
    margin-right: 0;
  }

  .rank-modules-works-item-btn {
    flex: 0 0 76px;
    min-width: 76px;
    padding: 4px 0;
    gap: 7px;
  }

  .rank-modules-works-item-stat-label {
    font-size: 12px;
  }

  .rank-modules-works-item-btn-read {
    font-size: 13px;
  }

  .rank-modules-works-item-btn-collect {
    font-size: 12px;
    line-height: 1.4;
  }
  .btn-add-shelf {
      font-size: 12px;
  }
  .rank-content-pagination {
    margin: 28px auto 22px;
  }

  .el-pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .el-pager-link {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .el-pager-page-info {
    font-size: 13px;
  }

  .blwk_tag {
    padding: 4px 4px;
  }
  .rank-modules-works-item-btn-read {
        width: 76px;
    }
    .rank-modules-works-item-cover {
        margin-right: 8px;
    }

}

/* 极窄屏幕：列表按钮下移，避免内容区被挤压 */
@media (max-width: 360px) {
  .rank-content-title {
    padding: 0 9px;
  }

  .rank-content-name {
    font-size: 16px;
  }

  .switch-box-item {
    padding: 6px 7px;
    font-size: 11px;
  }

  .rank-content-main {
    padding: 0 8px;
  }

  .rank-modules-works-item {
    flex-wrap: wrap;
  }

  .rank-modules-works-item-cover {
    width: 54px;
    height: 72px;
  }

  .rank-modules-works-item-content {
    flex-basis: calc(100% - 130px);
  }

  .rank-modules-works-item-btn {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    flex: 1 0 100%;
    min-width: 0;
    padding: 8px 0 0;
  }
}

/* top banner*/

.top-banner {
    height: 100px;
    background-color: #ffd28d;
    margin-top: 10px;
}

.top-banner-inner {
    width: 100%;
    max-width: 1160px;
    height: 100%;
    margin: 0 auto;
}

.top-banner-inner img {
    display: block;
    width: 90%;
    height: 100%;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
    .top-banner {
        height: 60px;
    }

    .top-banner-inner img {
        width: 100%;
        height: 60px;
        object-fit: contain;
    }
}

.shuku-novel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 3px 0;
}
.shuku-novel-tags .tag {
    position: static;
    display: inline-block;
    border-radius: 10px;
}
.tag:hover {
    background: rgba(251, 114, 153, 0.15);
    border-color: var(--pink);
    transform: translateY(-1px);
}
