/* ========== 基础设置 ========== */
:root {
  --detail-glow: rgba(255,255,255,0.15);
}

/* ========== 背景模糊层 ========== */
.detail-bg {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 50vh;
  z-index: -1;
  overflow: hidden;
}
.detail-bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(30px) brightness(0.6);
  transform: scale(1.1);
}
.detail-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 20%, var(--color-bg) 85%);
}

/* ========== 容器 ========== */
.detail-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md);
  position: relative;
  z-index: 1;
}

.play-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md);
  position: relative;
  z-index: 1;
}

/* ========== 英雄区 ========== */
.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;          /* 移动端居中 */
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
@media (min-width: 768px) {
  .detail-hero {
    flex-direction: row;
    align-items: flex-start;
  }
}

.detail-poster {
  width: clamp(200px, 40vw, 320px);
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}
.detail-poster img {
  width: 100%; height: 100%; object-fit: cover;
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  /* 保证文字在模糊背景下可读 */
  color: var(--color-text);
  text-shadow: 0 1px 8px rgba(255,255,255,0.7);
  text-align: center;  
}
@media (min-width: 768px) {
  .detail-info {
    text-align: left;                /* PC 端恢复左对齐 */
  }
}
.detail-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-text);
  text-shadow: 0 1px 12px rgba(255,255,255,0.8);
}
.detail-sub {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-shadow: 0 1px 6px rgba(255,255,255,0.6);
}
.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  justify-content: center;            /* 移动端居中 */
}
@media (min-width: 768px) {
  .detail-meta-row {
    justify-content: flex-start;      /* PC 端左对齐 */
  }
}
.detail-meta-item {
  color: var(--color-text);
}
.detail-meta-item a {
  color: var(--color-accent);
}

.detail-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  justify-content: center;            /* 移动端居中 */
}
@media (min-width: 768px) {
  .detail-actions {
    justify-content: flex-start;      /* PC 端左对齐 */
  }
}
.btn-primary, .btn-glass {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.6em 1.4em;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-shadow: none;
}
.btn-primary {
  background: var(--color-accent);
  color: white;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-glass:hover {
  border-color: var(--color-accent);
}

/* ========== 简介和元数据 ========== */
.detail-meta-block {
  margin-top: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.detail-blurb p {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.8;
}
.detail-blurb p.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn-text {
  background: none;
  color: var(--color-accent);
  font-size: var(--text-xs);
  cursor: pointer;
  margin-top: 4px;
  border: 0;
}
.btn-texts {
  flex: 1;
  color: var(--color-accent);
  word-break: break-all;
}
.qa-movie-link {
  flex: 1;
  color: var(--color-accent);
  word-break: break-all;
}
.detail-extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.extra-item {
  background: var(--color-accent-soft);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}
.extra-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.extra-value {
  font-size: var(--text-sm);
  font-weight: 500;
}
.extra-value.rating {
  color: #e67e22;
  font-weight: 700;
}
.actor-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.actor-scroll-wrapper {
  position: relative;
}
.actor-scroll {
  max-height: 3em;          /* 移动端约两行 */
  overflow: hidden;
}
.actor-scroll.expanded {
  max-height: none;
}
.actor-toggle {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--color-accent);
  cursor: pointer;
}
/* 元数据列表 */
.detail-meta-list {
  margin-top: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.meta-row {
  display: flex;
  align-items: baseline;
  font-size: var(--text-sm);
  line-height: 1.6;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-xs);
}
.meta-row:last-child {
  border-bottom: none;
}

.meta-label {
  width: clamp(60px, 20vw, 90px);
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-weight: 500;
}

.meta-value {
  flex: 1;
  color: var(--color-text);
  word-break: break-all;
}

.actor-links a,
.alias-links a {
  color: var(--color-accent);
  margin: 0 4px;
}

.actor-links .slash,
.alias-links .slash {
  color: var(--color-text-muted);
  margin: 0 2px;
}

.rating-value {
  color: #e67e22;
  font-weight: 600;
}

.meta-blurb {
  margin-top: var(--space-sm);
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: 1.8;
}
.meta-blurb p.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn-text {
  background: none;
  border: 0;
  color: var(--color-accent);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
}
/* ========== 角色/相关/榜单 ========== */
.detail-meta-extend {
  margin-top: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}
.info-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--space-xs);
}
.info-row__label {
  font-weight: 600;
  white-space: nowrap;
  margin-right: var(--space-xs);
}
.info-tag {
  font-size: var(--text-xs);
  padding: 2px 10px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: 20px;
  white-space: nowrap;
}
.info-tag:hover {
  background: var(--color-accent);
  color: white;
}
/* 角色项 */
.role-item {
  white-space: nowrap;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.role-divider {
  color: var(--color-accent);
  margin: 0 3px;
  font-weight: 600;
}
/* 斜杠分隔符 */
.slash {
  margin: 0 4px;
  color: var(--color-text-muted);
}

/* ========== 播放器 ========== */
.detail-player {
  margin-top: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.player-list-title {
  font-size: var(--text-lg);
  margin: var(--space-sm) 0;
}
.player-tab-wrap {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}
.player-source-btn {
  padding: 0.3em 1em;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  cursor: pointer;
  color: var(--color-text);
}
.player-source-btn.active {
  background: var(--color-accent);
  color: white;
  border-color: transparent;
}
.episode-list {
  display: none;
}
.episode-list.active {
  display: block;
}
.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}
.ep-link {
  background: var(--color-accent-soft);
  color: var(--color-text);
  padding: 0.4em 0;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  transition: var(--transition-fast);
}
.ep-link:hover {
  background: var(--color-accent);
  color: white;
}

/* ========== 推荐区 ========== */
.detail-recommend {
  margin-top: var(--space-xl);
}
.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* ========== Tab 系统 ========== */
.detail-tabs {
  margin-top: var(--space-xl);
}
.tab-nav {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-sm);
}
.tab-btn {
  padding: 0.4em 1.2em;
  font-size: var(--text-sm);
  border-radius: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--color-accent);
  color: white;
  border-color: transparent;
}

.tab-panel {
  display: none;
  margin-top: var(--space-md);
}
.tab-panel.active {
  display: block;
}

/* 演员卡片横向滑动 */
.actor-scroll-box {
  padding-bottom: var(--space-sm);
}
.actor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  width: clamp(100px, 25vw, 140px);
  flex-shrink: 0;
}
.actor-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--color-border);
}
.actor-name {
  font-size: var(--text-xs);
  text-align: center;
  color: var(--color-text);
}

/* 剧照网格 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-sm);
}
.photo-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.photo-thumb:hover {
  transform: scale(1.02);
}

/* 专题竖版网格 
.topic-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(clamp(160px, 28vw, 220px), 1fr));
}*/

/* 评论模块 */
.comment-module {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

/* 评论模块 */
.comment-module-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
  font-family: var(--font-heading);
}
.comment-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-head {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.comment-user {
  font-weight: 600;
  color: var(--color-text);
}
.comment-content {
  position: relative;
  line-height: 1.5;
}
.comment-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.comment-expand-btn {
  color: var(--color-accent);
  font-size: var(--text-xs);
  cursor: pointer;
  margin-left: 4px;
}
.comment-actions {
  margin-top: 4px;
  font-size: var(--text-xs);
}
.comment-empty {
  text-align: center;
  padding: var(--space-md);
  color: var(--color-text-muted);
}

/* 分集剧情 */
.review-item {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-sm);
}
.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  cursor: pointer;
}
.review-title {
  font-size: var(--text-base);
  font-weight: 600;
}
.review-excerpt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.review-toggle {
  font-size: 1.5rem;
  color: var(--color-accent);
}
.review-content-inner {
  padding: var(--space-sm) 0;
}

/* 问答 */
.qa-item {
  background: var(--color-surface);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
}
.qa-item summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text);
}
.qa-answer {
  margin-top: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* 灯箱 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 200;
  justify-content: center;
  align-items: center;
}
.lightbox.show { display: flex; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}
.lightbox-close { top: 20px; right: 30px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
}

/* 工具类补充 */
.text-muted { color: var(--color-text-muted); }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.breadcrumb a:hover {
  color: var(--color-accent);
}
.breadcrumb-sep {
  color: var(--color-text-muted);
  opacity: 0.6;
}
.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

/* 播放页专用样式（基于全局变量） */
.player-box {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 40px rgba(37,99,235,0.08),
    0 0 80px rgba(37,99,235,0.04),
    var(--shadow-lg);
  margin-bottom: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.08);
  /* 强制 16:9 并按视口限制最大高度 */
  aspect-ratio: 16 / 9;
  max-height: 75vh;
}

.player-box .mac_player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0f;
}

/* 确保内部 iframe 完全填充 */
.player-box iframe,
.player-box video,
.player-box embed {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 加载态呼吸动画 */
.player-box:empty::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(37,99,235,0.06) 0%, transparent 70%);
  animation: player-pulse 2.4s ease-in-out infinite;
  z-index: 0;
}
@keyframes player-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ────────────────────────────────────────
   控制栏——毛玻璃悬浮胶囊
   ──────────────────────────────────────── */
.control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  margin-bottom: var(--space-md);
}

.control-btn {
  display: inline-flex;
  align-items: center;
  gap: clamp(4px, 0.6vw, 8px);
  padding: 0.5em 1.2em;
  border-radius: 100px;            /* 胶囊型 */
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  /* Liquid Glass 基础层 */
  background: var(--glass-bg);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.control-btn:hover {
  background: rgba(255,255,255,0.85);
  border-color: rgba(37,99,235,0.35);
  box-shadow: 
    0 4px 16px rgba(37,99,235,0.12),
    0 0 0 1px rgba(37,99,235,0.08);
  transform: translateY(-1px);
}

.control-btn.accent {
  background: var(--color-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(37,99,235,0.25);
}
.control-btn.accent:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 20px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}

.control-btn .btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ────────────────────────────────────────
   选集面板——Bento Grid 玻璃卡片
   ──────────────────────────────────────── */
.ep-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: clamp(12px, 2vw, 20px);
  margin-bottom: var(--space-md);
  box-shadow: var(--glass-shadow);
}

.ep-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ep-panel-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.ep-panel-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-accent-soft);
  padding: 2px 10px;
  border-radius: 100px;
}

/* 剧集按钮网格 */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(54px, 12vw, 70px), 1fr));
  gap: clamp(6px, 1vw, 8px);
  max-height: clamp(200px, 40vh, 320px);
  overflow-y: auto;
  padding-right: 4px;
}

/* 滚动条美化 */
.ep-grid::-webkit-scrollbar {
  width: 4px;
}
.ep-grid::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 4px;
}

.ep-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em 0.3em;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ep-grid a:hover {
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.25);
  transform: scale(1.04);
}

/* 当前播放剧集 */
.ep-grid a.active {
  background: var(--color-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(37,99,235,0.3);
  font-weight: 600;
}

/* 源切换标签 */
.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 0.8vw, 8px);
  margin-bottom: var(--space-sm);
}

.source-tab {
  padding: 0.35em 1em;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.source-tab:hover {
  background: rgba(255,255,255,0.75);
  color: var(--color-text);
}

.source-tab.active {
  background: var(--color-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.play-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
}
.play-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-right: var(--space-sm);
}
.play-episode {
  color: var(--color-accent);
  font-weight: 500;
}
.play-meta-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-muted);
}
.play-meta-tags .divider {
  opacity: 0.6;
}
.play-meta-tags a {
  color: var(--color-accent);
}
/* 集数工具条 */
.ep-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

.sort-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text);
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: var(--text-xs);
  transition: all 0.2s;
}
.sort-btn:hover {
  background: var(--color-accent);
  color: #fff;
}

.ep-jump {
  display: flex;
  align-items: center;
  gap: 4px;
}
.jump-input {
  width: 3em;
  padding: 2px 4px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  color: var(--color-text);
  font-size: var(--text-xs);
  text-align: center;
}
.jump-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text-secondary);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: var(--text-xs);
  transition: all 0.2s;
}
.jump-btn:hover {
  background: var(--color-accent);
  color: #fff;
}

/* 网格滚动容器 */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.5em, 1fr));
  gap: 0.4em;
  max-height: clamp(14em, 60vh, 24em);
  overflow-y: auto;
  padding: 0.5em;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: transparent;
  scroll-behavior: smooth;
}

@media (max-width: 600px) {
  .episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(3em, 1fr));
  }
}

/* 集数按钮 */
.episode-grid .ep-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em 0.2em;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s;
}
.episode-grid .ep-link:hover {
  background: var(--color-accent);
  color: #fff;
}
.episode-grid .ep-link.active {
  background: var(--color-accent);
  color: #fff;
}

/* 向下箭头 */
.scroll-arrow {
  text-align: center;
  margin-top: 4px;
  color: var(--color-text-muted);
  opacity: 0.6;
  animation: arrow-bounce 1.5s infinite;
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* 隐藏未激活的 episode-list */
.episode-list { display: none; }
.episode-list.active { display: block; }
/* ── 影片简介摘要 ── */
.play-summary {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
  line-height: 1.8;
}
.play-summary .summary-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.play-summary .summary-content.expanded {
  display: block;
  -webkit-line-clamp: unset;
}
.summary-toggle {
  color: var(--color-accent);
  font-size: var(--text-xs);
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
}

/* ── 评论模块 ── */
.comment-play-module {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.comment-play-module h3 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}
.comment-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-head {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.comment-user {
  font-weight: 600;
  color: var(--color-text);
}
.comment-content {
  position: relative;
  line-height: 1.5;
}
.comment-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.comment-expand-btn {
  color: var(--color-accent);
  font-size: var(--text-xs);
  cursor: pointer;
  margin-left: 4px;
}
.comment-actions {
  margin-top: 4px;
  font-size: var(--text-xs);
}

/* 猜你喜欢已由全局 .grid-fluid 提供，若无背景可单独补 */
.detail-recommend {
  margin-top: var(--space-md);
}

.type-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--color-accent);
}
.breadcrumb-sep {
  opacity: 0.6;
}
.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

.type-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* 横向滚动卡片宽度 */
.type-hot .vod-card {
  width: clamp(140px, 30vw, 180px);
}

/* 分页样式（整合） */
.mac_pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 0.8vw, 8px);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  padding: 0.5em 0.8em;
  border-radius: 100px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all 0.25s ease;
}
.page-link:hover {
  background: rgba(255,255,255,0.85);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.page-current {
  background: var(--color-accent);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.page-jump {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.page-jump input {
  width: 60px;
  padding: 0.3em 0.6em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-align: center;
  color: var(--color-text);
  background: var(--color-surface);
}
.page-jump button {
  padding: 0.3em 0.8em;
  border-radius: 100px;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
}

/* 搜索页专属样式（复用全局变量） */
.search-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--color-accent);
}
.breadcrumb-sep {
  opacity: 0.6;
}
.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

.search-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: var(--space-xl) 0;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}
.empty-state p {
  margin-bottom: var(--space-sm);
}

/* 分页样式（与分类页共用） */
.mac_pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 0.8vw, 8px);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  padding: 0.5em 0.8em;
  border-radius: 100px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all 0.25s ease;
}
.page-link:hover {
  background: rgba(255,255,255,0.85);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.page-current {
  background: var(--color-accent);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.page-jump {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.page-jump input {
  width: 60px;
  padding: 0.3em 0.6em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-align: center;
  color: var(--color-text);
  background: var(--color-surface);
}
.page-jump button {
  padding: 0.3em 0.8em;
  border-radius: 100px;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
}
/* ========== 公共分页组件（毛玻璃胶囊风格） ========== */
.mac_pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 0.8vw, 8px);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  padding: 0.5em 0.8em;
  border-radius: 100px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--backdrop-blur));
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all 0.25s ease;
}

.page-link:hover {
  background: rgba(255,255,255,0.85);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

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

/* 跳转页码输入区 */
.page_jump {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.page_jump input {
  width: 60px;
  padding: 0.3em 0.6em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-align: center;
  color: var(--color-text);
  background: var(--color-surface);
}

.page_jump button {
  padding: 0.3em 0.8em;
  border-radius: 100px;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
}

/* ========== 专题详情页（2026设计：纵向卡片、毛玻璃、流体尺寸） ========== */
.topic-detail {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md);
}

/* 面包屑复用全局样式 */

/* 专题头 */
.topic-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
@media (min-width: 768px) {
  .topic-hero {
    flex-direction: row;
    align-items: flex-start;
  }
}
.topic-hero-poster {
  width: clamp(200px, 40vw, 320px);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e0e0e0;
  flex-shrink: 0;
}
.topic-hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topic-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.topic-hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-text);
}
.topic-hero-sub {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--color-text-muted);
}
.topic-content-short,
.topic-content-full {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.8;
}
.topic-expand-btn {
  background: none;
  border: 0;
  color: var(--color-accent);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
  align-self: flex-start;
}
.topic-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* 专题视频列表 */
.section-heading {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* ========== 专题视频列表 ========== */
.topic-vod-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .topic-vod-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 每张卡片：左图右文 */
.topic-vod-item {
  display: flex;
  gap: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.topic-vod-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,0.2);
}
.topic-vod-pic {
  width: clamp(100px, 25vw, 150px);
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eee;
}
.topic-vod-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topic-vod-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.topic-vod-title a {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
}
.topic-vod-title a:hover {
  color: var(--color-accent);
}
.topic-vod-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.topic-vod-meta span {
  white-space: nowrap;
}
.topic-vod-desc {
  font-size: var(--text-xs);
  color: var(--color-text);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topic-vod-plot {
  font-size: var(--text-xs);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-top: auto;
}
.plot-label {
  font-weight: 600;
}
.plot-content {
  color: var(--color-text);
}

/* =============================================
   专题网格终极修复（覆盖全局冲突）
   ============================================= */
#tab-topic .topic-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  width: 100%;
  box-sizing: border-box;
}

/* 重置全局固定宽度，让网格控制尺寸 */
#tab-topic .topic-card {
  width: 100%;                 /* 覆盖全局 width: clamp(...) */
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
#tab-topic .topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

/* 海报容器：强制使用 padding-top，重置 aspect-ratio */
#tab-topic .topic-poster {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;          /* 16:9 永恒比例 */
  overflow: hidden;
  background: #e0e0e0;
  aspect-ratio: auto;           /* 杀掉全局 aspect-ratio */
}
#tab-topic .topic-poster img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 信息区域 */
#tab-topic .topic-info {
  padding: var(--space-xs) var(--space-sm) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
#tab-topic .topic-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#tab-topic .topic-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}