/* 仅供屏幕阅读器使用的隐藏文字（不影响视觉呈现） */
.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 {
  --accent: #ff5566;
  --accent-light: #fff0f2;
  --text: #222;
  --text-muted: #999;
  --text-light: #666;
  --bg: #f5f5f5;
  --bg-white: #fff;
  --bg-light: #f5f5f5;
  --border: #eee;
  --border-mid: #e0e0e0;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  /* 容器最大寬度：比照 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; }
}

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

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

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

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

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

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

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

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

.header-desktop {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

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

.main-nav {
  flex: 1;
}

.main-nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-light);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

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

.main-nav a.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
  padding-bottom: 3px;
}

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

.header-actions .ha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f5f5f5;
    font-size: 20px;
    transition: background 0.15s, transform 0.15s;
    text-decoration: none;
}

.header-actions .ha-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

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

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

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

/* ── 搜寻框 + 按钮（比照目标站：单一边框输入框 + 内嵌放大镜图示，无实心按钮） ── */
.search-box {
  position: relative;
  flex: 0 0 auto;
  width: 200px;
  height: 30px;
}

.search-box input {
  width: 100%;
  height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 0 34px 0 12px;
  outline: none;
  font-size: 13px;
  color: var(--text-muted);
  background: #f5f5f5;
  transition: border-color 0.15s, background 0.15s;
}

.search-box input:focus {
  border-color: var(--accent);
  background: #fff;
}

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

.search-submit-btn:hover {
  color: #E64D5C;
}

.search-submit-btn:active {
  color: #CC4452;
  transform: scale(0.95);
}

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

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

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

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

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

.sh-icon--fire {
  background: #fff0e0;
}

.sh-icon--news {
  background: #e8f4ff;
}

.sh-icon--movie {
  background: #f0e8ff;
}

.sh-icon--tv {
  background: #e8fff4;
}

.sh-icon--show {
  background: #fff8e0;
}

.sh-icon--anime {
  background: #ffe8f0;
}

.sh-icon--short {
  background: #fff0e0;
}

.sh-icon--doc {
  background: #e8f0ff;
}

.sh-icon--topic {
  background: #fff0f0;
}

.sh-icon--rank {
  background: #fffbe0;
}

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

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

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

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

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

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

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

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

/* ===========================
   首页面板标头（比照目标站 .ewave-pannel_hd / .ewave-pannel__head）
   仅用于首页各面板，独立于全站共用的 .section-header，避免影响其他页面
   =========================== */
.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;
}

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

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

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

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

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

/* 子分类快速连结（比照目标站 .ewave-pannel__head 内的 .nav.nav-text.pull-right，
   仅桌机 ≥1200px 显示，跟目标站 hidden-sm hidden-xs 一致） */
.pannel-hd-sub {
  display: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

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

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

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

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

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

/* ===========================
   面板容器 + 选集列表（共用于 vod/detail、vod/play，见 widget/playlist）
   比照目标站：不做白底卡片外观，区块直接融入页面背景，仅靠 pannel-hd
   的图示、标题与底部分隔线来划分区块；选集按钮采用目标站的胶囊圆角
   =========================== */
.pannel-box {
  margin-bottom: 32px;
}

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

/* 选集列表：来源分页放在标头右侧（比照目标站 nav-tabs pull-right） */
.playlist-sources {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

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

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

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

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

/* 选集网格（比照目标站 .ewave-content__playlist.column8：桌机 8 栏，固定高度滚轮滑动） */
.playlist-episodes-wrap {
  max-height: 236px;
  overflow-y: auto;
  padding-right: 10px;
}

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

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

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

.playlist-episodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 选集按钮：胶囊圆角（比照目标站） */
.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: 999px;
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

@media (max-width: 479px) {
  .episode { flex: 0 0 calc(33.3333% - 3px); }
}

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

/* ===========================
   热播推荐：马赛克排列（1 大 + 多小，比照目标站首个 panel）
   =========================== */
.hot-mosaic {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
}

.hot-mosaic > .vod-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.hot-mosaic > .vod-card:first-child a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hot-mosaic > .vod-card:first-child .vod-thumb {
  flex: 1;
  aspect-ratio: auto;
}

/* 防御性封顶：本环境 num 参数不保证限制笔数 */
.hot-mosaic > .vod-card:nth-child(n+14) {
  display: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.news-card a {
  display: block;
}

.news-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  margin: 0;
  background: #f5f5f5 url('../img/load.gif') no-repeat center center;
  background-size: cover;
}

.news-card h4 {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  padding: 8px 10px 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

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

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

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

.vod-card a {
  display: block;
}

/* 悬停效果比照目标站：仅在支持 hover 的输入装置上触发，避免触控装置出现黏滞悬停 */
@media (hover: hover) and (pointer: fine) {
  .vod-card:hover {
    z-index: 5;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  }

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

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

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

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

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

.vod-list--s .vod-card {
  flex: 0 0 calc(20% - 8px);
}

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

/* 底部渐层字幕列（比照目标站 .pic-text：满宽、渐层深色底、靠右） */
.vod-remarks {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 8px 6px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55));
  color: #fff;
  font-size: 12px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 左上角评分缎带（比照目标站 .pic-tag-h，主色底、不规则圆角） */
.vod-score {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 4px 0 8px 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

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

.badge-year {
  background: #2d6bf5;
}

.badge-tag {
  background: #f5a623;
}

.badge-blue {
  background: #1d8cff;
}

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

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

/* ===========================
   影片卡片悬停详情层（比照目标站：鼠标停留时以渐层遮罩
   浮出简介、更新时间、演员等更完整的资讯）
   =========================== */
.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;
}

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

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

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

.vdc-score {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", Times, serif;
  color: #09BB07;
}

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

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

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

.vdc-hits {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #ff8a3d;
}

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

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

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

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

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

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

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

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

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

/* ===========================
   首页头图轮播
   =========================== */
.home-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  background: #111;
}

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

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

.home-hero-slide a {
  display: block;
  padding-top: 30%;
  background-color: #111;
  background-position: center center;
  background-size: cover;
}

.hh-info {
  position: absolute;
  left: 40px;
  bottom: 32px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 60%;
}

.hh-tag {
  display: inline-block;
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  padding: 0 8px;
  border-radius: 2px;
}

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

.hh-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  gap: 6px;
}

.hhd {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}

.hhd.active {
  width: 10px;
  border-radius: 20px;
  background: #fff;
}

/* 左右切换箭头（比照目标站 swiper-button，50x50px、悬停变黑底圆形） */
.home-hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  background: transparent;
  border-radius: 50%;
  transition: background 0.2s;
}

.home-hero-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}

.home-hero-arrow--prev {
  left: 10px;
}

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

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

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

.cb-side {
  width: 260px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
}

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

/* ===========================
   排行文字清单（编号徽章，用于侧栏 + 总榜单）
   =========================== */
.vlt-rank-item {
  border-top: 1px dotted var(--border-mid);
}

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

.rank-board-col .vlt-rank-item:nth-child(n+9) {
  display: none;
}

.detail-sidebar .vlt-rank-item:nth-child(n+16) {
  display: none;
}

.vlt-rank-item:first-child {
  border-top: none;
}

.vlt-rank-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  overflow: hidden;
}

.vlt-rank-badge {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eee;
  color: #999;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vlt-rank-badge--1,
.vlt-rank-badge--2 {
  background: var(--accent);
  color: #fff;
}

.vlt-rank-badge--3 {
  background: #ffb2b2;
  color: #fff;
}

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

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

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

/* 总榜单：4 栏并排 */
.rank-board-grid {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.rank-board-col {
  flex: 1;
  min-width: 0;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
}

.rank-board-col .section-header h2 {
  font-size: 15px;
}

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

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

.topic-card--lg {
  flex: 0 0 calc(50% - 5px);
  min-height: 200px;
}

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

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

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

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

.topic-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 6px;
}

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

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

/* ===========================
   排行榜
   =========================== */
.rank-grid {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.rank-grid > li {
  flex: 1 1 0;
  min-width: 0;
}

.rank-col {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
}

.rank-col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.rank-top {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.rank-top-thumb {
  width: 70px;
  height: 94px;
  border-radius: var(--radius);
  flex-shrink: 0;
  overflow: hidden;
}

.rank-top-info {
  flex: 1;
  min-width: 0;
  position: relative;
}

.rank-top-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 10px;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.rank-top-info h4 {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.rank-top-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.rank-views {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  display: block;
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f5f5f5;
}

.rank-list li:last-child {
  border-bottom: none;
}

.rank-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f0f0f0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-num--2 {
  background: #f5a623;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.rank-num--3 {
  background: #ffc600;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.rank-num--other {
  color: #999;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rank-name {
  flex: 1;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.rank-count {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ===========================
   手机专用元件
   =========================== */
.header-mobile {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

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

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

.page-btn,
.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;
}

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

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

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

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

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

/* ── 平板 768px ~ 1024px ── */
@media (max-width: 1024px) {
  /* 平板/手机比照目标站：马赛克首卡取消特殊放大，回到统一网格 */
  .hot-mosaic {
    grid-template-columns: repeat(4, 1fr);
  }

  .hot-mosaic > .vod-card:first-child {
    grid-column: span 1;
    grid-row: span 1;
  }

  .hot-mosaic > .vod-card:first-child a {
    display: block;
    height: auto;
  }

  .hot-mosaic > .vod-card:first-child .vod-thumb {
    flex: none;
    aspect-ratio: 3/4;
  }

  .rank-board-grid {
    flex-wrap: wrap;
  }

  .rank-board-col {
    flex: 0 0 calc(50% - 8px);
  }

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

  .vod-card {
    flex: 0 0 calc(25% - 8px);
  }

  .vod-list {
    gap: 10px;
  }

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

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

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

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

  .news-card {
    flex: 1 1 calc(33.333% - 7px);
    min-width: 0;
  }

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

  .section-breadcrumb a {
    display: inline;
  }

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

  .topic-card--lg {
    flex: 0 0 calc(66.666% - 4px);
  }

  .rank-grid {
    flex-wrap: wrap;
  }

  .rank-grid > li {
    flex: 0 0 calc(50% - 6px);
  }
}

/* ── 平板 768px ~ 1024px：header 沿用桌机版 logo + 主导览 + 搜寻栏同一行排列。
   留言、排行榜、观看纪录三个 icon 全部保留；空间改由缩小 logo、导览、搜寻栏与 icon 按钮本身来腾出 ── */
@media (min-width: 768px) and (max-width: 1024px) {
  .header-inner {
    gap: 8px;
  }

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

  .main-nav {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .main-nav-list {
    gap: 0;
    flex-wrap: nowrap;
    width: max-content;
  }

  .main-nav a {
    padding: 5px 8px;
    font-size: 14px;
  }

  .search-box {
    width: 130px;
  }

  .header-actions {
    gap: 4px;
  }

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

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

  /* header：手机版切换成 .header-mobile 垂直结构（logo+搜寻栏一行、分类导览另一行） */
  .header-mobile {
    display: block;
  }

  .header-desktop {
    display: none;
  }

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

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

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

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

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

  /* 比照目标站：往下滑动时 logo + 搜寻栏整排一起收合，只留分类导览贴齐画面顶端；
     用 max-height + opacity 让收合有渐隐动画，而非直接 display:none 瞬间消失 */
  .is-header-scrolled .header-mobile-inner {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
  }

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

  /* 比照目标站：往下滑动、logo/搜寻栏收合后，导览列改用底线（原本的上边框会跟着 header 一起贴顶失去意义） */
  .is-header-scrolled .header-mobile-nav {
    border-top: none;
    border-bottom: 1px solid var(--border);
  }

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

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

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

  .header-mobile-nav-list a {
    display: inline-block;
    padding: 10px 8px;
    font-size: 14px;
    color: var(--text-light);
    white-space: nowrap;
  }

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

  .hot-mosaic {
    grid-template-columns: repeat(3, 1fr);
  }

  .vodlist-text {
    display: none;
  }

  .rank-board-grid {
    flex-direction: column;
  }

  .rank-board-col {
    flex: 0 0 auto;
  }

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

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

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

  .hh-desc {
    font-size: 12px;
  }

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

  .section-breadcrumb a {
    display: none;
  }

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

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

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

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

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

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

  .vod-card {
    flex: 0 0 calc(33.333% - 5px);
  }

  .vod-list {
    gap: 6px;
  }

  .vod-list--s .vod-card {
    flex: 0 0 calc(33.333% - 5px);
  }

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

  .rank-grid {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .rank-grid > li {
    flex: 0 0 auto;
    width: 100%;
  }

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

  .topic-card--lg {
    flex: 0 0 100%;
  }
}

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

  .vod-card {
    flex: 0 0 calc(33.333% - 4px);
  }

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

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

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

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

  .topic-card {
    flex: 0 0 100%;
  }
}

/* ===== rank-top1 (shared widget/rank_top) ===== */
.rank-top1 {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.rank-top1 > a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rank-top1-thumb {
  position: relative;
  width: 60px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  margin: 0;
  background: #f5f5f5 url('../img/load.gif') no-repeat center center;
  background-size: cover;
}
.rank-top1-thumb img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.rank-top1-n {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 0 0 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rank-top1-info { flex: 1; min-width: 0; }
.rank-top1-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-top1-info p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-top1 > a:hover .rank-top1-info h4 { color: var(--accent); }

@media (min-width: 768px) {
  .rank-top1-thumb { width: 70px; }
  .rank-top1-info h4 { font-size: 14px; }
}

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

.cmt-ajax-wrap { min-height: 60px; }
.cmt-loading {
  font-size: 13px;
  color: var(--text-muted);
  padding: 24px 0;
  text-align: center;
}
.cmt-empty {
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* 评论列表 */
.cmt-list { margin: 0 0 12px; padding: 0; }
.cmt-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.cmt-item:last-child { border-bottom: none; }
.cmt-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cmt-item-user { font-size: 13px; font-weight: 600; color: var(--text); }
.cmt-item-time { font-size: 11px; color: var(--text-muted); }
.cmt-item-content { font-size: 13px; color: var(--text-light); line-height: 1.7; }
.cmt-item-reply-list {
  margin: 0;
  padding: 0;
}

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

.cmt-paging {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 0 0;
}
.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;
}
.cmt-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.cmt-page-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmt-page-btn.is-disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* 输入表单 */
.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;
}
.cmt-textarea:focus { border-color: var(--accent); background: #fff; }
.cmt-textarea:focus + .cmt-form-bar {
  border-color: var(--accent);
  border-top-color: var(--border);
}
.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;
}
.cmt-chars { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.cmt-chars em { font-style: normal; color: var(--accent); font-weight: 600; }
.cmt-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cmt-verify-input {
  width: 88px;
  height: 34px;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.cmt-verify-input:focus { border-color: var(--accent); }
.cmt-captcha {
  height: 34px;
  width: auto;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--border-mid);
  display: block;
}
.cmt-submit {
  height: 34px;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.cmt-submit:hover { background: #E64D5C; }

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

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

.modal-box {
  background: #fff;
  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);
}

.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;
}
.modal-close:hover { color: var(--text); }

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

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

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

.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;
}
.modal-input:focus { border-bottom-color: var(--accent); }
.modal-input::placeholder { color: var(--text-muted); }

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

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

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

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

/* ── 历史记录 Modal ── */
.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;
}
.hm-overlay.is-open { display: flex; }

.hm-box {
  background: #fff;
  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);
}

.hm-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hm-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.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;
}
.hm-clear:hover { color: var(--accent); }
.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;
}
.hm-close:hover { background: var(--border); color: var(--text); }

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

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

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

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

/* ===========================
   剧情介绍展开/收合（共用）
   =========================== */
.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;
}
.desc-body.desc-expanded {
  max-height: 2000px;
}
/* 超出 3 行才叠加渐淡遮罩（由 JS 依内容实际高度加上 desc-has-more） */
.desc-body.desc-collapsed.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;
}
.desc-expand-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  background: #fff8f5;
  border: 1px solid #ffe0cc;
  border-radius: 5px;
  padding: 8px;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.desc-expand-btn:hover { background: var(--accent-light); }

/* ==========================================
   漂浮功能按鈕 (Floating Action Buttons)
   ========================================== */
.fab-group {
  position: fixed;
  bottom: 30px;
  right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: auto;
}
.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  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;
}
.fab-btn:hover {
  background: #E64D5C;
  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);
}
.fab-btn--top { opacity: 0; pointer-events: none; }
.fab-btn--top.is-visible { opacity: 1; pointer-events: auto; }
.fab-qr-popup {
  position: fixed;
  bottom: 160px;
  right: 24px;
  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;
}
.fab-qr-popup.is-open { display: block; }
.fab-qr-popup p { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.fab-qr-popup img { width: 130px; height: 130px; border-radius: 4px; background: #fff; display: block; }

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

/* ===== 通用 Toast 提示（全站共用：分享复制链接、评分成功等短暂提示）===== */
.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;
}
.rate-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

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

@media (max-width: 479px) {
  .vd-breadcrumb { margin-bottom: 8px; }
}
@media (min-width: 480px) and (max-width: 767px) {
  .vd-breadcrumb { margin-bottom: 10px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .vd-breadcrumb { margin-bottom: 14px; }
}
@media (min-width: 1025px) {
  .vd-breadcrumb { margin-bottom: 16px; }
}
@media (max-width: 767px) {
  .vd-breadcrumb { font-size: 12px; }
}
