/* 仅供屏幕阅读器使用的隐藏文字（不影响视觉呈现） */
.dg-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;
}

/* CSS Variables & Reset：token 表实测自 https://safilm69.com/（2026-09-15，见 docs/STYLE_CLONE_SOP.md §2） */
:root {
  /* 主色：暖橙（实测 --el-color-primary/--accent-color，全站按钮/链接hover/选中态/评分数字唯一强调色） */
  --accent: #ff7231;
  --accent-light: rgba(255, 114, 49, 0.14);
  --accent-hover: #ff8c54;
  --accent-active: #e35a1a;
  /* 次强调色：沿用既有红（目标站未见明显独立红色徽章体系，保留供更新集数徽章使用） */
  --accent-red: #e6322e;
  --accent-red-light: rgba(230, 50, 46, 0.16);
  --accent-red-hover: #ff4d47;
  --accent-red-active: #c22622;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-light: rgba(255, 255, 255, 0.85);
  /* 页面底色：实测 --bg-color，非纯黑的深炭灰 */
  --bg: #16161a;
  /* 卡片/面板底色：实测 --card-bg/--panel-color/--container-bg 统一值 */
  --bg-white: #1a1c1f;
  --bg-light: #131316;
  /* hover/填充层：实测 --el-fill-color-light/--filter-btn-bg/--search-btn-bg */
  --bg-elev: #363839;
  --bg-modal: #1a1c1f;
  --border: rgba(255, 255, 255, 0.1);
  --border-mid: rgba(255, 255, 255, 0.16);
  /* 圆角：实测 --el-border-radius-base(4px)/--border-radius-xl(8px) */
  --radius: 4px;
  --radius-lg: 8px;
  /* 阴影：实测 --el-box-shadow（多层淡阴影，非重黑投影） */
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.08), 0 12px 32px 4px rgba(0, 0, 0, 0.04);
  /* 评分专用绿色：目标站评分数字沿用主色橙，本站保留独立绿色供非评分场景区隔用 */
  --score-green: #6dd47e;
  /* 容器最大寬度：比照 Bootstrap 斷點階梯 (sm/md/lg/xl/xxl) */
  --max-w: 540px;
}

@media (min-width: 768px) {
  /* 768px 断点容器宽度调高，让 iPad 直向（768~834px 常见宽度）不会留白过多 */
  :root { --max-w: 760px; }
}
@media (min-width: 992px) {
  :root { --max-w: 960px; }
}
@media (min-width: 1200px) {
  :root { --max-w: 1140px; }
}
@media (min-width: 1400px) {
  :root { --max-w: 1320px; }
}
@media (min-width: 1600px) {
  /* 宽屏卡片网格加侧栏，容器需再放宽避免卡片过窄 */
  :root { --max-w: 1520px; }
}
@media (min-width: 1920px) {
  :root { --max-w: 1760px; }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.mac-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  /* 挡首页头图 100vw 破格带出的水平捲动；放 body 而非 .dg-page-shell，避免 sticky header 失效 */
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

.dg-page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dg-page-shell > * {
  width: 100%;
  min-width: 0;
}

.dg-text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== HEADER ===== */
.dg-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.2s;
}

/* 页面切换读取条：header.js 控制 width/opacity，宽度变化需要 transition，
   opacity 淡出用较短时间避免完成后停留过久 */
.dg-page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-active), var(--accent) 35%, var(--accent-hover) 65%, #ffd8a8);
  z-index: 200;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.2s ease;
}

.dg-page-progress.dg-is-active {
  opacity: 1;
}

.dg-header-desktop {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* 首页 hero：header 透明叠在图片上，背景随 .dg-is-header-scrolled 切实色（见 .dg-home-hero） */
.dg-site-header--hero .dg-header-desktop {
  background: transparent;
  border-bottom-color: transparent;
}

.dg-is-header-scrolled .dg-site-header--hero .dg-header-desktop {
  background: var(--bg);
  border-bottom-color: var(--border);
}

.dg-site-header--hero .dg-header-mobile {
  background: transparent;
  border-bottom-color: transparent;
}

.dg-is-header-scrolled .dg-site-header--hero .dg-header-mobile {
  background: var(--bg-white);
  border-bottom-color: var(--border);
}

.dg-header-inner {
  /* 满版排列：logo / nav-search 群组 / actions 三者 space-between 分居两端与中间；
     左右缩排对齐下方 .dg-home-content 卡片区块（同 max-width + 居中） */
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 主导览 + 搜寻框合并群组：靠左紧贴 logo，群组内两者留一点间距；
   margin-right:auto 把剩余空间推给右侧，让 dg-header-actions 贴右 */
.dg-header-nav-search {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 680px;
  gap: 20px;
  margin-left: 12px;
  margin-right: auto;
}

.dg-brand-block {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.dg-brand-block.dg-logo {
  display: block;
  width: 120px;
  height: 40px;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  overflow: hidden;
  opacity: 1;
  transition: width 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}

/* 主导览：单一下拉触发钮，悬停/聚焦展开面板 */
.dg-main-nav {
  position: relative;
  flex-shrink: 0;
}

.dg-nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--text);
  border-radius: 999px;
  transition: background 0.15s;
}

.dg-main-nav.dg-is-open .dg-nav-drop-btn {
  background: var(--bg-elev);
}

.dg-nav-drop-btn .mac-icon {
  font-size: 14px;
  transition: transform 0.15s;
}

.dg-main-nav.dg-is-open .dg-nav-drop-btn .mac-icon {
  transform: rotate(180deg);
}

.dg-main-nav-list {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 6px;
  margin: 0;
  z-index: 120;
  min-width: 140px;
}

.dg-main-nav.dg-is-open .dg-main-nav-list {
  display: block;
}

/* 只限真支援 hover 的滑鼠装置；触控装置的 :hover 会黏着不清除，
   改靠 header.js 的 dg-is-open 控制，否则平板会打不开/关不掉 */
@media (hover: hover) and (pointer: fine) {
  .dg-nav-drop-btn:hover,
  .dg-main-nav:hover .dg-nav-drop-btn,
  .dg-main-nav:focus-within .dg-nav-drop-btn {
    background: var(--bg-elev);
  }

  .dg-main-nav:hover .dg-nav-drop-btn .mac-icon,
  .dg-main-nav:focus-within .dg-nav-drop-btn .mac-icon {
    transform: rotate(180deg);
  }

  .dg-main-nav:hover .dg-main-nav-list,
  .dg-main-nav:focus-within .dg-main-nav-list {
    display: block;
  }
}

.dg-main-nav-list-inner {
  background: var(--bg-modal);
  border-radius: 5px;
  padding: 6px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.dg-main-nav-list li {
  list-style: none;
}

.dg-main-nav a {
  position: relative;
  display: block;
  padding: 9px 20px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.dg-main-nav a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.dg-main-nav a.dg-active {
  color: var(--accent);
  font-weight: 600;
}

/* 实测目标站现役导览项底部短线标注 */
.dg-main-nav a.dg-active::after {
  content: '';
  position: absolute;
  left: 20px;
  bottom: 4px;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

/* 二级子分类飞出面板：header.html 已预先侦测有无子分类，
   没有子分类的项目不会带这个 class，也不会输出箭头/面板 */
.dg-has-sub {
  position: relative;
}

.dg-main-nav-sub-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.dg-main-nav-sub {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  padding-left: 6px;
  z-index: 121;
}

.dg-has-sub:focus-within > .dg-main-nav-sub {
  display: block;
}

/* 触控装置无法触发 mouseleave，:hover 点击后会黏住关不掉，只给真滑鼠装置加 hover 展开 */
@media (hover: hover) and (pointer: fine) {
  .dg-has-sub:hover > .dg-main-nav-sub {
    display: block;
  }
}

/* 触控装置（平板等）没有 hover，改由 header.js 拦截第一次点击、加上此 class 展开子分类 */
.dg-has-sub.dg-sub-open > .dg-main-nav-sub {
  display: block;
}

.dg-main-nav-sub-inner {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 2px 18px;
  margin: 0;
  padding: 10px 14px;
  background: var(--bg-modal);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* 只有一个子分类时不产生第二栏空白 */
.dg-main-nav-sub-inner:has(li:only-child) {
  grid-template-columns: max-content;
}

.dg-main-nav-sub-inner li {
  list-style: none;
}

.dg-main-nav-sub-inner a {
  padding: 9px 6px;
  white-space: nowrap;
}

.dg-header-actions {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.dg-header-actions .dg-ha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    color: var(--text);
    font-size: 19px;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

.dg-header-actions .dg-ha-btn:hover {
    color: var(--accent);
    background: var(--bg-elev);
}

.dg-header-actions .dg-ha-btn.dg-active {
    color: var(--accent);
}

/* 「看过」按钮：图示 + 文字垂直堆叠（实测目标站 header 右侧写法，比例换算贴合本站 64px header） */
.dg-header-actions .dg-ha-btn--stack {
    width: auto;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    border-radius: 0;
    font-size: 18px;
    padding: 0 8px;
}

.dg-header-actions .dg-ha-btn--stack span {
    font-size: 12px;
    color: var(--text);
}

.dg-header-actions .dg-ha-btn--stack:hover {
    background: none;
}

.dg-header-actions .dg-ha-btn--stack:hover span {
    color: var(--accent);
}

/* 登录按钮：圆角胶囊、白底深字（实测截图：78x36px 白色实心底，非透明边框） */
.dg-header-actions .dg-ha-btn--pill {
    width: auto;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    gap: 6px;
}

.dg-header-actions .dg-ha-btn--pill .mac-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dg-header-actions .dg-ha-btn--pill:hover {
    background: var(--accent);
    color: #fff;
}

.dg-header-actions-mobile .dg-ham-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-elev);
    font-size: 16px;
    transition: background 0.15s;
    text-decoration: none;
}

.dg-header-actions-mobile .dg-ham-btn:hover {
    background: var(--accent-light);
}

/* ── 搜寻框：圆形玻璃感药丸搜寻栏 ── */
.dg-search-box {
  position: relative;
  flex: 1 1 auto;
  max-width: 560px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  transition: background 0.15s;
}

.dg-search-box:focus-within {
  background: rgba(255, 255, 255, 0.16);
}

.dg-search-box input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  border: none;
  border-radius: 999px;
  background: transparent;
  padding: 0 40px 0 18px;
  outline: none;
  font-size: 14px;
  color: var(--text);
}

.dg-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.dg-search-submit-btn {
  position: absolute;
  top: 0;
  right: 4px;
  width: 32px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  transition: color 0.15s;
}

.dg-search-submit-btn:hover {
  color: var(--accent);
}

.dg-search-submit-btn:active {
  color: var(--accent-active);
  transform: scale(0.95);
}

/* ===== 搜索下拉面板：历史搜索（localStorage）+ 热门搜索 ===== */
.dg-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 260px;
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  z-index: 20;
}
.dg-search-panel[hidden] { display: none; }

.dg-sp-block + .dg-sp-block { margin-top: 12px; }

.dg-sp-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.dg-sp-clear {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.dg-sp-clear:hover { color: var(--accent); }

/* 序列式列表：一行一条，左侧序号（见 skill 强制18.2，不做横排胶囊/标签云） */
.dg-sp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dg-sp-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius);
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.dg-sp-item:hover { background: var(--bg-elev); }
.dg-sp-num {
  min-width: 14px;
  font-size: 11px;
  color: var(--text-muted);
}

/* 热门搜索前三名比照排行榜 .dg-rank-badge--1/2/3 红/橙/黄配色；
   历史搜索是使用者自己的搜寻纪录（按时间新到旧排序，非热度排名），不套用此配色 */
[data-hot-list] li:nth-child(1) .dg-sp-num { color: #df0a25; }
[data-hot-list] li:nth-child(2) .dg-sp-num { color: #df642b; }
[data-hot-list] li:nth-child(3) .dg-sp-num { color: #fcc400; }
.dg-sp-word {
  font-size: 13px;
  color: var(--text-light);
  transition: color 0.15s;
}
.dg-sp-item:hover .dg-sp-word { color: var(--accent); }

/* ===== 首页内容区 ===== */
.dg-home-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 20px 48px;
  --home-pt: 14px;
}

.dg-content-block {
  margin-bottom: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 20px 20px;
}

/* 热播推荐不套用 .dg-content-block 的白底/圆角/阴影，仅保留区块间距 + 左右 padding
   （与其他 .dg-content-block 区块的左右 20px 对齐，标题/内容才能上下对齐） */
.dg-hot-section {
  margin: 28px 0 24px;
  padding: 0 20px;
}

.dg-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dg-section-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dg-sh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 13px;
  flex-shrink: 0;
}

.dg-sh-icon--fire {
  background: var(--accent-light);
}

.dg-sh-icon--news {
  background: rgba(59, 130, 246, 0.16);
}

.dg-sh-icon--movie {
  background: rgba(139, 92, 246, 0.16);
}

.dg-sh-icon--tv {
  background: rgba(34, 197, 94, 0.16);
}

.dg-sh-icon--show {
  background: rgba(251, 191, 36, 0.16);
}

.dg-sh-icon--anime {
  background: rgba(236, 72, 153, 0.16);
}

.dg-sh-icon--short {
  background: var(--accent-light);
}

.dg-sh-icon--doc {
  background: rgba(6, 182, 212, 0.16);
}

.dg-sh-icon--topic {
  background: rgba(249, 115, 22, 0.16);
}

.dg-sh-icon--rank {
  background: rgba(245, 166, 35, 0.16);
}

.dg-sh-badge {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}

.dg-sh-badge em {
  font-style: normal;
  background: var(--accent-red);
  color: #fff;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
}

.dg-section-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
}

.dg-section-breadcrumb a {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dg-section-breadcrumb a:hover {
  color: var(--accent);
}

.dg-section-breadcrumb a:first-child {
  color: var(--text-light);
  font-weight: 500;
}

.dg-refresh-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elev);
  flex-shrink: 0;
  white-space: nowrap;
}

.dg-refresh-btn:hover {
  color: var(--accent);
  background: var(--accent-light);
}

/* ===== 首页面板标头（仅用于首页各面板，独立于 .dg-section-header） ===== */
.dg-pannel-hd {
  position: relative;
  height: 40px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dg-pannel-hd-title {
  display: flex;
  align-items: center;
  margin: 0;
  padding-right: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  flex-shrink: 0;
  min-width: 0;
}

.dg-pannel-hd-title .mac-icon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  color: var(--accent);
  flex-shrink: 0;
}

.dg-pannel-hd-right {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.dg-pannel-hd-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
  color: var(--text-muted);
}

.dg-pannel-hd-more:hover {
  color: var(--accent);
}

/* 子分类快速连结：仅桌机 ≥1200px 显示 */
.dg-pannel-hd-sub {
  display: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.dg-pannel-hd-sub li {
  display: flex;
  align-items: center;
  line-height: 1;
}

.dg-pannel-hd-sub li:nth-child(n+10) {
  display: none;
}

.dg-pannel-hd-sub a {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dg-pannel-hd-sub a:hover {
  color: var(--accent);
}

.dg-pannel-hd-sub .dg-split-line {
  display: inline-block;
  margin: 0 12px;
  width: 1px;
  height: 14px;
  background: var(--border-mid);
}

/* ===== 面板容器 + 选集列表（共用于 vod/detail、vod/play，见 widget/playlist） ===== */
.dg-pannel-box {
  margin-bottom: 32px;
}

.dg-pannel-box .dg-pannel-hd {
  margin-bottom: 14px;
}

/* 选集列表：来源分页放在标头右侧 */
.dg-playlist-sources {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.dg-source-tab {
  font-size: 13px;
  color: var(--text-light);
  background: none;
  border: none;
  padding: 0 0 2px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.dg-source-tab.dg-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.dg-playlist-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0;
  text-align: center;
}

.dg-playlist-panel        { display: none; }
.dg-playlist-panel.dg-active { display: block; }

/* 选集网格：与播放页 .dg-pw-episode-grid 统一为胶囊网格，固定收纳 4 排半高度，超出滚轮滑动
   10 栏 × 34px 胶囊 × 4 + 3 排距(10px) + 半颗胶囊(17px) + 半排距(5px) = 188px */
.dg-playlist-episodes-wrap {
  max-height: 188px;
  overflow-y: auto;
  padding-right: 10px;
}

.dg-playlist-episodes-wrap::-webkit-scrollbar {
  width: 6px;
}

.dg-playlist-episodes-wrap::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 999px;
}

.dg-playlist-episodes-wrap::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.dg-playlist-episodes {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
}

/* 选集按钮：与播放页 .dg-pw-episode 统一为圆角胶囊 */
.dg-episode {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 34px;
  padding: 0 6px;
  border-radius: 17px;
  background: var(--bg-elev);
  color: var(--text);
  border: none;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dg-episode:hover { color: var(--accent); }
.dg-episode.dg-active {
  background: var(--accent);
  color: #14120a;
  font-weight: 700;
}

@media (max-width: 1199px) {
  .dg-playlist-episodes { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 767px) {
  .dg-playlist-episodes { grid-template-columns: repeat(4, 1fr); }

  .dg-episode { font-size: 12px; }

  .dg-pannel-box .dg-pannel-hd {
    height: auto;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .dg-playlist-sources {
    gap: 16px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dg-playlist-sources::-webkit-scrollbar {
    display: none;
  }

  .dg-source-tab {
    flex-shrink: 0;
  }
}

@media (max-width: 479px) {
  .dg-playlist-episodes { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .dg-pannel-hd-sub {
    display: flex;
  }
}

/* ===== 热播推荐：单排横向可滑动清单 + 左右箭头（比照目标站「最新更新」） ===== */
/* 桌面：箭头各自佔一栏宽度、与卡片列并排，不重叠压在卡片上；
   平板/手机（见 max-width: 1024px 覆写）改回叠加悬浮在卡片列边缘，
   让卡片列拉满版面宽度 */
.dg-hot-scroll-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dg-hot-track {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 10px;
  /* 上下 padding 预留 hover scale(1.25) 放大所需空间，避免放大后顶到
     上方标题行/下方相邻区块（见强制 11.8，overflow-y 只负责不裁切，
     没有足够留白视觉上仍会贴到邻近内容）；用等值负 margin 抵消，
     不改变 .dg-hot-scroll-wrap 的原本高度（.dg-hot-scroll-btn 的
     top/bottom 是相对 wrap 定位，位置不受影响），非 hover 时视觉上无变化 */
  padding: 60px 2px 64px;
  margin: -58px 0 -62px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

/* 卡片 hover 时用 transform:scale 放大，会被本身的 overflow-x:auto 裁掉；
   悬停在任一卡片上时放行纵向溢出（见强制 11.8）。
   横向 overflow-x 永远保持 auto、不可切换成其他值——
   切成 visible 会连带露出右侧本该被横向捲动裁掉、还没滑到的卡片；
   切成 clip/hidden 会让该轴失去捲动容器身份，
   hover 瞬间 scrollLeft 被浏览器归零，画面跳回最左侧、点击命中错位 */
@media (hover: hover) and (pointer: fine) {
  .dg-hot-track:has(.dg-vod-card:hover) {
    overflow-y: visible;
  }
}

.dg-hot-track::-webkit-scrollbar {
  display: none;
}

.dg-hot-track > .dg-vod-card {
  flex: 0 0 calc((100% - 50px) / 6);
}

.dg-hot-scroll-btn {
  flex: 0 0 auto;
  z-index: 5;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: #fff;
  font-size: 38px;
  cursor: pointer;
  transition: opacity 0.15s, color 0.15s;
}

.dg-hot-scroll-btn:hover {
  color: var(--accent);
}

.dg-hot-scroll-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

/* 分类内容区块主栏：实测目标站为 8 栏，§12.1 强制 3 的倍数覆写取 9 栏 */
.dg-vod-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
}

.dg-vod-grid--6col {
  grid-template-columns: repeat(9, 1fr);
}

/* 防御性封顶：本环境 num 参数不保证限制笔数（桌面 9 栏 2 排 = 18 笔） */
.dg-vod-grid > .dg-vod-card:nth-child(n+19) {
  display: none;
}

/* 网格卡片不显示右上角更新徽章：仅底部常驻标签列 + 评分 */
.dg-vod-grid .dg-vod-remarks {
  display: none;
}

/* ===== 热播推荐卡片 ===== */
.dg-hot-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dg-hot-grid::-webkit-scrollbar {
  display: none;
}

.dg-hot-card {
  flex: 0 0 calc(16.6666% - 9px);
  min-width: 150px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dg-hot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dg-hot-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  margin: 0;
}

.dg-hot-badge-tl {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 3px;
}

.dg-hot-remarks {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
}

.dg-hot-info {
  padding: 8px 10px 10px;
}

.dg-hot-info h3 {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.dg-hot-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 热点资讯 ===== */
.dg-news-grid {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.dg-news-card {
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  border-top: 2px solid var(--accent);
  transition: transform 0.2s;
}

.dg-news-card:hover {
  transform: translateY(-6px);
}

.dg-news-card a {
  display: block;
}

.dg-news-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  margin: 0;
  background: var(--bg-light) url('../img/load.gif') no-repeat center center;
  background-size: cover;
}

.dg-news-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dg-news-title-wrap {
  box-sizing: border-box;
  padding: 8px 10px 10px;
  /* max-height 用 border-box 计算（含 padding），精确等于 padding(8+10=18px) + 内容2行高度(12px*1.5*2=36px)，
     不依赖 -webkit-line-clamp 单独计算行数，避免不同浏览器对多行截断支援度不一致时内容溢出 */
  max-height: 54px;
  overflow: hidden;
}

.dg-news-card h4 {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
}

/* ===== 影片卡片通用 ===== */
.dg-vod-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.dg-vod-list--wrap2 .dg-vod-card:nth-child(n+13) {
  display: none;
}

.dg-vod-card {
  position: relative;
  z-index: 1;
  flex: 0 0 calc((100% - 50px) / 6);
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dg-vod-card a {
  display: block;
}

/* 仅在支持 hover 的输入装置上触发，避免触控装置黏滞悬停 */
@media (hover: hover) and (pointer: fine) {
  .dg-vod-card:hover {
    z-index: 20;
    transform: scale(1.25);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  }

  .dg-vod-card:hover .dg-vod-thumb img {
    transform: scale(1.07);
  }

  .dg-vod-card:hover .dg-vod-name,
  .dg-vod-card:hover .dg-vod-sub {
    visibility: hidden;
  }

  .dg-vod-card:hover .dg-vod-hover-mask,
  .dg-vod-card:hover .dg-vod-detail {
    opacity: 1;
  }

  /* 底部常驻标签列 hover 时隐藏，避免与悬浮详情层叠字 */
  .dg-vod-card:hover .dg-vod-tags {
    opacity: 0;
  }
}

.dg-vod-thumb {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  margin: 0;
  background: var(--bg-white) url('../img/load.gif') no-repeat center center;
  background-size: cover;
}

.dg-vod-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.dg-vod-list--s .dg-vod-card {
  flex: 0 0 calc((100% - 50px) / 6);
}

.dg-vod-badges {
  position: absolute;
  top: 5px;
  left: 5px;
  display: flex;
  gap: 3px;
}

/* 集数/完结状态：底部渐层列内纯文字，不做底色徽章（实测目标站底部资讯列写法） */
.dg-vod-remarks {
  flex-shrink: 0;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.6;
  overflow: hidden;
  white-space: nowrap;
}

/* 底部常驻资讯列：集数状态（左）+ 地区/年代标签（右） */
.dg-vod-tags {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding: 16px 6px 6px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.85));
  transition: opacity 0.2s;
}

.dg-vod-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 0;
}

.dg-vod-tag {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-light);
  font-size: 10.5px;
  line-height: 1.6;
  padding: 0 5px;
  border-radius: 4px;
  white-space: nowrap;
}

/* 评分：右上角纯色数字，不做底色徽章（实测目标站 top:8px right:8px 纯文字写法） */
.dg-vod-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* 平板 6 栏／手机 3 栏卡片较窄，地区+年代 tag 与集数状态文字挤在同一行易换行、显得杂乱，
   窄卡片下只保留左侧集数状态，右侧地区/年代 tag-group 直接隐藏 */
@media (max-width: 1024px) {
  .dg-vod-tags {
    justify-content: flex-start;
  }

  .dg-vod-tag-group {
    display: none;
  }
}

.dg-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  color: #fff;
}

.dg-badge-year {
  background: #9c6c14;
}

.dg-badge-tag {
  background: #f5a623;
}

.dg-badge-blue {
  background: var(--accent-red);
}

.dg-vod-name {
  font-size: 14px;
  font-weight: 500;
  padding: 7px 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

@media (min-width: 992px) {
  .dg-vod-name { font-size: 16px; }
}

/* 别名（vod_sub）纯文字显示，不做成 tag 胶囊外观 */
.dg-vod-genre-tags {
  padding: 2px 8px 8px;
}

.dg-vod-genre-tag {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 影片卡片悬停详情层：鼠标停留时以渐层遮罩浮出简介等完整资讯 ===== */
.dg-vod-hover-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72%;
  min-height: 150px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72) 35%, rgba(0, 0, 0, 0.95));
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.dg-vod-detail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 9px 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 10.5px;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.dg-vdc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.dg-vdc-title {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dg-vdc-score {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--score-green);
}

.dg-vdc-time,
.dg-vdc-roles {
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dg-vdc-intro {
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dg-vdc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
  font-weight: 600;
}

.dg-vdc-hits {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
}

.dg-vdc-hits .mac-icon {
  font-size: 11px;
}

/* ===== 影片文字列表（补充标题清单，桌机限定） ===== */
.dg-vodlist-text {
  display: flex;
  flex-wrap: wrap;
  margin: 4px 0 0;
  padding: 0;
}

.dg-vlt-item {
  flex: 0 0 25%;
  min-width: 0;
  border-top: 1px dotted var(--border-mid);
}

/* 防御性封顶：本环境 num 参数不保证限制笔数，用 CSS 隐藏多出的项目 */
.dg-vlt-item:nth-child(n+17) {
  display: none;
}

.dg-vlt-item:nth-child(-n+4) {
  border-top: none;
}

.dg-vlt-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 15px 9px 0;
  overflow: hidden;
}

.dg-vlt-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
}

.dg-vlt-link:hover .dg-vlt-name {
  color: var(--accent);
}

.dg-vlt-tag {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== 首页头图轮播 ===== */
/* 满版头图：脱离 .dg-home-content 的置中/内距容器，与下方内容区块区隔 */
.dg-home-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0;
  /* 叠到 header 后方：--header-h（header.js 写入）+ --home-pt（父层 padding-top）一并扣除 */
  margin-top: calc(-1 * var(--header-h, 0px) - var(--home-pt, 0px));
  position: relative;
  z-index: 1;
}

.dg-home-hero-stage {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.dg-home-hero-track {
  display: flex;
  transition: transform 0.3s ease;
}

.dg-home-hero-slide {
  min-width: 100%;
  position: relative;
}

/* 主视觉采较高的海报式比例，非满宽横幅 */
.dg-home-hero-slide a {
  display: block;
  padding-top: 40%;
  background-color: #0a0a0b;
  background-position: center center;
  background-size: cover;
  position: relative;
}

/* 底部渐层：让分页点等叠层元素与背景图保持对比 */
.dg-home-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 24%, rgba(0,0,0,0) 46%);
  pointer-events: none;
}

/* 头图右侧资讯区：仅电脑版显示，平板/手机隐藏（见 RWD 区块）；
   右边界比照 .dg-hero-quicklinks 的置中容器留白公式，避免死贴萤幕边缘造成画面右重左轻；
   再额外扣掉右箭头宽度(44px)+间距(24px)，避免中等宽度萤幕下两者视觉重叠 */
.dg-hh-info {
  position: absolute;
  right: calc(max(56px, (100% - var(--max-w)) / 2) + 24px + 44px + 24px);
  top: 32%;
  z-index: 1;
  max-width: 38%;
  text-align: right;
}

.dg-hh-title {
  margin: 0 0 10px;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dg-hh-meta {
  margin: 0 0 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dg-hh-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: rgba(235, 235, 235, 0.92);
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}

.dg-hh-play:hover {
  background: var(--accent);
  color: #fff;
}

.dg-hh-play .mac-icon {
  font-size: 18px;
}

/* 轮播分页点：实测目标站 8px 圆点 / active 拉长 20px 药丸、主色橙；电脑版位于分类捷径下方一行、跨版置中 */
.dg-home-hero-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 32px;
}

.dg-hh-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}

.dg-hh-dot--active {
  width: 20px;
  background: var(--accent);
}

/* 头图下方叠层容器：分页点 + 分类捷径 + 热门片单，实测目标站底部渐层资讯条结构；
   容器本身仍贴底（渐层背景需覆盖到画面底边界，否则会露出下方图片形成断层），
   往上收改用内部 padding-bottom 撑开内容与底边的距离 */
.dg-home-hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding-bottom: 26px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0) 100%);
}

/* 分类捷径 + 热门片单：左右两栏布局，中间以竖线分隔（实测目标站结构） */
.dg-hero-quicklinks {
  display: flex;
  align-items: center;
  gap: 32px;
  /* 左右內距比照置中容器留白（视窗越宽留白越多）再加 24px 内缩，下限 56px；
     宽屏时置中留白本身已远大于下限，只调下限没有视觉效果，必须额外加值 */
  padding: 0 calc(max(56px, (100% - var(--max-w)) / 2) + 24px);
}

/* 分类捷径：单行纯文字，无底色，靠左不参与伸缩 */
.dg-hqk-channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.dg-hqk-channels li {
  list-style: none;
  display: flex;
  align-items: center;
}

.dg-hqk-divider {
  flex-shrink: 0;
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.3);
}

.dg-hqk-channel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s;
}

.dg-hqk-channel:hover {
  color: var(--accent);
}

/* 热门片单：依文字宽度自然排列的胶囊标签，半透明白底，占用右侧剩余空间；
   宽度不固定导致每排笔数不定，改用 max-height 锁最多两排高度（34px 胶囊 * 2 + 16px 行距），
   超出两排的候选项目自动溢出隐藏，模板端 num 需拉大以提供足够候选（见 widget/home_hero.html） */
.dg-hqk-films {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 16px 30px;
  margin: 0;
  padding: 0;
  min-width: 0;
  max-height: 84px;
  overflow: hidden;
}

.dg-hqk-films li {
  list-style: none;
}

.dg-hqk-films a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}

.dg-hqk-films a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* 平板/手机版放不下分类捷径+热门片单，直接隐藏，只保留左右箭头 + 分页点；
   分页点上方原本让给分类捷径的间距一并取消；dg-hh-info 仅电脑版显示；
   底部叠层容器只剩分页点，电脑版的 padding-bottom: 48px 是留给分类捷径的收边间距，
   平板/手机不需要，改回较小值 */
@media (max-width: 1024px) {
  .dg-hero-quicklinks {
    display: none;
  }

  .dg-home-hero-bottom {
    padding-bottom: 16px;
  }

  .dg-home-hero-dots {
    padding-top: 0;
  }

  .dg-hh-info {
    display: none;
  }
}

@media (max-width: 767px) {
  .dg-home-hero-bottom {
    padding-bottom: 12px;
  }
}

/* 左右切换箭头，悬停变金色圆形底 */
.dg-home-hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.dg-home-hero-arrow:hover {
  background: var(--accent);
  color: #14120a;
}

/* 左右箭头内缩至内容容器边界，与 .dg-hh-info 共用同一个留白公式（见上方），
   避免两组各自独立计算 right 值，在中等宽度萤幕下距离不足而视觉重叠 */
.dg-home-hero-arrow--prev {
  left: calc(max(56px, (100% - var(--max-w)) / 2) + 24px);
}

.dg-home-hero-arrow--next {
  right: calc(max(56px, (100% - var(--max-w)) / 2) + 24px);
}

/* ===== 分类区块 75/25 分栏（主内容 + 周榜单侧栏） ===== */
.dg-content-block--split {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.dg-cb-main {
  flex: 1;
  min-width: 0;
}

.dg-cb-side {
  flex: 0 0 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 0 12px;
  overflow: hidden;
}

/* 与左侧 .dg-pannel-hd 同处 y=0 起算，两栏标题底线才会齐平；
   高度从 40px 加到 56px 让标题有上下呼吸空间，与左侧对齐点不受影响 */
.dg-cb-side .dg-pannel-hd {
  height: 56px;
  padding: 0 18px;
}

/* 与左侧 .dg-vod-grid 同规格 margin-top，让标题底线到内容首行的距离两栏一致 */
.dg-cb-side .dg-vlt-rank-list {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dg-cb-side .dg-vlt-rank-item {
  flex: 1;
  display: flex;
}

.dg-cb-side .dg-vlt-rank-link {
  flex: 1;
}

.dg-cb-side .dg-section-header h2 {
  font-size: 15px;
}

/* 通用圆点分隔符（标题/标签文字之间），依所在容器颜色继承 currentColor */
.dg-split-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  vertical-align: middle;
}

/* ===== 排行文字清单（大号编号 + 双行资讯，用于侧栏 + 总榜单） ===== */
.dg-vlt-rank-item {
  border-top: none;
}

/* 防御性封顶：本环境 num 参数不保证限制笔数，侧栏仅留 10 笔；
   detail 页用 .dg-cb-side--full modifier 放宽到 15 笔（见 vod_detail.html 用法） */
.dg-cb-side .dg-vlt-rank-item:nth-child(n+11) {
  display: none;
}

.dg-cb-side.dg-cb-side--full .dg-vlt-rank-item:nth-child(n+11) {
  display: flex;
}

.dg-cb-side.dg-cb-side--full .dg-vlt-rank-item:nth-child(n+16) {
  display: none;
}

.dg-vlt-rank-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  overflow: hidden;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.dg-vlt-rank-link:hover {
  background: var(--accent-light);
}

/* 排名编号徽章：全站排行榜元件共用（排行榜页 Top1-3 + 侧栏/文字条列 1-N 名），
   1/2/3 名各自实测目标站红/橙/黄，其余名次为中性灰底色 */
.dg-rank-badge {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  background: var(--bg-elev);
  border-radius: var(--radius) var(--radius) var(--radius) 0;
}

.dg-rank-badge--1 { background: #df0a25; }
.dg-rank-badge--2 { background: #df642b; }
.dg-rank-badge--3 { background: #fcc400; }

.dg-vlt-rank-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dg-vlt-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dg-vlt-rank-link .dg-vlt-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text);
}

.dg-vlt-rank-link:hover .dg-vlt-name {
  color: var(--accent);
}

.dg-vlt-rank-score {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--score-green);
}

/* 标签胶囊列（地区/语言/年份，深色方块小标签） */
.dg-vlt-rank-tags {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow: hidden;
}

.dg-vlt-rank-tag {
  flex-shrink: 0;
  background: var(--bg-elev);
  color: var(--text-light);
  font-size: 11px;
  line-height: 1.8;
  padding: 0 7px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 88px;
}

.dg-vlt-rank-hot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.dg-vlt-rank-hot .mac-icon {
  width: 13px;
  height: 13px;
  color: var(--accent-red);
}

/* ===== 专题 ===== */
.dg-topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.dg-topic-card {
  flex: 0 0 calc((100% - 50px) / 6);
  min-height: 140px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  transition: transform 0.2s;
}

.dg-topic-card--lg {
  /* 取消大卡跨欄：6 筆资料桌面一排显示，每张同宽才能整除 1 排，不再特殊放大第 1 张 */
  flex: 0 0 calc((100% - 50px) / 6);
  min-height: 140px;
}

.dg-topic-card:hover {
  transform: translateY(-6px);
}

.dg-topic-card a {
  width: 100%;
}

.dg-topic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 55%);
}

.dg-topic-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.dg-topic-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 6px;
}

/* 专题卡片顶部色条：统一主色，仅 widget/topic_card 引用 */
.dg-topic-grid .dg-topic-card {
  border-top: 2px solid var(--accent);
}

.dg-topic-content h3 {
  font-size: 15px;
  font-weight: 600;
}

.dg-topic-content p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

/* ===== 友情连结 ===== */
.dg-friend-links {
  max-width: var(--max-w);
  margin: 0 auto 16px;
  padding: 16px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
}

.dg-friend-links h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.dg-friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
}

.dg-friend-links-list a {
  font-size: 13px;
  color: var(--text-light);
}

.dg-friend-links-list a:hover {
  color: var(--accent);
}

/* ===== Footer ===== */
.dg-site-footer {
  margin-top: auto;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
}

.dg-site-footer p,
.dg-site-footer address {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 2;
  font-style: normal;
}

.dg-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.dg-footer-links a {
  font-size: 12px;
  color: var(--text-muted);
}

.dg-footer-links a:hover {
  color: var(--accent);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ===== Hover 渐暗效果 ===== */
.dg-hot-card,
.dg-news-card,
.dg-vod-card,
.dg-topic-card {
  cursor: pointer;
}

.dg-hot-card .dg-hot-thumb::after,
.dg-news-card .dg-news-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s;
  pointer-events: none;
}

.dg-hot-card:hover .dg-hot-thumb::after,
.dg-news-card:hover .dg-news-thumb::after {
  background: rgba(0, 0, 0, 0.25);
}

.dg-topic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s;
  z-index: 1;
  pointer-events: none;
}

.dg-topic-card:hover::before {
  background: rgba(0, 0, 0, 0.2);
}

.dg-category-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.dg-category-toggle:hover,
.dg-category-toggle[aria-expanded="true"] {
  background: var(--accent);
  color: #14120a;
  border-color: var(--accent);
}

@keyframes catMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 手机专用元件 ===== */
.dg-header-mobile {
  display: none;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.dg-header-mobile-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  flex-shrink: 0;
  max-height: 64px;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.28s ease;
}

/* ===== 通用分页 ===== */
.dg-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.dg-page-btn,
.dg-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid var(--border-mid);
  background: var(--bg-white);
  color: var(--text-light);
  transition: all 0.15s;
}

.dg-page-btn:hover,
.dg-page-num:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.dg-page-num.dg-active {
  background: var(--accent);
  color: #14120a;
  border-color: var(--accent);
  font-weight: 600;
}

.dg-page-ellipsis {
  color: var(--text-muted);
  padding: 0 4px;
}

/* ===== RWD ===== */

/* ── 桌机周榜单侧栏只在 ≥1200px 显示 ── */
@media (max-width: 1199px) {
  .dg-cb-side {
    display: none;
  }
}

/* ── 平板 768px ~ 1024px ── */
@media (max-width: 1024px) {
  /* 平板：首页影片卡片（热播推荐/分类内容）统一一排 6 筆，与桌面一致 */
  .dg-hot-track > .dg-vod-card {
    flex: 0 0 calc((100% - 50px) / 6);
  }

  /* 平板可用宽度较窄，箭头改叠加悬浮在卡片列上（不佔版面宽度），
     卡片列才能拉满整个 wrap 宽度 */
  .dg-hot-scroll-wrap {
    gap: 0;
  }

  .dg-hot-scroll-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    font-size: 30px;
  }

  .dg-hot-scroll-btn--prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 4px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  }

  .dg-hot-scroll-btn--next {
    right: 0;
    justify-content: flex-end;
    padding-right: 4px;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  }

  .dg-vod-grid,
  .dg-vod-grid--6col {
    grid-template-columns: repeat(6, 1fr);
  }

  .dg-home-content {
    padding: 12px 16px 40px;
    --home-pt: 12px;
  }

  .dg-header-inner {
    padding: 0 16px;
  }

  .dg-vod-card {
    flex: 0 0 calc((100% - 20px) / 3);
  }

  .dg-vod-list {
    gap: 10px;
  }

  .dg-vlt-item {
    flex: 0 0 33.333%;
  }

  .dg-vlt-item:nth-child(-n+3) {
    border-top: none;
  }

  .dg-vlt-item:nth-child(4) {
    border-top: 1px dotted var(--border-mid);
  }

  .dg-news-grid {
    flex-wrap: wrap;
  }

  .dg-news-card {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
    min-width: 0;
  }

  .dg-hot-card {
    flex: 0 0 calc(33.333% - 7px);
  }

  .dg-section-breadcrumb a {
    display: inline;
  }

  .dg-topic-card,
  .dg-topic-card--lg {
    flex: 0 0 calc((100% - 20px) / 3);
  }
}

/* 限定 min-width，避免 .dg-vod-list .dg-vod-card（2 class）优先权
   在手机宽度盖过上面裸 .dg-vod-card（1 class）的 3 栏设定 */
@media (min-width: 768px) and (max-width: 1024px) {
  .dg-vod-list .dg-vod-card,
  .dg-vod-list-grid .dg-vod-card {
    flex: 0 0 calc((100% - 50px) / 6);
  }

  /* 一排 6 筆时封顶改回 12（2 整排），避免 9 笔切出残行 */
  .dg-vod-list--wrap2 .dg-vod-card:nth-child(n+13) {
    display: none;
  }
}

/* ── 平板 768px ~ 1024px：header 维持 logo + 主导览 + 搜寻栏同一行，改缩小各元件腾出空间 ── */
@media (min-width: 768px) and (max-width: 1024px) {
  .dg-header-inner {
    gap: 8px;
  }

  .dg-brand-block.dg-logo {
    width: 96px;
    height: 32px;
  }

  .dg-nav-drop-btn {
    padding: 6px 10px;
    font-size: 14px;
  }

  .dg-search-box {
    width: 130px;
  }

  .dg-header-actions {
    gap: 4px;
  }

  .dg-header-actions .dg-ha-btn {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  /* 登录按钮：平板只显示人头 icon，与其他 header actions 一致改回圆形 */
  .dg-header-actions .dg-ha-btn--pill {
    width: 30px;
    padding: 0;
  }

  .dg-header-actions .dg-ha-btn--pill span {
    display: none;
  }
}

/* ── 手机 < 768px ── */
@media (max-width: 767px) {
  .dg-main-nav {
    display: none;
  }

  /* header：手机版切换成 .dg-header-mobile 垂直结构 */
  .dg-header-mobile {
    display: block;
  }

  .dg-header-desktop {
    display: none;
  }

  /* logo 缩小一点，与搜寻栏并排同一行 */
  .dg-header-mobile .dg-brand-block.dg-logo {
    width: 92px;
    height: 32px;
    flex-shrink: 0;
  }

  .dg-search-box {
    width: 100%;
    height: 32px;
  }

  .dg-search-box input {
    height: 32px;
    background: var(--bg-elev);
    border: 1px solid var(--border-mid);
    border-radius: 4px;
    padding: 0 36px 0 14px;
    font-size: 13px;
  }

  .dg-search-submit-btn {
    right: 14px;
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  /* 搜寻栏与 logo 并排同一行，占满剩余宽度 */
  .dg-header-mobile-search.dg-search-box {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  /* 往下滑动时 logo + 搜寻栏整排收合，用 max-height + opacity 做渐隐动画；
     overflow: hidden 只在收合时加，避免展开状态裁掉搜寻下拉面板（绝对定位会超出 64px 高度） */
  .dg-is-header-scrolled .dg-header-mobile-inner {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
  }

  /* 分类导览：可左右滑动 */
  .dg-header-mobile-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid var(--border);
  }

  /* 收合后导览列改用底线（原本的上边框贴顶会失去意义） */
  .dg-is-header-scrolled .dg-header-mobile-nav {
    border-top: none;
    border-bottom: 1px solid var(--border);
  }

  .dg-header-mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .dg-header-mobile-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0 12px;
    white-space: nowrap;
  }

  .dg-header-mobile-nav-list li {
    flex-shrink: 0;
  }

  .dg-header-mobile-nav-list a,
  .dg-header-mobile-nav-list button {
    display: inline-block;
    padding: 10px 8px;
    font-size: 14px;
    color: var(--text-light);
    white-space: nowrap;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
  }

  .dg-header-mobile-nav-list a.dg-active {
    color: var(--accent);
    font-weight: 600;
  }

  .dg-vod-grid,
  .dg-vod-grid--6col {
    grid-template-columns: repeat(3, 1fr);
  }

  .dg-hot-track > .dg-vod-card {
    flex: 0 0 calc((100% - 20px) / 3);
  }

  .dg-hot-scroll-btn {
    width: 28px;
    font-size: 24px;
  }

  .dg-vodlist-text {
    display: none;
  }

  .dg-home-hero-arrow {
    display: none;
  }

  .dg-home-hero-slide a {
    padding-top: 82%;
  }

  .dg-section-breadcrumb a {
    display: none;
  }

  .dg-section-breadcrumb a:first-child {
    display: inline;
  }

  .dg-home-content {
    padding: 10px 10px 68px;
    --home-pt: 10px;
  }

  .dg-hot-grid {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .dg-hot-card {
    flex: 0 0 calc(50% - 5px);
    min-width: 0;
  }

  .dg-news-grid {
    flex-wrap: wrap;
  }

  .dg-news-card {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
    min-width: 0;
  }

  .dg-vod-card {
    flex: 0 0 calc((100% - 12px) / 3);
  }

  .dg-vod-list {
    gap: 6px;
  }

  .dg-vod-list--s .dg-vod-card {
    flex: 0 0 calc((100% - 12px) / 3);
  }

  .dg-vod-list--wrap2 .dg-vod-card:nth-child(n+7) {
    display: none;
  }

  .dg-topic-card,
  .dg-topic-card--lg {
    flex: 0 0 calc((100% - 20px) / 3);
  }
}

/* ── 小手机 < 480px ── */
@media (max-width: 479px) {
  .dg-vod-list {
    gap: 5px;
  }

  .dg-vod-card {
    flex: 0 0 calc((100% - 10px) / 3);
  }

  .dg-vod-name {
    font-size: 11px;
    padding: 5px 6px 2px;
  }

  .dg-vod-sub {
    font-size: 10px;
    padding: 0 6px 6px;
  }

  .dg-hot-card {
    flex: 0 0 calc(50% - 5px);
  }

  .dg-news-card {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
    min-width: 0;
  }

  .dg-topic-card {
    flex: 0 0 calc((100% - 12px) / 3);
  }
}

/* ===== 共用评论元件 ===== */
.dg-comment-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 14px;
}
.dg-cmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dg-cmt-title { font-size: 14px; font-weight: 600; color: var(--text); }
.dg-cmt-count { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.dg-cmt-count em { color: var(--accent); font-style: normal; font-weight: 600; }

.dg-cmt-ajax-wrap { min-height: 60px; }
/* 覆写全站共用 home.css 里 .mac_comment 的寫死白底/淺藍邊框（class 为 JS 挂钩须保留） */
.dg-comment-section .mac_comment {
  background: transparent;
  border-color: var(--border);
}
.dg-cmt-loading {
  font-size: 13px;
  color: var(--text-muted);
  padding: 24px 0;
  text-align: center;
}
.dg-cmt-empty {
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* 评论列表 */
.dg-cmt-list { margin: 0 0 12px; padding: 0; }
.dg-cmt-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.dg-cmt-item:last-child { border-bottom: none; }
.dg-cmt-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.dg-cmt-item-user { font-size: 13px; font-weight: 600; color: var(--text); }
.dg-cmt-item-time { font-size: 11px; color: var(--text-muted); }
.dg-cmt-item-content { font-size: 13px; color: var(--text-light); line-height: 1.7; }
.dg-cmt-item-reply-list {
  display: block;
  /* 缩排：让回复视觉上从属于上方留言，不跟留言本身等宽对齐 */
  margin: 0 0 0 16px;
  padding: 0;
  box-sizing: border-box;
}

.dg-cmt-item-reply {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  background: var(--bg-light);
  border-left: 3px solid var(--accent);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
  border-radius: 0 4px 4px 0;
}
.dg-cmt-reply-label { font-weight: 600; color: var(--accent); }
.dg-cmt-item-actions { display: flex; gap: 12px; margin-top: 6px; }
.dg-cmt-action-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.dg-cmt-action-link:hover { color: var(--accent); }

.dg-cmt-paging {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 0 0;
}
.dg-cmt-page-btn {
  padding: 4px 10px;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.dg-cmt-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.dg-cmt-page-btn.dg-is-active { background: var(--accent); border-color: var(--accent); color: #14120a; }
.dg-cmt-page-btn.dg-is-disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* 输入表单 */
.dg-cmt-textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--border-mid);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  resize: none;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  background: var(--bg-light);
  transition: border-color 0.15s, background 0.15s;
}
.dg-cmt-textarea:focus { border-color: var(--accent); background: var(--bg-elev); }
.dg-cmt-textarea:focus + .dg-cmt-form-bar {
  border-color: var(--accent);
  border-top-color: var(--border);
}
.dg-cmt-form-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border-mid);
  border-top: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  padding: 10px 14px;
  transition: border-color 0.15s;
}
.dg-cmt-chars { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.dg-cmt-chars em { font-style: normal; color: var(--accent); font-weight: 600; }
.dg-cmt-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dg-cmt-verify-input {
  width: 88px;
  height: 34px;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 13px;
  color: #000;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.dg-cmt-verify-input:focus { border-color: var(--accent); }
.dg-cmt-captcha {
  height: 34px;
  width: auto;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--border-mid);
  display: block;
}
.dg-cmt-submit {
  height: 34px;
  padding: 0 20px;
  background: var(--accent);
  color: #14120a;
  font-size: 14px;
  font-weight: 600;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.dg-cmt-submit:hover { background: var(--accent-active); }

@media (max-width: 767px) {
  .dg-comment-section {
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    border-bottom: 8px solid var(--bg-light);
    padding: 14px;
  }
  .dg-cmt-form-bar { flex-wrap: wrap; }
  .dg-cmt-chars { order: 2; }
  .dg-cmt-actions { order: 1; width: 100%; justify-content: flex-end; }
  .dg-cmt-verify-input { width: 80px; }
}

/* ── Login Modal ── */
.dg-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.dg-modal-overlay.dg-is-open { display: flex; }

.dg-modal-box {
  background: var(--bg-modal);
  border-radius: 14px;
  padding: 36px 32px 28px;
  width: 90%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.dg-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
}
.dg-modal-close:hover { color: var(--text); }

.dg-modal-title {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
}

.dg-modal-field { margin-bottom: 20px; }

.dg-modal-label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.dg-modal-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-mid);
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}
.dg-modal-input:focus { border-bottom-color: var(--accent); }
.dg-modal-input::placeholder { color: var(--text-muted); }

.dg-modal-submit {
  width: 100%;
  background: var(--accent);
  color: #14120a;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
.dg-modal-submit:hover { background: var(--accent-active); }

.dg-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.dg-modal-link { color: var(--text-muted); }
.dg-modal-link--accent { color: var(--accent); font-weight: 500; }
.dg-modal-link--accent:hover { text-decoration: underline; }

/* ── 系统弹窗（MAC.Pop，home.js 动态注入，样式写死为白底）覆写为深色风格 ── */
.mac_pop_bg,
.mac_pop_msg_bg {
  background: rgba(0, 0, 0, 0.55);
}

.mac_pop,
.mac_pop_msg {
  background-color: var(--bg-modal);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.mac_pop .pop_top {
  border-bottom-color: var(--border);
}

.mac_pop .pop_top h2 {
  color: var(--text);
  font-family: inherit;
}

.mac_pop span.pop_close {
  background: none;
  text-indent: 0;
  font-size: 20px;
  line-height: 23px;
  text-align: center;
  color: var(--text-muted);
  transition: color 0.15s;
}
.mac_pop span.pop_close:hover { color: var(--accent); }

.mac_pop .pop-foot {
  border-top-color: var(--border);
}

.mac_pop .pop-ok {
  background-color: var(--accent);
}
.mac_pop .pop-cancel {
  background-color: transparent;
  border-color: var(--border-mid);
  color: var(--text);
}

.mac_pop .pop-msg,
.mac_pop_msg .pop-msg {
  color: var(--text);
}

.mac_pop {
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  right: auto !important;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 32px) !important;
  height: auto !important;
  display: flex;
  flex-direction: column;
}

.mac_pop .pop_content {
  flex: 1 1 auto;
  overflow-y: auto;
}

.mac_pop_msg {
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  right: auto !important;
  transform: translate(-50%, -50%);
  width: auto !important;
  height: auto !important;
  min-width: 120px;
  max-width: min(80vw, 360px);
  padding: 18px 24px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ── MacCMS 内建 history dropdown（文字列表）隐藏，改用自订带图 modal ── */
.dg-mac_history_box { display: none !important; }

/* ── 历史记录 Modal ── */
.dg-hm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dg-hm-overlay.dg-is-open { display: flex; }

.dg-hm-box {
  background: var(--bg-modal);
  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.2);
}

.dg-hm-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dg-hm-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.dg-hm-clear {
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.dg-hm-clear:hover { color: var(--accent); }
.dg-hm-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.dg-hm-close:hover { background: var(--border); color: var(--text); }

.dg-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-mid) transparent;
}
.dg-hm-body::-webkit-scrollbar { width: 4px; }
.dg-hm-body::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

.dg-hm-card {
  /* 6 per row */
  flex: 0 0 calc((100% - 50px) / 6);
  min-width: 0;
  display: block;
  text-decoration: none;
  color: var(--text);
  align-self: flex-start;
}
.dg-hm-thumb {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg);
  /* 让 img absolute 定位有基准，防止图片撑开 grid row */
  contain: strict;
}
.dg-hm-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.dg-hm-card:hover .dg-hm-thumb img { transform: scale(1.04); }
.dg-hm-card:hover .dg-hm-name { color: var(--accent); }

.dg-hm-name {
  font-size: 11px;
  margin-top: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-light);
  transition: color 0.15s;
}
.dg-hm-empty {
  width: 100%;
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 767px) {
  .dg-hm-box { border-radius: 16px; max-height: 85vh; align-self: center; }
  .dg-hm-overlay { padding: 0 12px; align-items: flex-end; }
  /* 3 per row */
  .dg-hm-card { flex: 0 0 calc((100% - 20px) / 3); }
}

/* ===== 剧情介绍展开/收合（共用） ===== */
.dg-desc-body {
  position: relative;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
  max-height: calc(13px * 1.8 * 3);
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.dg-desc-body * {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: inherit !important;
  font-family: inherit !important;
}
.dg-desc-body.dg-desc-expanded {
  max-height: 2000px;
}
/* 超出 3 行才叠加渐淡遮罩（由 JS 依内容实际高度加上 desc-has-more） */
.dg-desc-body.dg-desc-collapsed.dg-desc-has-more::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--bg-white));
  pointer-events: none;
}
.dg-desc-expand-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--border-mid);
  border-radius: 5px;
  padding: 8px;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.dg-desc-expand-btn:hover { background: var(--accent-light); }

/* ===== 漂浮功能按鈕 (Floating Action Buttons) ===== */
.dg-fab-group {
  position: fixed;
  bottom: 30px;
  right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: auto;
}
.dg-fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #14120a;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 85, 102, 0.4), 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  cursor: pointer;
  border: none;
}
.dg-fab-btn:hover {
  background: var(--accent-active);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 28px rgba(255, 85, 102, 0.5), 0 2px 10px rgba(0,0,0,0.16);
}
.dg-fab-btn--top { opacity: 0; pointer-events: none; }
.dg-fab-btn--top.dg-is-visible { opacity: 1; pointer-events: auto; }
.dg-fab-qr-popup {
  position: fixed;
  bottom: 160px;
  right: 24px;
  z-index: 400;
  display: none;
  width: auto;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  text-align: center;
}
.dg-fab-qr-popup.dg-is-open { display: block; }
.dg-fab-qr-popup p { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.dg-fab-qr-popup img { width: 130px; height: 130px; border-radius: 4px; background: #fff; display: block; }

@media (max-width: 767px) {
  .dg-fab-group { bottom: 76px; right: 14px; }
  .dg-fab-qr-popup { bottom: 146px; right: 14px; }
}
@media (max-width: 1024px) {
  .dg-fab-btn--qr { display: none; }
}

/* ===== 通用 Toast 提示（全站共用：分享复制链接、评分成功等短暂提示）===== */
.dg-rate-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 24px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
}
.dg-rate-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

/* ===== 当前位置 / 面包屑（共用 widget/breadcrumb，详情页 + 播放页共用） ===== */
.dg-vd-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.dg-vd-breadcrumb .mac-icon {
  font-size: 11px;
  color: var(--text-muted);
}
.dg-vd-breadcrumb a {
  color: var(--text-light);
}
.dg-vd-breadcrumb a:hover {
  color: var(--accent);
}
.dg-vd-bc-current {
  color: var(--text-muted);
}
.dg-vd-bc-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.dg-vd-bc-list li {
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 479px) {
  .dg-vd-breadcrumb { margin-bottom: 14px; gap: 7px; }
  .dg-vd-bc-list, .dg-vd-bc-list li { gap: 7px; }
}
@media (min-width: 480px) and (max-width: 767px) {
  .dg-vd-breadcrumb { margin-bottom: 16px; gap: 7px; }
  .dg-vd-bc-list, .dg-vd-bc-list li { gap: 7px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .dg-vd-breadcrumb { margin-bottom: 20px; gap: 7px; }
  .dg-vd-bc-list, .dg-vd-bc-list li { gap: 7px; }
}
@media (min-width: 1025px) {
  .dg-vd-breadcrumb { margin-bottom: 24px; gap: 7px; }
  .dg-vd-bc-list, .dg-vd-bc-list li { gap: 7px; }
}
@media (max-width: 767px) {
  .dg-vd-breadcrumb { font-size: 12px; }
}

/* mac-icon sprite base */
.mac-icon{width:1em;height:1em;fill:currentColor;flex-shrink:0;}
