/* 仅供屏幕阅读器使用的隐藏文字（不影响视觉呈现） */
.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 实测自目标站 v.waiboys.com（2026-10-07，见 docs/STYLE_CLONE_SOP.md 附录） */
:root {
  /* 主强调色 #ff2a14；橙→红渐层用于导览现役线、立即播放（--grad-accent） */
  --accent: #ff2a14;
  --accent-light: rgba(255, 42, 20, 0.14);
  --accent-hover: #ff5a44;
  --accent-active: #d9200d;
  /* 同色系元件专用色，套版面时按元件对应，不要合并成 --accent */
  --accent-nav: #ff2a14;
  --accent-login: #ff2a14;
  --accent-tab: #ff2a14;
  --grad-accent: linear-gradient(90deg, #ff9800, #ff2a14);
  --grad-play: linear-gradient(90deg, #ff9800, #ff2a14);
  --grad-fav: linear-gradient(to right, #fc000c, #f9444d);
  --shadow-play: 0 3px 12px rgba(0, 0, 0, 0.18);
  --accent-red: #ff2a14;
  --accent-red-light: rgba(255, 42, 20, 0.16);
  --accent-red-hover: #ff5a44;
  --accent-red-active: #d9200d;
  /* 排名角标 1/2/3 */
  --rank-1: #ff2a14;
  --rank-2: #ff6a1a;
  --rank-3: #ff9800;
  --text: rgba(255, 255, 255, 0.87);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-light: rgba(255, 255, 255, 0.87);
  /* 页底 #16161a；--bg-white 是「面板」底（沿用 tp32 的变量名，所有卡片／评论区／侧栏块都用它，与 --bg-elev 同值），--bg-light 保持页底色（页脚、面板内的输入框与回复框） */
  --bg: #16161a;
  --bg-white: #25252b;
  --bg-light: #16161a;
  --bg-elev: #25252b;
  --bg-tag: #32323c;
  --bg-hover: #1c1c20;
  --bg-search: rgba(255, 255, 255, 0.1);
  --bg-modal: #25252b;
  --border: #25252b;
  --border-mid: #32323c;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-card: 5px;
  --module-gap: 24px;
  /* 目标站几乎不用阴影 */
  --shadow: 0 0 0 0 transparent;
  --shadow-card-hover: 0 10px 30px rgba(0, 0, 0, 0.3);
  --score-green: #34a853;
  /* 通用色 token（组件里不写死色码，统一引用这里） */
  --white: #fff;
  --black: #000;
  --black-rgb: 0, 0, 0;
  --accent-warm: #ff9800;
  --accent-rgb: 255, 42, 20;
  --bg-rgb: 22, 22, 26;
  --bg-elev-rgb: 37, 37, 43;
  --tag-warm: #fef0e5;
  --tile-light: #eaedf1;
  --tile-light-hover: #e3e6eb;
  --chip-light: #d7dae1;
  --text-soft: #c2c6d0;
  --text-dim: #8f8f8f;
  --scrollbar: #666;
  --star: #fcb80a;
  --rank-grad-1: linear-gradient(180deg, #ff5a3c, #ff2a14);
  --rank-grad-2: linear-gradient(180deg, #ff8a4c, #ff6a1a);
  --rank-grad-3: linear-gradient(180deg, #ffb53a, #ff9800);
  /* 内容区最大宽度与左右留白：断点比照目标站 1789/1549/1329/1239/899/559 */
  --max-w: 1740px;
  --gutter: 0px;
  --topbar-h: 70px;
  --sidebar-w: 0px;
}

@media (max-width: 1789px) {
  :root { --max-w: 1520px; }
}
@media (max-width: 1549px) {
  :root { --max-w: 1240px; }
}
@media (max-width: 1329px) {
  :root { --max-w: 1150px; }
}
@media (max-width: 1239px) {
  :root { --max-w: 100%; --gutter: 30px; }
}
@media (max-width: 899px) {
  :root { --gutter: 20px; --topbar-h: 60px; }
}
@media (max-width: 559px) {
  :root { --gutter: 15px; }
}

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

.mac-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: middle;
}

html {
  scroll-behavior: smooth;
}

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

/* 只留入口、暂无功能的链接（如忘记密码）：不显示手型与 hover 效果 */
a[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
}

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

ul {
  list-style: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: url(../img/load.gif) no-repeat center/cover, var(--bg-elev);
}

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

.dg-page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 让出固定的顶栏（见 HEADER 区） */
  padding: var(--topbar-h) 0 0;
}

/* 排除 sr-only（否则会盖掉它的 1px 宽、撑出水平滚动条）；:where 让权重维持一个 class，不压过顶栏自己的宽度 */
.dg-page-shell > :where(:not(.dg-sr-only)) {
  width: 100%;
  min-width: 0;
}

/* ===== HEADER：顶部固定导览（logo + 搜索 + 导览项 + 记录/登录），比照目标站 ===== */
.dg-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(var(--bg-rgb), 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  transition: background-color 0.3s ease-in;
}

/* 有满版头图的页面，置顶时顶栏透明，滚动后才出现底色（header.js 切换） */
.dg-site-header.dg-header-clear {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.dg-topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.dg-topbar-brand {
  flex-shrink: 0;
  width: 96px;
}

.dg-brand-block.dg-logo {
  display: block;
  width: 100%;
  height: 32px;
  overflow: hidden;
}

/* 现役项底下的橙→红渐层短线、文字转主色（.dg-active 由 header.html 条件输出） */
.dg-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

/* 宽度够时靠右；不够时 margin-left:auto 归零、向右溢出可横向滚动（用 justify-content:flex-end 会让溢出的左半段滚不到） */
.dg-nav-list {
  display: flex;
  width: max-content;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.dg-nav-link {
  position: relative;
  display: block;
  padding: 0 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 45px;
  white-space: nowrap;
  transition: color 0.3s ease-in;
}

.dg-nav-link:hover,
.dg-nav-link.dg-active {
  color: var(--accent-nav);
}

.dg-nav-link.dg-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 35%;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 5px;
  background: var(--grad-accent);
}

/* 页面切换读取条：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%, var(--accent-warm));
  z-index: 200;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.2s ease;
}

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

.dg-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-shrink: 0;
}

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

.dg-header-actions .dg-ha-btn .mac-icon {
  width: 22px;
  height: 22px;
}

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

/* 搜索图示只在手机显示，点击展开搜索框 */
.dg-header-actions .dg-ha-btn--search {
  display: none;
}

/* ── 搜索框：灰底圆角，右侧搜索钮 ── */
.dg-search-box {
  position: relative;
  flex: 0 1 460px;
  height: 45px;
  border-radius: var(--radius);
  background: var(--bg-search);
  transition: background 0.3s ease-in;
}

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

.dg-search-box input {
  width: 100%;
  height: 45px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  padding: 0 50px 0 20px;
  outline: none;
  font-size: 16px;
  color: var(--text);
}

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

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

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

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

@media (max-width: 899px) {
  .dg-topbar {
    gap: 12px;
  }

  .dg-search-box {
    flex-basis: 260px;
  }
}

/* 手机：logo 缩小、搜索框收成图示展开的浮层，导览横向滚动 */
@media (max-width: 767px) {
  .dg-topbar {
    gap: 8px;
  }

  .dg-topbar-brand {
    width: 72px;
  }

  .dg-nav-list {
    margin-left: 0;
  }

  .dg-header-actions {
    gap: 0;
  }

  .dg-header-actions .dg-ha-btn--search {
    display: inline-flex;
  }

  .dg-search-box {
    display: none;
    position: fixed;
    top: calc(var(--topbar-h) + 8px);
    left: var(--gutter);
    right: var(--gutter);
    flex: none;
    height: 44px;
    background: var(--bg-elev);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .dg-site-header.dg-search-open .dg-search-box {
    display: block;
  }

  .dg-search-box input {
    height: 44px;
  }
}

/* ===== 搜索下拉面板：历史搜索（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: 0 8px 24px rgba(0, 0, 0, 0.4);
  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: var(--rank-1); }
[data-hot-list] li:nth-child(2) .dg-sp-num { color: var(--rank-2); }
[data-hot-list] li:nth-child(3) .dg-sp-num { color: var(--rank-3); }
.dg-sp-word {
  font-size: 13px;
  color: var(--text-light);
  transition: color 0.15s;
}
.dg-sp-item:hover .dg-sp-word { color: var(--accent); }

/* ===== 手机底部导览（widget/mobile_tabbar，≤767px） ===== */
.dg-tabbar {
  display: none;
}

@media (max-width: 767px) {
  .dg-tabbar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg);
    border-top: 1px solid var(--border);
  }

  .dg-tabbar-list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .dg-tabbar-list li {
    flex: 1 1 0;
    min-width: 0;
  }

  .dg-tabbar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.3;
  }

  .dg-tabbar-link .mac-icon {
    width: 24px;
    height: 24px;
  }

  .dg-tabbar-link.dg-active {
    color: var(--accent);
  }

  .dg-tabbar-link.dg-active .mac-icon {
    fill: url(#dg-grad-nav);
  }

  .dg-page-shell {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
}

/* ===== 首页内容区 ===== */
/* 内容宽度与左右留白由 :root 的 --max-w／--gutter 随断点切换 */
.dg-home-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 30px var(--gutter) 20px;
}

/* ===== 分类区块日排行（index.md 强制2.3）：桌面态快捷导览，移动端隐藏 ===== */
.sh-dayrank {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0 20px;
  padding: 0 0 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.sh-dayrank::-webkit-scrollbar {
  display: none;
}

.sh-dayrank li {
  flex-shrink: 0;
  white-space: nowrap;
}

.sh-dayrank a {
  font-size: 12px;
  color: var(--text-muted);
}

.sh-dayrank a:hover {
  color: var(--accent);
}

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

/* ===== 选集列表（widget/playlist，详情/播放页共用）：标题右侧为来源页签，页签与下方面板相接 ===== */
.dg-playlist .dg-module-hd {
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 0;
}

.dg-playlist .dg-module-title {
  align-self: center;
  margin-right: auto;
  font-size: 26px;
}

.dg-playlist-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: center;
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.dg-playlist-sort:hover,
.dg-playlist-sort[aria-pressed="true"] {
  color: var(--accent);
}

.dg-playlist-sources {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.dg-playlist-sources > li {
  flex-shrink: 0;
}

.dg-source-tab {
  position: relative;
  flex-shrink: 0;
  height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.dg-source-tab:hover,
.dg-source-tab.dg-active {
  background: var(--grad-accent);
  color: var(--white);
}

.dg-source-tab.dg-active {
  font-weight: 700;
}

.dg-source-tab:hover .dg-source-count,
.dg-source-tab.dg-active .dg-source-count {
  background: rgba(255, 255, 255, 0.28);
}

.dg-source-count {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--grad-play);
  color: var(--white);
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
}

.dg-playlist-empty {
  margin-top: 17px;
  padding: 24px 0;
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.dg-playlist-panel {
  display: none;
  padding: 15px;
  border-radius: var(--radius) 0 var(--radius) var(--radius);
  background: var(--bg-elev);
}

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

/* 超过约 4～5 排在框内滚动（目标站为 30vh；需求方决定比照目标站，不用展开按钮） */
.dg-playlist-episodes-wrap {
  max-height: clamp(160px, 30vh, 230px);
  padding: 6px 5px 2px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--scrollbar) transparent;
  scrollbar-width: thin;
}

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

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

/* auto-fill 按最长集名算出栏数，剩余宽度由 1fr 均分，整行撑满不留右侧空白 */
.dg-playlist-episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(max(var(--ep-w, 3em), 3em) + 36px)), 1fr));
  gap: 10px;
}

/* li 只做列表语义，让集数按钮撑满格子 */
.dg-playlist-episodes > li {
  display: grid;
  min-width: 0;
}

/* 长集名换行，不用省略号吞掉（强制8.2） */
.dg-episode {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 35px;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-tag);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
  transition: color 0.3s ease-in, background 0.3s ease-in;
}

.dg-episode:hover {
  background: var(--grad-accent);
  color: var(--white);
}

.dg-episode.dg-active {
  background: var(--grad-play);
  color: var(--white);
  font-weight: 700;
}

/* 当前集前的小三角播放记号 */
.dg-episode.dg-active::before {
  content: '';
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-right: 6px;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent var(--white);
}

/* 连载中最新一集的「NEW」角标 */
.dg-episode--new {
  position: relative;
}

.dg-episode--new::after {
  content: 'NEW';
  position: absolute;
  top: -5px;
  right: -4px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--white);
  font-size: 9px;
  font-weight: 500;
  line-height: 12px;
}

/* 纯数字集名：固定 40px 方块，一排放得下更多 */
.dg-playlist-episodes--num {
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
}

.dg-playlist-episodes--num .dg-episode {
  min-height: 40px;
  padding: 0;
}

.dg-playlist-episodes--num .dg-episode.dg-active::before {
  display: none;
}

.dg-playlist-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 15px;
  padding: 8px 0;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
}

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

.dg-playlist-more[hidden] {
  display: none;
}

.dg-playlist-more[aria-expanded="true"] .mac-icon {
  transform: rotate(180deg);
}


/* 手机：来源页签换到标题下一行、可横向滑动（强制8.3） */
@media (max-width: 767px) {
  .dg-playlist .dg-module-hd {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .dg-playlist .dg-module-title {
    font-size: 20px;
  }

  .dg-playlist-sources {
    order: 3;
    width: 100%;
  }

  .dg-source-tab {
    height: 40px;
    font-size: 13px;
  }

  .dg-playlist-panel {
    padding: 15px;
    border-radius: 0 var(--radius) var(--radius) var(--radius);
  }

  .dg-playlist-episodes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dg-episode {
    min-height: 30px;
    padding: 4px 6px;
    font-size: 12px;
  }
}

/* ===== 热点资讯 ===== */
.dg-news-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

.dg-news-card {
  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 h3 {
  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-card {
  position: relative;
  z-index: 1;
  flex: 0 0 calc((100% - 50px) / 6);
  min-width: 0;
}

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

/* hover 详情由 widget/vod_card_popout 浮层呈现（skill 强制15）；卡片本身只做目标站的红色底光＋标题变色 */
@media (hover: hover) and (pointer: fine) {
  .dg-vod-card:hover {
    z-index: 50;
  }

  .dg-vod-card:hover .dg-vod-thumb {
    box-shadow: var(--shadow-card-hover);
  }

  .dg-vod-card:hover .dg-vod-name {
    color: var(--accent);
  }
}

/* 直版封面 5:7（目标站 178x250）；首页「正在热映」用 .dg-vod-grid--wide 改横版 */
.dg-vod-thumb {
  position: relative;
  aspect-ratio: 5/7;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius-card);
  background: var(--bg-elev) url('../img/load.gif') no-repeat center center;
  background-size: cover;
  transition: box-shadow 0.3s ease-in;
}

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

/* 集数/完结状态：封面底部置中白字＋淡渐层（目标站直版卡写法） */
.dg-vod-remarks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 8px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0));
}

.dg-vod-name {
  margin: 10px 0 0;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

/* 又名（vod_sub）：片名下一行灰色小字，没有值整行不输出 */
.dg-vod-sub {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ===== 影片卡片 hover 详情浮层（skill 强制15，样板 tp17/tp13）===== */
/* 边缘翻转 pop-left/pop-right 由 vod_card.js 在 mouseenter 时判定 */
.hover-popout {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 60;
  /* 至少比卡片大一圈：直版大卡时固定 300px 会比卡片还小 */
  width: max(300px, calc(100% + 40px));
  min-height: calc(100% + 30px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%) scale(0.6667);
  transform-origin: center center;
}

.hover-popout.pop-left {
  left: 0;
  transform: translate(0, -50%) scale(0.6667);
  transform-origin: left center;
}

.hover-popout.pop-right {
  left: auto;
  right: 0;
  transform: translate(0, -50%) scale(0.6667);
  transform-origin: right center;
}

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  .dg-vod-card:hover .hover-popout {
    display: flex;
    flex-direction: column;
    visibility: visible;
    pointer-events: auto;
    animation: popoutIn 0.25s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.15s;
  }

  .dg-vod-card:hover .hover-popout.pop-left {
    animation-name: popoutInLeft;
  }

  .dg-vod-card:hover .hover-popout.pop-right {
    animation-name: popoutInRight;
  }
}

@keyframes popoutIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.6667); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes popoutInLeft {
  from { opacity: 0; transform: translate(0, -50%) scale(0.6667); }
  to { opacity: 1; transform: translate(0, -50%) scale(1); }
}

@keyframes popoutInRight {
  from { opacity: 0; transform: translate(0, -50%) scale(0.6667); }
  to { opacity: 1; transform: translate(0, -50%) scale(1); }
}

.popout-inner {
  position: relative;
  flex: 1;
  padding-bottom: 14px;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-white);
}

.hover-popout .popout-cover {
  position: relative;
  display: block;
  flex-grow: 1;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-elev);
}

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

.popout-cover-shadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 70px;
  background: linear-gradient(rgba(0, 0, 0, 0), var(--bg-white));
}

.popout-title-wrap {
  position: relative;
  margin-top: -30px;
  padding: 0 14px;
}

.popout-title {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.popout-mix {
  padding: 10px 14px 0;
}

.popout-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
}

.popout-tag {
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius);
  font-size: 11px;
  line-height: 20px;
  white-space: nowrap;
}

.popout-tag--year {
  flex-shrink: 0;
  color: var(--white);
  background: var(--accent);
  font-weight: 700;
}

.popout-tag--main {
  color: var(--accent);
  background: var(--accent-light);
}

.popout-tag--grey {
  color: var(--text-light);
  background: var(--bg-elev);
}

.popout-tag--plain {
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
}

.popout-label {
  color: var(--text-muted);
}

.popout-actor {
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.popout-desc {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.popout-score {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px 0;
  color: var(--text);
  font-size: 12px;
}

.popout-score .mac-icon,
.popout-score .score-num {
  color: var(--star);
}

.popout-score .score-num {
  font-weight: 700;
}

/* ===== 影片文字列表（补充标题清单，桌机限定） ===== */



/* ===== 首页（比照目标站：轮播 → 正在热映 → 分类区块 → 排行榜） ===== */

/* 头图轮播：widget/home_hero（首页与分类频道页共用），home_hero.js 选取 data-hero-* */
.dg-hero {
  position: relative;
  /* 桌机满版：抵销顶栏高度、main 上内距与左右留白，从页面最顶端开始，顶栏透明叠在上面 */
  width: 100vw;
  height: 35vw;
  margin: calc(-1 * (var(--topbar-h) + 30px)) calc(50% - 50vw) var(--module-gap);
  overflow: hidden;
  background: var(--bg-white);
}

.dg-hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.dg-hero-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
}

.dg-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
}

/* 底部与左侧渐层：衬出左下文字，并与页底色接起来 */
.dg-hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(var(--bg-rgb), 0.55) 0%, rgba(var(--bg-rgb), 0) 150px),
    linear-gradient(to top, var(--bg) 0%, rgba(var(--bg-rgb), 0) 45%),
    linear-gradient(to right, rgba(var(--bg-rgb), 0.6) 0%, rgba(var(--bg-rgb), 0) 50%);
}

/* 左下信息区与右侧排行对齐到内容区边缘 */
.dg-hero-info {
  position: absolute;
  left: max(var(--gutter), calc((100% - var(--max-w)) / 2));
  bottom: 70px;
  z-index: 1;
  max-width: 480px;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.dg-hero-remarks {
  display: inline-block;
  margin: 0 0 8px;
  padding: 0 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.51);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 20px;
}

.dg-hero-title {
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dg-hero-title a {
  color: var(--white);
}

.dg-hero-blurb {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dg-hero-dots {
  position: absolute;
  left: max(var(--gutter), calc((100% - var(--max-w)) / 2));
  bottom: 40px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.dg-hero-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--white);
  opacity: 0.4;
  cursor: pointer;
  transition: width 0.25s, background 0.25s, opacity 0.25s;
}

.dg-hero-dot.dg-active {
  width: 18px;
  background: var(--accent);
  opacity: 1;
}

/* 右侧热播排行：悬停切换左侧轮播（home_hero.js 的 data-hero-rank） */
.dg-hero-rank {
  position: absolute;
  top: calc(var(--topbar-h) + 30px);
  right: max(var(--gutter), calc((100% - var(--max-w)) / 2));
  z-index: 2;
  width: 270px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(var(--bg-rgb), 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.dg-hero-rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-hero-rank-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-card);
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
  transition: background 0.3s ease-in;
}

.dg-hero-rank-item.dg-active {
  background: rgba(var(--accent-rgb), 0.28);
  font-weight: 700;
}

.dg-hero-rank-no {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.dg-hero-rank-list li:nth-child(1) .dg-hero-rank-no { background: var(--rank-1); color: var(--white); }
.dg-hero-rank-list li:nth-child(2) .dg-hero-rank-no { background: var(--rank-2); color: var(--white); }
.dg-hero-rank-list li:nth-child(3) .dg-hero-rank-no { background: var(--rank-3); color: var(--white); }

.dg-hero-rank-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 平板/手机：排行收起，轮播改为内缩圆角卡 */
@media (max-width: 1239px) {
  .dg-hero-rank {
    display: none;
  }
}

@media (max-width: 899px) {
  .dg-hero {
    width: auto;
    height: auto;
    aspect-ratio: 100 / 35;
    margin: 0 0 var(--module-gap);
    border-radius: var(--radius);
  }

  .dg-hero-info {
    left: 20px;
    bottom: 34px;
    max-width: 70%;
  }

  .dg-hero-title {
    font-size: 20px;
  }

  .dg-hero-blurb {
    display: none;
  }

  .dg-hero-dots {
    left: 20px;
    bottom: 14px;
  }
}

@media (max-width: 767px) {
  .dg-hero {
    aspect-ratio: 100 / 45;
  }

  .dg-hero-info {
    left: 15px;
    bottom: 28px;
  }

  .dg-hero-title {
    font-size: 18px;
  }

  .dg-hero-dots {
    left: 15px;
    bottom: 12px;
  }
}

/* 首页快捷分类：大类名＋2 个子分类，右侧排行榜/专题入口；手机隐藏 */
.dg-shortcuts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 var(--module-gap);
}

.dg-shortcuts-list,
.dg-shortcuts-extra {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-shortcuts-list {
  gap: 40px;
}

.dg-shortcut {
  display: block;
  text-align: center;
  transition: color 0.3s ease-in;
}

.dg-shortcut-name {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.dg-shortcut-sub {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.dg-shortcut-sub em {
  margin: 0 4px;
  font-style: normal;
}

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

.dg-shortcuts-extra {
  gap: 30px;
}

.dg-shortcut-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
  transition: color 0.3s ease-in;
}

.dg-shortcut-icon .mac-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.dg-shortcut-icon:hover {
  color: var(--text);
}

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

/* 标题前的火焰图示 */
.dg-title-icon {
  width: 0.9em;
  height: 0.9em;
  margin-right: 4px;
  color: var(--accent);
  vertical-align: -0.1em;
}

/* 分类区块：左 6 栏卡片 + 右侧日榜 250px（≥1240px，比照目标站 .module-side）；窄屏日榜接在卡片下方 */
.dg-sec-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
  align-items: start;
}

.dg-sec-main {
  min-width: 0;
}

.dg-side-rank-title {
  margin: 0 0 15px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
}

/* 整列同一套语言：一整块面板、1px 底色线分隔；名次都是同款斜切块，前三名只换色并加微光泽，4 名起沿用目标站浅灰块 */
.dg-side-rank-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--bg-elev);
  list-style: none;
}

.dg-side-rank-list li + li {
  border-top: 1px solid var(--bg);
}

.dg-side-rank-item {
  position: relative;
  display: block;
  min-height: 62px;
  padding: 12px 16px 12px 66px;
  transition: background 0.3s ease-in;
}

.dg-side-rank-item:hover {
  background: var(--bg-hover);
}

.dg-side-rank-no {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 0;
  width: 36px;
  height: 20px;
  margin-top: -10px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
}

.dg-side-rank-no::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 2px;
  background: var(--chip-light);
  transform: skewX(-10deg);
}

.dg-side-rank-no--1,
.dg-side-rank-no--2,
.dg-side-rank-no--3 {
  color: var(--white);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.dg-side-rank-no--1::before {
  background: var(--rank-grad-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dg-side-rank-no--2::before {
  background: var(--rank-grad-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dg-side-rank-no--3::before {
  background: var(--rank-grad-3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dg-side-rank-text {
  display: block;
  min-width: 0;
}

.dg-side-rank-text strong,
.dg-side-rank-text em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dg-side-rank-text strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.3s ease-in;
}

.dg-side-rank-text em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.dg-side-rank-item:hover strong {
  color: var(--accent);
}

@media (max-width: 1239px) {
  .dg-sec-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 区块（module）：中文标题 + 英文浮水印、右侧 tab 或「更多」 */
.dg-module {
  margin-bottom: var(--module-gap);
}

.dg-module-hd {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 34px;
  margin-bottom: 15px;
}

.dg-module-title {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
}

.dg-module-title a {
  position: relative;
  z-index: 1;
  color: inherit;
}

.dg-module-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 35px;
  margin-left: auto;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.dg-module-tabs-wrap {
  position: relative;
  min-width: 0;
  margin-left: auto;
}

/* 手机版才显示的「推荐 ▾」下拉钮 */
.dg-module-tabs-toggle {
  display: none;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px 0 15px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.dg-module-tabs-toggle .mac-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.dg-module-tabs-wrap.dg-is-open .dg-module-tabs-toggle .mac-icon {
  transform: rotate(180deg);
}

.dg-module-tabs {
  display: flex;
  gap: 0;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dg-module-tabs::-webkit-scrollbar {
  display: none;
}

.dg-module-tab {
  flex-shrink: 0;
  height: 35px;
  padding: 0 20px;
  border: 0;
  border-radius: 18px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  line-height: 35px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.dg-module-tab:hover {
  background: var(--bg-hover);
}

.dg-module-tab.dg-active {
  background: var(--accent-tab);
  color: var(--white);
  font-weight: 700;
}

/* 影片卡网格：桌机/平板 6 栏、手机 3 栏（§12.1） */
.dg-vod-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-vod-grid[hidden] {
  display: none;
}

/* 横版卡（正在热映）：封面 4:3（需求方指定，目标站为 16:9.3）、集数改右上角红色胶囊 */
.dg-vod-grid--wide .dg-vod-thumb {
  aspect-ratio: 4 / 3;
}

.dg-vod-grid--wide .dg-vod-remarks {
  left: auto;
  right: 5px;
  top: 5px;
  bottom: auto;
  max-width: calc(100% - 10px);
  padding: 2px 8px;
  border-radius: 8px 7px 8px 8px;
  background: var(--accent);
}

/* 分类页标题区（比照目标站）：页标题 38px/700 → 子分类方块（浅色底，目标站原样） */
.dg-page-title {
  margin: 0;
  color: var(--text);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.6;
}

.dg-listhead {
  margin: 10px 0 var(--module-gap);
}

.dg-listhead-items {
  display: flex;
  margin: 0 -10px 0 0;
  padding: 0;
  list-style: none;
}

.dg-tile {
  position: relative;
  flex: 1;
  height: 80px;
  margin-right: 10px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--tile-light);
  text-align: center;
  transition: background 0.3s ease-in;
}

.dg-tile:hover {
  background: var(--tile-light-hover);
}

.dg-tile.dg-selected,
.dg-tile.dg-selected:hover {
  background: var(--tag-warm);
}

.dg-tile-link {
  position: relative;
  z-index: 2;
  display: block;
  height: 100%;
  padding: 15px 10px;
  color: var(--black);
  font-size: 14px;
}

.dg-tile-title {
  position: relative;
  top: 8px;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.dg-tile-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 10px;
  height: 2px;
  margin-left: -5px;
  border-radius: 50px;
  background: var(--text-soft);
  transition: all 0.3s ease-in;
}

.dg-tile-link:hover .dg-tile-title::after,
.dg-tile.dg-selected .dg-tile-title::after {
  width: 36px;
  margin-left: -18px;
  background: var(--accent);
}

.dg-tile.dg-selected .dg-tile-title {
  color: var(--accent);
}

.dg-tile-bg {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: inline-block;
  width: 150px;
  overflow: hidden;
  border-radius: 0 0 10px 10px;
  color: rgba(0, 0, 0, 0.03);
  font-size: 60px;
  font-weight: 900;
  line-height: 50px;
  text-align: right;
  text-indent: 20px;
  white-space: nowrap;
  pointer-events: none;
}

.dg-tile-lib .dg-tile-bg {
  text-align: left;
  transform: scale(1.8);
}

.dg-tile-sep {
  flex: none;
  align-self: center;
  width: 2px;
  height: 70px;
  margin: 5px 10px 5px 0;
  border-radius: 5px;
  background: var(--chip-light);
}

@media (max-width: 899px) {
  .dg-page-title {
    font-size: 26px;
  }

  .dg-listhead {
    margin-bottom: var(--module-gap);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dg-listhead::-webkit-scrollbar {
    display: none;
  }

  /* 宽度随文字撑开，不再用 vw 固定宽：「XX影片库」这类较长的名称在平板上会被挤成两行 */
  .dg-tile {
    flex: none;
    width: auto;
    min-width: 96px;
  }

  .dg-tile-link {
    padding: 15px 22px;
  }
}

@media (max-width: 559px) {
  .dg-listhead-items {
    margin-right: 0;
  }

  .dg-tile {
    width: auto;
    min-width: 20vw;
    height: 58px;
    margin-right: 6px;
  }

  .dg-tile-link {
    padding: 0 15px;
    line-height: 58px;
  }

  .dg-tile-title {
    top: 0;
    font-size: 16px;
  }

  .dg-tile-title::after,
  .dg-tile-bg {
    display: none;
  }
}


/* 排行榜名次角标（卡片左上角，1/2/3 名红/橙/黄） */
.dg-vod-rank {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 40px;
  height: 50px;
  padding-left: 7px;
  border-top-left-radius: var(--radius-card);
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  font-size: 30px;
  font-style: italic;
  font-weight: 700;
  line-height: 48px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
}

.dg-vod-rank--1 { background: var(--rank-1); }
.dg-vod-rank--2 { background: var(--rank-2); }
.dg-vod-rank--3 { background: var(--rank-3); }

@media (max-width: 767px) {
  .dg-vod-rank {
    width: 32px;
    height: 40px;
    padding-left: 5px;
    font-size: 24px;
    line-height: 38px;
  }
}

/* 排行榜：每张榜卡沿用 widget/vodlist_rank，这里改成目标站「名次＋片名/备注＋箭头」样式 */


















/* 名次：大号数字，1/2/3 名红/橙/黄、其余灰（目标站实测） */














@media (min-width: 768px) and (max-width: 1024px) {
  .dg-module-title {
    font-size: 24px;
  }

  /* 平板卡片间距与手机版相同（需求方指定，不比照目标站的 18px 15px） */
  .dg-vod-grid {
    gap: 15px 10px;
  }

  /* 正在热映维持 6 栏（§12.1），卡片窄，角标与片名缩小：角标比照目标站平板 10px */
  .dg-vod-grid--wide .dg-vod-remarks {
    top: 4px;
    right: 4px;
    max-width: calc(100% - 8px);
    padding: 3px 7px 2px;
    font-size: 10px;
    line-height: 1.6;
  }

  .dg-vod-grid--wide .dg-vod-name {
    margin-top: 8px;
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .dg-module {
    margin-bottom: var(--module-gap);
  }

  .dg-module-hd {
    gap: 12px;
    margin-bottom: 15px;
  }

  .dg-module-title {
    font-size: 20px;
  }


  .dg-module-tabs-toggle {
    display: inline-flex;
  }

  .dg-module-tabs {
    display: none;
  }

  .dg-module-tabs-wrap.dg-is-open .dg-module-tabs {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    min-width: 120px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .dg-module-tabs-wrap.dg-is-open .dg-module-tab {
    text-align: left;
  }

  .dg-vod-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px 10px;
  }

  .dg-vod-remarks {
    font-size: 10px;
  }

  /* 正在热映、排行榜改成单排横向滚动（目标站手机版），右侧露出下一张提示可滑 */
  .dg-vod-grid--wide {
    display: flex;
    gap: 10px;
    margin-right: -15px;
    padding-right: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

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

  .dg-vod-grid--wide > .dg-vod-card {
    flex: 0 0 150px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-elev);
    scroll-snap-align: start;
  }

  .dg-vod-grid--wide .dg-vod-thumb {
    border-radius: 0;
  }

  .dg-vod-grid--wide .dg-vod-name {
    margin: 0;
    padding: 8px 10px;
  }

  

  
}

/* ===== 资讯页共用（art/type + art/detail）：分类导览、两栏版面、侧栏区块 ===== */
/* 分类导览：左上分类标题＋下方膠囊页签（选中橙→红渐层，同首页分类区块的 tab 语言） */
.dg-art-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 var(--module-gap);
}

.dg-art-tabs-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.dg-art-tabs-kicker {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.dg-art-tabs-kicker--link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: color 0.3s ease-in;
}

.dg-art-tabs-kicker--link:hover {
  color: var(--accent);
}

.dg-art-tabs-title {
  color: var(--text);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.6;
}

.dg-art-tabs-list {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.dg-art-tabs-list::-webkit-scrollbar {
  display: none;
}

.dg-art-tab {
  flex-shrink: 0;
  height: 35px;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 35px;
  white-space: nowrap;
  transition: background 0.3s ease-in, color 0.3s ease-in;
}

.dg-art-tab:hover {
  background: var(--bg-hover);
}

.dg-art-tab.dg-active {
  background: var(--grad-accent);
  color: var(--white);
  font-weight: 700;
}

@media (max-width: 767px) {
  .dg-art-tabs {
    margin-bottom: 20px;
  }

  .dg-art-tabs-title {
    font-size: 26px;
  }
}

.dg-art-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 20px;
}

.dg-art-content {
  min-width: 0;
}

.dg-art-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* 资讯侧栏里的日榜：标题收进面板内，面板上缘与左侧内容（轮播／文章卡）上缘齐平 */
.dg-art-side .dg-side-rank {
  padding: 15px 12px 8px;
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.dg-art-side .dg-side-rank-title {
  margin: 0 0 10px;
  padding: 0 6px;
  font-size: 20px;
}

.dg-art-side .dg-side-rank-list {
  border-radius: 0;
  background: none;
}

.dg-art-side .dg-side-rank-item {
  padding-right: 6px;
  padding-left: 62px;
}

.dg-art-side .dg-side-rank-no {
  left: 6px;
}

/* 桌机两栏时侧栏吸顶：滚动文章列表／正文时「热播影视」始终停在顶栏下方；过高时栏内自己滚动 */
@media (min-width: 1200px) {
  .dg-art-side {
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
    max-height: calc(100vh - var(--topbar-h) - 40px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .dg-art-side::-webkit-scrollbar {
    display: none;
  }
}

.dg-art-side-block {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-white);
}

.dg-art-side-title {
  margin: 0;
  padding: 15px 18px 5px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}

/* 首页排行榜卡在 ≤1299px 是横向滚动列里的固定宽卡片，放进侧栏时取消 */


/* 侧栏 <1200px 改接在内容下方 */
@media (max-width: 1199px) {
  .dg-art-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dg-art-sb-read-list {
  margin: 0;
  padding: 6px 0;
}

.dg-art-sb-read-item {
  border-bottom: 1px solid var(--bg);
}

.dg-art-sb-read-item:last-child {
  border-bottom: none;
}

.dg-art-sb-read-item a {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  align-items: flex-start;
  transition: background 0.15s;
}

.dg-art-sb-read-item a:hover {
  background: var(--bg-elev);
}

.dg-art-sb-read-thumb {
  width: 72px;
  height: 50px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0;
}

.dg-art-sb-read-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.dg-art-sb-read-item:hover .dg-art-sb-read-thumb img {
  transform: scale(1.05);
}

.dg-art-sb-read-info {
  flex: 1;
  min-width: 0;
}

.dg-art-sb-read-title {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
}

.dg-art-sb-read-item:hover .dg-art-sb-read-title {
  color: var(--accent);
}

.dg-art-sb-read-cat {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--tag-warm);
  color: rgba(0, 0, 0, 0.68);
  font-size: 11px;
}

/* ===== 排行文字清单（大号编号 + 双行资讯，用于侧栏 + 总榜单） ===== */








/* 排名编号徽章：全站排行榜元件共用（排行榜页 Top1-3 + 侧栏/文字条列 1-N 名），
   1/2/3 名各自实测目标站红/橙/黄，其余名次为中性灰底色 */
















/* 标签胶囊列（地区/语言/年份，深色方块小标签） */
/* 备注只在首页排行榜（.dg-rank-paper）显示，其余排行清单维持地区/语言/年份标签 */










/* ===== 专题卡（widget/topic_card，首页与专题列表页共用）：16:9 封面，片名与简介叠在底部渐层上 ===== */
.dg-topic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-topic-card {
  min-width: 0;
}

.dg-topic-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: box-shadow 0.3s;
}

.dg-topic-link:hover {
  box-shadow: var(--shadow-card-hover);
}

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

.dg-topic-link:hover .dg-topic-img {
  transform: scale(1.05);
}

.dg-topic-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}

.dg-topic-count {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  font-size: 12px;
  line-height: 18px;
}

.dg-topic-content {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  z-index: 2;
  color: var(--white);
}

.dg-topic-name {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

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

.dg-topic-blurb {
  margin: 2px 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 1024px) {
  .dg-topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px 12px;
  }
}

/* 手机 2 栏（§12.1 专题卡例外） */
@media (max-width: 767px) {
  .dg-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dg-topic-blurb {
    display: none;
  }
}

/* ===== 友情链接（首页底部，比照目标站 #friendlink：1px 顶线、「友情链接：」标题与链接同一行流式排列） ===== */
.dg-friend-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--bg-tag);
}

.dg-friend-links-title {
  margin: 0 10px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.dg-friend-links-list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-friend-links-list a {
  display: inline-block;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  transition: color 0.3s ease-in;
}

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

/* ===== Footer ===== */
.dg-site-footer {
  margin-top: auto;
  background: var(--bg-elev);
  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;
}

/* 链接列：居中，链接之间 1px 细线分隔（目标站页脚 .sitemap 同款） */
.dg-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.dg-footer-links a {
  padding: 0 12px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-muted);
  transition: color 0.3s ease-in;
}

.dg-footer-links a + a {
  border-left: 1px solid var(--bg-tag);
}

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

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

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

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

.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-news-card:hover .dg-news-thumb::after {
  background: rgba(0, 0, 0, 0.25);
}

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

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

/* ===== 通用分页（widget/pagination 全站共用，比照目标站胶囊页码） ===== */
.dg-pagination {
  padding: 10px 0 0;
}

.dg-pagination-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-page-btn,
.dg-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 50px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.3s ease-in, background 0.3s ease-in;
}

.dg-page-btn {
  padding: 0 18px;
}

.dg-page-btn:hover,
.dg-page-num:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.dg-page-num.dg-active {
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
}

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

/* ── 平板 768px ~ 1024px ── */
@media (max-width: 1024px) {
  /* 平板可用宽度较窄，箭头改叠加悬浮在卡片列上（不佔版面宽度），
     卡片列才能拉满整个 wrap 宽度 */

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

  .dg-news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── 手机 < 768px ── */
@media (max-width: 767px) {
  .dg-home-content {
    padding: 0 var(--gutter) 20px;
  }

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

/* ── 小手机 < 480px ── */
@media (max-width: 479px) {
  .dg-vod-card {
    flex: 0 0 calc((100% - 10px) / 3);
  }

  .dg-vod-name {
    margin-top: 8px;
    font-size: 12px;
  }

  .dg-vod-sub {
    font-size: 11px;
  }
}

/* ===== 共用评论元件 ===== */
.dg-comment-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 25px 30px;
  margin-bottom: 14px;
}
.dg-cmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dg-cmt-title { font-size: 20px; font-weight: 700; color: var(--text); }
.dg-cmt-count { margin-left: 8px; font-size: 13px; 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;
}

/* 评论列表：平铺，条间 1px 底色线（同留言板） */
.dg-cmt-list { margin: 0 0 12px; padding: 0; }
.dg-cmt-item { padding: 16px 0; border-bottom: 1px solid var(--bg); }
.dg-cmt-item:last-child { border-bottom: none; }
.dg-cmt-item-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.dg-cmt-item-user { font-size: 14px; font-weight: 700; color: var(--text); }
.dg-cmt-item-time { font-size: 12px; color: var(--text-muted); }
.dg-cmt-item-content { font-size: 14px; color: var(--text-light); line-height: 1.7; overflow-wrap: anywhere; }
.dg-cmt-item-reply-list {
  display: block;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.dg-cmt-item-reply {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  background: var(--bg-tag);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.dg-cmt-reply-label { font-weight: 700; color: var(--accent); }
.dg-cmt-item-actions { display: flex; gap: 16px; margin-top: 8px; }
.dg-cmt-action-link {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease-in;
}
.dg-cmt-action-link:hover { color: var(--accent); }
.dg-cmt-action-link.disabled { opacity: 0.5; pointer-events: none; }

.dg-cmt-paging {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px 0 0;
  list-style: none;
}
.dg-cmt-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  background: var(--bg-tag);
  border: none;
  border-radius: 17px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease-in, background 0.3s ease-in;
}
.dg-cmt-page-btn:hover { color: var(--accent); }
.dg-cmt-page-btn.dg-is-active { background: var(--grad-play); color: var(--white); }
.dg-cmt-page-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* 输入表单：灰底输入框，字数／验证码／发布放在下方一列 */
.dg-cmt-textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.6;
  box-sizing: border-box;
  background: var(--bg-tag);
  transition: border-color 0.3s ease-in;
}
.dg-cmt-textarea:focus { border-color: var(--accent); }
.dg-cmt-form-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0 0;
}
.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: 700; }
.dg-cmt-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dg-cmt-verify-input {
  width: 96px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-tag);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s ease-in;
}
.dg-cmt-verify-input:focus { border-color: var(--accent); }
.dg-cmt-captcha {
  height: 36px;
  width: auto;
  border-radius: var(--radius);
  cursor: pointer;
  display: block;
}
.dg-cmt-submit {
  height: 36px;
  padding: 0 28px;
  background: var(--grad-play);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.3s ease-in;
}
.dg-cmt-submit:hover { opacity: 0.9; }

@media (max-width: 767px) {
  .dg-comment-section {
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    border-bottom: 8px solid var(--bg-light);
    padding: 15px;
  }
  .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-white);
  border-radius: var(--radius-lg);
  padding: 40px 36px 28px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.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: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}

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

.dg-modal-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.dg-modal-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--bg-tag);
  height: 38px;
  padding: 0;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color 0.3s ease-in;
}
.dg-modal-input:focus { border-bottom-color: var(--accent); }
.dg-modal-input::placeholder { color: var(--text-muted); }
.dg-modal-verify { display: flex; align-items: center; gap: 10px; }
.dg-modal-verify .dg-modal-input { flex: 1; min-width: 0; }
.dg-modal-captcha { flex-shrink: 0; width: 100px; height: 38px; border-radius: var(--radius); cursor: pointer; object-fit: contain; }

.dg-modal-submit {
  width: 100%;
  height: 44px;
  background: var(--grad-play);
  color: var(--white);
  border: none;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.3s ease-in;
}
.dg-modal-submit:hover { opacity: 0.9; }

.dg-modal-footer {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  font-size: 13px;
}

.dg-modal-link {
  padding: 0 12px;
  color: var(--text-light);
  transition: color 0.3s ease-in;
}
.dg-modal-link + .dg-modal-link { border-left: 1px solid var(--bg-tag); }
.dg-modal-link:hover { color: var(--accent); }
.dg-modal-link[aria-disabled="true"] { color: var(--text-muted); cursor: default; }

/* ── 系统弹窗（MAC.Pop，home.js 动态注入，样式写死为白底）覆写为深色风格 ── */
/* 播放器 iframe 自带 z-index:99998，弹窗要盖过它 */
.mac_pop_bg,
.mac_pop_msg_bg {
  z-index: 100000 !important;
  background: rgba(0, 0, 0, 0.55);
}

.mac_pop,
.mac_pop_msg {
  z-index: 100001 !important;
  background-color: var(--bg-white);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

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

.mac_pop .pop-ok {
  background: var(--grad-play);
  border-radius: var(--radius);
}
.mac_pop .pop-cancel {
  background-color: var(--bg-tag);
  border-color: transparent;
  border-radius: var(--radius);
  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 ── */
.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); }
}

/* ===== 详情页基础信息（widget/detail_hero，详情/下载页共用）=====
   比照目标站：圆角面板（左资讯、右海报），内距 25px，桌机向左右各外扩 25px；元素顺序为标题/标签 → 资讯行 → 操作按钮 */
.dg-vd-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 0 25px;
  margin: 0 -25px var(--module-gap);
  padding: 25px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.dg-vd-poster {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  width: 200px;
  aspect-ratio: 5 / 7;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg-tag);
}

.dg-vd-poster img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-card);
  object-fit: cover;
}

.dg-vd-body {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

/* 剧情：下一行横跨两栏，一直延伸到海报下方 */
.dg-vd-plot {
  grid-column: 1 / -1;
  margin: 0;
}

.dg-vd-head {
  padding: 0;
}

.dg-vd-title {
  margin: 0;
  padding: 0 0 10px;
  color: var(--text-muted);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.3;
}

.dg-vd-title-sub {
  margin-left: 12px;
  font-size: 22px;
  font-weight: 400;
}

.dg-vd-subtitle {
  margin: -5px 0 0;
  padding: 0 0 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.dg-vd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0 0;
}

.dg-vd-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--bg-tag);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 28px;
}

.dg-vd-tag dd {
  margin: 0;
}

.dg-vd-tag--type {
  background: var(--tag-warm);
  color: rgba(0, 0, 0, 0.68);
}

.dg-vd-tag--type .mac-icon {
  margin-right: 4px;
  color: var(--accent-warm);
}

.dg-vd-tag a,
.dg-vd-names a,
.dg-vd-crumbs a {
  color: inherit;
  transition: color 0.3s ease-in;
}

.dg-vd-tag a:hover,
.dg-vd-names a:hover,
.dg-vd-crumbs a:hover {
  color: var(--accent);
}

.dg-vd-tag a + a::before,
.dg-vd-names a + a::before {
  content: '/';
  margin: 0 6px;
  color: var(--text-muted);
}

.dg-vd-card {
  display: flex;
  flex-direction: column;
}

.dg-vd-meta {
  display: flex;
  flex-direction: column;
  margin: 20px 0 0;
}

.dg-vd-meta-row {
  display: flex;
  padding: 5px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
}

.dg-vd-meta-row[data-o="1"] { order: 1; }
.dg-vd-meta-row[data-o="2"] { order: 2; }
.dg-vd-meta-row[data-o="3"] { order: 3; }
.dg-vd-meta-row[data-o="4"] { order: 4; }
.dg-vd-meta-row[data-o="5"] { order: 5; }
.dg-vd-meta-row[data-o="6"] { order: 6; }
.dg-vd-meta-row[data-o="7"] { order: 7; }
.dg-vd-meta-row[data-o="8"] { order: 8; }
.dg-vd-meta-row[data-o="9"] { order: 9; }
.dg-vd-meta-row[data-o="10"] { order: 10; }
.dg-vd-meta-row[data-o="11"] { order: 11; }
.dg-vd-meta-row[data-o="12"] { order: 12; }

.dg-vd-meta-row dt {
  flex: 0 0 auto;
  min-width: 46px;
  margin-right: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.dg-vd-meta-row dd {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.dg-vd-names--clamp {
  display: block;
}

.dg-vd-crumbs span {
  margin: 0 4px;
}

.dg-vd-status--serial {
  color: var(--text);
}

.dg-vd-score {
  color: var(--score-green);
  font-weight: 700;
}

.dg-vd-score--none {
  color: var(--text-muted);
  font-weight: 400;
}


.dg-rate-label {
  color: var(--text-muted);
}

.dg-vd-meta-row--rate .dg-rate-label {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--bg-tag);
  font-size: 13px;
}

.dg-vd-meta-row--rate .dg-rate-stars {
  margin-left: 2px;
}

.dg-rate-stars {
  display: inline-flex;
  gap: 2px;
}

.dg-rs {
  padding: 0;
  color: var(--bg-tag);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}

.dg-rs:hover,
.dg-rs.dg-rs-on {
  color: var(--star);
}

.dg-vd-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.dg-vd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  padding: 0 30px;
  border-radius: 50px;
  color: var(--white);
  font-size: 16px;
  line-height: 40px;
  transition: opacity 0.3s ease-in;
}

.dg-vd-btn .mac-icon {
  width: 14px;
  height: 14px;
}

.dg-vd-btn--play {
  background: var(--grad-play);
  box-shadow: var(--shadow-play);
  font-weight: 700;
}

.dg-vd-btn--play:hover {
  opacity: 0.9;
}

.dg-vd-btn--sub {
  background: var(--bg-tag);
  color: var(--text);
}

.dg-vd-btn--sub:hover {
  background: var(--bg-hover);
}

/* 分享：目标站是右下角的气泡提示，这里沿用 .dg-pdb-share 的复制网址功能 */
.dg-vd-btn.dg-pdb-share {
  position: absolute;
  right: 0;
  bottom: 25px;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px 0 0 10px;
  background: var(--tag-warm);
  color: rgba(0, 0, 0, 0.68);
  font-size: 14px;
  line-height: 36px;
}

@media (max-width: 1239px) {
  .dg-vd-hero {
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  .dg-vd-hero {
    display: block;
    margin: 0 calc(var(--gutter) * -1) var(--module-gap);
    padding: 20px var(--gutter);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .dg-vd-poster {
    float: right;
    width: 110px;
    margin: 0 0 10px 15px;
  }

  .dg-vd-title {
    font-size: 24px;
  }

  .dg-vd-subtitle {
    padding-bottom: 6px;
  }

  .dg-vd-tag {
    font-size: 12px;
  }

  .dg-vd-tags {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .dg-vd-tag {
    flex: 0 0 auto;
  }

  .dg-vd-meta {
    clear: both;
  }

  .dg-vd-btn.dg-pdb-share {
    position: static;
    height: 40px;
    border-radius: 50px;
    line-height: 40px;
  }
}

/* ===== 剧情介绍展开/收合（widget/desc_expand）：两段之间留间距（强制7.3），超过 3 行才显示「展开全部」 ===== */
.dg-desc-body {
  position: relative;
  max-height: calc(14px * 1.6 * 3 + 10px);
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.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 p {
  margin: 0 0 10px;
}

.dg-desc-body p:last-child {
  margin-bottom: 0;
}

.dg-desc-body.dg-desc-expanded {
  max-height: none;
}

.dg-desc-body.dg-desc-collapsed.dg-desc-has-more::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 30px;
  background: linear-gradient(rgba(var(--bg-elev-rgb), 0), var(--bg-elev));
  pointer-events: none;
}

.dg-desc-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-tab);
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 767px) {
  .dg-desc-body.dg-desc-collapsed.dg-desc-has-more::after {
    background: linear-gradient(rgba(var(--bg-elev-rgb), 0), var(--bg-elev));
  }
}

/* ===== 漂浮功能按钮 (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: 10px;
  width: auto;
}
/* 比照目标站右侧悬浮钮：36px 半透明黑圆钮，hover 变主色 */
.dg-fab-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--black-rgb), 0.6);
  color: var(--white);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease-in, opacity 0.3s ease-in;
  cursor: pointer;
  border: none;
}
.dg-fab-btn:hover {
  background: var(--accent);
}
.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: 140px;
  right: 24px;
  z-index: 400;
  display: none;
  width: auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  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: var(--white); display: block; }

@media (max-width: 767px) {
  .dg-fab-group { bottom: 76px; right: 14px; }
  .dg-fab-qr-popup { bottom: 126px; 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: var(--white);
  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);
}

/* ===== 当前位置 / 面包屑（共用 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; }
}

/* ===== 简单面包屑（专题列表/专题详情/留言板/排行榜等纯文字层级页面共用，见 decisions.md 全局-面包屑） ===== */
.dg-simple-breadcrumb {
  margin-bottom: 16px;
}
.dg-simple-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.dg-simple-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dg-simple-breadcrumb li:not(:last-child)::after {
  content: '›';
}
.dg-simple-breadcrumb a {
  color: var(--text-light);
}
.dg-simple-breadcrumb a:hover {
  color: var(--accent);
}
.dg-simple-breadcrumb li[aria-current="page"] {
  color: var(--text-muted);
}
@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; }
}
