/* ==========================================
   CSS Variables — 饭搭子影视（fdzys.net）風格：純黑底 + 亮藍主色 + 金色評分
   （配色依 https://fdzys.net/ 實際頁面配色重新設計，非逐色取樣）
   ========================================== */
:root {
  --bg-base:       #0a0b10;   /* 仿 fdzys.net 純黑背景 */
  --bg-topbar:     rgba(9, 10, 15, 0.92);   /* 扁平頂欄，仿 fdzys 實色深色橫幅 */
  --bg-card:       #14161d;
  --bg-elevated:   #1c1f29;

  --accent:        #2f6bff;   /* 仿 fdzys 導覽/按鈕主藍色 */
  --accent-hover:  #5c8dff;
  --accent-light:  rgba(47, 107, 255, 0.14);

  --gold:          #ffb400;   /* 評分星級金色 */
  --gold-2:        #7a5200;
  --gold-grad:     linear-gradient(104deg, var(--gold) 9.95%, var(--gold-2) 86.56%);

  --tag-purple:    #6c5ce7;   /* 「跟播中」等次要標籤色，與主藍區隔 */

  --text-1:        rgba(255, 255, 255, 0.94);
  --text-2:        #9aa2b1;
  --text-3:        rgba(154, 162, 177, 0.55);

  --border:        rgba(154, 162, 177, 0.14);
  --border-2:      rgba(154, 162, 177, 0.26);

  --score-hi:      #ffb400;
  --score-mid:     #35c980;

  --topbar-h:      60px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-pill:   999px;
  --shadow-panel:  0 10px 30px rgba(0, 0, 0, 0.45);
  --content-max:   1760px;
  --accent-2:      var(--gold);
  --accent-2-alt:  var(--gold-2);
}

/* ==========================================
  Base Reset
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-base);
  color: var(--text-1);
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { display: block; background: url(../img/load.gif) no-repeat center/cover, var(--bg-elevated); }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
ul { list-style: none; }

/* 僅供螢幕閱讀器使用，不影響視覺呈現 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 全站 icon 基底樣式：取代原本 <iconify-icon> 自訂元素的內建行為
   （iconify-icon 已移除，改用 public/icons.html 的 SVG sprite，見 §21.25）。
   width/height:1em 讓 icon 尺寸跟著容器 font-size 縮放（原本 iconify-icon 的預設行為），
   fill:currentColor 讓 icon 顏色跟著 color 走，沿用全站原本大量「.xxx iconify-icon { color:... }」
   的既有用法模式，改成 .icon 後行為完全一致，不需要逐一調整套用顏色的地方。 */
.icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================
   Page Layout — 無 Sidebar，純全寬
   ========================================== */
.page-shell {
  min-height: 100vh;
  background-color: var(--bg-base);
}

.main-area {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
}

/* ==========================================
   Topbar — 仿 fdzys.net 風格：扁平滿版深色橫幅導覽
   （實測 fdzys.net 頂欄為滿版不透明深色橫條，非懸浮膠囊；
   本主題保留原本 sticky + 半透明毛玻璃質感，但改為滿版直角）
   ========================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-topbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  padding: 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}
@media (min-width: 1600px) { .topbar-inner { max-width: 1540px; } }

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Logo */
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-logo-img {
  width: 108px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Horizontal nav — 仿 fdzys 圖示＋文字膠囊，選中為實心藍底 */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.tn-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, background-color 0.2s;
}
.tn-item .icon { font-size: 17px; }
.tn-item:hover { color: var(--text-1); background: rgba(255,255,255,0.06); }
.tn-item.is-active { color: #fff; font-weight: 700; background: var(--accent); }

/* "更多" dropdown — tablet nav overflow */
.tn-more-wrap {
  position: relative;
  display: none;
  flex-shrink: 0;
}
.tn-more-btn { gap: 3px; }
.tn-more-caret {
  font-size: 11px;
  transition: transform 0.2s;
}
.tn-more-btn[aria-expanded="true"] .tn-more-caret { transform: rotate(180deg); }
.tn-more-menu {
  display: none;
  position: fixed;  /* fixed 繞開所有上層 overflow 限制 */
  min-width: 120px;
  background: var(--bg-topbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 9999;
  padding: 4px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.tn-more-menu.is-open { display: block; }
.tn-more-menu .tn-item {
  display: flex;
  height: auto;
  padding: 9px 16px;
  width: 100%;
}
.tn-more-menu .tn-item::after { display: none; }

/* Right actions */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.tb-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-2);
  font-size: 20px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.tb-icon-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.07); }

/* 實測「立即訂閱」按鈕漸層樣式，套用在登入 CTA 上呼應同一視覺重點 */
.tb-login-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 18px;
  background: var(--gold-grad);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition: filter 0.2s;
  flex-shrink: 0;
}
.tb-login-btn .icon { font-size: 16px; }
.tb-login-btn:hover { filter: brightness(1.1); }

/* ==========================================
   Search Overlay — 全屏彈出式搜尋
   ========================================== */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.search-overlay.is-open { display: flex; }

.search-overlay-inner {
  width: 100%;
  max-width: 680px;
  padding: 0 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 18px;
  gap: 8px;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent); }

.search-bar-icon {
  color: var(--text-3);
  font-size: 20px;
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: 16px;
  padding: 10px 0;
  min-width: 0;
}
#searchInput::placeholder { color: var(--text-3); }

.search-submit-btn {
  padding: 9px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.2s;
}
.search-submit-btn:hover { background: var(--accent-hover); }

.search-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 18px;
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}
.search-close-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.08); }

.search-hot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 4px 0;
}
.sh-label {
  font-size: 13px;
  color: var(--text-3);
  flex-shrink: 0;
  margin-right: 4px;
}
.sh-tag {
  display: inline-block;
  padding: 5px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.sh-tag:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

.search-history {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 4px 0;
}
.search-history .sh-label { padding-top: 6px; }
.sh-tags {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.sh-clear-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}
.sh-clear-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.08); }

/* ==========================================
   Page Content
   ========================================== */
.page-content { flex: 1; }

/* ==========================================
   Hero Banner — 仿 fdzys.net 風格：滿版背景圖 + 左下角資訊區塊
   實測 fdzys.net 首頁 Hero 為較扁的滿版橫幅，文字/按鈕貼齊左下角，
   而非畫面垂直置中的大面積左側資訊欄
   ========================================== */
.hero-banner {
  position: relative;
  height: 52vh;
  min-height: 360px;
  max-height: 560px;
  overflow: hidden;
  background: var(--bg-base);
  /* 允許手機版左右滑動切換投影片（見 hero.js），同時保留垂直滾動頁面 */
  touch-action: pan-y;
}

/* 滿版背景圖（完全撐滿 banner 區塊） */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transform: scale(1.02);
  transition: transform 1s ease;
}
.hero-slide.is-active .hero-bg { transform: scale(1.0); }

/* 底部＋左側漸層，維持文字可讀性（仿 fdzys 左下角資訊區塊） */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(10, 11, 16, 0.95) 0%,
      rgba(10, 11, 16, 0.55) 32%,
      transparent 60%),
    linear-gradient(to right,
      rgba(10, 11, 16, 0.75) 0%,
      transparent 45%);
}

/* 文字定位：左下角資訊區塊（仿 fdzys 左下角標題膠囊，但保留原本的年份/地區徽章與簡介——
   使用者要求恢復「原本的影片資訊」，只移除播放／詳情按鈕；
   整張投影片本身就是連往詳情頁的連結，見下方 .hero-slide） */
.hero-content {
  position: absolute;
  left: 40px;
  right: 220px;
  bottom: 128px;
  z-index: 2;
  pointer-events: none;
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hb {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: var(--radius-pill);
}
.hb--year,
.hb--area {
  background: rgba(154, 162, 177, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

.hero-title-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 14px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s;
  pointer-events: auto; /* .hero-content 設 pointer-events:none 供點擊穿透，
                            此為可繼承屬性，子層需自行覆寫回 auto 才能觸發 :hover */
}
.hero-title-chip:hover { background: var(--accent); }

.hero-meta {
  margin-top: 12px;
  max-width: 520px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 整張投影片＝連往詳情頁的連結；is-active 之外的投影片 pointer-events:none，
   不會攔截點擊，滑鼠/觸控點擊圖片皆可直接跳轉，取代原本的「詳情」按鈕與手機版 touch hack */
.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  z-index: 1;
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* 右側精選片單（仿 fdzys 首頁 Hero 右側直式片單，取代原本 prev/next 箭頭與 dots） */
.hero-playlist {
  position: absolute;
  right: 40px;
  top: 64px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 260px;
}
.hero-playlist-item {
  max-width: 100%;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: none;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s, color 0.2s;
}
.hero-playlist-item:hover { color: #fff; }
.hero-playlist-item.is-active {
  color: #fff;
  font-weight: 700;
  background: rgba(255,255,255,0.14);
}

/* ==========================================
   Hero Wrap — 讓 Quick Browse 疊在 Hero 圖片下緣的定位容器（僅首頁使用）
   ========================================== */
.hero-wrap { position: relative; }

/* ==========================================
   Quick Browse — 首頁 Hero 下緣分類快覽（仿 fdzys 首頁 Hero 下方
   「電影：動作/喜劇/愛情/科幻/恐怖片」雙層分類膠囊列，疊在 Hero 圖片內）
   欄寬固定（grid-template-columns），子分類實際可顯示的數量由
   asset/js/quick_browse.js 依欄位可用寬度動態計算：放不下就從最後一個開始刪除，
   剩餘的子分類再平均分配寬度撐滿整欄（見 §21.9）
   ========================================== */
.quick-browse {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 20px;
  z-index: 3;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-template-columns: repeat(2, 340px);
  justify-content: space-between;
  row-gap: 8px;
}

.quick-pill {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}
/* 主分類：不使用按鈕樣式，僅圖示＋純文字 */
.qp-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.qp-main:hover { color: var(--accent-hover); }
.qp-main .icon { font-size: 14px; }
/* 子分類：寬度由 JS 動態指定（flex-basis），CSS 只給預設樣式 */
.qp-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s;
  flex: 0 0 auto;
  min-width: 0;
}
.qp-sub:hover { color: #fff; border-color: var(--accent); background: var(--accent); }

@media (max-width: 1023px) {
  .hero-playlist { display: none; }
  .quick-browse { grid-template-columns: repeat(2, 240px); }
}

@media (max-width: 767px) {
  .hero-content { left: 20px; right: 20px; bottom: 16px; }
  .hero-badges { margin-bottom: 8px; }
  .hb { font-size: 10px; padding: 3px 9px; }
  .hero-title-chip { font-size: 16px; padding: 10px 18px; }
  .hero-meta { display: none; }
  /* 手機版 Hero 太矮，分类快览直接隱藏（不佔版面），不再疊圖也不再改為直式堆疊 */
  .hero-wrap { display: flex; flex-direction: column; }
  .quick-browse { display: none; }
}


/* ==========================================
   Content Block — 內容區塊容器
   ========================================== */
/* 兩側留白改用 clamp() 隨視窗寬度連續縮放（見 §21.37），不再用 min-width 斷點：
   斷點寫法在筆電螢幕（實測邏輯寬度落在斷點門檻以下）會整段判斷都不成立、
   留白直接變回 0 滿版，只有外接大螢幕才看得到效果，不是連續漸變、而是「有」或「無」。
   clamp(24px, 6vw, 140px) 保證任何寬度都至少有 24px、且隨寬度平滑增加到最多 140px，
   不會有「低於某個寬度就完全沒有留白」的斷層。 */
.content-block {
  padding: 36px clamp(24px, 6vw, 140px) 12px;
  max-width: 1760px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.section-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

/* 區塊標題：純文字＋淡色小圖示，不用色塊/色條（沿用原版面比例） */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}
.section-title-icon {
  color: var(--text-2);
  font-size: 15px;
  display: flex;
  opacity: 0.8;
}

/* 「更多」連結：實測為純文字＋小箭頭，無膠囊底色/邊框 */
.section-more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  padding: 4px 2px;
  background: none;
  border: none;
  border-radius: 0;
  transition: color 0.2s;
}
.section-more:hover {
  color: var(--accent);
  background: none;
  border-color: transparent;
}

/* ==========================================
   VOD Grid — 一般清單頁：多欄自動換行
   ========================================== */
.vod-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px 16px;
}

/* 首頁專用：固定兩列六格（不橫向捲動），取代原本的 .hscroll + 箭頭方案 */
.vod-row--fixed { grid-template-columns: repeat(6, 1fr); }

/* ==========================================
   首頁橫向捲動列（各分區皆為單排橫向捲動，
   而非多欄換行 grid — 這是首頁與一般清單頁最主要的版面差異）
   ========================================== */
.hp-row-wrap { position: relative; }

.vod-row.hscroll,
.topic-grid.hscroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  gap: 16px;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.vod-row.hscroll::-webkit-scrollbar,
.topic-grid.hscroll::-webkit-scrollbar { display: none; }

.vod-row.hscroll > .vod-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
}
.topic-grid.hscroll > .topic-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.hp-row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.hp-row-wrap:hover .hp-row-arrow { opacity: 1; }
.hp-row-arrow:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.hp-row-arrow--prev { left: -14px; }
.hp-row-arrow--next { right: -14px; }
.hp-row-arrow.is-hidden { display: none; }

@media (max-width: 1023px) {
  .hp-row-arrow { display: none; }
}

/* ==========================================
   VOD Card — 2:3 直式海報，仿 fdzys 卡片角標/評分列樣式
   ========================================== */
.vod-card { position: relative; min-width: 0; }
.vod-card a { display: block; }

.vod-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-elevated);
}
.vod-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.vod-card:hover .vod-thumb img { transform: scale(1.12); }

/* 底部漸層遮罩 */
.vod-thumb::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 55%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.72) 100%);
  pointer-events: none;
  z-index: 1;
}

.vod-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.vod-card:hover .vod-overlay { opacity: 1; }

/* 播放按鈕：紅底圓形 */
.vod-play-icon {
  width: 54px;
  height: 54px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 0 0 6px rgba(47, 107, 255,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.vod-card:hover .vod-play-icon {
  transform: scale(1.1);
  box-shadow: 0 0 0 10px rgba(47, 107, 255,0.18);
}

/* ===== Hover 浮動放大卡片：獨立元素，寬度可超出本身欄寬，向左右兩側跨出 ===== */
.vod-pop {
  position: absolute;
  top: 0;
  left: 50%;
  width: 170%;
  transform: translateX(-50%) scale(0.92);
  transform-origin: center top;
  z-index: 30;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 24px 55px rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  /* 未 hover 时不参与布局：visibility:hidden 的绝对定位浮层仍会把页面撑出横向滚动 */
  display: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.vod-card:hover .vod-pop {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}
.vod-pop-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg-elevated);
}
.vod-pop-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vod-pop-body {
  padding: 10px 12px 12px;
}
.vod-pop-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vod-pop-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 11px;
}
.vem-tag {
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  padding: 1px 5px;
}
.vem-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--score-hi);
  font-weight: 700;
}
.vem-score .icon { font-size: 11px; }

.vod-pop-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.veg-tag {
  font-size: 10px;
  color: var(--text-2);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
}

.vod-pop-desc {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 767px) {
  .vod-pop { display: none; }
}

/* Badge：左上角狀態膠囊（仿 fdzys「HD/TC国语/已完结/全28集」角標） */
.vod-badge-tl {
  position: absolute;
  top: 8px; left: 8px;
  right: 8px;
  display: flex;
  flex-direction: row;
  z-index: 3;
  pointer-events: none;
}
.vbadge {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  border-radius: var(--radius-sm);
}
.vbadge--year {
  background: rgba(0,0,0,0.6);
  color: var(--text-2);
}
.vbadge--type {
  background: var(--accent);
  color: #fff;
}
.vbadge--remark {
  background: var(--accent);
  color: #fff;
}

/* 底部評分／熱度資訊列（仿 fdzys 海報底部左右資訊列） */
.vod-meta-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 6px;
  font-size: 11px;
  font-weight: 700;
  z-index: 3;
}
.vod-hits {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.85);
}
.vod-hits .icon { font-size: 12px; color: var(--text-2); }
.vod-rate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
}
.vod-rate .icon { font-size: 12px; }

.vod-score {
  position: absolute;
  bottom: 6px; right: 0;
  background: rgba(47, 107, 255,0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  z-index: 3;
}
.vod-remarks {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 4px 8px 6px;
  font-size: 10px;
  color: rgba(255,255,255,0.80);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
}

.vod-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-1);
  transition: color 0.2s;
}
.vod-card:hover .vod-name { color: var(--accent); }

.vod-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   Login Modal
   ========================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 600;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.is-open { display: flex; }

.modal-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 32px 28px 28px;
  width: 340px;
  max-width: calc(100vw - 32px);
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  color: var(--text-3);
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-1); }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 24px; }
.modal-field { margin-bottom: 16px; }
.modal-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.modal-input {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.modal-input:focus { border-color: var(--accent); }
.modal-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
  margin-top: 6px;
}
.modal-submit:hover { background: var(--accent-hover); }
.modal-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
}
.modal-link { color: var(--text-2); transition: color 0.2s; }
.modal-link:hover { color: var(--accent); }
.modal-link--accent { color: var(--accent); }

.modal-box--confirm { width: 300px; text-align: center; }
.modal-box--confirm .modal-title { margin-bottom: 22px; }
.modal-confirm-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-submit--danger { display: block; background: var(--accent); }
.modal-submit--danger:hover { background: var(--accent-hover); }
.modal-cancel {
  width: 100%;
  padding: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.modal-cancel:hover { color: var(--text-1); border-color: var(--accent); }

/* ==========================================
   History Modal
   ========================================== */
.hm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hm-overlay.is-open { display: flex; }

.hm-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.hm-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hm-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.hm-clear {
  font-size: 13px;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.hm-clear:hover { color: var(--accent); }
.hm-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}
.hm-close:hover { background: var(--border); color: var(--text-1); }
.hm-body {
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.hm-body::-webkit-scrollbar { width: 4px; }
.hm-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.hm-card {
  flex: 0 0 calc((100% - 50px) / 6);
  min-width: 0;
  display: block;
  text-decoration: none;
  color: var(--text-1);
  align-self: flex-start;
}
.hm-thumb {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  contain: strict;
}
.hm-thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.hm-card:hover .hm-thumb img { transform: scale(1.04); }
.hm-card:hover .hm-name { color: var(--accent); }
.hm-name {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.hm-empty {
  width: 100%;
  text-align: center;
  padding: 40px 0;
  color: var(--text-3);
  font-size: 13px;
}

/* ==========================================
   Footer — 紅色底條
   ========================================== */
.site-footer {
  padding: 24px 24px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.8;
  background: var(--bg-topbar);
}
.footer-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-bottom: 20px;
}
.footer-links a { color: var(--text-3); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom-bar {
  margin: 0 -24px;
  padding: 10px 24px;
  background: var(--bg-base);
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
}

/* ==========================================
   漂浮功能按鈕 (FAB)
   ========================================== */
.fab-group {
  position: fixed;
  bottom: 30px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 400;
}
.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(47, 107, 255,0.45), 0 2px 8px rgba(0,0,0,0.5);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.25s;
}
.fab-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 28px rgba(47, 107, 255,0.6), 0 2px 10px rgba(0,0,0,0.5);
}
.fab-btn--top { opacity: 0; pointer-events: none; }
.fab-btn--top.is-visible { opacity: 1; pointer-events: auto; }
.fab-qr-popup {
  position: fixed;
  bottom: 160px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 401;
  display: none;
}
.fab-qr-popup.is-open { display: block; }
.fab-qr-popup figcaption { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.fab-qr-popup img { width: 130px; height: 130px; border-radius: 4px; background: #fff; display: block; }

/* ==========================================
   Comments (shared)
   ========================================== */
.comment-section { margin-bottom: 32px; }
.gbook-count { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 6px; }
.gbook-list { margin-bottom: 20px; }
.gbook-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.gbook-avatar {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 50%; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 22px;
}
.gbook-body { flex: 1; min-width: 0; }
.gbook-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.gbook-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.gbook-time { font-size: 11px; color: var(--text-3); }
.gbook-content { font-size: 13px; color: var(--text-2); line-height: 1.7; word-break: break-all; }
.gbook-reply {
  margin-top: 8px; padding: 8px 12px;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: flex-start;
}
.gbook-reply .icon { flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.gbook-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.gbook-form-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 12px; }
.gbook-textarea {
  width: 100%; padding: 10px 12px;
  background: var(--bg-elevated); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text-1); font-size: 13px;
  font-family: inherit; resize: vertical; outline: none; line-height: 1.6;
  transition: border-color 0.2s; display: block; margin-bottom: 10px;
}
.gbook-textarea:focus { border-color: var(--accent); }
.gbook-textarea::placeholder { color: var(--text-3); }
.gbook-form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gbook-chars { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.gbook-chars em { font-style: normal; color: var(--accent); }
.gbook-verify-wrap { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
.gbook-captcha-img { height: 36px; border-radius: 4px; cursor: pointer; vertical-align: middle; }
.gbook-input {
  padding: 8px 12px; background: var(--bg-elevated); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text-1); font-size: 13px; outline: none; transition: border-color 0.2s;
}
.gbook-input:focus { border-color: var(--accent); }
.gbook-input::placeholder { color: var(--text-3); }
.gbook-input--verify { width: 88px; }
.gbook-submit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background 0.2s, transform 0.15s;
}
.gbook-submit-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ==========================================
   Rank Widgets
   ========================================== */
.rank-col {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
}
.rank-col-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.rank-col-title { padding: 12px; font-size: 14px; font-weight: 700; color: var(--text-1); }
.rch-badge { font-size: 10px; padding: 2px 6px; border-radius: 3px; background: var(--accent-light); color: var(--accent); margin-left: 6px; }
.rank-col-more { font-size: 12px; color: var(--text-3); }
.rank-col-more:hover { color: var(--accent); }
.rank-top1 { padding: 12px; border-bottom: 1px solid var(--border); }
.rank-top1 a { display: flex; gap: 10px; }
.rt1-thumb {
  position: relative; flex-shrink: 0;
  width: 56px; height: 78px;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elevated);
}
.rt1-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rt1-crown { position: absolute; top: 3px; left: 3px; color: var(--score-hi); font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.rt1-info { flex: 1; min-width: 0; }
.rt1-name { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.rank-top1 a:hover .rt1-name { color: var(--accent); }
.rt1-meta { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.rt1-status { font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.rt1-hits { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #f0b429; }
.rank-list { list-style: none; padding: 6px 0; }
.rank-li { border-bottom: 1px solid rgba(255,255,255,0.04); }
.rank-li:last-child { border-bottom: none; }
.rank-li-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; font-size: 13px; color: var(--text-2); transition: background 0.15s;
}
.rank-li-inner:hover { background: var(--bg-elevated); color: var(--text-1); }
.rl-num {
  flex-shrink: 0; width: 20px; height: 20px;
  border-radius: 3px; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-3);
}
.rl-num--gold   { background: #f0b429; color: #1a1a1a; }
.rl-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rl-hits { flex-shrink: 0; font-size: 11px; color: var(--text-3); }

/* ==========================================
   Art Card (文章資訊 — 橫向清單卡)
   ========================================== */
.art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 28px; }
.art-card {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px;
  color: var(--text-1);
}
.art-card-thumb {
  position: relative; flex: 0 0 150px; width: 150px; aspect-ratio: 4/3;
  overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-elevated);
}
.art-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.art-card:hover .art-card-thumb img { transform: scale(1.05); }
.art-card-nopic { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--text-3); }
.art-card-cat {
  position: absolute; top: 2px; right: 2px;
  padding: 3px 10px; background: var(--bg-elevated); color: var(--text-2);
  font-size: 11px; font-weight: 700; border-radius: var(--radius-sm);
}
.art-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.art-card-title {
  font-size: 15px; font-weight: 700; color: var(--text-1); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; transition: color 0.2s;
}
.art-card:hover .art-card-title { color: var(--accent); }
.art-card-desc {
  font-size: 12.5px; color: var(--text-3); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   排行榜首頁（舊版：側邊欄用，index 已改用 .rank-row-home）
   ========================================== */
.rank-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ==========================================
   首頁人氣排行榜 — 單排大數字（沿用原版面，
   1-6 巨型數字橫向排列＋小縮圖，非分類分欄卡片列表）
   ========================================== */
.rank-row-home {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.rank-row-home::-webkit-scrollbar { display: none; }

.rrh-item {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.rrh-num {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  font-style: italic;
  -webkit-text-stroke: 1.5px rgba(154, 162, 177,0.35);
  color: rgba(154, 162, 177,0.12);
  flex-shrink: 0;
  transition: color 0.2s, -webkit-text-stroke-color 0.2s;
}
.rrh-item:nth-child(1) .rrh-num { color: rgba(47, 107, 255,0.22); -webkit-text-stroke-color: var(--accent); }
.rrh-item:nth-child(2) .rrh-num { color: rgba(255, 180, 0,0.22); -webkit-text-stroke-color: var(--gold); }
.rrh-item:nth-child(3) .rrh-num { color: rgba(108, 92, 231,0.35); -webkit-text-stroke-color: var(--tag-purple); }
.rrh-item:hover .rrh-num { color: rgba(47, 107, 255,0.35); -webkit-text-stroke-color: var(--accent); }

.rrh-thumb {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}
.rrh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.rrh-item:hover .rrh-thumb img { transform: scale(1.06); }

.rrh-info { display: none; }

@media (max-width: 767px) {
  .rrh-num { font-size: 44px; }
  .rrh-thumb { width: 74px; }
  .rank-row-home { gap: 18px; }
}

/* ==========================================
   Topic Card
   ========================================== */
.topic-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.topic-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: none; border-radius: var(--radius);
  overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; color: var(--text-1);
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.45); }
.topic-card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-elevated); }
.topic-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.topic-card:hover .topic-card-thumb img { transform: scale(1.04); }
.topic-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: rgba(255,255,255,0.85);
  opacity: 0; transition: opacity 0.2s;
}
.topic-card:hover .topic-card-overlay { opacity: 1; }
.topic-card-count { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; background: rgba(0,0,0,0.65); color: var(--text-2); font-size: 11px; border-radius: 3px; }
.topic-card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.topic-card-title { font-size: 14px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
.topic-card:hover .topic-card-title { color: var(--accent); }
.topic-card-blurb { font-size: 12px; color: var(--text-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================
   Mobile Tabbar
   ========================================== */
.mobile-tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: var(--bg-topbar);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 300; flex-direction: row;
}
.mtb-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; height: 100%;
  color: var(--text-3); font-size: 10px;
  text-decoration: none; position: relative; transition: color 0.2s;
}
.mtb-item .icon { font-size: 22px; }
.mtb-item.is-active { color: #fff; }
.mtb-item.is-active::before {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

/* ==========================================
   Pagination
   ========================================== */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 28px 0 10px; }
.pg-btn, .pg-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-2);
  background: var(--bg-elevated); color: var(--text-2); font-size: 13px; transition: all 0.2s;
}
.pg-btn:hover, .pg-num:hover { color: var(--text-1); border-color: var(--accent); background: var(--bg-card); }
.pg-num.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pg-info { font-size: 12px; color: var(--text-3); margin-left: 8px; }

/* ==========================================
   Download page
   ========================================== */
.down-main { flex: 1; }
.down-container { max-width: 900px; margin: 0 auto; padding: 24px 20px 40px; }
.down-hero { display: flex; gap: 20px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; }
.down-poster { flex-shrink: 0; width: 100px; height: 140px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elevated); }
.down-poster img { width: 100%; height: 100%; object-fit: cover; }
.down-info { flex: 1; min-width: 0; }
.down-title { font-size: 20px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.down-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.down-meta span { padding: 2px 10px; border-radius: 3px; font-size: 12px; background: var(--bg-elevated); color: var(--text-3); border: 1px solid var(--border); }
.down-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.down-hint .icon { color: #f0b429; }
.detail-back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border-2); color: var(--text-2); font-size: 13px; transition: all 0.2s; }
.detail-back-btn:hover { color: var(--accent); border-color: var(--accent); }
.down-sources { display: flex; flex-direction: column; gap: 20px; }
.ds-group { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ds-group-title { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 15px; font-weight: 600; color: var(--text-1); border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.ds-list { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.ds-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-base); color: var(--text-2); font-size: 13px; transition: all 0.2s; }
.ds-item:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }

/* ==========================================
   Desc Expand widget
   ========================================== */
.desc-collapsed { max-height: 80px; overflow: hidden; -webkit-mask-image: linear-gradient(black 40%, transparent); mask-image: linear-gradient(black 40%, transparent); }
.desc-expanded { max-height: none; mask-image: none; -webkit-mask-image: none; }
.desc-expand-btn { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--accent); padding: 6px 0; cursor: pointer; background: none; border: none; }
.desc-expand-btn:hover { text-decoration: underline; }

/* ==========================================
   Ad Slots
   ========================================== */
.vod-ad-slot { margin: 0 0 20px; }
/* 實測站內促銷橫幅為金色系（呼應「立即訂閱」按鈕漸層），與導覽/卡片的青藍主色區隔開來 */
.site-ad { border-radius: var(--radius); border: 1px solid rgba(255, 180, 0,0.3); background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%); overflow: hidden; position: relative; }
.site-ad::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--gold-grad); border-radius: var(--radius) 0 0 var(--radius); }
.site-ad--banner { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 18px; font-size: 12px; color: var(--text-2); flex: 1; }
.site-ad-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.site-ad-icon { font-size: 18px; flex-shrink: 0; color: var(--gold); }
.site-ad-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.site-ad-text strong { font-size: 13px; color: var(--text-1); }
.site-ad-text span { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-ad--sidebar { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; text-align: left; }
.site-ad--sidebar .site-ad-body { flex: 1; min-width: 0; }
.site-ad-label { display: inline-block; font-size: 9px; color: var(--gold); margin-bottom: 3px; letter-spacing: 1px; text-transform: uppercase; }
.site-ad-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.site-ad-desc { font-size: 11px; color: var(--text-3); line-height: 1.5; }
.site-ad-btn { display: inline-flex; align-items: center; flex-shrink: 0; padding: 6px 14px; background: var(--gold-grad); color: #fff; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; white-space: nowrap; transition: filter 0.2s; }
.site-ad-btn:hover { filter: brightness(1.1); }

/* ==========================================
   MAC.Pop 彈出層覆寫
   ========================================== */
.mac_pop_bg { background: rgba(0,0,0,0.65) !important; backdrop-filter: blur(4px); }
.mac_pop { background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: 0 24px 64px rgba(0,0,0,0.7) !important; padding: 0 !important; display: flex !important; flex-direction: column !important; overflow: hidden !important; }
.mac_pop .pop_top { display: flex !important; align-items: center !important; justify-content: space-between !important; height: auto !important; padding: 14px 16px !important; background: var(--bg-elevated) !important; border-bottom: 1px solid var(--border) !important; flex-shrink: 0 !important; }
.mac_pop .pop_top h2 { font-size: 15px !important; font-weight: 600 !important; color: var(--text-1) !important; margin: 0 !important; line-height: 1 !important; float: none !important; }
.mac_pop span.pop_close { float: none !important; width: 28px !important; height: 28px !important; font-size: 16px !important; text-indent: 0 !important; background: none !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; border-radius: 50% !important; color: var(--text-3) !important; cursor: pointer !important; transition: color 0.2s, background 0.2s !important; line-height: 1 !important; }
.mac_pop span.pop_close:hover { color: var(--text-1) !important; background: var(--bg-base) !important; }
.mac_pop .pop_content { flex: 1 !important; overflow-y: auto !important; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.mac_pop_msg_bg { background: rgba(0,0,0,0.3) !important; }
.mac_pop_msg { background: var(--bg-elevated) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; box-shadow: 0 4px 24px rgba(0,0,0,0.5) !important; padding: 10px 20px !important; }
.mac_pop_msg .pop-msg { color: var(--text-1) !important; font-size: 13px !important; }

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1199px) {
  .mobile-tabbar { display: flex; }
  .main-area { padding-bottom: 56px; }
}
@media (max-width: 1023px) {
  .rank-home-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid     { grid-template-columns: repeat(3, 1fr); }
  .vod-row--fixed { grid-template-columns: repeat(4, 1fr); }
  .site-ad--banner .site-ad-text span { display: none; }
  .fab-group { bottom: 76px; right: 14px; }
  .fab-qr-popup { bottom: 146px; right: 14px; }
  .fab-btn--qr { display: none; }
}

/* ==========================================
   Hamburger Button (hidden on desktop)
   ========================================== */
.hamburger-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: transparent; border: none;
  color: var(--text-2); font-size: 22px;
  cursor: pointer; transition: color 0.2s, background 0.2s;
}
.hamburger-btn:hover { color: var(--text-1); background: var(--bg-elevated); }

/* ==========================================
   Mobile Nav Drawer
   ========================================== */
.mob-nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 499;
}
.mob-nav-overlay.is-open { display: block; }

.mob-nav-drawer {
  position: fixed; top: 0; right: 0;
  width: 240px; height: 100dvh;
  background: var(--bg-topbar);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid var(--border);
  z-index: 500;
  transform: translateX(100%);
  visibility: hidden; /* 收起时不参与布局，避免撑出横向滚动 */
  transition: transform 0.28s cubic-bezier(.4,0,.2,1), visibility 0s 0.28s;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
}
.mob-nav-drawer.is-open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
.mob-nav-drawer::-webkit-scrollbar { display: none; }

.mnd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mnd-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.mnd-close {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: none;
  color: var(--text-2); font-size: 18px; cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.mnd-close:hover { color: var(--text-1); background: var(--bg-elevated); }

.mnd-nav { display: flex; flex-direction: column; padding: 8px 0; flex: 1; }

.mnd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  color: var(--text-2); font-size: 15px;
  text-decoration: none; transition: color 0.2s, background 0.2s;
}
.mnd-item:hover { color: var(--text-1); background: var(--bg-elevated); }
.mnd-item.is-active { color: var(--accent); }
.mnd-item .icon { font-size: 20px; flex-shrink: 0; }

@media (max-width: 767px) {
  .hero-banner { height: 50vh; min-height: 300px; }
  /* 手機版收斂為滿版底部疊字，捨棄桌面版左右分割框景，維持可讀性 */
  .hero-bg { top: 0; bottom: 0; left: 0; right: 0; border-radius: 0; box-shadow: none; }
  .hero-overlay {
    background:
      linear-gradient(to top, rgba(10, 11, 16,0.95) 0%, rgba(10, 11, 16,0.35) 45%, transparent 100%);
  }
  /* .hero-content／.hero-title-chip／.hero-playlist 手機版樣式已統一定義於
     上方「Hero Wrap / Quick Browse」區塊的 767px／1023px media query，此處不再重複 */
  .brand-name { display: none; }
  .content-block { padding: 20px 14px 8px; }
  .vod-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .vod-row.hscroll { gap: 10px; }
  .vod-row.hscroll > .vod-card { flex: 0 0 calc((100% - 20px) / 3); }
  .art-grid       { grid-template-columns: 1fr; gap: 16px; }
  .art-card-thumb { flex-basis: 110px; width: 110px; }
  .art-card-title { font-size: 14px; }
  .topic-grid     { grid-template-columns: repeat(2, 1fr); }
  .rank-home-grid { grid-template-columns: 1fr; }
  .hm-overlay { padding: 16px; }
  .hm-box { max-height: 85vh; }
  .hm-card { flex: 0 0 calc((100% - 20px) / 3); }
  .mobile-tabbar { display: flex; }
  .main-area { padding-bottom: 56px; }
  .tb-login-btn span { display: none; }
  .topbar-inner { padding: 0 14px; gap: 10px; }

  .topbar-nav { display: none; }
  .hamburger-btn { display: flex; }
}

@media (max-width: 480px) {
  .vod-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}

/* ==========================================
   Section Lazy Reveal (Intersection Observer)
   ========================================== */
.content-block.will-observe {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.content-block.is-visible {
  opacity: 1;
  transform: none;
}

/* 区块头日排行（index.md 强制2.3）：一行不换行、溢出裁掉，移动端隐藏 */
.section-title a { color: inherit; }
.section-title a:hover { color: var(--accent); }
.sh-dayrank { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; overflow: hidden; white-space: nowrap; font-size: 13px; }
.sh-dayrank a { color: var(--text-3); flex-shrink: 0; }
.sh-dayrank a:hover { color: var(--accent); }
@media (max-width: 767px) {
  .sh-dayrank { display: none; }
}
/* 搜索弹窗输入框下拉（强制18.2 硬性布局）：序列式、一行一条、左侧序号、历史在前热门在后、小字号、悬停高亮 */
.search-bar { position: relative; }
.search-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  padding: 6px 0; background: var(--bg-card); border: 1px solid var(--border-2); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.5); max-height: 60vh; overflow-y: auto; text-align: left;
}
.search-drop .sd-group + .sd-group { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.sd-group-hd { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; }
.sd-label { font-size: 11px; color: var(--text-3); letter-spacing: .5px; }
.sd-clear { font-size: 11px; color: var(--text-3); background: none; border: 0; padding: 0; cursor: pointer; }
.sd-clear:hover { color: var(--accent); }
.sd-list { list-style: none; margin: 0; padding: 0; }
.sd-item { display: flex; align-items: center; gap: 10px; padding: 0 12px; transition: background .15s; }
.sd-item:hover { background: rgba(255,255,255,.06); }
.sd-num { flex-shrink: 0; width: 16px; font-size: 11px; color: var(--text-3); text-align: center; }
.sd-item:nth-child(-n+3) .sd-num { color: var(--accent); font-weight: 700; }
.sd-word {
  flex: 1; min-width: 0; text-align: left; padding: 6px 0;
  font-size: 13px; color: var(--text-2); background: none; border: 0; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s;
}
.sd-item:hover .sd-word { color: var(--accent); }

/* ===== 语义化列表容器（ul/li 化后的重置） ===== */
.vod-row, .art-grid, .topic-grid, .rank-home-grid { list-style: none; margin-top: 0; margin-bottom: 0; padding-left: 0; }
.vod-row > li, .art-grid > li, .topic-grid > li, .rank-home-grid > li { min-width: 0; }
.art-grid > li > .art-card, .topic-grid > li > .topic-card { height: 100%; }
.art-card-date { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }

/* ===== 从 tp16 移植：影片网格 base + 九列 / 列表空态 / 面包屑（nav>ol） ===== */
/* ==========================================
   影片网格 base + 九列修饰（分类页/筛选页 27 条，基线）；列表空态
   ========================================== */
.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 18px; }
.vod-row.vod-row--c9, .vod-grid.vod-grid--c9 { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 16px 14px; }
@media (max-width: 1199px) {
  .vod-row.vod-row--c9, .vod-grid.vod-grid--c9 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 600px) {
  .vod-row.vod-row--c9, .vod-grid.vod-grid--c9 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
.vod-grid { list-style: none; margin-top: 0; margin-bottom: 0; padding-left: 0; }
.vod-grid > li { min-width: 0; }
.list-empty { padding: 28px 0; color: var(--text-3); font-size: 14px; text-align: center; }
.breadcrumb { max-width: var(--content-max); margin: 16px auto 16px; padding: 0 20px; font-size: 13px; color: var(--text-3); }   /* 左右 gutter 与 .content-block 对齐 */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .bc-sep { display: inline-flex; margin: 0 4px; color: var(--text-3); }
.breadcrumb .bc-sep .mac-icon { width: 12px; height: 12px; }
.breadcrumb .bc-current { color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
@media (max-width: 767px) {
  .breadcrumb { margin: 10px 12px; }
}
/* ==========================================
   详情类页面共用区块（detail / play / down / plot / art detail 共用，从 vod_detail.css 上提）
   ========================================== */
.detail-section {
  margin-bottom: 24px;
}
.detail-section-hd {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-1);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.detail-section-hd .icon { color: var(--accent); }
.detail-section-hd--split {
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.detail-section-hd--split h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-1);
  margin: 0;
}
.detail-section-more {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}
.detail-section-more:hover { color: var(--accent); }
/* 详情/播放/分集/专题等页面内影视卡网格：一行 6 列（基线），≤1199 4 列、≤600 3 列 */
.detail-vod-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-vod-grid > li { min-width: 0; display: block; }
/* 详情页 猜你喜欢/相关推荐/关联系列：一行 9 列（≤1199 6 列、≤600 3 列）；关联系列默认收起只显前 9 条 */
.detail-vod-grid--c9 { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; }
.detail-vod-grid--c9.is-collapsed > li:nth-child(n+10) { display: none; }
.rel-toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 6px 14px; font-size: 13px; color: var(--text-2); border: 1px solid var(--border-2); border-radius: var(--radius-pill); transition: color 0.2s, border-color 0.2s; }
.rel-toggle[hidden] { display: none; }
.rel-toggle:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 1199px) {
  .detail-vod-grid--c9 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .detail-vod-grid--c9 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
/* 分集剧情 / 角色介绍 标题行：标题 + 右侧「更多」 */
.detail-section-hd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.detail-section-hd-row .detail-section-hd { margin: 0; padding: 0; border: 0; }
/* ==========================================
   播放列表 widget（detail / play 共用）
   ========================================== */
/* ===== Playlist Section ===== */
.playlist-section {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  padding: 16px 20px;
}
/* ===== Playlist Widget（仿 .play-nav + .playerlist 藍色高亮） ===== */
.playlist-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.playlist-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}
.pl-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.pl-sort-btn:hover { color: var(--accent); border-color: var(--accent); }
.playlist-sources {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.playlist-sources::-webkit-scrollbar { display: none; }
.playlist-sources .pl-source-tab { flex-shrink: 0; white-space: nowrap; }
.pl-source-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: none;
  margin-right: 4px;
  margin-bottom: -1px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pl-source-tab.is-active {
  background: var(--bg-card);
  border-color: var(--border);
  border-bottom: 1px solid var(--bg-card);
  color: var(--accent);
  font-weight: 700;
}
.playlist-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.playlist-panel { display: none; }
.playlist-panel.is-active { display: block; }
.playlist-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--bg-elevated);
}
.playlist-notice .icon { color: var(--accent); }
.playlist-episodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}
.playlist-episodes.episodes-collapsed {
  max-height: 132px;
  overflow: hidden;
}
.episode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 7px 10px;
  background: #fcfcfc;
  border: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.episode-btn:hover { border-color: var(--accent); color: var(--accent); }
.episode-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.episode-more-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 5px 12px;
  border: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.episode-more-trigger:hover { color: var(--accent); border-color: var(--accent); }
/* ==========================================
   分享弹窗 widget（detail / down 共用）
   ========================================== */
/* ===== Share Modal ===== */
.share-modal { display: none; }
.share-modal.is-open { display: block; }
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1400;
}
.share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1401;
  background: var(--bg-card);
  padding: 24px;
  width: min(380px, 92vw);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.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;
}
.share-popup-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: 0 0 8px;
}
.share-popup-link {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  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;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.share-popup-copy:hover { opacity: 0.88; }
/* ==========================================
   简介展开 widget（detail / down 共用）
   ========================================== */
.desc-body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
}
.desc-body * {
  background-color: transparent !important;
  color: inherit !important;
}
.desc-body.desc-collapsed {
  max-height: 5.4em;
  overflow: hidden;
  position: relative;
}
.desc-body.desc-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.4em;
  background: linear-gradient(transparent, var(--bg-card));
}
.desc-body.desc-expanded {
  max-height: none;
}
.desc-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}
.desc-expand-btn:hover { opacity: 0.8; }
/* 简介两段式：模板化短句与真实剧情之间要有可见间距（全局 reset 清掉了 p 的默认 margin，强制1.4/7.3） */
.desc-lead { margin-bottom: 10px; color: var(--text-2); }
.desc-text p { margin-bottom: 10px; }
.desc-text p:last-child { margin-bottom: 0; }
/* ==========================================
   评论 widget（detail / play / art detail 共用）
   ========================================== */
/* ===== Comment Section（仿 .mac_comment 素樸方框） ===== */
.cmt-total-label { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 6px; }
.cmt-total-label em { color: var(--accent); font-style: normal; }
.mac_comment.cmt-ajax-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-height: 60px;
  padding: 12px;
}
.cmt-loading {
  font-size: 13px;
  color: var(--text-3);
  padding: 24px 0;
  text-align: center;
}
.cmt-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.cmt-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 24px;
}
.cmt-textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.cmt-textarea:focus { border-color: var(--accent); }
.cmt-textarea::placeholder { color: var(--text-3); }
.cmt-form-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.cmt-verify-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.cmt-verify-input {
  width: 90px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 12px;
  outline: none;
}
.cmt-captcha-img { height: 30px; cursor: pointer; flex-shrink: 0; }
.cmt-form-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cmt-remaining { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.cmt-remaining em { color: var(--accent); font-style: normal; }
.cmt-submit-btn {
  padding: 8px 22px;
  background: var(--accent-2);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.cmt-submit-btn:hover { background: var(--accent-2-alt); }
.cmt-list { display: flex; flex-direction: column; gap: 0; list-style: none; margin: 0; padding: 0; }
.cmt-children { list-style: none; margin: 0; padding: 0; }
.cmt-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cmt-item:last-child { border-bottom: none; }
.cmt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.cmt-body { flex: 1; min-width: 0; }
.cmt-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cmt-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.cmt-time { font-size: 11px; color: var(--text-3); }
.cmt-content { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0 0 6px; }
.cmt-child-item {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-left: 2px solid var(--accent);
}
.cmt-child-name { font-size: 12px; font-weight: 600; color: var(--text-1); margin-right: 6px; }
.cmt-actions { display: flex; gap: 12px; margin-top: 4px; }
.cmt-action-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}
.cmt-action-link:hover { color: var(--accent); }
.cmt-paging {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 16px 0 4px;
}
.cmt-page-btn {
  background: none;
  font: inherit;
  padding: 4px 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.cmt-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.cmt-page-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmt-page-btn.is-disabled { opacity: 0.4; cursor: default; pointer-events: none; }
/* ==========================================
   专题侧栏 widget（detail / play / down 共用）
   ========================================== */
.topic-side-block { margin-top: 24px; padding-bottom: 8px; }
.ts-hd { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
.ts-hd-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--text-1); }
.ts-hd-title .icon { color: var(--accent); }
.ts-hd-more { font-size: 12px; color: var(--text-3); }
.ts-hd-more:hover { color: var(--accent); }
.ts-list { list-style: none; margin: 0; padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.ts-item { display: block; }
.ts-cover { aspect-ratio: 16/9; overflow: hidden; 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-top: 6px; line-height: 1.4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ts-item:hover .ts-title { color: var(--accent); }
.ts-blurb { font-size: 12px; color: var(--text-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1199px) {
  .detail-vod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .cmt-form-footer { flex-direction: column; align-items: stretch; }
  .cmt-form-right { margin-left: 0; justify-content: space-between; }
}
@media (max-width: 600px) {
  .detail-vod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
/* ==========================================
   资讯页共用（art/type + art/detail）：三栏布局 / 左侧分类导航 / 右侧栏 widget / 轮播
   原先在 art_type.css 与 art_detail.css 各写一份，这里收成单一来源。
   ========================================== */
.art-layout {
  max-width: var(--content-max); margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr 240px;
  gap: 24px;
  padding: 24px 20px 40px;
  align-items: start;
}
.art-content { min-width: 0; }
.art-content .breadcrumb { margin: 0 0 16px; }
/* 左侧分类导航 */
.art-leftnav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
}
.aln-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-size: 14px; color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}
.aln-item:last-child { border-bottom: none; }
.aln-item:hover { color: var(--text-1); background: var(--bg-elevated); }
.aln-item.is-active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.aln-item .icon { width: 16px; height: 16px; }
/* 轮播 */
.art-slider {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16/7;
  margin-bottom: 24px;
  background: var(--bg-elevated);
}
.art-slider-track { display: flex; transition: transform 0.4s ease; margin: 0; }
.art-slide { flex-shrink: 0; width: 100%; position: relative; margin: 0; }
.art-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-slide-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 16px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.art-slide-title { font-size: 14px; font-weight: 600; color: #fff; }
.art-slider-dots { position: absolute; bottom: 10px; right: 12px; display: flex; gap: 6px; }
.asd {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.2s;
}
.asd.is-active { background: var(--bg-card); width: 18px; border-radius: 3px; }
/* 右侧栏 */
.art-sidebar { position: sticky; top: calc(var(--topbar-h) + 12px); }
.art-sb-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}
.art-sb-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--text-1);
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.art-sb-title .icon { color: var(--accent); }
.art-hot-list { list-style: none; margin: 0; padding: 8px 0; }
.art-hot-list li a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; font-size: 13px; color: var(--text-2);
  transition: color 0.2s;
}
.art-hot-list li a:hover { color: var(--accent); }
.ahl-num {
  flex-shrink: 0; width: 20px; height: 20px;
  border-radius: 3px; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-3);
}
/* 前三名配色用 nth-child，不在模板里判断 */
.art-hot-list li:nth-child(1) .ahl-num { background: #f0b429; color: #1a1a1a; }
.art-hot-list li:nth-child(2) .ahl-num { background: #b0b8c8; color: #1a1a1a; }
.art-hot-list li:nth-child(3) .ahl-num { background: #c28060; color: #1a1a1a; }
.ahl-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.art-sb-read-list { list-style: none; margin: 0; padding: 8px 12px; }
.art-sb-item a { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.art-sb-item:last-child a { border-bottom: none; }
.asi-thumb { flex-shrink: 0; width: 64px; height: 42px; border-radius: 4px; overflow: hidden; background: var(--bg-elevated) url("../img/load.gif") no-repeat center/cover; }
.asi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asi-info { flex: 1; min-width: 0; }
.asi-title { font-size: 13px; color: var(--text-2); line-height: 1.4; margin-bottom: 4px; }
.art-sb-item a:hover .asi-title { color: var(--accent); }
.asi-cat { font-size: 11px; color: var(--text-3); }
/* 平板：收起右侧栏，左导航缩窄 */
@media (max-width: 1023px) {
  .art-layout { grid-template-columns: 140px 1fr; gap: 14px; padding: 16px 16px 60px; }
  .art-sidebar { display: none; }
}
/* 手机：单栏，左导航变横向滚动标签列 */
@media (max-width: 767px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 10px 10px 80px; overflow-x: hidden; }
  .art-leftnav {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
    width: 100%;
  }
  .art-leftnav::-webkit-scrollbar { display: none; }
  .aln-item {
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 9px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .aln-item:last-child { border-right: none; }
  .art-content { width: 100%; }
  .art-slider { aspect-ratio: 16/9; margin-bottom: 12px; }
}
