/* ==========================================
   VOD Detail Page — friDay 深藍主題版面
   ========================================== */

.page-content {
  flex: 1;
  background: var(--bg-base);
}

/* ===== Shared Wrapper ===== */
.detail-wrap {
  max-width: 1760px;
  margin: 0 auto;
  padding: 24px 8px 0;
}

/* ===== Top Hero：劇照放大模糊背景 ===== */
.detail-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.detail-hero-bg {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  filter: blur(100px) brightness(1.05) saturate(1.6);
  transform: scale(1.15);
  z-index: 0;
}
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,13,17,0) 0%, rgba(12,13,17,0.35) 65%, var(--bg-base) 100%);
  z-index: 1;
}
.detail-hero > .detail-wrap {
  position: relative;
  z-index: 2;
  padding-bottom: 32px;
}

/* ===== Top Section: Poster + Info ===== */
.detail-top {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 24px;
}

.detail-poster {
  flex-shrink: 0;
  width: 250px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.detail-poster img {
  width: 100%;
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
}
.poster-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.poster-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(22,24,29,0.75);
  color: var(--score-green);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.detail-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

/* ===== 評分卡（Hero 右側） ===== */
.detail-rate-card {
  flex-shrink: 0;
  width: 260px;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(28, 31, 38, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
}
.drc-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.drc-score-num { font-size: 40px; font-weight: 800; color: #fff; line-height: 1; }
.drc-score-badge {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--score-green);
  color: #fff;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drc-count { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.drc-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
}
.rs {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.15s;
}
.rs:hover { transform: scale(1.12); }
.rs-bg,
.rs-fg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  white-space: nowrap;
}
.rs-bg { color: var(--border-2); }
.rs-fg {
  color: #f5c518;
  width: 0%;
  overflow: hidden;
}
.rs-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.rs-hit--half { left: 0; }
.rs-hit--full { left: 50%; }
.drc-cta { margin-top: 10px; font-size: 12px; color: var(--text-3); }

.detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}
.detail-title-row .detail-title { margin-bottom: 0; }

.detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
  line-height: 1.3;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dtag {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--bg-card);
}

.detail-meta {
  margin: 0 0 18px;
}
.dm-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.dm-row:last-child { border-bottom: none; }
.dm-row dt {
  color: var(--text-3);
  flex-shrink: 0;
  width: 38px;
  font-weight: 500;
}
.dm-row dd {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.dm-row dd a {
  color: var(--text-2);
  text-decoration: none;
  margin-right: 4px;
}
.dm-row dd a:hover { color: var(--accent); }
.dm-badge {
  display: inline-block;
  background: var(--bg-elevated);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 4px;
}
.dm-actors {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-actors a { display: inline; }

.dm-row--combo {
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 8px;
}
.dm-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.dm-item + .dm-item {
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.dm-item-label {
  color: var(--text-3);
  font-weight: 500;
  flex-shrink: 0;
}
.dm-item a {
  color: var(--text-2);
  text-decoration: none;
  margin-right: 4px;
}
.dm-item a:hover { color: var(--accent); }

.dm-blurb {
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s;
}
.detail-btn:hover { opacity: 0.85; }
.detail-btn--play {
  background: linear-gradient(100deg, #4d8dff 0%, #9b6bff 55%, #ff6ec7 100%);
  color: #fff;
}
.detail-btn--dl {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent-hover);
}
.detail-btn--share {
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  color: var(--text-1);
}

/* ===== Tabs Section ===== */
.detail-wrap--tabs {
  border-top: 1px solid var(--border);
  padding-top: 0;
}
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.dtab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.dtab:hover { color: var(--text-1); }
.dtab.is-active {
  color: var(--accent);
}

#detailDesc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
}
.detail-desc-summary { margin: 0 0 10px; color: var(--text-2); }
.detail-desc-body { margin: 0; }
#detailDesc.desc-collapsed {
  max-height: 4.8em;
  overflow: hidden;
  position: relative;
}
#detailDesc.desc-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.4em;
  background: linear-gradient(transparent, var(--bg-base));
}
.desc-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}

/* ===== Cast List ===== */
.detail-cast-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 8px;
  margin: 0;
  padding-left: 0;
}
.cast-item-wrap { display: contents; }
.cast-item {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 72px;
}
.cast-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-3);
}
.cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cast-name {
  font-size: 12px;
  color: var(--text-1);
  display: block;
  text-align: center;
  line-height: 1.3;
  word-break: break-all;
}
.cast-role {
  font-size: 11px;
  color: var(--text-3);
  display: block;
  text-align: center;
}

/* ===== Rate Block ===== */
.rate-block {
  padding: 8px 0 16px;
}
.rate-label {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 12px;
}
.rate-stars {
  display: flex;
  gap: 8px;
  font-size: 30px;
  color: var(--border-2);
}
.rs {
  cursor: pointer;
  transition: color 0.15s;
}
.rs:hover,
.rs.rs-on { color: var(--accent); }

/* .playlist-section 已收口进 main.css（vod/detail + vod/play 共用） */

/* ===== Bottom Layout: Main + Sidebar ===== */
.detail-bottom-layout {
  display: flex;
  gap: 32px;
  max-width: 1760px;
  margin: 0 auto;
  padding: 24px 8px 40px;
  align-items: flex-start;
}
.detail-bottom-main {
  flex: 1;
  min-width: 0;
}
.detail-sidebar {
  width: 260px;
  flex-shrink: 0;
}

/* ===== 侧栏：专题 ===== */
.topic-side-block { margin-top: 16px; }
.ts-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.ts-hd-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--text-1);
}
.ts-hd-title iconify-icon { color: var(--accent); }
.ts-hd-more { font-size: 12px; color: var(--text-3); }
.ts-hd-more:hover { color: var(--accent); }

.ts-list { display: flex; flex-direction: column; margin: 0; padding: 0; }
.ts-item-wrap { display: contents; }
.ts-item {
  display: block; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
}
.ts-item-wrap:last-child .ts-item { border-bottom: none; }

.ts-collage {
  display: flex; gap: 4px; height: 76px;
  border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: 8px; background: var(--bg-elevated);
}
.ts-collage-item { flex: 1 1 0; min-width: 0; overflow: hidden; }
.ts-collage-item:first-child { flex: 1.7 1 0; }
.ts-collage-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-collage-item--single { flex: 1 1 100%; }

.ts-title {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  margin: 0 0 4px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; transition: color 0.2s;
}
.ts-item:hover .ts-title { color: var(--accent); }
.ts-blurb {
  font-size: 12px; color: var(--text-3); line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-section {
  margin-bottom: 32px;
}
.detail-section-hd {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.detail-section-hd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.detail-section-hd-row .detail-section-hd {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.detail-section-more {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}
.detail-section-more:hover { color: var(--accent); }
/* 列数/间距/断点交给 main.css 的共用 .vod-grid 别名规则，这里不再重复定义 */

/* ===== Plot List ===== */
.plot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.plot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 100%;
}
.plot-desc {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin: 0;
}
.plot-desc-line {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plot-ep {
  font-weight: 600;
  color: var(--text-1);
  margin-right: 6px;
}
.plot-link {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.plot-link:hover { color: var(--accent); }

/* ===== Share Modal ===== */
.share-modal { display: none; }
.share-modal.is-open { display: block; }
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1400;
}
.share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1401;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 24px;
  width: min(380px, 92vw);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.share-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-3);
  cursor: pointer;
  line-height: 1;
}
.share-popup-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
}
.share-popup-icons {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.spi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}
.spi-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-1);
  border: 1px solid var(--border);
}
.share-popup-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: 0 0 8px;
}
.share-popup-link {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-2);
  resize: none;
  height: 52px;
  box-sizing: border-box;
  display: block;
  margin-bottom: 10px;
}
.share-popup-copy {
  width: 100%;
  padding: 9px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.share-popup-copy:hover { opacity: 0.88; }

/* .playlist-*/.pl-*/.episode-* 样式已收口进 main.css（vod/detail + vod/play 共用），此处不再重复 */

/* 评论区 .cmt-*/.cmt-ajax-wrap 样式已收口进 main.css（vod/detail + art/detail 共用），此处不再重复 */

/* ===== Responsive ===== */
/* 断点对齐 vod_play.css 的 .play-aside（1199px），此前是 900px，901–1199px 之间
   详情页会比播放页提前收起两栏布局，切页时版面跳动 */
@media (max-width: 1199px) {
  .detail-sidebar { display: none; }
}
@media (max-width: 640px) {
  .detail-top { flex-direction: column; align-items: center; }
  .detail-poster { width: 230px; }
  .detail-info { width: 100%; }
  .detail-rate-card { width: 100%; margin-top: 4px; }
  .detail-bottom-layout { flex-direction: column; padding: 16px 8px 32px; }
  .detail-wrap { padding: 16px 8px 0; }
  .detail-tabs { overflow-x: auto; }
  .plot-item { flex-direction: column; align-items: flex-start; }
  .plot-desc-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .plot-link { align-self: flex-end; }
}
