/* 仅供屏幕阅读器使用的隐藏文字（不影响视觉呈现） */
.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: #ff6b00;
  --accent-light: #fff4eb;
  --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);
  --max-w: 1200px;
}

*,
*::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: relative;
  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);
}

.sub-toolbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 99;
}

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

.main-nav {
  flex: 1;
}

.main-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  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 0 0 auto;
  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-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);
}

/* ===========================
   副导览
   =========================== */
.sub-toolbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ── 搜寻框 + 按钮 ── */
.search-box {
  flex: 1;
  max-width: 300px;
  display: flex;
  align-items: center;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border-mid);
  border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 6px 14px;
  outline: none;
  font-size: 13px;
  color: var(--text-muted);
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
}

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

#searchBtn {
  flex-shrink: 0;
  height: 30px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

#searchBtn:hover {
  background: #e55f00;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.35);
}

#searchBtn:active {
  background: #cc5500;
  transform: scale(0.97);
}

.hot-searches {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  overflow: hidden;
}

.hot-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.hot-searches a {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
}

.hot-searches a:hover {
  color: var(--accent);
}

/* ===========================
   分类快捷列
   =========================== */
.quick-links {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.quick-links-row {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 0;
}

/* 跑马灯区块 */
.marquee-block {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 450px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-mid);
  padding-right: 16px;
  height: 100%;
  overflow: hidden;
}

/* 分类卷动列 */
.quick-links-inner {
  max-width: none;
  margin: 0;
  padding: 0 0 0 16px;
  height: 40px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-links-inner::-webkit-scrollbar {
  display: none;
}

.quick-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 40px;
  border-right: 1px solid var(--border-mid);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-light);
}

.quick-pill:last-child {
  border-right: none;
}

.quick-pill:first-child {
  padding-left: 0;
}

.quick-pill strong {
  color: var(--accent);
  font-weight: 600;
}

.qp-sep {
  color: var(--border-mid);
}

.qp-icon {
  font-size: 14px;
}

.quick-pill a {
  color: var(--text-light);
  font-size: 12px;
  padding: 0 4px;
}

.quick-pill a:hover {
  color: var(--accent);
}

@media (max-width: 1024px) {
  .marquee-block {
    width: 300px;
  }

  .quick-pill a {
    padding: 0;
  }
}

@media (max-width: 767px) {
  .quick-links-row {
    flex-direction: column;
    height: auto;
    padding: 0;
  }

  .marquee-block {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0 12px;
    height: 36px;
  }

  .quick-links-inner {
    display: none;
  }
}

/* ===========================
   首页内容区
   =========================== */
.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);
}

/* ===========================
   热播推荐卡片
   =========================== */
.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;
}

.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+7) {
  display: none;
}

.vod-card {
  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:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.vod-card a {
  display: block;
}

.vod-thumb {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  margin: 0;
}

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

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

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

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

.vod-score {
  color: #ffb400;
  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%;
}

/* ===========================
   专题
   =========================== */
.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);
}

/* ===========================
   跑马灯
   =========================== */
.marquee-row {
  height: 36px;
  border-bottom: 1px solid var(--border);
  background: #fffbf7;
  overflow: hidden;
}

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

.marquee-icon {
  font-size: 14px;
  flex-shrink: 0;
  color: var(--accent);
}

.marquee-wrap {
  flex: 1;
  overflow: hidden;
}

.marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
  font-size: 13px;
  color: var(--text-light);
}

@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,
.vod-card .vod-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,
.vod-card:hover .vod-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);
}

/* ===========================
   全分类下拉选单
   =========================== */
.cat-dropdown-wrap {
  position: relative;
  flex-shrink: 0;
}

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

.cat-toggle-icon {
  font-size: 15px;
}

.cat-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  border: 1px solid var(--border);
  min-width: 320px;
  overflow: hidden;
}

.cat-menu.is-open {
  display: block;
  animation: catMenuIn 0.18s ease forwards;
}

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

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

.cat-menu-inner {
  padding: 10px 12px 12px;
}

.cat-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  white-space: nowrap;
}

.cat-menu-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

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

.header-mobile-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 50px;
}

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

.header-actions-mobile button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f5f5f5;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

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

.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 200;
  justify-content: space-around;
  align-items: center;
}

.mobile-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 11px;
}

.mobile-tabbar-item.active {
  color: var(--accent);
}

.tabbar-icon {
  font-size: 18px;
  line-height: 1;
}

.tabbar-label {
  font-size: 11px;
}

/* ===========================
   通用分页
   =========================== */
.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
   =========================== */

/* ── 平板 768px ~ 1024px ── */
@media (max-width: 1024px) {
  .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;
  }

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

  .cat-menu {
    min-width: 300px;
  }

  .main-nav {
    display: none;
  }
}

/* ── 手机 < 768px ── */
@media (max-width: 767px) {
  .header-mobile {
    display: block;
  }

  .header-desktop {
    display: none;
  }

  .sub-toolbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 99;
  }

  .mobile-tabbar {
    display: flex;
  }

  .sub-toolbar-inner {
    padding: 0 12px;
    gap: 8px;
    height: 46px;
  }

  .search-box {
    max-width: 100%;
    flex: 1;
  }

  .search-box input {
    background: #f5f5f5;
    border: 1px solid var(--border-mid);
    border-right: none;
    border-radius: 999px 0 0 999px;
    padding: 7px 14px;
    font-size: 13px;
  }

  #searchBtn {
    height: 30px;
    padding: 0 14px;
    font-size: 12px;
  }

  .hot-searches {
    display: none;
  }

  .quick-links-inner {
    display: none;
  }

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

  .marquee-row {
    padding: 0 10px;
  }

  /* 手机版全分类选单 */
  .cat-dropdown-wrap {
    position: static;
  }

  .cat-menu {
    position: fixed;
    top: auto;
    left: 8px;
    right: 8px;
    min-width: 0;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 12px;
    z-index: 400;
  }

  .cat-menu-inner {
    padding: 10px 12px 14px;
  }

  .cat-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .cat-menu-item {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* ── 小手机 < 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;
}
.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: #e55f00; }

@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: #e55f00; }

.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; align-items: flex-end; }
  /* 3 per row：(100% - 2 gaps × 10px) / 3 */
  .hm-card { flex: 0 0 calc((100% - 20px) / 3); }
}

/* ===========================
   剧情介绍展开/收合（共用）
   =========================== */
.desc-body {
  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;
}
.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,107,0,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: #e65f00;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 28px rgba(255,107,0,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; }
}

/* ==========================================
   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;
}
