/* vod_detail.css — tp16：移植 tp06 版 + 本主题独有的 Hero 毛玻璃剧照背景壳 */

/* ===== Hero 背景壳（tp16 独有） ===== */
/* ===== 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(13,14,18,0) 0%, rgba(13,14,18,0.35) 65%, var(--bg-base) 100%);
  z-index: 1;
}
.detail-hero > .detail-hero-wrap {
  position: relative;
  z-index: 2;
  padding-bottom: 32px;
}
/* ==========================================
   VOD Detail Page — 仿 maccmsbox_119 白底藍調佈局
   ========================================== */
.page-content {
  flex: 1;
  background: var(--bg-base);
}
/* ===== Top Section: Poster + Info ===== */
.detail-top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.detail-poster {
  flex-shrink: 0;
  width: 250px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-panel);
  background: url("../img/load.gif") no-repeat center/cover;
}
.detail-poster img {
  width: 100%;
  display: block;
  aspect-ratio: 5/7;
  object-fit: cover;
}
.poster-tag {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
}
.detail-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}
.detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  line-height: 1.3;
}
.detail-title-en {
  font-size: 13px;
  color: var(--text-3);
  margin: 4px 0 12px;
}
/* ===== 评分行：豆瓣分 + 星级；站内「我要评分」在下方 tab（.rate-panel） ===== */
.score-src { font-size: 12px; color: var(--text-3); }
.rate-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 0 20px; }
.rate-label { font-size: 14px; color: var(--text-2); }
.rate-hint { font-size: 12px; color: var(--text-3); }
.rate-stars { display: inline-flex; gap: 2px; }
.rs {
  font-size: 26px;
  line-height: 1;
  color: var(--border-2);
  cursor: pointer;
  padding: 0 1px;
  transition: color 0.15s;
}
.rs:hover,
.rs.rs-on { color: var(--score-hi); }
/* ===== 基础信息 dl：dt 偏灰、dd 正文；年份/地区/语言/时长合并成一行（基线「dt/dd 颜色区分」） ===== */
.detail-meta { margin: 0; font-size: 13px; color: var(--text-2); }
.detail-meta .dm-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.7;
}
.detail-meta .dm-row:last-child { border-bottom: none; }
.detail-meta dt { flex-shrink: 0; color: var(--text-3); }
.detail-meta dt::after { content: "："; }
.detail-meta dd { margin: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.detail-meta dd a { color: var(--text-2); }
.detail-meta dd a:hover { color: var(--accent); }
.detail-meta .dm-sep { color: var(--text-3); margin: 0 2px; }
.dm-row--group { gap: 0 22px; flex-wrap: wrap; }
.dm-pair { display: flex; align-items: center; gap: 4px; }
.dm-actors { max-height: 3.4em; overflow: hidden; }
.status-badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  border-radius: 2px;
  color: #fff;
  background: var(--accent);
}
.status-badge.is-end { background: var(--text-3); }
.status-remark { color: var(--text-2); }
.detail-tags .dtag {
  display: inline-block;
  padding: 1px 9px;
  font-size: 12px;
  border: 1px solid var(--border-2);
  background: var(--bg-elevated);
  color: var(--text-2);
}
.detail-tags .dtag:hover { color: var(--accent); border-color: var(--accent); }
.detail-score-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.score-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--score-hi);
  line-height: 1;
}
.detail-stars {
  position: relative;
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 2px;
}
.detail-stars-bg { color: var(--border-2); white-space: nowrap; }
.detail-stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: var(--text-1);
  white-space: nowrap;
}
.detail-actions {
  border-top: none;
  padding-top: 0;
  margin-top: 12px;
}
.dm-labeled { display: flex; flex-wrap: wrap; align-items: center; }
.dm-label { color: var(--text-3); margin-right: 2px; }
.dm-split { display: inline-block; width: 1px; height: 11px; background: var(--border-2); margin: 0 10px; }
.dm-labeled a, .dm-line a {
  color: var(--text-2);
  text-decoration: none;
  margin-right: 4px;
}
.dm-labeled a:hover, .dm-line a:hover { color: var(--accent); }
.dm-desc-line { border-bottom: none; line-height: 1.7; }
.dm-desc-line.dm-clamp-2 {
  line-height: 22px;
  max-height: 45px;
}
.dm-desc-more {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  margin-left: 4px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  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: var(--accent);
  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-2);
}
/* ===== Tabs Section ===== */
.detail-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  margin-bottom: 0;
}
.dtab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 13px 20px;
  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);
  border-bottom-color: var(--accent);
}
#tab-intro, #tab-cast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 20px;
  margin-bottom: 24px;
}
/* ===== Cast List ===== */
.detail-cast-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 8px;
}
.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);
  border: 1px solid var(--border);
}
.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;
}
/* ===== Bottom Layout: Main + Sidebar ===== */
/* ===== Hero Wrapper：滿版，不與側欄並排 ===== */
.detail-hero-wrap {
  max-width: var(--content-max);
  margin: 0 auto 24px;
  padding: 0 40px;   /* tp24 全站 40px 留白 */
}
.detail-bottom-layout {
  display: flex;
  gap: 20px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 40px 40px;
  align-items: flex-start;
}
.detail-bottom-main {
  flex: 1;
  min-width: 0;
}
.detail-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
}
/* ===== Plot List（分集劇情：單行、超出省略號，詳情連結接在行尾） ===== */
.plot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.plot-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.plot-item-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plot-ep {
  font-weight: 600;
  color: var(--text-1);
  margin-right: 4px;
}
.plot-link {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
  margin-left: 6px;
}
.plot-link:hover { color: var(--accent); }
/* ===== Responsive ===== */
@media (max-width: 900px) {
  .detail-sidebar { display: none; }
  .detail-hero-wrap,
  .detail-bottom-layout { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) {
  .detail-top { flex-direction: column; align-items: center; }
  .detail-poster { width: 230px; }
  .detail-info { width: 100%; }
  /* 側欄在 ≤900px 已 display:none，這裡改用 display:block（而非 flex-direction:column）
     避免巢狀 flex 容器在深層 nowrap 文字（分集劇情）撐開時，百分比寬度/stretch 計算失準、
     子層寬度超出容器導致橫向溢出（分集劇情條被推出可視範圍） */
  .detail-bottom-layout { display: block; padding: 0 12px 32px; }
  .detail-hero-wrap { padding: 12px 12px 0; }
  .detail-tabs { overflow-x: auto; }
}
