/* 仅供屏幕阅读器使用的隐藏文字（不影响视觉呈现） */
.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：纯黑背景 + 暖金主色，半透明玻璃卡片 */
:root {
  /* 主色：暖金（品牌强调色，标题图示 / 链接 hover / 选中态 / 评分数字 / 边框高光） */
  --accent: #ffcd84;
  --accent-light: rgba(255, 205, 132, 0.14);
  --accent-hover: #ffdca3;
  --accent-active: #d89d06;
  /* 次强调色：红色（更新集数徽章 / 播放按钮 / 榜单强调点，比照目标站徽章色） */
  --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.65);
  --text-light: rgba(255, 255, 255, 0.85);
  --bg: #000000;
  /* 卡片/面板底色：不做实心深灰卡片，改用极浅白玻璃叠层，融入纯黑背景 */
  --bg-white: #121212;
  --bg-light: #0a0a0a;
  --bg-elev: #1c1c1c;
  --bg-modal: #161616;
  --border: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.18);
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  /* 评分专用绿色（与主色金/次强调色红做出区隔，符合评分「绿色=高分」直觉联想） */
  --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", 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;
}

.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 分居两端与中间 */
  padding: 0 24px;
  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/focus-within 展开；
   触控装置的 :hover 点击后会黏着不清除，只能靠 JS 的 dg-is-open 控制，
   见 header.js — 否则会出现「平板点了打不开/关不掉」 */
@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);
  overflow: hidden;
}

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

.dg-main-nav a {
  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-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-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 19px;
    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);
}

.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);
}

/* 搜寻下拉面板：宽度不受搜寻栏 flex 限制，独立定位撑出可读宽度 */
.dg-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 420px;
  max-width: 80vw;
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 18px 20px;
  z-index: 10;
}

.dg-search-panel[hidden] {
  display: none;
}

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

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

.dg-sp-clear {
  font-size: 13px;
  color: var(--text-muted);
}

.dg-sp-clear:hover {
  color: var(--accent);
}

.dg-sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dg-sp-tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-light);
  font-size: 13px;
  transition: color 0.15s, background 0.15s;
}

.dg-sp-tag:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.dg-sp-hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dg-sp-hot-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-light);
}

.dg-sp-hot-item a:hover {
  color: var(--accent);
}

/* 排名数字：前 3 名强调色，其余灰阶 */
.dg-sp-hot-rank {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
  width: 16px;
  flex-shrink: 0;
}

.dg-sp-hot-item:nth-child(1) .dg-sp-hot-rank { color: var(--accent-red); }
.dg-sp-hot-item:nth-child(2) .dg-sp-hot-rank { color: var(--accent); }
.dg-sp-hot-item:nth-child(3) .dg-sp-hot-rank { color: var(--accent-active); }

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

.dg-content-block {
  margin-bottom: 24px;
}

/* 热播推荐紧接满版头图轮播之后，额外拉开与轮播下缘的距离 */
.dg-content-block--hot {
  margin-top: 28px;
}

.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; }

/* 选集网格：桌机 8 栏，固定高度滚轮滑动 */
.dg-playlist-episodes-wrap {
  max-height: 236px;
  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: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 选集按钮：与播放页 .dg-pw-episode 统一为小圆角矩形 */
.dg-episode {
  flex: 0 0 calc(12.5% - 7px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  padding: 6px 6px;
  border-radius: 5px;
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* 屏幕越窄，每行显示的集数越少，让单集按钮有更多宽度显示文字（padding 维持不变） */
@media (max-width: 1199px) {
  .dg-episode { flex: 0 0 calc(16.6667% - 7px); }
}

@media (max-width: 767px) {
  .dg-playlist-episodes { gap: 4px; }
  .dg-episode { flex: 0 0 calc(25% - 3px); }

  .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-episode { flex: 0 0 calc(33.3333% - 3px); }
}

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

/* ===== 热播推荐：单排横向可滑动清单 + 左右箭头（比照目标站「最新更新」） ===== */
/* 箭头不佔版面宽度，绝对定位悬浮叠在片单左右边缘上 */
.dg-hot-scroll-wrap {
  position: relative;
}

.dg-hot-track {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 2px 2px 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

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

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

.dg-hot-scroll-btn {
  position: absolute;
  top: 2px;
  bottom: 47px;
  z-index: 5;
  width: 64px;
  display: flex;
  align-items: center;
  border: 0;
  background: none;
  color: #fff;
  font-size: 38px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.dg-hot-scroll-btn--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 6px;
  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: 6px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

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

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

/* ===== 分类内容区块主栏：统一网格，首卡资讯常驻，其余 hover 显示 ===== */
.dg-vod-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
}

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

/* 防御性封顶：本环境 num 参数不保证限制笔数 */
.dg-vod-grid > .dg-vod-card:nth-child(n+13) {
  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);
  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: 2/3;
  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;
}

/* 右上角更新徽章：红底集数徽章，常驻显示不需 hover */
.dg-vod-remarks {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--accent-red);
  color: #fff;
  font-weight: 700;
  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;
}

.dg-vod-score {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.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 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.dg-vod-sub {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 8px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ===== 影片卡片悬停详情层：鼠标停留时以渐层遮罩浮出简介等完整资讯 ===== */
.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: #ff8a3d;
}

.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-hero-panel[hidden] {
  display: none;
}

.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: 42%;
  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.85) 0%, rgba(0,0,0,0.55) 16%, rgba(0,0,0,0.08) 32%, rgba(0,0,0,0) 55%);
  pointer-events: none;
}

.dg-hh-info {
  position: absolute;
  left: 40px;
  bottom: 118px;
  z-index: 1;
  max-width: 60%;
}

.dg-hh-name {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* 舞台右侧热门推荐浮层：纯文字靠右浮贴，第 1 名放大强调当标题，其余小字条列 */
.dg-hero-trend {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: max(32px, calc((100% - var(--max-w)) / 2));
  z-index: 2;
  width: 280px;
  max-width: calc(100% - 48px);
  text-align: right;
}

.dg-hero-trend-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.dg-hero-trend-item a {
  position: relative;
  display: inline-block;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 17px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 3px;
  transition: color 0.2s, font-size 0.2s, font-weight 0.2s;
}

/* hover：金色底线由右往左展开 + 文字变金色 + 轻微右移 */
.dg-hero-trend-item a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.dg-hero-trend-item a:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

.dg-hero-trend-item a:hover::after {
  width: 100%;
}

/* 跟着轮播联动：当前项放大+白色强调，JS（home_hero.js goTo()）动态切换此 class */
.dg-hero-trend-item--active a {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  padding-bottom: 5px;
  transition: color 0.2s, font-size 0.2s;
}

.dg-hero-trend-item--active a:hover {
  color: var(--accent-hover);
}

@media (max-width: 900px) {
  .dg-hero-trend {
    display: none;
  }
}

/* ===== 头图下方满版快速片单列：分类捷径 + 热门片名混排，叠在轮播图片底部（绝对定位） ===== */
.dg-hero-quicklinks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  /* 左右內距比照置中容器留白（视窗越宽留白越多），下限 32px */
  padding: 14px max(32px, calc((100% - var(--max-w)) / 2));
}

.dg-hqk-track {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

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

/* 热门片单：独立 <ul>，跟分类捷径分开，走「2 行网格横向排列 + 整体可横向捲动」 */
.dg-hqk-films {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 10px 28px;
  width: max-content;
  margin: 0;
  padding: 0;
  align-items: start;
}

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

.dg-hqk-films a {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  transition: color 0.15s;
}

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

/* 分类捷径按钮列：独立 <ul>，同样走「2 行网格横向排列」，避免分类过多撑高整列；右侧加内距区隔两块 */
.dg-hqk-channels {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  padding-right: 20px;
  flex-shrink: 0;
  align-items: start;
}

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

.dg-hqk-channel {
  display: block;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s;
}

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

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

/* 分类捷径 / 热门片单两个 <ul> 之间的分隔线（独立 <span>，非 <li>） */
.dg-hqk-divider {
  flex-shrink: 0;
  align-self: stretch;
  width: 1px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.28);
}

.dg-hqk-scroll {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

.dg-hqk-scroll:hover {
  background: var(--accent);
  color: #14120a;
}

@media (max-width: 767px) {
  .dg-hero-quicklinks {
    padding: 8px max(16px, calc((100% - var(--max-w)) / 2));
    gap: 6px;
  }

  .dg-hqk-films {
    gap: 6px 14px;
  }

  .dg-hqk-films a,
  .dg-hqk-channel {
    font-size: 11px;
  }

  .dg-hqk-channels {
    gap: 5px;
    padding-right: 12px;
  }

  .dg-hqk-scroll {
    width: 28px;
    height: 28px;
    font-size: 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-home-hero-arrow--prev {
  left: 14px;
}

.dg-home-hero-arrow--next {
  right: 14px;
}

/* ===== 分类区块 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，两栏标题底线才会齐平 */
.dg-cb-side .dg-pannel-hd {
  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: 12px 18px;
  overflow: hidden;
  transition: background 0.15s;
}

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

/* 大号编号：粗体数字，无圆形底色徽章 */
.dg-vlt-rank-num {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  color: var(--text);
  font-family: Arial, "PingFang SC", sans-serif;
}

.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;
  overflow: hidden;
  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);
  }

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

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

  .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);
  }
}

/* 猜你喜欢（widget/vod_card 用 .dg-vod-list 包裹）平板维持一排 6 筆；
   限定 min-width，避免 .dg-vod-list .dg-vod-card 的优先权（2 class）在手机宽度
   下盖过上面 max-width:767px 区块里裸 .dg-vod-card（1 class）的 3 栏设定 */
@media (min-width: 768px) and (max-width: 1024px) {
  .dg-vod-list .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;
  }
}

/* ── 手机 < 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 做渐隐动画 */
  .dg-is-header-scrolled .dg-header-mobile-inner {
    max-height: 0;
    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 {
    display: inline-block;
    padding: 10px 8px;
    font-size: 14px;
    color: var(--text-light);
    white-space: nowrap;
  }

  .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(42% - 8px);
  }

  .dg-hot-scroll-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .dg-hot-scroll-btn--prev {
    left: -10px;
  }

  .dg-hot-scroll-btn--next {
    right: -10px;
  }

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

  .dg-hh-info {
    left: 12px;
    bottom: 84px;
    max-width: 80%;
  }

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

  .dg-hh-name {
    font-size: 16px;
  }

  .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% - 10px) / 2);
  }
}

/* ── 小手机 < 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% - 10px) / 2);
  }
}

/* ===== 共用评论元件 ===== */
.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);
}

@media (max-width: 479px) {
  .dg-vd-breadcrumb { margin-bottom: 14px; gap: 7px; }
}
@media (min-width: 480px) and (max-width: 767px) {
  .dg-vd-breadcrumb { margin-bottom: 16px; gap: 7px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .dg-vd-breadcrumb { margin-bottom: 20px; gap: 7px; }
}
@media (min-width: 1025px) {
  .dg-vd-breadcrumb { margin-bottom: 24px; 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;}
