/* ========== 苹果CMS V10 影视模板样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #0f0f17;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: #ff6b35; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ========== 颜色变量 ========== */
:root {
  --primary: #ff6b35;
  --primary-hover: #ff8c5a;
  --bg: #0f0f17;
  --bg-card: #1a1a28;
  --bg-hover: #252538;
  --text: #e0e0e0;
  --text-muted: #888;
  --border: #2a2a3e;
  --radius: 10px;
}

/* ========== 头部导航 ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 23, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: 1px;
}
.nav {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  white-space: nowrap;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.nav a:hover, .nav a.active {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 4px 4px 4px 16px;
  border: 1px solid var(--border);
  transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  width: 160px;
}
.search-box button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary-hover); }

/* ========== 主容器 ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
}

/* ========== 区块标题 ========== */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-title h2 {
  font-size: 20px;
  font-weight: 700;
  position: relative;
  padding-left: 14px;
}
.section-title h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}
.section-title .more {
  font-size: 13px;
  color: var(--text-muted);
  transition: color .2s;
}
.section-title .more:hover { color: var(--primary); }

/* ========== 卡片网格 ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
  position: relative;
}
.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 107, 53, .2);
}
.card-thumb {
  position: relative;
  width: 100%;
  padding-top: 140%;
  overflow: hidden;
  background: var(--bg-hover);
}
.card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-thumb img { transform: scale(1.08); }
.card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.card-score {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, .7);
  color: #ffb800;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.card-info {
  padding: 10px 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 轮播横幅 ========== */
.banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 30px;
  height: 360px;
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.banner-slide.active { opacity: 1; }
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,23,.95) 0%, rgba(15,15,23,.3) 50%, transparent 100%);
}
.banner-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  max-width: 500px;
  z-index: 2;
}
.banner-content h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.banner-content p {
  font-size: 14px;
  color: #bbb;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.banner-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
}
.banner-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(255,107,53,.4);
  color: #fff;
}
.banner-dots {
  position: absolute;
  bottom: 20px;
  right: 30px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.banner-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: all .3s;
}
.banner-dots span.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* ========== 筛选栏（分类页） ========== */
.filter-bar {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.filter-row {
  display: flex;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.filter-row:last-child { border-bottom: none; }
.filter-label {
  width: 70px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 14px;
  padding-top: 4px;
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.filter-options a {
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 13px;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.filter-options a:hover, .filter-options a.active {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--bg-card);
  font-size: 14px;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.pagination a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}
.pagination .current {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

	/* ========== 筛选栏 WAP 端横向滑动 ========== */
@media (max-width:768px){
  .filter-bar .filter-row{
    display:flex;
    align-items:center;
    gap:8px;
  }
  .filter-bar .filter-label{
    flex-shrink:0;
    white-space:nowrap;
  }
  .filter-bar .filter-options{
    flex:1;
    min-width:0;                    /* 关键：允许收缩，否则滚动不生效、整行撑破屏幕 */
    display:flex;
    flex-wrap:nowrap;               /* 关键：禁止换行，不再溢出到第2排 */
    overflow-x:auto;                /* 关键：横向滑动 */
    -webkit-overflow-scrolling:touch;  /* iOS 惯性滚动 */
    overscroll-behavior-x:contain;     /* 滑到头不触发浏览器的前进/后退手势 */
    gap:6px;
    padding:2px 2px 4px;
    scrollbar-width:none;           /* 隐藏滚动条(Firefox) */
  }
  .filter-bar .filter-options::-webkit-scrollbar{display:none}  /* 隐藏滚动条(Chrome/Safari) */
  .filter-bar .filter-options a{
    flex-shrink:0;                  /* 选项不被压缩变形 */
    white-space:nowrap;             /* 选项文字不折行 */
  }
}

/* ========== 详情页 ========== */
.detail-wrap {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}
.detail-poster {
  width: 240px;
  flex-shrink: 0;
}
.detail-poster img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.detail-info { flex: 1; }
.detail-info h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}
.detail-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.detail-meta-item {
  font-size: 14px;
  color: #ccc;
}
.detail-meta-item span {
  color: var(--text-muted);
  margin-right: 6px;
}
.detail-score-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 10px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.detail-score-num {
  font-size: 32px;
  font-weight: 800;
  color: #ffb800;
}
.detail-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.btn-primary, .btn-secondary {
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 20px rgba(255,107,53,.4);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.06);
}
.detail-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.detail-section h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.detail-desc {
  font-size: 14px;
  color: #bbb;
  line-height: 1.8;
}
/* 播放源切换 */
.play-source-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.play-source-tab {
  padding: 6px 16px;
  border-radius: 6px;
  background: var(--bg-hover);
  font-size: 13px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
  border: 1px solid transparent;
}
.play-source-tab:hover { transform: translateY(-2px); }
.play-source-tab.active {
  background: var(--primary);
  color: #fff;
}
.play-episode-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.play-episode-item {
  padding: 8px 0;
  text-align: center;
  background: var(--bg-hover);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.play-episode-item:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
}

/* ========== 播放页 ========== */
.player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}
.player-main {
  width: 100%;
  background: #000;
}
.player-main iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.player-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-card);
  flex-wrap: wrap;
  gap: 10px;
}
.player-title {
  font-size: 16px;
  font-weight: 600;
}
.player-episode-switch {
  display: flex;
  gap: 10px;
  align-items: center;
}
.player-episode-switch a {
  padding: 5px 14px;
  background: var(--bg-hover);
  border-radius: 6px;
  font-size: 13px;
  transition: all .25s;
}
.player-episode-switch a:hover {
  background: var(--primary);
  color: #fff;
}

/* ========== 搜索页 ========== */
.search-header {
  text-align: center;
  padding: 30px 0;
}
.search-header h1 {
  font-size: 24px;
  margin-bottom: 8px;
}
.search-header .keyword {
  color: var(--primary);
  font-weight: 700;
}
.search-header .count {
  color: var(--text-muted);
  font-size: 14px;
}
.search-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.search-empty .icon {
  font-size: 60px;
  margin-bottom: 16px;
  opacity: .3;
}
.hot-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.hot-search a {
  padding: 6px 16px;
  background: var(--bg-card);
  border-radius: 20px;
  font-size: 13px;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.hot-search a:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
}

/* ========== 底部 ========== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  margin-top: 40px;
  text-align: center;
}
.footer p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--primary); }

/* ========== 回到顶部 ========== */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 99;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(255,107,53,.3);
}
.back-top.show {
  opacity: 1;
  visibility: visible;
}
.back-top:hover {
  transform: translateY(-4px) scale(1.1);
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .card-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
}
@media (max-width: 992px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .banner { height: 280px; }
  .banner-content h2 { font-size: 24px; }
  .detail-wrap { flex-direction: column; align-items: center; }
  .detail-poster { width: 180px; }
  .detail-info { width: 100%; text-align: center; }
  .detail-meta-list { grid-template-columns: 1fr; text-align: left; }
  .detail-btns { justify-content: center; }
}
@media (max-width: 768px) {
  .header-inner { height: 56px; gap: 12px; padding: 0 14px; }
  .logo { font-size: 18px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .search-box input { width: 100px; }
  .container { padding: 16px 14px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }
  .banner { height: 200px; margin-bottom: 20px; }
  .banner-content { bottom: 20px; left: 20px; }
  .banner-content h2 { font-size: 18px; }
  .banner-content p { display: none; }
  .banner-btn { padding: 6px 18px; font-size: 13px; }
  .section-title h2 { font-size: 17px; }
  .detail-info h1 { font-size: 22px; }
  .player-info-bar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .search-box { display: none; }
  .filter-label { width: 50px; font-size: 12px; }
  .filter-options a { padding: 3px 10px; font-size: 12px; }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.card {
  animation: fadeInUp .5s ease backwards;
}
.card:nth-child(1) { animation-delay: .02s; }
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .08s; }
.card:nth-child(4) { animation-delay: .11s; }
.card:nth-child(5) { animation-delay: .14s; }
.card:nth-child(6) { animation-delay: .17s; }

	/* ========== 分页 pgx ========== */
.pgx{
  --pgx-main:#ff4d5e;              /* ← 主色：改成你主题的品牌色 */
  --pgx-sub:#ff8a3d;               /* ← 渐变副色：不想要渐变就填成和主色一样 */
  --pgx-glow:rgba(255,77,94,.35);  /* ← 当前页光晕，跟主色配套改 */
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;
  margin:30px 0 6px;user-select:none;font-variant-numeric:tabular-nums;
}
.pgx-info{flex-basis:100%;text-align:center;font-size:12px;letter-spacing:.5px;color:#98a2b3;margin-bottom:2px}
.pgx-btn{
  min-width:38px;height:38px;padding:0 15px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:14px;line-height:1;white-space:nowrap;border-radius:10px;
  color:inherit;text-decoration:none;
  background:rgba(148,163,184,.10);
  border:1px solid rgba(148,163,184,.18);
  transition:color .2s,border-color .2s,background .2s,transform .2s;
}
a.pgx-btn:hover{color:var(--pgx-main);border-color:var(--pgx-main);background:transparent;transform:translateY(-2px)}
.pgx-cur{
  color:#fff;font-weight:700;border-color:transparent;
  background:linear-gradient(135deg,var(--pgx-main),var(--pgx-sub));
  box-shadow:0 6px 18px var(--pgx-glow);
}
.pgx-dis{opacity:.35;cursor:default;pointer-events:none}
@media (max-width:640px){
  .pgx{gap:6px;margin:24px 0 4px}
  .pgx-btn{min-width:34px;height:34px;padding:0 11px;font-size:13px;border-radius:9px}
  .pgx-m{display:none}   /* 手机端隐藏 首页/尾页，保留 上一页·页码·下一页 */
  .pgx-info{font-size:11px}
}

	/* ========== 剧集列表：加间距 + 长名称省略 ========== */
.play-episode-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); /* 每个按钮最少96px，放不下就换行，按钮更宽 */
  gap:10px;                                                 /* 按钮之间的间距 */
}
.play-episode-list .play-episode-item{
  display:block;
  min-width:0;              /* 允许在网格里收缩，省略号才能生效 */
  padding:9px 12px;         /* 按钮内边距，文字不贴边 */
  text-align:center;
  white-space:nowrap;       /* 名称不折行 */
  overflow:hidden;
  text-overflow:ellipsis;   /* 过长名称显示省略号，不再挤压 */
  line-height:1.4;
}
@media (max-width:640px){
  .play-episode-list{
    grid-template-columns:repeat(auto-fill,minmax(72px,1fr));
    gap:8px;
  }
  .play-episode-list .play-episode-item{padding:8px 8px;font-size:13px}
}

	/* ========== 播放源排序按钮 ========== */
.play-source-tabs{
  display:flex;
  align-items:center;
  flex-wrap:wrap;   /* 手机端放不下时自动换行 */
  gap:8px;
}
.play-sort{
  margin-left:auto;          /* 推到最右侧 */
  padding:6px 14px;
  font-size:13px;
  line-height:1.4;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.25);
  color:inherit;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
  transition:color .2s,border-color .2s;
}
.play-sort:hover{color:#ff4d5e;border-color:#ff4d5e}

	/* ========== WAP端 播放源标签横向滑动 ========== */
@media (max-width:768px){
  .play-source-tabs{
    min-width:0;                        /* 允许在父容器里收缩，滚动才能生效 */
    flex-wrap:nowrap;                   /* 多个源不换行 */
    overflow-x:auto;                    /* 横向滑动 */
    -webkit-overflow-scrolling:touch;   /* iOS 惯性滚动 */
    overscroll-behavior-x:contain;      /* 滑到头不触发浏览器返回手势 */
    scrollbar-width:none;               /* 隐藏滚动条(Firefox) */
    padding-bottom:4px;
  }
  .play-source-tabs::-webkit-scrollbar{display:none}  /* 隐藏滚动条(Chrome/Safari) */
  .play-source-tabs .play-source-tab{
    flex-shrink:0;                      /* 标签不被压缩变形 */
    white-space:nowrap;                 /* 源名称不折行 */
  }
  .play-source-tabs .play-sort{flex-shrink:0}
}

	/* ========== WAP端 影片主信息 一排两个 ========== */
@media (max-width:768px){
  .detail-meta-list{
    display:grid;
    grid-template-columns:1fr 1fr;   /* 一排显示 2 个 */
    gap:8px 12px;                    /* 行间距 8px / 列间距 12px */
    align-items:center;
  }
  .detail-meta-item{
    min-width:0;                     /* 允许收缩，省略号才能生效 */
    white-space:nowrap;              /* 单行显示 */
    overflow:hidden;
    text-overflow:ellipsis;          /* 超长内容（如主演名单）截断显示省略号 */
  }
}

	/* ========== 头部：WAP端 导航折叠（第一行零位移 + 导航横滑） ========== */
.nav-toggle{display:none}   /* PC 端隐藏 */
 
@media (max-width:768px){
  /* 高度完全交给「内容 + 上下对称 padding」：展开/收起第一行位置零变化 */
  .header{height:auto;min-height:0}
  .header .header-inner{
    height:auto;min-height:0;
    padding-top:8px;padding-bottom:8px;   /* 若主题原有上下内边距，改成原值即可，保持上下相等 */
    flex-wrap:wrap;align-items:center;
  }
 
  .header .logo{order:1;flex-shrink:0}
  .header .search-box{order:2;flex:1;display:flex;align-items:center;margin:0 10px;min-width:0}
  .header .search-box input{flex:1;min-width:0;width:100%}
 
  .header .nav-toggle{
    order:3;flex-shrink:0;
    display:flex;flex-direction:column;justify-content:center;gap:4px;
    width:38px;height:34px;padding:0 9px;
    background:none;border:1px solid rgba(148,163,184,.35);border-radius:8px;
    color:inherit;cursor:pointer;
  }
  .nav-toggle span{display:block;height:2px;width:100%;background:currentColor;border-radius:2px;transition:transform .25s,opacity .25s}
  .nav-toggle.open span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  .nav-toggle.open span:nth-child(2){opacity:0}
  .nav-toggle.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
 
  /* 导航：单行横向滑动，不折行、不溢出到第二排 */
  .header .nav{
    order:4;
    display:none;
    flex-basis:100%;
    flex-direction:row;
    flex-wrap:nowrap;             /* ★ 不换行 */
    align-items:center;
    gap:8px;
    padding:10px 0 2px;
    margin-top:10px;
    border-top:1px solid rgba(148,163,184,.15);
    background:transparent;       /* 跟随头部底色，自动适配主题 */
    overflow-x:auto;              /* ★ 超出部分左右滑动 */
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;         /* 隐藏滚动条（Firefox） */
  }
  .header .nav::-webkit-scrollbar{display:none}   /* 隐藏滚动条（Chrome/WebView） */
  .header .nav.open{display:flex}
  .header .nav a{
    flex-shrink:0;                /* ★ 栏目不被压缩，滑动手感稳定 */
    padding:7px 14px;
    border-radius:16px;
    font-size:14px;
    white-space:nowrap;
  }
}
	/* ===== 播放页：标题行两端对齐（上一集/下一集移到最右） ===== */
.player-info-bar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.player-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-episode-switch{flex-shrink:0;display:flex;gap:8px}
 
/* ===== 播放源：横向滑动 + 右侧固定排序按钮 ===== */
.play-source-bar{display:flex;align-items:center;gap:8px}
.play-source-tabs{flex:1;min-width:0;display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.play-source-tabs::-webkit-scrollbar{display:none}
.play-source-tabs .play-source-tab{flex-shrink:0;white-space:nowrap}
.play-episode-sort{flex-shrink:0;cursor:pointer;user-select:none}

/* ===== 友情链接 ===== */
.friend-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.friend-links a{padding:7px 14px;border-radius:8px;background:rgba(148,163,184,.08);border:1px solid rgba(148,163,184,.15);font-size:13px;color:#b9c3d6;transition:.2s}
.friend-links a:hover{color:var(--primary,#ff6c00);border-color:var(--primary,#ff6c00)}

	/* ===== 面包屑导航 ===== */
.breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0 18px;font-size:13px;color:#8a93a3}
.breadcrumb a{color:#8a93a3;text-decoration:none;transition:color .2s}
.breadcrumb a:hover{color:var(--primary,#ff6c00)}
.breadcrumb-sep{color:#4a5261}
.breadcrumb-current{color:#e8edf7;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:768px){
  .breadcrumb{margin-top:14px;font-size:12px}
  .breadcrumb-current{max-width:160px}
}

/* ===== 播放记录（仅PC） ===== */
.history-box{position:relative;margin-left:12px;flex-shrink:0}
.history-btn{display:flex;align-items:center;gap:6px;background:rgba(148,163,184,.08);border:1px solid rgba(148,163,184,.2);border-radius:20px;padding:7px 14px;color:#c6cfdf;font-size:13px;cursor:pointer;transition:.2s;white-space:nowrap}
.history-btn:hover{color:var(--primary,#ff6c00);border-color:var(--primary,#ff6c00)}
.history-panel{display:none;position:absolute;top:calc(100% + 10px);right:0;width:320px;background:var(--bg,#111318);border:1px solid rgba(148,163,184,.15);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.45);padding:12px;z-index:120}
.history-box:hover .history-panel{display:block}
.history-head{display:flex;justify-content:space-between;align-items:center;padding:2px 4px 10px;border-bottom:1px solid rgba(148,163,184,.12)}
.history-head b{font-size:14px;color:#e8edf7}
.history-head a{font-size:12px;color:#8a93a3}
.history-head a:hover{color:var(--primary,#ff6c00)}
.history-list{max-height:320px;overflow-y:auto}
.history-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 4px;border-bottom:1px dashed rgba(148,163,184,.1);font-size:13px}
.history-item:last-child{border-bottom:none}
.history-name{color:#c6cfdf;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.history-item:hover .history-name{color:var(--primary,#ff6c00)}
.history-part{color:#8a93a3;font-size:12px;flex-shrink:0}
.history-empty{padding:18px 0;text-align:center;color:#6b7484;font-size:13px}
@media (max-width:768px){
  .history-box{display:none}
}

/* ===== 留言板 ===== */
.gbook-layout{display:grid;grid-template-columns:380px 1fr;gap:20px;margin-top:16px;align-items:start}
.gbook-form-panel,.gbook-list-panel{background:var(--bg,#111318);border:1px solid rgba(148,163,184,.12);border-radius:12px;padding:18px 20px}
.gbook-form-panel h3,.gbook-list-panel h3{font-size:16px;margin-bottom:14px;padding-left:10px;border-left:3px solid var(--primary,#ff6c00);line-height:1.2}
.gbook_form{display:flex;flex-direction:column;gap:10px}
.gbook_form label{font-size:13px;color:#8a93a3}
.gbook_form input[type=text],.gbook_form textarea{width:100%;background:rgba(148,163,184,.06);border:1px solid rgba(148,163,184,.2);border-radius:8px;padding:10px 12px;color:#e8edf7;font-size:14px}
.gbook_form input:focus,.gbook_form textarea:focus{outline:none;border-color:var(--primary,#ff6c00)}
.gbook_form textarea{min-height:120px;resize:vertical}
.gbook-count{font-size:12px;color:#6b7484;text-align:right;margin-top:-4px}
	.gbook-verify-row{display:flex;gap:10px;align-items:center}
.gbook-verify-row input{flex:1;min-width:0}
.gbook-verify-row img{height:38px;border-radius:6px;cursor:pointer;flex-shrink:0}
.gbook_submit{align-self:flex-start;background:var(--primary,#ff6c00);color:#fff;border:none;border-radius:20px;padding:10px 28px;font-size:14px;font-weight:600;cursor:pointer;transition:.2s}
.gbook_submit:hover{filter:brightness(1.1)}
.gbook-tip{font-size:12px;color:#6b7484}
.gbook-item{display:flex;gap:12px;padding:14px 0;border-bottom:1px dashed rgba(148,163,184,.12)}
.gbook-item:last-child{border-bottom:none}
.gbook-avatar{width:40px;height:40px;border-radius:50%;background:rgba(255,108,0,.15);color:var(--primary,#ff6c00);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.gbook-body{flex:1;min-width:0}
.gbook-head{display:flex;align-items:center;gap:10px;font-size:12px;color:#6b7484}
.gbook-head b{color:#e8edf7;font-size:14px}
.gbook-content{margin-top:4px;color:#c6cfdf;font-size:14px;line-height:1.7;word-break:break-word}
.gbook-reply{margin-top:8px;padding:8px 12px;border-left:3px solid var(--primary,#ff6c00);background:rgba(255,108,0,.06);border-radius:0 8px 8px 0;font-size:13px;color:#d9dfea}
.gbook-reply b{color:var(--primary,#ff6c00)}
.gbook-reply-time{color:#6b7484;font-size:12px}
.gbook-list:empty::after{content:'暂无留言，快来抢沙发～';display:block;padding:24px 0;text-align:center;color:#6b7484;font-size:13px}
@media (max-width:768px){
  .gbook-layout{grid-template-columns:1fr}
}