/* ============================================================
   视频资源站CMS - 深蓝暗色风格（参考 madousp2.cc）
   主色：青绿 #4ecdc4 / 红 #ff6b6b
   背景：深蓝渐变 #1a1a2e → #16213e
   ============================================================ */

:root {
  --primary: #4ecdc4;
  --primary-red: #ff6b6b;
  --primary-light: rgba(78,205,196,.12);
  --text: #e0e0e0;
  --text-muted: #999;
  --border: rgba(255,255,255,.08);
  --bg: #1a1a2e;
  --bg2: rgba(255,255,255,.05);
  --card: rgba(255,255,255,.05);
  --card-hover: rgba(255,255,255,.09);
  --nav-bg: rgba(26,26,46,.95);
  --white: #ffffff;
  --card-shadow: 0 2px 8px rgba(0,0,0,.3);
  --card-hover-shadow: 0 8px 24px rgba(78,205,196,.15);
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 布局 ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.main-wrap { padding: 20px 0; }
.main-content { width: 100%; }
.sidebar { display: none; }

/* ===== 顶部导航 ===== */
.site-header {
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; height: 64px; gap: 20px; }
.site-logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-nav { display: flex; gap: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
  transition: all .2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--primary); background: var(--primary-light); }

/* ===== 导航下拉菜单 ===== */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 3px; padding: 5px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 13px; white-space: nowrap; transition: all .2s; cursor: pointer; }
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.active .nav-dropdown-toggle { color: var(--primary); background: var(--primary-light); }
.nav-arrow { font-size: 10px; transition: transform .2s; line-height: 1; }
.nav-dropdown:hover .nav-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1e2235;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  min-width: 130px;
  padding: 6px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 9999;
  backdrop-filter: blur(10px);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 15px;
  color: rgba(255,255,255,.8);
  white-space: nowrap;
  transition: all .15s;
  background: transparent;
  border-radius: 0;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active { color: var(--primary); background: rgba(78,205,196,.1); }
.header-search { display: flex; align-items: center; gap: 8px; }
.header-search input {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 15px;
  outline: none;
  width: 165px;
  color: var(--text);
  transition: border-color .2s;
}
.header-search input:focus { border-color: var(--primary); }
.header-search input::placeholder { color: var(--text-muted); }
.header-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 7px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: opacity .2s;
  white-space: nowrap;
}
.header-search button:hover { opacity: .85; }

//* ===== 广告位通用 ===== */
.ad-banner { margin: 8px 0; text-align: center; overflow: hidden; }
.ad-banner img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* ===== PC 3排横幅广告 ===== */
.ad-banner-rows { background: var(--bg); padding: 6px 0 2px; }
.banner-row { display: flex; gap: 4px; width: 100%; margin-bottom: 4px; }
.banner-row a { display: block; flex: 1; overflow: hidden; line-height: 0; }
.banner-row a.flex-2 { flex: 2; }
.banner-row img { width: 100%; height: 90px; object-fit: cover; display: block; border-radius: 4px; transition: opacity .2s; }
.banner-row a:hover img { opacity: .88; }

/* ===== 顶部横幅广告（旧兼容） ===== */
.ad-top-banner { background: var(--bg); padding: 6px 0; text-align: center; overflow: hidden; }
.ad-top-banner img { max-width: 100%; height: auto; max-height: 100px; border-radius: var(--radius-sm); display: inline-block; }

/* ===== H5顶部横幅 ===== */
.ad-h5-top { background: var(--bg); line-height: 0; }
.ad-h5-top img { width: 100%; height: 50px; object-fit: cover; display: block; }

/* ===== H5中部信息流 ===== */
.ad-h5-mid { margin: 0 0 12px; line-height: 0; }
.ad-h5-mid img { width: 100%; height: auto; max-height: 100px; object-fit: cover; border-radius: 6px; display: block; }

/* ===== 图标栏广告 - PC每排8个，H5每排4个，自动换行可无限添加 ===== */
.ad-icon-bar { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 0; margin-bottom: 4px; }
.icon-bar-grid { display: flex; flex-wrap: wrap; width: 100%; }
.icon-bar-item { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; padding: 8px 4px; box-sizing: border-box; flex: 0 0 12.5%; max-width: 12.5%; transition: transform .15s; }
.icon-bar-item:hover { transform: translateY(-3px); }
.icon-bar-img { width: 60px; height: 60px; border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.3); flex-shrink: 0; }
.icon-bar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icon-bar-name { font-size: 14px; color: var(--text-muted); text-align: center; line-height: 1.3; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 2px; }

/* ===== 信息流广告 ===== */
.ad-feed-wrap { text-align: center; margin: 12px 0; overflow: hidden; max-width: 100%; }
.ad-feed-wrap img { max-width: 100%; height: auto; max-height: 120px; border-radius: var(--radius-sm); display: block; margin: 0 auto; }

/* ===== 播放器下方广告 ===== */
.ad-player-bottom { margin: 8px 0; text-align: center; overflow: hidden; width: 100%; border-radius: var(--radius-sm); }
.ad-player-bottom img { width: 100%; height: auto; max-height: 120px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
/* PC端广告默认显示，H5端广告默认隐藏 */
.ad-player-bottom[data-device="pc"] { display: block; }
.ad-player-bottom[data-device="mobile"] { display: none; }
@media (max-width: 768px) {
  .ad-player-bottom[data-device="pc"] { display: none !important; }
  .ad-player-bottom[data-device="mobile"] { display: block !important; }
  .ad-player-bottom img { max-height: 80px; }
}

/* ===== 侧边300广告 ===== */
.ad-mid-300 { text-align: center; overflow: hidden; border-radius: var(--radius); }
.ad-mid-300 img { max-width: 300px; width: 100%; height: auto; border-radius: var(--radius-sm); }

/* ===== H5底部固定广告 ===== */
.ad-h5-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; text-align: center; background: rgba(15,17,23,.95); padding: 4px 0; display: none; }
.ad-h5-bottom img { max-height: 55px; width: auto; max-width: 100%; }
@media (max-width: 768px) {
  .ad-h5-bottom { display: block; }
  /* H5图标栏每排4个 */
  .icon-bar-item { flex: 0 0 25%; max-width: 25%; padding: 8px 4px; }
  .icon-bar-img { width: 52px; height: 52px; border-radius: 12px; }
  .icon-bar-name { font-size: 11px; }
  /* H5横幅高度适配 */
  .banner-row img { height: 60px; }
}

/* ===== 视频卡片 ===== */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.video-grid li { list-style: none; }
.video-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .2s, box-shadow .2s, background .2s;
  border: 1px solid var(--border);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  background: var(--card-hover);
  border-color: rgba(78,205,196,.3);
}
.video-card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: rgba(0,0,0,.3); }
.video-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video-card:hover .video-card-thumb img { transform: scale(1.06); }
.video-card-duration { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; padding: 2px 5px; border-radius: 3px; }
.video-card-views { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 2px 5px; border-radius: 3px; }
.video-card-tag { position: absolute; top: 6px; left: 6px; background: linear-gradient(135deg, #ff6b6b, #4ecdc4); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 600; }
.video-card-body { padding: 8px 10px 10px; }
.video-card-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  margin-bottom: 6px;
}
.video-card-meta { margin-top: 4px; font-size: 14px; color: var(--text-muted); }

/* 视频卡片TAG标签 */
.video-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.vc-tag {
  display: inline-block;
  font-size: 12px;
  color: #4ecdc4;
  background: rgba(78,205,196,.12);
  border: 1px solid rgba(78,205,196,.35);
  border-radius: 3px;
  padding: 1px 6px;
  line-height: 1.6;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.video-card:hover .vc-tag { color: #fff; background: rgba(78,205,196,.3); border-color: rgba(78,205,196,.6); }

/* 数量徽章 */
.count-badge { font-size: 13px; color: var(--text-muted); margin-left: auto; }

/* 侧边栏分类链接 */
.sidebar-cat-link { display: block; padding: 5px 8px; border-radius: 5px; font-size: 13px; color: var(--text-muted); transition: all .2s; }
.sidebar-cat-link:hover, .sidebar-cat-link.active { color: var(--primary); background: var(--primary-light); }

/* 标签大全页 */
.tags-all-wrap { background: var(--card); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--card-shadow); display: flex; flex-wrap: wrap; gap: 10px; }
.tags-all-item { color: var(--text-muted); transition: color .2s; }
.tags-all-item:hover { color: var(--primary); }
.tag-count { font-size: 10px; color: var(--text-muted); margin-left: 2px; }

/* 更多链接 */
.more-link { margin-left: auto; font-size: 13px; color: var(--text-muted); transition: color .2s; }
.more-link:hover { color: var(--primary); }

/* 视频tags（播放页） */
.video-tags { margin-top: 8px; }
.video-tags span { font-size: 12px; color: var(--text-muted); margin-right: 8px; }

/* 平板端：3列 */
@media (max-width: 1024px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
/* H5 移动端：2列，图片正方形 */
@media (max-width: 640px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .video-card-thumb { aspect-ratio: 1/1; }
  .video-card-body { padding: 6px 8px 8px; }
  .video-card-title { font-size: 12px; -webkit-line-clamp: 2; }
  
}

/* ===== 区块标题 ===== */
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.section-title h2 { font-size: 20px; font-weight: 700; color: var(--text); }
.section-title .more { margin-left: auto; font-size: 14px; color: var(--text-muted); }
.section-title .more:hover { color: var(--primary); }
.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: linear-gradient(to bottom, #ff6b6b, #4ecdc4);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== 侧边栏 ===== */
.sidebar-block {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}
.sidebar-block h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--text); }
.tag-cloud-section { margin-top: 32px; padding: 20px 0 8px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
  background: rgba(255,255,255,.06);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 15px;
  transition: all .2s;
  border: 1px solid var(--border);
}
.tag-cloud a:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ===== 热门排行 ===== */
.rank-list { list-style: none; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rank-item:last-child { border-bottom: none; }
.rank-num { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.08); color: var(--text-muted); flex-shrink: 0; }
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg,#ff6b6b,#4ecdc4); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg,#f59e0b,#ff6b6b); color: #fff; }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg,#64748b,#475569); color: #fff; }
.rank-title { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.rank-title:hover { color: var(--primary); }
.rank-views { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

/* ===== 分页 ===== */
.pagination-wrap { display: flex; justify-content: center; margin: 28px 0; }
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  cursor: pointer;
  user-select: none;
}
.pagination li a:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.pagination li.active a,
.pagination li.active span { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.pagination li span.ellipsis { background: transparent; border-color: transparent; color: var(--text-muted); cursor: default; min-width: 28px; padding: 0 4px; }
.pagination li.disabled a,
.pagination li.disabled span { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ===== 面包屑 ===== */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--text-muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ===== 播放页 ===== */
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; position: relative; }
.player-wrap iframe, .player-wrap video { width: 100%; height: 100%; border: none; }
.video-info { background: var(--card); border-radius: var(--radius); padding: 18px; margin-top: 14px; border: 1px solid var(--border); }
.video-title { font-size: 22px; font-weight: 700; line-height: 1.4; color: var(--text); }
.video-meta { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.video-meta span { font-size: 16px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.video-desc { margin-top: 12px; font-size: 16px; color: var(--text-muted); line-height: 1.8; }
.video-tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.video-tags-wrap a {
  background: rgba(78,205,196,.1);
  color: #4ecdc4;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid rgba(78,205,196,.4);
  transition: all .2s;
  font-weight: 500;
  letter-spacing: .3px;
}
.video-tags-wrap a:hover { background: rgba(78,205,196,.25); color: #fff; border-color: #4ecdc4; }

/* 播放源切换 */
.source-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.source-tab { padding: 6px 16px; border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text-muted); transition: all .2s; }
.source-tab.active, .source-tab:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* 举报按钮 */
.report-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: #f59e0b; cursor: pointer; padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid #f59e0b; background: rgba(245,158,11,.08); transition: all .2s; margin-top: 10px; font-weight: 500; }
.report-btn:hover { color: #ff6b6b; border-color: #ff6b6b; }

/* ===== 搜索页 ===== */
.search-form { display: flex; gap: 10px; margin-bottom: 20px; }
.search-form input { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 15px; color: var(--text); outline: none; }
.search-form input:focus { border-color: var(--primary); }
.search-form input::placeholder { color: var(--text-muted); }
.search-form button { background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 24px; font-size: 15px; cursor: pointer; font-weight: 500; }
.search-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.search-empty .icon { font-size: 48px; margin-bottom: 12px; }

/* ===== TAG页 ===== */
.tag-header { background: var(--card); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; border: 1px solid var(--border); }
.tag-header h1 { font-size: 20px; font-weight: 700; }
.tag-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.tag-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tag-list-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; text-align: center; transition: all .2s; }
.tag-list-item:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.tag-list-item .name { font-size: 14px; font-weight: 500; }
.tag-list-item .count { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== 换量页 ===== */
.exchange-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.exchange-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; transition: all .2s; }
.exchange-item:hover { border-color: var(--primary); box-shadow: var(--card-hover-shadow); }
.exchange-item img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; background: var(--bg2); }
.exchange-item .site-name { font-size: 14px; font-weight: 600; }
.exchange-item .site-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.exchange-form { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.exchange-form h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 80px; }
.btn-primary { background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 24px; font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity .2s; }
.btn-primary:hover { opacity: .85; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  margin-top: 50px;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.friend-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.friend-links a { font-size: 14px; color: var(--text-muted); transition: color .2s; }
.friend-links a:hover { color: var(--primary); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 14px; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 13px; color: var(--text-muted); }

/* ===== 流量互换浮动条 ===== */
.traffic-bar { background: var(--nav-bg); border-top: 1px solid var(--border); padding: 8px 0; overflow: hidden; }
.traffic-bar-inner { display: flex; gap: 20px; animation: marquee 30s linear infinite; width: max-content; }
.traffic-bar-inner:hover { animation-play-state: paused; }
.traffic-bar-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.traffic-bar-item:hover { color: var(--primary); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== 提示 Toast ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--nav-bg); color: var(--text); padding: 10px 20px; border-radius: 20px; font-size: 14px; z-index: 9999; border: 1px solid var(--border); backdrop-filter: blur(8px); animation: fadeInUp .3s ease; box-shadow: 0 4px 20px rgba(0,0,0,.4); }
@keyframes fadeInUp { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .main-wrap { padding: 12px 0; }
}
@media (max-width: 640px) {
  .header-inner { height: 56px; gap: 10px; }
  .site-logo { font-size: 1.2rem; }
  .header-search input { width: 120px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .video-title { font-size: 16px; }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #e0e0e0; border-radius: 5px; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 5px; border: 2px solid #e0e0e0; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ===== 骨架屏加载 ===== */
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 15px; }


/* ============================================================
   H5端专属样式（手机优化）
   ============================================================ */

/* ===== H5导航栏 ===== */
.h5-header {
  display: none;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  height: 52px;
}
.h5-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 14px;
  position: relative;
}
.h5-header-inner .h5-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}
.h5-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.h5-menu-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .2s;
}
.h5-menu-btn:hover { background: rgba(255,255,255,.08); }
.h5-header-right { display: flex; align-items: center; gap: 2px; }
.h5-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  padding: 6px;
  border-radius: 8px;
  transition: background .2s;
  text-decoration: none;
}
.h5-search-icon:hover { background: rgba(255,255,255,.08); }

/* H5抽屉菜单遮罩 */
.h5-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 300;
}
.h5-drawer-overlay.open { display: block; }

/* H5抽屉菜单：全屏宽，从左侧滑入 */
.h5-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #141824;
  z-index: 301;
  transition: left .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.h5-drawer.open { left: 0; }

/* 抽屉头部 */
.h5-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  position: relative;
}
.h5-drawer-head .h5-drawer-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.h5-drawer-logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.h5-drawer-close {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  opacity: .7;
}
.h5-drawer-close:hover { opacity: 1; }

/* 抽屉导航列表 */
.h5-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.h5-drawer-nav::-webkit-scrollbar { width: 3px; }
.h5-drawer-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* 普通导航项 */
.h5-dnav-item {
  display: block;
  padding: 14px 20px;
  font-size: 16px;
  color: #c8d0e0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  text-decoration: none;
  transition: color .15s, background .15s;
}
.h5-dnav-item:hover { color: #fff; background: rgba(255,255,255,.04); }
.h5-dnav-item.active { color: var(--primary); }

/* 带子分类的分组 */
.h5-dnav-group { border-bottom: 1px solid rgba(255,255,255,.05); }
.h5-dnav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 16px;
  color: #c8d0e0;
  cursor: pointer;
  transition: color .15s;
  user-select: none;
}
.h5-dnav-toggle:hover { color: #fff; }
.h5-dnav-toggle.active { color: var(--primary); }
.h5-dnav-toggle.open { color: var(--primary); }
.h5-dnav-arrow {
  flex-shrink: 0;
  transition: transform .2s;
  opacity: .6;
}
.h5-dnav-toggle.open .h5-dnav-arrow { transform: rotate(180deg); }

/* 子分类列表 */
.h5-dnav-children {
  display: none;
  background: rgba(0,0,0,.2);
  padding: 4px 0;
}
.h5-dnav-child {
  display: block;
  padding: 11px 20px 11px 32px;
  font-size: 15px;
  color: #8a95a8;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: color .15s;
}
.h5-dnav-child:hover { color: #c8d0e0; }
.h5-dnav-child.active { color: var(--primary); }

/* 抽屉底部搜索框 */
.h5-drawer-search {
  flex-shrink: 0;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #141824;
}
.h5-drawer-search input {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.h5-drawer-search input:focus { border-color: var(--primary); }
.h5-drawer-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 768px) {
  /* 隐藏PC导航，显示H5导航 */
  .site-header { display: none !important; }
  .h5-header { display: block; }

  /* 容器内边距缩小 */
  .container { padding: 0 10px; }
  .main-wrap { padding: 8px 0; } /* 底部留出固定广告空间 */

  /* 视频卡片：2列，封面16:9 */
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .video-card-thumb { aspect-ratio: 16/9; }
  .video-card-body { padding: 6px 8px 8px; }
  .video-card-title { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 4px; }
  .video-card-meta { font-size: 11px; }
  .video-card-tags { display: none; } /* H5卡片不显示TAG，节省空间 */
  .tag-cloud-section { display: none !important; margin: 0 !important; padding: 0 !important; height: 0 !important; overflow: hidden !important; } /* H5不显示首页热门标签 */
  .video-card-duration { font-size: 10px; padding: 1px 4px; }
  .video-card-views { font-size: 10px; padding: 1px 4px; }

  /* 区块标题 */
  .section-title { margin-bottom: 10px; }
  .section-title h2 { font-size: 18px; font-weight: 700; }

  /* 首页各分类区块间距 */
  .main-wrap section { margin-top: 20px !important; }
  .container .tag-cloud-section { display: none !important; margin: 0 !important; padding: 0 !important; height: 0 !important; overflow: hidden !important; } /* 覆盖section通用margin，H5隐藏热门标签 */

  /* 播放页 */
  .main-wrap .main-content { width: 100%; }
  .sidebar { display: none !important; }
  .player-wrap { border-radius: 0; margin: 0; width: 100%; max-width: 100%; overflow: hidden; }
  #xgplayer { width: 100% !important; max-width: 100% !important; }
  #xgplayer .xgplayer { width: 100% !important; max-width: 100% !important; }
  #xgplayer video { width: 100% !important; max-width: 100% !important; }
  .video-info { border-radius: var(--radius-sm); padding: 12px; margin-top: 8px; }
  .video-title { font-size: 19px; }
  .video-meta { gap: 10px; margin-top: 8px; }
  .video-meta span { font-size: 15px; }
  .video-tags-wrap { gap: 6px; margin-top: 10px; }
  .video-tags-wrap a { padding: 4px 10px; font-size: 14px; }
  .episodes { margin-top: 10px; }
  .episode-list { gap: 6px; }
  .episode-list a { padding: 5px 12px; font-size: 14px; }
  .report-btn { font-size: 13px; padding: 5px 12px; margin-top: 8px; }

  /* H5播放页相关视频：横向滚动 */
  .h5-related-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .h5-related-scroll::-webkit-scrollbar { display: none; }
  .h5-related-scroll .video-card {
    flex: 0 0 140px;
    min-width: 140px;
  }
  .h5-related-scroll .video-card-thumb { aspect-ratio: 16/9; }
  .h5-related-scroll .video-card-title { font-size: 12px; -webkit-line-clamp: 2; }

  /* H5播放页：热门视频列表 */
  .h5-hot-list { list-style: none; }
  .h5-hot-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }
  .h5-hot-list li:last-child { border-bottom: none; }
  .h5-hot-list .rank { width: 20px; height: 20px; border-radius: 4px; background: rgba(255,255,255,.08); color: var(--text-muted); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .h5-hot-list li:nth-child(1) .rank { background: linear-gradient(135deg,#ff6b6b,#4ecdc4); color: #fff; }
  .h5-hot-list li:nth-child(2) .rank { background: linear-gradient(135deg,#f59e0b,#ff6b6b); color: #fff; }
  .h5-hot-list li:nth-child(3) .rank { background: linear-gradient(135deg,#64748b,#475569); color: #fff; }
  .h5-hot-list a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; }
  .h5-hot-list a:hover { color: var(--primary); }

  /* 搜索页 */
  .search-form { gap: 6px; }
  .search-form input { font-size: 15px; padding: 9px 14px; }
  .search-form button { padding: 9px 16px; font-size: 14px; }

  /* 分页 */
  .pagination a, .pagination span { min-width: 32px; height: 32px; font-size: 13px; }

  /* 面包屑 */
  .breadcrumb { font-size: 13px; margin-bottom: 10px; }

  /* 页脚 */
  .site-footer { padding: 20px 0; margin-top: 20px; }
  .friend-links a { font-size: 13px; }
  .footer-copy { font-size: 12px; }

  /* 图标栏 */
  .icon-bar-item { flex: 0 0 25%; max-width: 25%; padding: 8px 4px; }
  .icon-bar-img { width: 52px; height: 52px; border-radius: 12px; }
  .icon-bar-name { font-size: 11px; }

  /* 站长推荐链接 */
  .exchange-links-wrap { padding: 4px 0; gap: 4px 6px; }
  .exchange-link-item { font-size: 13px; padding: 3px 10px; }
}

/* ===== 广告区域 PC/H5 CSS控制（兼容桌面UA模式手机浏览器） ===== */
/* 默认：手机专属广告隐藏，PC广告显示 */
.ad-mobile-only { display: none !important; }
.ad-pc-only { display: block; }
/* 768px以下：手机专属广告显示，PC广告隐藏 */
@media (max-width: 768px) {
  .ad-mobile-only { display: block !important; }
  .ad-pc-only { display: none !important; }
}

/* ===== 播放页右侧推荐栏 ===== */
/* 播放页 main-wrap 改为左右布局 */
.main-wrap.video-page {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.main-wrap.video-page .main-content {
  flex: 1;
  min-width: 0;
}
/* 右侧推荐栏 */
.video-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* 推荐栏标题 */
.vsidebar-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  padding: 0 0 10px 0;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 12px;
}
/* 信息流广告卡片 */
.vsidebar-ad-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.vsidebar-ad-label {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,.55);
  color: #aaa;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 1;
  pointer-events: none;
}
/* 广告占位（未配置时显示） */
.vsidebar-ad-empty {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(78,205,196,.08), rgba(255,107,107,.08));
  display: flex;
  align-items: center;
  justify-content: center;
}
.vsidebar-ad-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
}
.vsidebar-ad-placeholder small {
  font-size: 11px;
  color: var(--primary);
}
/* 热门视频卡片 */
.vsidebar-card {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity .15s;
}
.vsidebar-card:last-child {
  border-bottom: none;
}
.vsidebar-card:hover {
  opacity: .8;
}
/* 缩略图 */
.vsidebar-thumb {
  position: relative;
  width: 110px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.vsidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 时长角标 */
.vsidebar-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
}
/* 视频信息 */
.vsidebar-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.vsidebar-title {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vsidebar-meta {
  font-size: 12px;
  color: var(--text-muted);
}
/* 小屏幕隐藏右侧推荐栏 */
@media (max-width: 1100px) {
  .video-sidebar {
    display: none;
  }
  .main-wrap.video-page {
    display: block;
  }
}

/* ===== 播放页公告/备用地址框 ===== */
.video-notice-box {
  background: rgba(28, 8, 8, 0.92);
  border: 1px solid rgba(255, 68, 68, 0.4);
  border-left: 4px solid #ff4444;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 2px 14px rgba(255, 68, 68, 0.10);
}
.video-notice-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 80, 80, 0.22);
}
.video-notice-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.video-notice-title {
  font-size: 15px;
  font-weight: 700;
  color: #ff6b6b;
  letter-spacing: 0.5px;
}
.video-notice-body {
  font-size: 14px;
  color: #dfc0c0;
  line-height: 2.0;
}
/* 公告框内链接样式 */
.video-notice-body a {
  color: #ff9f9f;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(255, 159, 159, 0.5);
  padding-bottom: 1px;
}
.video-notice-body a:hover {
  color: #ffcfcf;
  border-bottom-color: #ffcfcf;
}
@media (max-width: 768px) {
  .video-notice-box { padding: 12px 14px; margin-bottom: 14px; }
  .video-notice-body { font-size: 13px; }
}

#xgplayer .xgplayer-progress {
  height: 6px !important;
  background: rgba(255, 255, 255, 0.12) !important;
}
#xgplayer .xgplayer-progress-cache {
  background: rgba(148, 163, 184, 0.22) !important;
}
#xgplayer .xgplayer-progress-played {
  background: #cbd5e1 !important;
  box-shadow: none !important;
}
#xgplayer .xgplayer-progress-btn {
  width: 14px !important;
  height: 14px !important;
  background: #e2e8f0 !important;
  box-shadow: none !important;
}
