/* ============================================================
   tp13_dark_black — main.css
   視覺：白底黑框，左側常駐側欄維持半透明黑色疊色（參考 miguvideo 頻道頁原站風格）
   功能架構：同 tp10_light_blue
   ============================================================ */

/* ===== CSS Variables ===== */
:root {
  /* 背景層（白底） */
  --bg-body:        #FFFFFF;
  --bg-page:        #FFFFFF;
  --bg-card:        #FFFFFF;
  --bg-card-hover:  #F5F5F5;
  --bg-elevated:    #F7F7F7;
  --bg-input:       #F5F5F5;
  --bg-overlay:     rgba(0,0,0,.6);

  /* 主調色（低飽和藍，只用在連結/hover文字/細線裝飾條，不作按鈕實心填色） */
  --accent:         #4C8DFF;
  --accent-hover:   #3A6FDB;
  --accent-grad:    linear-gradient(135deg, #4C8DFF 0%, #6FA8FF 100%);
  --accent-muted:   rgba(76,141,255,.10);

  /* 實心按鈕／徽章／目前選中狀態一律用黑色系填色（見 CLAUDE.md §27.1），不用 accent 藍 */
  --fill:           #1A1A1A;
  --fill-hover:     #333333;

  /* 文字 */
  --text-1:         #1A1A1A;
  --text-2:         #5A5A5A;
  --text-3:         #8C8C8C;

  /* 邊框（淡灰分隔線，用於 input／modal／tag 等結構性元件，不用來框圖片/卡片） */
  --border:         #E5E6EB;
  --border-light:   #D8D8D8;

  /* 側欄／頂欄專用（暗色 chrome，不隨白底主題變化，見 CLAUDE.md §22.1／§27） */
  --topbar-bg:          #0D0D0D;
  --topbar-input-bg:    rgba(255,255,255,.08);
  --sidebar-overlay:    rgba(0,0,0,.6);
  --sidebar-text:       rgba(255,255,255,.85);
  --sidebar-text-muted: rgba(255,255,255,.6);

  /* 尺寸 */
  --topbar-h:       60px;
  --sidebar-w:      196px;
  /* 桌面版不設上限：側欄已經把內容往右推過一次，內容區應該把剩餘寬度用到螢幕右緣，
     不要再用 max-width 卡住留一塊空白（見 CLAUDE.md §35）。<1024px 斷點會覆寫成 100%
     （效果相同，維持不動）。 */
  --container-w:    none;
  --radius:         4px;
  --radius-sm:      3px;
  --shadow-card:    0 2px 12px rgba(0,0,0,.08);

  --rank-1:         #FFD700;
  --rank-2:         #C0C0C0;
  --rank-3:         #CD7F32;
  --score-mid:      #85c13a;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-body); color: var(--text-1); min-height: 100%; }
body { font-family: "PingFang SC","Microsoft YaHei",Arial,sans-serif; font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
a:hover { color: var(--accent); transition: .15s ease-in-out; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
iconify-icon { display: inline-flex; align-items: center; vertical-align: middle; }
input, select, textarea { font-family: inherit; }

/* ===== Page Shell =====
   side-nav 是浮在 main-area 上方的半透明疊層（見 §22.1），不佔版面寬度，
   所以這裡用 padding-left（讓 main-area 背景延伸到最左，側欄疊在上面）
   而不是 margin-left（那樣會挖出一塊空白，側欄後面就沒東西可透了）。 */
.page-shell { min-height: 100vh; }
.main-area  { min-height: 100vh; display: flex; flex-direction: column; padding-left: var(--sidebar-w); }
.page-content { flex: 1; padding-top: var(--topbar-h); }

/* ===== Container ===== */
.warp { }
/* margin 不置中（不是 0 auto）：側欄已經把內容往右推過一次，
   若再置中會在側欄與內容之間多出一大塊空白，跟參考網站「內容緊貼側欄右緣」的版型不符。 */
.container { width: 100%; max-width: var(--container-w); margin: 0; padding: 0 16px; }

/* ===== Two-column layout ===== */
.page-body {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 20px 0 40px;
}
.main-inner { flex: 1; min-width: 0; }
.mian-sidebar { width: 300px; flex-shrink: 0; }
.main-inner > *:first-child,
.mian-sidebar > *:first-child { margin-top: 0; }

/* ============================================================
   TOPBAR — 全寬固定於最上層
   ============================================================ */
/* topbar 是暗色 chrome（跟側欄同色系），跟頁面白底內容區分開，
   固定用 --topbar-bg／--sidebar-text 這類不隨主題變化的 token（見 CLAUDE.md §27）。 */
.dk-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  z-index: 300;
  display: flex; align-items: center;
  padding: 0 20px 0 0;
}

/* Logo 區塊，寬度對齊側欄 */
.dk-brand {
  width: var(--sidebar-w); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
}
.dk-brand-img { height: 30px; width: auto; }

/* 搜尋框 */
.dk-search {
  display: flex; align-items: center;
  width: 320px; height: 36px; margin-left: 8px;
  background: var(--topbar-input-bg); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; overflow: hidden;
}
.dk-search input {
  flex: 1; height: 100%; padding: 0 6px 0 16px;
  border: none; outline: none; background: transparent;
  color: var(--sidebar-text); font-size: 13px;
}
.dk-search input::placeholder { color: var(--sidebar-text-muted); }
.dk-search-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--sidebar-text-muted); font-size: 16px; border-radius: 50%;
  transition: color .15s;
}
.dk-search-btn:hover { color: #fff; }

/* 右側動作區 */
.dk-actions {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; flex-shrink: 0;
}
.dk-action-btn {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 17px;
  font-size: 13px; color: var(--sidebar-text-muted); white-space: nowrap;
  transition: .15s;
}
.dk-action-btn iconify-icon { font-size: 18px; }
.dk-action-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.dk-action-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; margin-left: 4px; cursor: pointer;
  color: var(--sidebar-text-muted); font-size: 22px; transition: .15s;
}
.dk-action-avatar:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile hamburger */
.dk-hamburger {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: var(--sidebar-text-muted); font-size: 22px;
  margin-left: 8px; flex-shrink: 0;
}

/* ============================================================
   SIDE-NAV — 左側常駐圖示側欄（桌面）
   ============================================================ */
.side-nav {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-overlay);
  z-index: 250;
  overflow-y: auto;
  padding: 10px 0;
}
.side-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; font-size: 16px; color: var(--sidebar-text-muted);
  border-left: 3px solid transparent;
  transition: .15s;
  white-space: nowrap;
}
.side-nav-item iconify-icon { font-size: 19px; flex-shrink: 0; }
.side-nav-item span { overflow: hidden; text-overflow: ellipsis; }
.side-nav-item:hover { color: var(--sidebar-text); background: rgba(255,255,255,.08); }
.side-nav-item.is-active {
  color: #fff; background: rgba(76,141,255,.35);
  border-left-color: var(--accent); font-weight: 600;
}
.side-nav-divider { height: 1px; background: rgba(255,255,255,.15); margin: 10px 20px; }

/* ===== Mobile Nav Drawer（沿用抽屜承接同一份導覽內容，與桌面側欄同樣的半透明黑色疊色） ===== */
.mob-nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); z-index: 400;
}
.mob-nav-overlay.is-open { display: block; }
.mob-nav-drawer {
  position: fixed; top: 0; left: -280px; bottom: 0;
  width: 280px; background: var(--sidebar-overlay);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  z-index: 410; transition: left .3s ease;
  overflow-y: auto;
}
.mob-nav-drawer.is-open { left: 0; }
.mnd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.15);
}
.mnd-title { font-size: 16px; font-weight: 700; color: var(--sidebar-text); }
.mnd-close { font-size: 22px; color: var(--sidebar-text-muted); }
.mnd-nav { padding: 8px 0; }

/* ===== Search Overlay (mobile) ===== */
.search-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--bg-page); z-index: 500;
}
.search-overlay.is-open { display: flex; flex-direction: column; }
.search-overlay-inner { padding: 12px 16px; }
.search-bar-row { display: flex; align-items: center; gap: 10px; }
.search-bar {
  flex: 1; display: flex; align-items: center;
  height: 40px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
}
.search-bar-icon { font-size: 18px; color: var(--text-3); margin: 0 10px; flex-shrink: 0; }
.search-bar input {
  flex: 1; height: 100%; border: none; outline: none;
  background: transparent; color: var(--text-1); font-size: 15px;
}
.search-submit-btn {
  padding: 0 16px; height: 40px;
  background: var(--fill); color: #fff; font-size: 14px; font-weight: 600;
}
.search-close-btn { font-size: 22px; color: var(--text-2); flex-shrink: 0; }
.search-hot { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.sh-label { font-size: 13px; color: var(--text-3); width: 100%; }
.sh-tag {
  padding: 5px 14px; background: var(--bg-card);
  border-radius: 20px; font-size: 13px; color: var(--text-2);
  transition: .15s;
}
.sh-tag:hover { background: var(--fill); color: #fff; }

/* ===== History Modal ===== */
.hm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.75); z-index: 600;
  align-items: center; justify-content: center;
}
.hm-overlay.is-open { display: flex; }
.hm-box {
  width: 90%; max-width: 760px; max-height: 80vh;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  display: flex; flex-direction: column;
}
.hm-header {
  display: flex; align-items: center; padding: 14px 20px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.hm-title { flex: 1; text-align: center; font-size: 16px; font-weight: 700; }
.hm-clear { font-size: 13px; color: var(--text-3); }
.hm-clear:hover { color: var(--accent); }
.hm-close { font-size: 20px; color: var(--text-3); }
.hm-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.hm-card { flex: 0 0 calc((100% - 50px) / 6); min-width: 0; display: block; text-decoration: none; color: var(--text-1); }
.hm-thumb { position: relative; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; background: var(--bg-elevated); }
.hm-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .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 .15s; }
.hm-empty { width: 100%; text-align: center; padding: 36px 0; color: var(--text-3); font-size: 13px; }

/* ===== Module: .mod ===== */
.mod {
  padding: 20px; background: var(--bg-card);
  border-radius: var(--radius);
}
.mod + .mod, .mod + .mod-inner, .mod-inner + .mod,
.mod-inner + .mod-inner, .margin-t-20 { margin-top: 20px; }

/* Section header */
.mod-head { display: flex; align-items: center; margin-bottom: 16px; }
.mod-head-title {
  flex: 1; padding-left: 14px; position: relative;
}
.mod-head-title::before {
  content: ""; position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 1px;
}
.mod-head-name { font-size: 20px; font-weight: 700; color: var(--text-1); }
.mod-head-more { font-size: 13px; color: var(--text-3); flex-shrink: 0; transition: color .15s; }
.mod-head-more:hover { color: var(--accent); text-decoration: underline; }
.mod-head-today { font-size: 13px; color: var(--text-2); margin-left: auto; margin-right: 12px; flex-shrink: 0; }
.mod-head-today em { color: var(--accent); font-style: normal; font-weight: 700; }

/* Tab list */
.mod-author-list { display: flex; gap: 8px; flex: 1; margin-left: 16px; }
.mod-author-list li {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 12px;
  background: var(--bg-elevated); border-radius: 13px;
  font-size: 13px; cursor: pointer; transition: .15s; color: var(--text-2);
}
.mod-author-list li:hover,
.mod-author-list li.active { color: #fff; background: var(--fill); }

/* .mod-inner */
.mod-inner { background: var(--bg-card); padding: 20px; border-radius: var(--radius); }
.mod-inner-head { display: flex; align-items: center; margin-bottom: 14px; }
.mod-inner-name {
  font-size: 20px; font-weight: 700; color: var(--text-1);
  padding-left: 12px; position: relative;
}
.mod-inner-name::before {
  content: ""; position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--accent); border-radius: 1px;
}
.mod-inner-more {
  margin-left: auto; font-size: 13px; color: var(--text-3); font-weight: 600;
  flex-shrink: 0; text-decoration: none; transition: color .15s;
}
.mod-inner-more:hover { color: var(--accent); }

/* ===== Breadcrumb ===== */
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 4px; }
/* 麵包屑最後一段（目前頁面名稱）用 <cite> 標籤是為了結構化資料語義（見 CLAUDE.md §24
   point 4），但瀏覽器對 <cite> 有預設的 font-style:italic，要覆寫掉，不然只有最後一段
   會變成斜體、跟前面的連結文字不一致。 */
.breadcrumb cite { font-style: normal; }

/* ===== VOD Grid =====
   卡片維持固定寬度（150px），不用 minmax(...,1fr) 讓卡片跟著容器變寬——
   容器（.container）現在不設 max-width，寬螢幕時應該是「多塞幾欄」而不是
   「卡片被拉得比原本大」，所以欄寬給固定像素，auto-fill 只決定塞得下幾欄，
   欄與欄之間多出的零頭空間留白在最右邊，不強制撐滿最後一欄（見 CLAUDE.md §35）。 */
.video-film-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  justify-content: start;
  gap: 16px 12px;
}
/* --6col 已停用（原本 repeat(6,1fr) 會讓卡片跟著容器寬度拉伸）：
   直接繼承上面 .video-film-list 的固定寬度 auto-fill，寬螢幕時自然顯示超過 6 欄，
   不用另外覆寫 grid-template-columns（見 CLAUDE.md §35）。 */

/* ===== Hot Featured Block (首頁热点資訊) ===== */
.hot-block { display: flex; gap: 14px; height: 350px; }
.hot-feat-card {
  flex-shrink: 0; width: 220px;
  display: block; position: relative; overflow: hidden;
  border-radius: var(--radius); text-decoration: none;
  background: var(--bg-elevated);
}
.hot-feat-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
  transition: transform .35s ease;
}
.hot-feat-card:hover img { transform: scale(1.05); }
.hot-feat-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
}
.hot-feat-name { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.3; display: block; }
/* 固定寬度 auto-fill（185px，即原本 5 欄在 1280px 容器下的實際寬度，見 CLAUDE.md §35）：
   容器不設 max-width 後不能再用 repeat(5,1fr)，那樣寬螢幕下卡片會被拉得又寬又扁
   （使用者回報過這個問題）。改成固定寬度後欄數會隨可用寬度增加，所以模板那邊把
   {maccms:vod num} 從 11 提高到 31，確保有足夠資料可以多開幾欄；固定列高
   grid-auto-rows + overflow:hidden 讓超過 2 排的多餘項目（資料抓多了、但畫面只有
   350px 高放不下）直接被裁掉，不會撐高 .hot-block，維持原本「精選圖＋2 排縮圖」的版面比例。
   168px = 原本 grid-template-rows:repeat(2,1fr) 在 350px 高、扣掉一條 14px row-gap
   後平分兩排的實際高度（(350-14)/2），不是天真地拿 350/2，避免第二排被 overflow:hidden
   多裁掉幾像素。 */
.hot-grid {
  flex: 1; display: grid;
  grid-template-columns: repeat(auto-fill, 185px);
  grid-auto-rows: 168px;
  justify-content: start;
  overflow: hidden;
  gap: 14px 12px;
  list-style: none; padding: 0; margin: 0;
}
.hot-grid .video-item { display: flex; flex-direction: column; min-height: 0; }
.hot-grid .video-cover { aspect-ratio: unset; height: 115px; flex: none; }
.hot-grid .video-con { flex-shrink: 0; padding: 4px 0; }
@media (max-width: 767px) {
  .hot-block { height: auto; }
  .hot-feat-card { display: none; }
  .hot-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; gap: 10px 8px; overflow: visible; }
  /* 桌面版把 {maccms:vod num} 從 11 提高到 31 是為了寬螢幕多開幾欄用的（見上面桌面版
     .hot-grid 的註解），手機版沒有裁切機制（grid-template-rows:auto 不會被 overflow:hidden
     裁掉），資料變多會讓手機版多長出好幾排，所以手機版額外用 nth-child 只保留原本的
     前 10 筆（比照改動前 num=11 扣掉 1 筆精選圖之後手機版原本看到的數量），維持原本手機版版面。 */
  .hot-grid .video-item:nth-child(n+11) { display: none; }
  .hot-grid .video-cover { aspect-ratio: 2/3; flex: unset; }
  .hot-grid .video-con { padding: unset; }
}
/* ================================ */
.video-item { position: relative; min-width: 0; }
.video-cover {
  display: block; position: relative; overflow: hidden;
  background: var(--bg-elevated); border-radius: var(--radius);
  aspect-ratio: 2/3;
}
.video-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .35s ease;
}
.video-item:hover .video-cover img { transform: scale(1.07); }
.video-mask {
  position: absolute; bottom: 0; left: 0; right: 0; height: 55%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.85) 100%);
  pointer-events: none; z-index: 1;
}
.video-badge-tl { position: absolute; top: 0; left: 0; display: flex; gap: 4px; z-index: 2; }
.vbadge { padding: 3px 7px; font-size: 10px; font-weight: 700; line-height: 1.5; }
.vbadge--year { background: rgba(0,0,0,.7); color: rgba(255,255,255,.85); border-radius: 0 0 var(--radius-sm) 0; }
.vbadge--type { background: var(--accent); color: #fff; border-radius: 0 0 var(--radius-sm) 0; }
.video-duration {
  position: absolute; right: 6px; bottom: 6px;
  height: 20px; line-height: 20px; padding: 0 6px;
  color: #fff; font-size: 12px; z-index: 2;
}
.video-tips {
  position: absolute; top: 0; right: 0;
  padding: 0 6px; height: 20px; line-height: 20px;
  font-size: 11px; color: #fff;
  border-radius: 0 var(--radius) 0 var(--radius); z-index: 3;
}
.video-tips.red   { background: linear-gradient(to left, #e5424b 0, #ff8a3d 100%); }
.video-tips.blue  { background: linear-gradient(to left, #4C8DFF 0, #7FB1FF 100%); }
.video-tips.green { background: linear-gradient(to left, #2DD671 0, #58E08E 100%); }
.video-cover::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.35); opacity: 0; transition: opacity .22s; z-index: 2;
}
.video-item:hover .video-cover::after { opacity: 1; }
.video-play-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 44px; height: 44px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; z-index: 3;
  opacity: 0; transition: opacity .22s;
  box-shadow: 0 0 0 6px rgba(76,141,255,.25);
}
.video-item:hover .video-play-icon { opacity: 1; }
.video-con { margin-top: 7px; }
.video-con-tit {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.video-item:hover .video-con-tit { color: var(--accent); }
.video-con-subtitle {
  font-size: 11px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px;
}

/* ===== Mini film list ===== */
.video-mini-film-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px 10px;
}
.video-mini-film-list .video-cover { aspect-ratio: 2/3; border-radius: var(--radius); }

/* ===== Sidebar slide-grid ===== */
.slide-grid { background: var(--bg-card); padding: 16px 14px; border-radius: var(--radius); }
.slide-grid + .slide-grid { margin-top: 16px; }
.slide-grid-title { padding-left: 12px; position: relative; margin-bottom: 10px; }
.slide-grid-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; background: var(--accent); border-radius: 1px;
}
.slide-grid-name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.recent-tag-lists { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.recent-tag-lists a {
  display: inline-block; padding: 3px 10px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 2px;
  font-size: 12px; font-weight: 700; color: var(--text-2); transition: .15s;
}
.recent-tag-lists a:hover { color: #fff; background: var(--fill); border-color: var(--fill); }

/* ===== Search result ===== */
.film-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.film-item .img {
  flex-shrink: 0; width: 90px; height: 126px;
  border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated);
}
.film-item .img img { width: 100%; height: 100%; object-fit: cover; }
.film-item .info { flex: 1; min-width: 0; }
.film-item .title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.film-item .title a:hover { color: var(--accent); }
.film-item .des p { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.film-item .des label { color: var(--text-3); }
.film-item .btn {
  display: inline-flex; align-items: center; margin-top: 10px;
  padding: 6px 16px; background: var(--fill); color: #fff;
  border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: .15s;
}
.film-item .btn:hover { background: var(--fill-hover); color: #fff; }

/* ===== VOD Detail ===== */
.detail { background: var(--bg-card); padding: 20px; border-radius: var(--radius); }
.detail-main { display: flex; gap: 20px; }
.detail-main-left { flex-shrink: 0; width: 200px; }
.detail-main-left .cover {
  position: relative; width: 200px; border-radius: var(--radius);
  overflow: hidden; background: var(--bg-elevated);
}
.detail-main-left .cover img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.detail-main-left label { display: block; margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-3); }
.detail-main-right { flex: 1; min-width: 0; }
.detail-main-right h1 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.intro p { font-size: 13px; color: var(--text-2); line-height: 2; }
.intro label.color-9 { color: var(--text-3); }
.intro-desc { margin-top: 10px; font-size: 13px; color: var(--text-2); line-height: 1.8; }
.detail-main-btn { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-main-btn .btn {
  display: inline-flex; align-items: center;
  padding: 9px 24px; background: var(--fill); color: #fff;
  border-radius: var(--radius); font-size: 14px; font-weight: 700;
  transition: .15s; text-decoration: none; cursor: pointer; border: none;
}
.detail-main-btn .btn:hover { background: var(--fill-hover); color: #fff; }
.detail-main-btn .btn-dl {
  background: var(--accent-muted); color: var(--accent); border: 1px solid var(--accent);
}
.detail-main-btn .btn-dl:hover { background: var(--fill); color: #fff; }
.detail-main-btn .btn-share {
  background: var(--bg-elevated); color: var(--text-2); border: 1px solid var(--border);
}
.detail-main-btn .btn-share:hover { color: var(--accent); border-color: var(--accent); }

/* Episode buttons */
.tv-info-list ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tv-info-list li a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 0; width: 72px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px; color: var(--text-2); transition: .15s;
}
.tv-info-list li a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-muted); }
.tv-info-list li a.cur { color: var(--accent); border-color: var(--accent); font-weight: 700; }

/* ===== Play page ===== */
.tvplay { background: #000; }
.tvplay .inner-main { position: relative; aspect-ratio: 16/9; background: #000; }
.tvplay .inner-main > iframe,
.tvplay .inner-main > div { position: absolute; inset: 0; width: 100%; height: 100%; }
.filmplay-info { padding: 12px 0; }
.filmplay-info-common .title { font-size: 20px; font-weight: 700; }
.filmplay-info-desc { margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* ===== Filter / Show page ===== */
.mod-screen { padding: 4px 0 12px; }
.mod-screen-item { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.mod-screen-label { font-size: 13px; color: var(--text-3); white-space: nowrap; flex-shrink: 0; }
.mod-screen-list { display: flex; flex-wrap: wrap; gap: 4px; }
.mod-screen-link {
  padding: 3px 10px; border-radius: var(--radius);
  font-size: 13px; color: var(--text-2); transition: .15s;
}
.mod-screen-link:hover { color: var(--accent); background: var(--accent-muted); }
.mod-screen-link.cur { color: #fff; background: var(--fill); }

/* Sticky filter bar */
.vod-show-sticky {
  position: sticky; top: var(--topbar-h); z-index: 100;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

/* ============================================================
   HERO — 大圖左 + 熱門片單右（參考 miguvideo 頻道頁）
   ============================================================ */
/* .dk-hero 是滿版 banner：.main-area 因側欄浮層而有 padding-left，
   這裡用等量負 margin 把 hero 拉回貼齊螢幕左右邊（見 CLAUDE.md §22.1／§25），
   下面的 .warp/.container 內容維持原本的置中留白版型，不受影響。
   比照參考網站：桌面版完全去邊——不留 padding、.dk-hero-slides 不設 border-radius，
   讓圖片直接貼齊頂欄下緣與螢幕左右兩側，不要有黑邊/縫隙（使用者截圖回報過）；
   高度也從 440px 調高到 460px，比照參考網站量出來的高度。 */
.dk-hero {
  height: 460px; max-height: 460px;
  margin-left: calc(-1 * var(--sidebar-w));
  width: calc(100% + var(--sidebar-w));
}
.dk-hero-slides {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  background: var(--bg-card);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .5s ease;
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
/* vod_pic 退回方案（沒有 vod_pic_slide 橫版banner圖時）：vod_pic 多半是直式海報，
   直接 cover 會裁掉大半張臉/主體，改用「模糊放大鋪滿底 + 原圖 contain 置中」的雙層作法，
   兩層都靠 background-image:inherit 繼承同一個 .hero-bg 的行內背景圖，不用另外複製一份 URL。 */
.hero-bg--fallback::before,
.hero-bg--fallback::after {
  content: ''; position: absolute; inset: 0;
  background-image: inherit; background-repeat: no-repeat; background-position: center;
}
.hero-bg--fallback::before {
  background-size: cover;
  filter: blur(28px) brightness(.55);
  transform: scale(1.15); /* 放大蓋掉模糊造成的邊緣透空 */
}
.hero-bg--fallback::after { background-size: contain; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.7) 0%, rgba(0,0,0,.15) 45%, transparent 75%),
              linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 55%);
}
/* left 從側欄右緣算起，避免播放/詳情等按鈕被浮在上層的半透明側欄擋住點擊（見 CLAUDE.md §25.2） */
.hero-content {
  position: absolute; bottom: 30px; left: calc(var(--sidebar-w) + 30px); z-index: 2; max-width: 55%;
}
.hero-badges { display: flex; gap: 6px; margin-bottom: 10px; }
.hb {
  display: inline-block; padding: 2px 8px;
  border-radius: 2px; font-size: 11px; font-weight: 700;
}
.hb--year { background: var(--accent); color: #fff; }
.hb--area { background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.25); }
.hero-title { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 8px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hero-meta { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 14px; line-height: 1.5; }
.hero-btns { display: flex; gap: 10px; }
.hero-play-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 22px; background: var(--accent); color: #fff;
  border-radius: 20px; font-size: 14px; font-weight: 700;
  transition: background .15s;
}
.hero-play-btn:hover { background: var(--accent-hover); color: #fff; }
.hero-detail-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.28); border-radius: 20px;
  font-size: 14px; transition: background .15s;
}
.hero-detail-btn:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Hero controls */
.hero-dots {
  position: absolute; bottom: 10px; left: calc(var(--sidebar-w) + 30px); z-index: 3;
  display: flex; gap: 5px;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4); transition: .2s;
}
.hero-dot.is-active { background: var(--accent); width: 20px; border-radius: 3px; }

/* ===== Hero 熱門片單 — 疊在 hero 圖片右上方，不佔獨立欄位（見 CLAUDE.md §25.2） =====
   跟 .hero-title/.hero-badges 一樣，這塊疊在照片上，配色固定用白色系，
   不跟著全站白底配色走（跟 .side-nav 的道理相同：疊在圖片上的東西配色固定）。 */
/* 背景比照參考網站的 .slide-nav：不是純色色塊，是「上下淡出、中段實色」的漸層
   （上緣/下緣 rgba(0,0,0,0) 全透明，11%～92% 是 rgba(0,0,0,.5)），讓面板跟 hero 圖片
   的交界處是柔化的漸層，不是一條生硬的色塊邊界。 */
/* width/padding/top 比照參考網站 .slide-nav 實測數值：230px 寬、上下 padding 20px、
   跟頂欄下緣固定距離 56px（不是百分比、不是靠 flex 置中算出來的，使用者實測拉伸 RWD
   這個距離都不會變，所以這裡直接寫死 56px，不要改成 % 或其他會隨容器高度變動的算法）。
   right 從 16px 調成 70px：右下角固定的 .fab-group（回頂/選單按鈕，見 §38）
   `right:20px` + 按鈕本身 40px 寬，左緣落在離螢幕右邊 60px 處，panel 貼 16px 會跟
   FAB 按鈕視覺上黏在一起（使用者截圖回報）；70px 這個值不是憑空選的，`main.css` 裡
   `.fab-qr-popup`（FAB 的彈出視窗）本來就是用 `right:70px` 來閃避同一組 FAB 按鈕，
   這裡沿用同一個既有慣例，不要改成其他數字。 */
.dk-hero-panel {
  position: absolute; top: 56px; right: 70px; bottom: 16px;
  width: 230px; z-index: 5;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.5) 11%,
    rgba(0,0,0,.5) 92%,
    rgba(0,0,0,0) 100%);
  padding: 20px 0;
  border-radius: 8px;
  display: flex; flex-direction: column; overflow: hidden;
}
/* overflow-x:hidden 是關鍵：只設 overflow-y:auto 的話，瀏覽器會把 overflow-x 隱性算成
   auto（CSS 規範規則），.php-item 的 hover/is-active transform:scale(1.06) 又會讓內容
   的可捲動範圍稍微超出容器寬度，兩者疊加就會在面板底部多冒出一條水平捲軸；
   scrollbar-width/::-webkit-scrollbar 則是把「上下捲動」這個功能保留，但不顯示捲軸外觀
   （比照 .rail-track／.actor-hot-scroll 既有的隱藏捲軸寫法），參考網站的原始片單面板
   本來就看不到任何捲軸。 */
.dk-hero-panel-list {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.dk-hero-panel-list::-webkit-scrollbar { display: none; }
.php-item {
  display: block;
  padding: 8px 16px;
  transition: background .15s, transform .15s;
  transform-origin: left center;
}
.php-item-title {
  display: block; font-size: 13px; color: rgba(255,255,255,.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s, font-size .15s;
}
/* 副標題只在目前播放中／hover 時才顯示（見 CLAUDE.md §34） */
.php-item-sub {
  display: none; font-size: 11px; color: rgba(211,211,211,1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.php-item.is-active,
.php-item:hover {
  transform: scale(1.06);
}
/* 比照參考網站：hover/is-active 的片名字級放大到 20px、顏色用參考站實際的
   #007aff（不是共用的 var(--accent) #4C8DFF，兩者色號不同，這裡指定成參考站的原色，
   不動全站共用的 --accent 變數，避免牽動其他地方）。 */
.php-item.is-active .php-item-title,
.php-item:hover .php-item-title {
  color: #007aff; font-weight: 700; font-size: 20px;
}
.php-item.is-active .php-item-sub,
.php-item:hover .php-item-sub {
  display: block;
}

/* ============================================================
   RAIL — 橫向捲動片單列（見 CLAUDE.md §23）
   ============================================================ */
/* 左右 padding 對齊下方 .mod 區塊的實際內縮（.mod 本身 padding:20px），
   否則 rail 沒有這層 padding 會比下面的卡片區塊「寬」，兩者內容邊界對不齊。 */
.rail { padding: 0 20px; }
/* 跟下一個區塊的間距縮小：.mod 本身有 20px 內距 + margin-top:20px，疊在一起會顯得
   rail 跟下面區塊隔太遠，這裡用相鄰選擇器把間距收窄，不動其餘區塊彼此的間距。 */
.rail + .margin-t-20 { margin-top: 8px; }
.rail-head { display: flex; align-items: center; margin-bottom: 14px; }
.rail-title { font-size: 20px; font-weight: 700; color: var(--text-1); }
.rail-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.rail-counter { font-size: 12px; color: var(--text-3); }
.rail-counter .cur { color: var(--text-1); font-weight: 700; }
.rail-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 14px; transition: .15s;
}
.rail-arrow:hover { color: #fff; background: var(--fill); border-color: var(--fill); }
.rail-arrow[disabled] { opacity: .35; pointer-events: none; }
.rail-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
  padding-bottom: 4px; scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.rail-track::-webkit-scrollbar { display: none; }
/* min-width:0 是關鍵：flex item 預設 min-width:auto，若卡片內文字用 white-space:nowrap
   （.rail-card-title 就是），瀏覽器會把「文字完整不換行的寬度」當成這個 flex item 的最小寬度，
   標題一長，卡片就會被撐開超過 flex-basis(165px)，變成畫面上「某張卡片異常寬大」的爆版。
   加 min-width:0 讓 flex-basis 才是實際寬度，標題的 overflow:hidden/ellipsis 才會生效。 */
/* 桌面版改回固定寬度 165px（見 CLAUDE.md §35）：.container 現在不設 max-width，
   若卡片寬度繼續用「容器寬度等分 6 份」的算法，容器變寬時卡片會被拉得比原本大很多，
   跟「維持原本卡片寬度、多出的寬度拿來塞更多欄」的需求矛盾。改回固定寬度後，
   螢幕右緣可能會露出一張被切一半的下一張卡片——這是刻意的取捨（意味著還可以往右滑），
   不是 bug，跟 v9/v10 修的「等分寫法沒設好、單一卡片被撐爆」是不同情境，不要混為一談改回等分。 */
.rail-card { flex: 0 0 165px; min-width: 0; scroll-snap-align: start; }
.rail-card-thumb {
  position: relative; aspect-ratio: 2/3; border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card);
}
.rail-card-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s ease;
}
.rail-card:hover .rail-card-thumb img { transform: scale(1.06); }
.rail-card-badge {
  position: absolute; right: 6px; bottom: 6px;
  padding: 2px 7px; font-size: 11px; color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.6); border-radius: 3px;
}
.rail-card-title {
  margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--text-1);
  transition: color .15s;
}
.rail-card:hover .rail-card-title { color: var(--accent); }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-page); border-top: 1px solid var(--border);
  padding: 24px 0; text-align: center;
  color: var(--text-3); font-size: 13px;
}
.site-footer p { margin: 4px 0; line-height: 1.8; }
.site-footer a { color: var(--text-3); transition: color .15s; }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 10px 0; }

/* ===== FAB ===== */
.fab-group {
  position: fixed; right: 20px; bottom: 80px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
}
.fab-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-2); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.fab-btn:hover { background: var(--fill); border-color: var(--fill); color: #fff; }
.fab-qr-popup {
  display: none; position: fixed; right: 70px; bottom: 120px; z-index: 101;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; text-align: center;
  font-size: 13px; color: var(--text-2); box-shadow: var(--shadow-card);
}
.fab-qr-popup img { width: 100px; height: 100px; margin: 8px auto 0; }

/* ===== Mobile tabbar ===== */
.mobile-tabbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: var(--bg-card);
  border-top: 1px solid var(--border); z-index: 350;
  justify-content: space-around; align-items: center;
}
.mtb-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  font-size: 11px; color: var(--text-3); padding: 6px 0;
  transition: color .15s;
}
.mtb-item iconify-icon { font-size: 22px; }
.mtb-item:hover, .mtb-item.is-active { color: var(--accent); }

/* ===== Auth page (user/login, user/reg — 獨立頁面版本，重用 login-modal-box 樣式) ===== */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--topbar-h)); padding: 40px 16px;
}
.auth-page .login-modal-box { width: 380px; max-width: 100%; }
.auth-page .jump-error { padding: 10px 20px 0; font-size: 13px; color: var(--accent); }

/* ===== Login / Logout Modal ===== */
.login-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.75); z-index: 700;
  align-items: center; justify-content: center;
}
.login-modal-overlay.is-open { display: flex; }
.login-modal-box {
  width: 360px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; position: relative;
}
.login-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.login-modal-title { font-size: 16px; font-weight: 700; }
.modal-close-btn { font-size: 20px; color: var(--text-3); }
.login-modal-body { padding: 24px 20px; }
.login-form-group { margin-bottom: 14px; }
.login-form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.login-form-group input {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-1); font-size: 14px; outline: none;
}
.login-form-group input:focus { border-color: var(--accent); }
.login-submit {
  width: 100%; height: 42px;
  background: var(--fill); color: #fff;
  border-radius: var(--radius); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .15s; border: none;
}
.login-submit:hover { background: var(--fill-hover); }
.login-footer-links { margin-top: 12px; display: flex; justify-content: space-between; font-size: 13px; }
.login-footer-links a { color: var(--text-3); }
.login-footer-links a:hover { color: var(--accent); }

/* ===== Rank Widget ===== */
.rank-home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rank-col { }
.rank-col-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--text-1);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.rank-top-item {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 10px;
}
.rank-top-cover {
  flex-shrink: 0; width: 72px; border-radius: var(--radius);
  overflow: hidden; position: relative; aspect-ratio: 2/3;
  background: var(--bg-elevated);
}
.rank-top-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-top-crown { position: absolute; top: 4px; left: 4px; font-size: 15px; color: #F0B429; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.rank-top-info { flex: 1; min-width: 0; }
.rank-top-num {
  font-size: 22px; font-weight: 900; line-height: 1;
  color: var(--rank-1); margin-bottom: 4px;
}
.rank-top-name {
  font-size: 13px; font-weight: 700; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-top-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.rank-top-status { font-size: 11px; color: var(--score-mid, #85c13a); margin-top: 2px; }
.rank-top-hits { font-size: 12px; color: var(--accent); margin-top: 5px; display: flex; align-items: center; gap: 3px; }
.rank-list-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.rank-list-item:last-child { border-bottom: none; }
.rank-num {
  width: 20px; text-align: center; font-size: 13px; font-weight: 700;
  flex-shrink: 0; color: var(--text-3);
}
.rank-num.is-1 { color: var(--rank-1); }
.rank-num.is-2 { color: var(--rank-2); }
.rank-num.is-3 { color: var(--rank-3); }
.rank-name {
  flex: 1; min-width: 0;
  font-size: 13px; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-name:hover { color: var(--accent); }
.rank-hits { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.rank-more { display: block; text-align: center; font-size: 13px; color: var(--text-3); margin-top: 8px; transition: color .15s; }
.rank-more:hover { color: var(--accent); text-decoration: underline; }
/* sidebar rank — vod/play, vod/detail */
.rank-col-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.rank-col-more { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: auto; transition: color .15s; }
.rank-col-more:hover { color: var(--accent); text-decoration: underline; }
.rank-top1 { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; text-decoration: none; }
.rt1-thumb { flex-shrink: 0; width: 90px; border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 2/3; background: var(--bg-elevated); }
.rt1-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt1-crown { position: absolute; top: 4px; left: 4px; font-size: 15px; color: #F0B429; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.rt1-info { flex: 1; min-width: 0; }
.rt1-name { font-size: 13px; font-weight: 700; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 4px; display: block; }
.rt1-meta { font-size: 11px; color: var(--text-3); margin: 0 0 2px; }
.rt1-status { font-size: 11px; color: var(--score-mid, #85c13a); margin: 0 0 4px; }
.rt1-hits { font-size: 12px; color: var(--accent); display: flex; align-items: center; gap: 3px; }
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-li { border-bottom: 1px solid var(--border); }
.rank-li:last-child { border-bottom: none; }
.rank-li-inner { display: flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; }
.rl-num { width: 20px; text-align: center; font-size: 13px; font-weight: 700; flex-shrink: 0; color: var(--text-3); }
.rl-num--gold { color: var(--rank-1, #f5a623); }
.rl-num--silver { color: var(--rank-2, #9e9e9e); }
.rl-num--bronze { color: var(--rank-3, #cd7f32); }
.rl-name { flex: 1; min-width: 0; font-size: 13px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.rank-li-inner:hover .rl-name { color: var(--accent); }
.rl-hits { font-size: 12px; color: var(--text-3); flex-shrink: 0; }

/* ===== Art card ===== */
.art-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }
.art-card { display: flex; gap: 10px; align-items: flex-start; }
.art-card-cover { flex-shrink: 0; width: 80px; height: 54px; border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); }
.art-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.art-card-info { flex: 1; min-width: 0; }
.art-card-title {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s;
}
.art-card-title:hover { color: var(--accent); }
.art-card-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ===== Topic card ===== */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.topic-card { display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--bg-card); transition: transform .2s; }
.topic-card:hover { transform: translateY(-2px); }
.topic-card-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.topic-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.topic-card:hover .topic-card-thumb img { transform: scale(1.05); }
.topic-card-name {
  padding: 8px 10px;
  font-size: 13px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.topic-card:hover .topic-card-name { color: var(--accent); }
.sidebar-topic-grid { display: flex; flex-direction: column; gap: 10px; }
.topic-card-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; font-size: 24px; color: #fff; }
.topic-card:hover .topic-card-overlay { opacity: 1; }
.topic-card-count { position: absolute; bottom: 6px; right: 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,.65); padding: 2px 6px; border-radius: 3px; }
.topic-card-body { padding: 6px 10px; }
.topic-card-title { font-size: 13px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; transition: color .15s; }
.topic-card:hover .topic-card-title { color: var(--accent); }

/* ===== Actor card ===== */
.actor-card { text-align: center; }
.actor-card-cover {
  border-radius: 50%; overflow: hidden; aspect-ratio: 1/1;
  background: var(--bg-elevated); margin-bottom: 6px;
}
.actor-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.actor-card-name { font-size: 13px; color: var(--text-1); }

/* ===== Comment ===== */
.comment-form { margin-bottom: 20px; }
.comment-form textarea {
  width: 100%; height: 80px; padding: 10px 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-1); font-size: 14px;
  resize: vertical; outline: none;
}
.comment-form textarea:focus { border-color: var(--accent); }
.comment-submit {
  margin-top: 8px; padding: 8px 24px;
  background: var(--fill); color: #fff; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.comment-submit:hover { background: var(--fill-hover); }
.comment-list { }
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-meta { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.comment-text { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; color: var(--text-2); transition: .15s;
}
.page-btn:hover { color: var(--accent); border-color: var(--accent); }
.page-btn.cur { background: var(--fill); border-color: var(--fill); color: #fff; font-weight: 700; }

/* ===== Content-block animate ===== */
.content-block.will-observe { opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .4s ease; }
.content-block.will-observe.is-visible { opacity: 1; transform: none; }

/* ===== Utility ===== */
.ellipsis-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ellipsis-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.clearfix::after { content: ""; display: table; clear: both; }
.shadow { box-shadow: var(--shadow-card); }
.color-9 { color: var(--text-3); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root { --container-w: 100%; --sidebar-w: 0px; }
  .side-nav { display: none; }
  .dk-brand { width: auto; padding: 0 10px 0 16px; }
  .dk-search { width: 240px; }
  .dk-action-btn span { display: none; }
  .rank-home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  :root { --topbar-h: 54px; }
  .dk-search { display: none; }
  .dk-action-btn { display: none; }
  .dk-hamburger { display: flex !important; }
  #searchToggle { display: flex !important; }
  .dk-hero { flex-direction: column; height: auto; padding: 10px 12px 0; }
  .dk-hero-slides { height: 210px; flex: none; border-radius: 8px; }
  .dk-hero-panel { display: none; }
  /* 手機版 banner 只留圖，文字/按鈕都藏起來，整張圖點擊直接跳轉（heroTap，見 §28） */
  .hero-badges, .hero-title, .hero-meta, .hero-btns { display: none; }
  .hero-slide { cursor: pointer; }
  .mobile-tabbar { display: flex; }
  .page-content { padding-bottom: 56px; }
  .video-film-list { grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
  .rank-home-grid { grid-template-columns: repeat(2, 1fr); }
  .art-home-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .page-body { flex-direction: column; }
  .mian-sidebar { width: 100%; }
  .main-inner { max-width: calc(100vw - 32px); }
  .detail-main { flex-direction: column; }
  .detail-main-left { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .detail-main-left .cover { width: 160px; }
  .detail-main-right { width: 100%; }
  /* 手機版一次剛好顯示 3 張卡片（含 2 個 14px 間距）；.rail 的 padding 維持跟 .mod 一致，不縮小 */
  .rail-card { flex: 0 0 calc((100% - 28px) / 3); }
}
@media (max-width: 480px) {
  .video-film-list { grid-template-columns: repeat(3, 1fr); }
  .art-home-grid, .topic-grid { grid-template-columns: 1fr; }
  .rank-home-grid { grid-template-columns: 1fr; }
  .rank-top-cover { width: 110px; }
  .rank-top-name { font-size: 14px; }
  .hm-card { flex: 0 0 calc((100% - 20px) / 3); }
}

/* ===== 資訊列表 art/type ===== */
.art-list { display: flex; flex-direction: column; }
.art-list-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.art-list-item:last-child { border-bottom: none; }
.ali-thumb { flex-shrink: 0; width: 140px; }
.ali-thumb a { display: block; }
.ali-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.ali-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ali-title { font-size: 15px; font-weight: 700; color: var(--text-1); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ali-title:hover { color: var(--accent); }
.ali-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.ali-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-3); }
.ali-meta iconify-icon { font-size: 13px; vertical-align: -2px; }
@media (max-width: 480px) {
  .ali-thumb { width: 100px; }
  .ali-title { font-size: 13px; }
}

/* ===== 廣告區塊 ===== */
.site-ad {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.site-ad::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--fill);
}
.site-ad--sidebar { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 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(--fill); margin-bottom: 2px; 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: 5px 12px; background: var(--fill); color: #fff; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; white-space: nowrap; transition: .18s; text-decoration: none; }
.site-ad-btn:hover { opacity: 0.85; color: #fff; }
