/* Shared list page sections */

/* 排行榜周期面板的裸 wrapper:只允许布局宽度,绝不能设 display,
   否则会压过 UA 的 [hidden] { display:none },四个周期会同时显示。
   width 必须给:频道页的 .content-section 是 align-items:flex-start 的 flex 列,
   不撑宽的话里面 width:100% 的 .media-grid 会塌成 max-content。 */
.rank-panel {
  width: 100%;
}

.content-section {
  width: 100%;
  position: relative;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
  display: flex;
}

.section-header {
  width: 100%;
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.section-header__left {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  display: flex;
}

.section-header__marker {
  width: 8px;
  height: 36px;
  background: var(--color-primary-500);
  border-radius: 4px;
}

.section-title--sm {
  color: var(--text-primary);
  font-size: 36px;
  font-family: PingFang SC, sans-serif;
  font-weight: 600;
  word-wrap: break-word;
}

.section-header__more {
  justify-content: flex-start;
  align-items: center;
  gap: 2px;
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.section-header__more-text {
  color: var(--text-primary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
  word-wrap: break-word;
}

.section-header__more-text--light {
  color: var(--text-primary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
  word-wrap: break-word;
}

.section-header__more-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.media-card {
  width: 241px;
  max-width: 100%;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  display: inline-flex;
  text-decoration: none;
}

.media-card__cover {
  align-self: stretch;
  height: 323px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.media-card__placeholder {
  width: 241px;
  height: 374px;
  left: 0;
  top: -25px;
  position: absolute;
  background: var(--color-neutral-200);
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: inline-flex;
}

.media-card__watermark-line {
  align-self: stretch;
  transform: rotate(144deg);
  transform-origin: top left;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: flex;
}

.media-card__watermark-line-inner {
  align-self: stretch;
  transform: rotate(21deg);
  transform-origin: top left;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: flex;
}

.media-card__watermark-bar {
  align-self: stretch;
  height: 27.18px;
  transform: rotate(53deg);
  transform-origin: top left;
}

.media-card__logo-wrap {
  left: 85.50px;
  top: 171px;
  position: absolute;
  opacity: 0.20;
  justify-content: flex-start;
  align-items: flex-end;
  display: inline-flex;
}

.brand-logo {
  text-align: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  color: var(--color-primary-500);
  font-size: 24px;
  font-family: PingFang SC, sans-serif;
  font-weight: 500;
  line-height: 32px;
  word-wrap: break-word;
}

.media-card__image {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  position: absolute;
  object-fit: cover;
}

.media-card__body {
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
  display: flex;
  min-width: 0;
  width: 100%;
}

.media-card__title-row {
  align-self: stretch;
  justify-content: flex-start;
  align-items: center;
  display: flex;
  min-width: 0;
  width: 100%;
}

.media-card__title {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 20px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 28px;
}

.media-card__tags {
  align-self: stretch;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
  display: inline-flex;
}

.media-card__tags .meta-tag:nth-child(n + 3) {
  display: none;
}

.meta-tag {
  justify-content: center;
  align-items: center;
  gap: 10px;
  display: flex;
}

.meta-tag__text {
  text-align: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  color: var(--text-secondary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
  word-wrap: break-word;
}

.media-card__stats {
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  display: flex;
}

.meta-stat {
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  display: flex;
}

.meta-stat__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.scroll-btn {
  width: 50px;
  height: 50px;
  right: 0;
  top: 204px;
  position: absolute;
  cursor: pointer;
  z-index: 2;
}

.scroll-btn_left {
  width: 50px;
  height: 50px;
  left: 0;
  top: 204px;
  position: absolute;
  transform: rotate(180deg);
  cursor: pointer;
  z-index: 2;
}

.promo-feature {
  width: 628px;
  max-width: 628px;
  height: auto;
  aspect-ratio: 628 / 59;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.promo-feature__image {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  position: absolute;
  object-fit: cover;
  display: block;
  background: var(--color-neutral-200);
}


.rank-section {
  align-self: stretch;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
  display: flex;
}

.clip-card {
  width: 308px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  display: inline-flex;
  text-decoration: none;
}

.clip-card__cover {
  align-self: stretch;
  height: 175px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

/* VIP 角标（VIP 专区列表卡片）：金色底板用 CSS 渐变重建，VIP 字标是独立透明 SVG 图层 */
.media-vip-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #FFE8BE 1.65%, #E6B764 99.23%);
  pointer-events: none;
}

/* 自带尺寸，禁止挂全局 .icon（icon.css 的 .icon{width:100%;height:100%} 会撑满角标） */
.media-vip-badge__mark {
  display: block;
  width: 26.5px;
  height: 12px;
}

@media (max-width: 768px) {
  /* H5 角标内缩到 4px（设计稿 168×96 封面） */
  .media-vip-badge {
    left: 4px;
    top: 4px;
  }
}

.clip-card__placeholder {
  width: 355px;
  height: 199px;
  left: -24px;
  top: -12px;
  position: absolute;
  background: var(--color-neutral-200);
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: inline-flex;
}

.clip-card__logo-wrap {
  left: 142.50px;
  top: 84px;
  position: absolute;
  opacity: 0.20;
  justify-content: flex-start;
  align-items: flex-end;
  display: inline-flex;
}

.clip-card__image {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  position: absolute;
  object-fit: cover;
}

.clip-card__play {
  align-self: stretch;
  justify-content: flex-start;
  align-items: center;
  display: flex;
  min-width: 0;
  width: 100%;
}

.clip-card__play .media-card__title {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-header:has(.promo-feature) {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.section-header:has(.promo-feature) > .promo-feature {
  flex: 1;
  max-width: 628px;
  min-width: 0;
}

@media (max-width: 768px) {
  .content-section,
  .rank-section {
    gap: 12px;
  }

  .section-header__marker {
    width: 6px;
    height: 16px;
    border-radius: 3px;
  }

  .section-title--sm {
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
  }

  .section-header__more-text,
  .section-header__more-text--light {
    font-size: 12px;
    line-height: 18px;
    color: var(--text-secondary);
  }

  .section-header__more-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .section-header__more-icon .icon {
    width: 18px;
    height: 18px;
  }

  .clip-card__play .media-card__title {
    font-size: 16px;
    line-height: 22px;
  }

  .clip-card {
    width: 100%;
    max-width: 308px;
  }

  .section-header:has(.promo-feature) {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .section-header:has(.promo-feature) > .promo-feature {
    flex: none;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 343 / 47;
    border-radius: 6px;
  }

  .section-header:has(.promo-feature) .promo-feature__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .promo-row .promo-feature {
    flex: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 628 / 59;
    border-radius: 6px;
  }

  .promo-feature {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 628 / 59;
    border-radius: 6px;
  }

  .promo-feature__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

@media (max-width: 768px) {
  .media-card__stat--watch {
    display: none;
  }
}

@media (min-width: 769px) {
  .novel-list-page .novel-list-section .media-card__cover-stat {
    display: none;
  }
}

@media (max-width: 768px) {
  .novel-list-page .novel-list-section .media-card__cover-stat {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    align-items: center;
    justify-content: flex-end;
    /* 文字底部铺一层黑色透明渐变:浅色封面上观看量也看得清 */
    padding: 12px 6px 4px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
  }

  .novel-list-page .novel-list-section .media-card__cover-stat .meta-stat {
    gap: 0;
  }

  .novel-list-page .novel-list-section .media-card__cover-stat .meta-stat__icon {
    width: 16px;
    height: 16px;
  }

  .novel-list-page .novel-list-section .media-card__cover-stat .meta-stat__icon .icon {
    width: 16px;
    height: 16px;
  }

  .novel-list-page .novel-list-section .media-card__cover-stat .meta-tag__text {
    font-size: 10px;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.55);
  }
}
