﻿/* 仅在已确认短剧系列的文章中调整播放器与剧集区域，避免影响普通文章。 */
#post .post-content > .dplayer:has(+ .series-episode-nav) {
  overflow: hidden;
  border-radius: 10px !important;
}

#post .post-content .series-episode-nav {
  position: relative;
  margin: 20px 0 22px;
  padding: 18px 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  font-family: MiSans, "PingFang SC", sans-serif;
}

#post .post-content .series-episode-nav::before {
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 95, 95, .72) 22%, #ff2b2b 52%, rgba(190, 36, 36, .72) 82%, transparent);
  content: '';
}

#post .post-content .series-episode-nav__heading {
  display: flex;
  min-width: 0;
  align-items: center;
  margin: 0 0 16px;
  padding: 0;
  font-size: 24px;
  line-height: 32px;
  white-space: nowrap;
}

#post .post-content .series-episode-nav__heading::before {
  width: 2px;
  height: 32px;
  margin-right: 10px;
  flex: 0 0 2px;
  background: linear-gradient(180deg, #ff7878, #ff2b2b 55%, #c71717);
  content: '';
}

#post .post-content .series-episode-nav__heading strong {
  min-width: 0;
  overflow: hidden;
  flex: 0 1 auto;
  color: #fff;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#post .post-content .series-episode-nav__heading span {
  margin-left: 8px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .5);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

#post .post-content .series-episode-nav__list {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

#post .post-content .series-episode-nav__list a,
#post .post-content .series-episode-nav__current {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  border-radius: 10px;
  background: #333033;
  color: rgba(255, 255, 255, .8) !important;
  font-size: clamp(10px, calc(24px - var(--episode-label-length)), 20px);
  font-weight: 600;
  line-height: 26px;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
}

#post .post-content .series-episode-nav__list a {
  transition: background .12s, border-color .12s, color .12s, transform .08s;
}

#post .post-content .series-episode-nav__list a::after { display: none !important; }
#post .post-content .series-episode-nav__list a:hover,
#post .post-content .series-episode-nav__list a:focus-visible {
  border-color: rgba(255, 43, 43, .55) !important;
  background: #3c3434;
  color: #fff !important;
}

#post .post-content .series-episode-nav__list a:active {
  border-color: #ff2b2b !important;
  background: #4b3c3c;
  color: #fff !important;
  transform: scale(.98);
}

#post .post-content .series-episode-nav__current {
  border-color: rgba(255, 43, 43, .78) !important;
  background: linear-gradient(105deg, #ff2b2b, #be2424);
  color: #fff !important;
  box-shadow: inset 3px 0 0 #ff8a8a, 0 4px 10px rgba(125, 22, 22, .14);
  cursor: default;
}

@media (max-width: 1100px) {
  #post .post-content .series-episode-nav__list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #post .post-content .series-episode-nav__list a,
  #post .post-content .series-episode-nav__current { font-size: clamp(10px, calc(20px - var(--episode-label-length)), 16px); }
}

@media (max-width: 600px) {
  #post .post-content > h2:has(+ p + .dplayer + .series-episode-nav) {
    padding-bottom: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: rgba(255, 255, 255, .9);
  }

  #post .post-content > p:has(+ .dplayer + .series-episode-nav) {
    font-size: 12px;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: .208px;
    color: #f0f0f0;
  }

  #post .post-content > .dplayer:has(+ .series-episode-nav) {
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 8px !important;
  }
  #post .post-content .series-episode-nav { margin: 18px 0 20px; padding: 20px 16px; border-color: #434142; border-radius: 10px; font-family: "PingFang SC", sans-serif; }
  #post .post-content .series-episode-nav::before { top: -10px; }
  #post .post-content .series-episode-nav__heading { margin-bottom: 16px; font-size: 16px; line-height: 26px; }
  #post .post-content .series-episode-nav__heading::before { height: 26px; margin-right: 6px; }
  #post .post-content .series-episode-nav__heading strong { font-weight: 400; }
  #post .post-content .series-episode-nav__heading span { font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, .6); }
  #post .post-content .series-episode-nav__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  #post .post-content .series-episode-nav__list a,
  #post .post-content .series-episode-nav__current { min-height: 36px; border-radius: 4px; font-size: clamp(9px, calc(18px - var(--episode-label-length)), 14px); }
}
