.play-main {
  padding: 0 0 48px;
  background: #f5f5f5;
}

/* ── 播放器区域 ── */
.play-top-section {
  background: #1e1e2e;
  padding: 0;
}

.play-top-inner {
  max-height: 600px;
  max-width: var(--max-w);
  margin: 0 auto;
  /* padding: 0 16px;   */
  display: flex;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

.player-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  background: #111;
  overflow: hidden;
}

/* ── 下方白底内容 ── */
.play-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 16px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

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

/* ── Sidebar 上半（深色）── */
.play-sidebar {
  max-height: 600px;
  width: 260px;
  flex-shrink: 0;
  background: #1e1e2e;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.play-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ── Sidebar 下半（白底）── */
.play-sidebar-bottom {
  width: 260px;
  flex-shrink: 0;
}

.play-sidebar-bottom .psb-block,
.play-sidebar-bottom .rank-col {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}
.play-sidebar-bottom .rank-col { padding: 12px; }

.play-sidebar-bottom .psb-more {
  font-size: 11px;
  color: var(--text-muted);
}

.play-sidebar-bottom .psb-more:hover {
  color: var(--accent);
}

/* ===== 播放器 ===== */
.player-adbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  padding: 7px 14px;
}

.adbar-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

.adbar-close:hover {
  color: #fff;
}

.player-box {
  flex: 1;
  position: relative;
  width: 100%;
  background: #000;
  /* min-height: 300px; */
  aspect-ratio: 16/9;
  overflow: hidden;
}

.player-toolbar {
  display: flex;
  align-items: center;
  background: #1a1a1a;
  padding: 0 8px;
  overflow: visible;
  scrollbar-width: none;
}

.player-toolbar::-webkit-scrollbar {
  display: none;
}

/* 上/下集靠右（参考 conch_2 布局） */
.ptb-nav-group {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* 分享下拉（参考 conch_2） */
.ptb-share-wrap {
  position: relative;
  cursor: pointer;
}
.ptb-share-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.ptb-share-pop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  width: 240px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  padding: 12px;
  z-index: 50;
}
.ptb-share-pop .sp-tip {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}
.ptb-share-pop .sp-link {
  width: 100%;
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.ptb-share-pop .sp-copy {
  width: 100%;
  padding: 6px 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.ptb-share-pop[hidden] { display: none; }

.ptb-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  padding: 9px 10px;
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
}

.ptb-item:hover {
  color: var(--accent);
}
.ptb-item.is-disabled {
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== 片名资讯列 ===== */
.play-info-bar {
  background: var(--bg-white);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

.play-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.play-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.play-title a {
  color: inherit;
}

.play-title a:hover {
  color: var(--accent);
}

/* 标题当前集 */
.play-ep {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
}

/* 豆瓣评分徽章（同详情页） */
.douban-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  border: 1px solid #007722;
  border-radius: 4px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.douban-badge .db-label { background: #007722; color: #fff; padding: 3px 6px; }
.douban-badge .db-score { background: #fff; color: #007722; padding: 3px 8px; }

/* 关联系列 >6 折叠 */
.vod-list.rel-collapsed .vod-card:nth-child(n+7) { display: none; }
.rel-toggle {
  display: block;
  margin: 12px auto 0;
  padding: 6px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.rel-toggle:hover { border-color: var(--accent); color: var(--accent); }
.rel-toggle[hidden] { display: none; }

.play-intro-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
}

.play-intro-link:hover {
  color: var(--accent);
}

.play-intro-link iconify-icon {
  transition: transform 0.2s;
}

.play-intro-link.active iconify-icon {
  transform: rotate(180deg);
}

.play-intro-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s ease, opacity 0.3s ease;
}

.play-intro-panel.active {
  grid-template-rows: 1fr;
  opacity: 1;
}

.pip-inner {
  overflow: hidden;
  min-height: 0;
  padding-top: 11px;
}

.pip-inner::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 10px;
  background: var(--border);
}

.pip-row {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

.pip-label {
  color: var(--text);
}

.pip-val a {
  color: var(--text-muted);
}

.pip-val a:hover {
  color: var(--accent);
}

.pip-val a:not(:last-child)::after {
  content: " ";
}

.pip-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
}

.play-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.play-tags .douban-badge { margin-right: 10px; }

.separator {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 12px;
}

.play-score {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.play-tags a {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-light);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.play-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ===== 播放列表（共用 playlist 元件样式）===== */
.playlist-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 8px;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.playlist-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.sort-btn {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
}

.sort-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.playlist-sources {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.playlist-sources::-webkit-scrollbar { display: none; }

.source-tab {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--border-mid);
  background: #f5f5f5;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.source-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.playlist-panel {
  display: none;
}

.playlist-panel.active {
  display: block;
}

.playlist-notice {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: #fff8f5;
  border-radius: 4px;
}

.notice-icon {
  color: var(--accent);
}

.playlist-episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
}

.episode {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  word-break: break-all;
  line-height: 1.35;
  min-height: 30px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  background: #f5f5f5;
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.episode:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.episode.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.playlist-episodes.episodes-collapsed {
  max-height: 84px;
  overflow: hidden;
}

.episode-toggle {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 6px 0;
  background: #f5f5f5;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.episode-toggle:hover { background: var(--accent-light); }
.episode-toggle .mac-icon { vertical-align: -2px; }
.episode-toggle[hidden] { display: none; }

/* ===== 关联系列 & 相关推荐（grid）===== */
.play-series-section,
.play-related-section {
  background: var(--bg-white);
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.play-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.play-related-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
}


/* ===== Sidebar 共用 ===== */
.psb-block {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}

.psb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 0;
}

.psb-header h4 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.psb-more {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.psb-more:hover {
  color: var(--accent);
}

/* 当前播放 */
.psb-now-playing {
  display: flex;
  gap: 10px;
  padding: 12px;
  align-items: flex-start;
}

.psb-now-thumb {
  width: 70px;
  aspect-ratio: 3/4;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0;
}

.psb-now-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.psb-now-info {
  flex: 1;
  min-width: 0;
}

.psb-now-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.psb-cat-badge {
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
}

.psb-now-ep {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.psb-switch-btn {
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-block;
}

.psb-switch-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* 猜你喜欢 sidebar */
.psb-guess-list {
  margin: 0;
  padding: 6px 0;
}

.psb-guess-item {
  border-bottom: 1px solid var(--border);
}

.psb-guess-item:last-child {
  border-bottom: none;
}

.psb-guess-item a {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  align-items: flex-start;
}

.psb-gi-thumb {
  width: 60px;
  aspect-ratio: 3/4;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0;
}

.psb-gi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.psb-gi-info {
  flex: 1;
  min-width: 0;
}

.psb-gi-info h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.psb-gi-info p {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.psb-gi-ep {
  font-size: 10px;
  color: var(--accent);
  margin-top: 3px;
  display: block;
}

.psb-guess-item:hover .psb-gi-info h5 {
  color: var(--accent);
}

/* 排行榜 sidebar */
.psb-rank-list {
  list-style: none;
  padding: 8px 12px;
}

.psb-rank-list>li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.psb-rank-list>li:last-child {
  border-bottom: none;
}

.psb-rank-item {
  flex-direction: column !important;
  align-items: flex-start !important;
  padding-bottom: 10px !important;
}

.psb-rank-thumb {
  width: 50px;
  aspect-ratio: 3/4;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0;
}

.psb-rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.psb-rank-info {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.psb-rank-info h5 {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.psb-rank-info p {
  font-size: 10px;
  color: var(--text-muted);
}

.psb-rank-status {
  color: #22c55e;
}

.psb-rank-cnt {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
}

.psb-rn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f0f0f0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.psb-rn--1 {
  background: var(--accent);
  color: #fff;
}

.psb-rn--2 {
  background: #fef3c7;
  color: #d97706;
}

.psb-rn--3 {
  background: #fee2e2;
  color: #dc2626;
}

.psb-rank-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 专题 sidebar */
.psb-topic-list {
  margin: 0;
  padding: 10px 12px;
}

.psb-topic-card {
  cursor: pointer;
}

.psb-topic-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 6px;
}

.psb-topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.psb-topic-card:hover .psb-topic-thumb img {
  transform: scale(1.04);
}

.psb-topic-info h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.psb-topic-info p {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Sidebar 深色主题覆写 ===== */
.play-sidebar .psb-block {
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


.play-sidebar .psb-more {
  color: rgba(255, 255, 255, 0.5);
}

.play-sidebar .psb-more:hover {
  color: var(--accent);
}

.play-sidebar .psb-now-title {
  color: #fff;
}

.play-sidebar .psb-now-ep {
  color: rgba(255, 255, 255, 0.55);
}

.play-sidebar .psb-guess-item {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.play-sidebar .psb-header h4 {
  color: #fff;
}

.play-sidebar .psb-now-title {
  color: #fff;
}

.play-sidebar .psb-gi-info h5 {
  color: #fff;
  font-size: 13px;
}

.play-sidebar .psb-gi-info p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.play-sidebar .psb-gi-ep {
  font-size: 11px;
}

/* play-content 白底 */
.play-info-bar,
.copy-link-bar,
.playlist-section,
.play-series-section,
.play-related-section,
.comment-section {
  background: var(--bg-white);
}

/* ===== RWD ===== */
.play-sidebar,
.play-sidebar-bottom {
  display: none;
}

@media (min-width: 768px) {
  .play-sidebar {
    display: block;
  }

  .play-sidebar-bottom {
    display: block;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .play-sidebar {
    width: 200px;
  }

  .play-sidebar-bottom {
    width: 200px;
  }

  .play-related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1025px) {
  .play-sidebar {
    width: 260px;
  }

  .play-sidebar-bottom {
    width: 260px;
  }

  .play-main {
    padding-top: 0;
  }
}

@media (max-width: 767px) {
  .play-main {
    padding: 0 0 68px;
    background: #fff;
  }

  .play-top-inner {
    max-height: none;
    padding: 0;
  }

  .play-container {
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .player-wrap {
    border-radius: 0;
  }

  .player-adbar {
    font-size: 11px;
    padding: 5px 10px;
  }

  .player-toolbar {
    padding: 0 6px;
    overflow-x: auto;
  }
  .ptb-nav-group { margin-left: 0; }

  .ptb-item {
    padding: 8px 8px;
    font-size: 11px;
  }

  .play-info-bar,
  .copy-link-bar,
  .playlist-section,
  .play-series-section,
  .play-related-section,
  .play-comment-section {
    border-radius: 0;
    box-shadow: none;
    border-bottom: 8px solid var(--bg-light);
    margin-bottom: 0;
    padding: 12px 14px;
  }

  .play-related-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }

  .related-scroll .vod-card {
    flex: 0 0 90px;
  }
}

@media (max-width: 479px) {
  .play-related-grid {
    gap: 5px;
  }
}
