/* ==========================================
   VOD Detail Page — 沿用版面結構，配色改為 fdzys 風格
   ========================================== */

/* ===== Shared Wrapper ===== */

/* ===== Top Section 背景：該片劇照放大＋模糊，滿版鋪底（仿目標站效果） =====
   .detail-hero 撐滿版面寬度，.detail-hero-bg／.detail-hero-overlay 為絕對定位的
   背景圖層與深色漸層遮罩，實際的海報＋資訊內容仍在 .detail-wrap--hero 內維持
   原本 1280px 置中寬度，不受背景滿版影響 */

/* ===== Top Section: Poster + Info ===== */

.detail-title-en {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.dm-badge {
  display: inline-block;
  background: var(--bg-elevated);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 4px;
}

/* ===== 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-sec);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.dtab:hover { color: var(--text-pri); }
.dtab.is-active {
  color: var(--accent-deep);
}

#detailDesc {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.75;
}
#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-deep);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}

/* ===== Cast List ===== */
.detail-cast-list {
  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-muted);
}
.cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cast-name {
  font-size: 12px;
  color: var(--text-pri);
  display: block;
  text-align: center;
  line-height: 1.3;
  word-break: break-all;
}
.cast-role {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  text-align: center;
}

/* ===== Rate Block ===== */
.rate-block {
  padding: 8px 0 16px;
}
.rate-label {
  font-size: 14px;
  color: var(--text-sec);
  margin: 0 0 12px;
}
.rate-stars {
  display: flex;
  gap: 8px;
  font-size: 30px;
  color: var(--border-2);   /* 未点亮的星：走 :root token */
}
.rs {
  cursor: pointer;
  transition: color 0.15s;
}
.rs:hover,
.rs.rs-on { color: var(--gold); }

/* ===== Playlist Section ===== */

/* ===== Bottom Layout: Main + Sidebar ===== */
.detail-bottom-layout {
  display: flex;
  gap: 32px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--page-pad) 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: var(--section-gap); }
.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 .mac-icon { color: var(--accent-deep); }
.ts-hd-more { font-size: 12px; color: var(--text-3); }
.ts-hd-more:hover { color: var(--accent-deep); }

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

.ts-cover { aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--bg-elevated) url("../img/load.gif") no-repeat center/cover; }
.ts-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.ts-item:hover .ts-cover img { transform: scale(1.04); }

.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-deep); }
.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-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-deep); }
/* 相关推荐网格改用 main.css 的 .vod-grid（6 列／≤1199px 4 列／≤600px 3 列） */
/* ===== Plot List ===== */
.plot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.plot-item {
  position: relative;   /* 整卡可点：.plot-link::after 撑满整张卡（vod-detail 1.2） */
  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-sec);
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plot-ep {
  font-weight: 600;
  color: var(--text-pri);
  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::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.plot-item:hover { border-color: var(--accent); }
.plot-item:hover .plot-link,
.plot-link:hover { color: var(--accent-deep); }

/* ===== Share Modal ===== */

/* ===== Playlist Widget ===== */

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .detail-sidebar { display: none; }
}
@media (max-width: 640px) {
   /* 手機降低模糊半徑，減輕效能負擔 */
  
  
  
  .detail-bottom-layout { flex-direction: column; padding: 16px var(--page-pad) 32px; }
  
  .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; }

  /* .playlist-sources 手機橫滑規則已隨 playlist 樣式移至 main.css */
}

/* ===== tp35：detail_hero 狀態標籤／分類分隔（詳情頁強制 6：完結／連載視覺可辨識） ===== */

/* ===== 簡介分兩段（詳情頁強制 7.3）＋段落間距（強制 1.4／18.5：全局 reset 會吃掉 p 的間距） ===== */
#detailDesc .desc-intro { margin-bottom: 12px; color: var(--text-1); }
#detailDesc .desc-body p { margin-bottom: 0.8em; }
#detailDesc .desc-body p:last-child { margin-bottom: 0; }
#detailDesc .desc-body img { max-width: 100%; height: auto; }

