/* ============================================
   VideoSystem Common CSS - 全局基础样式
   使用命名空间 .vs- 前缀避免冲突
   ============================================ */

/* ========== 基础样式 ========== */
/* 使用组合选择器保持向后兼容 */
html {
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

body,
.vs-body {
  font-family: var(--vs-font-family);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  position: static;
  background-color: var(--vs-color-bg-body); /* 黑灰色背景 */
  box-sizing: border-box;
}

/* 确保所有元素不会超出视口 */
* {
  box-sizing: border-box;
}

/* 有底部导航栏时，为 body 添加底部 padding */
body.has-bottom-nav,
.vs-body.has-bottom-nav {
  padding-bottom: var(--vs-bottom-nav-height);
}

ul,
.vs-list {
  list-style: none;
  padding: 0;
}

li,
.vs-list-item {
  padding: 6px 0;
}

/* ========== 顶部栏样式 ========== */
/* 使用 fixed 定位确保导航栏始终固定 */
.vs-top-bar {
  background: var(--vs-color-bg-body); /* 使用统一的背景色 */
  border-bottom: 1px solid var(--vs-color-border); /* 添加分隔线，增强层次感 */
  padding: 8px 0; /* 优化：从14px减少到8px，更紧凑 */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--vs-z-index-top-bar);
  width: 100%;
  box-sizing: border-box;
  line-height: 1.6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); /* 优化：更精细的阴影 */
  backdrop-filter: blur(10px); /* 添加毛玻璃效果，更现代 */
}

.vs-top-bar-container {
  max-width: var(--vs-container-max-width);
  margin: 0; /* 默认靠左（<= 1200px时） */
  padding: 0 16px; /* 优化：从12px增加到16px */
  display: flex;
  align-items: center;
  gap: 12px; /* 优化：从lg(20px)减少到12px，更紧凑 */
  min-width: 0;
  position: relative;
  line-height: 1; /* 确保行高为1 */
}

.vs-top-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease; /* 从opacity改为all，更流畅 */
  padding: 4px 8px; /* 添加内边距，增加点击区域 */
  border-radius: var(--vs-radius-md); /* 添加圆角 */
}

.vs-top-logo:hover {
  opacity: 0.85;
  transform: translateY(-1px); /* 添加轻微上浮效果 */
  background: rgba(255, 204, 204, 0.1); /* 添加背景色 */
}

.vs-logo-icon {
  flex-shrink: 0;
  height: 32px; /* 优化：从36px减少到32px，更精致 */
  width: auto; /* 宽度自适应，保持原始比例 */
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(255, 204, 204, 0.3)); /* 添加图标阴影 */
  display: block; /* 确保图片是块级元素 */
}

.vs-top-logo:hover .vs-logo-icon {
  transform: scale(1.05); /* hover时轻微放大，移除旋转效果 */
}

.vs-logo-text {
  display: inline-block;
}

.vs-top-search {
  flex: 1;
  min-width: 0;
  max-width: var(--vs-search-max-width);
  position: relative;
  margin: 0 auto;
}

.vs-top-search-input {
  width: 100%;
  padding: 6px 36px 6px 12px; /* 优化：从10px减少到6px，更紧凑 */
  border: 1.5px solid var(--vs-color-border);
  border-radius: 16px; /* 优化：使用固定值16px，更精致 */
  font-size: 13px; /* 优化：从14px减少到13px */
  outline: none;
  transition: all 0.15s; /* 优化：从normal改为0.15s，更灵敏 */
  box-sizing: border-box;
  background: var(--vs-color-bg-light); /* 添加背景色，更有层次 */
  color: var(--vs-color-text-primary);
}

.vs-top-search-input:focus {
  border-color: var(--vs-video-color-primary);
  box-shadow: 0 0 0 3px rgba(255, 204, 204, 0.15), var(--vs-shadow-focus); /* 增强聚焦效果 */
  background: var(--vs-color-bg-lighter); /* 聚焦时背景更亮 */
  transform: translateY(-1px); /* 轻微上浮 */
}

.vs-top-search-input::placeholder {
  color: var(--vs-color-text-tertiary);
  opacity: 0.7;
}

.vs-top-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; /* 优化：从28px减少到24px，更精致 */
  height: 24px;
  border: none;
  background: var(--vs-video-color-primary);
  color: var(--vs-color-bg-white);
  border-radius: var(--vs-radius-circle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px; /* 优化：从14px减少到12px */
  flex-shrink: 0;
  transition: all 0.15s; /* 优化：从fast改为0.15s */
  box-shadow: 0 2px 6px rgba(255, 204, 204, 0.3); /* 添加阴影 */
}

.vs-top-search-btn:hover {
  background: var(--vs-video-color-primary-hover);
  transform: translateY(-50%) scale(1.1); /* 放大效果 */
  box-shadow: 0 3px 8px rgba(255, 204, 204, 0.4); /* 增强阴影 */
}

.vs-top-search-btn:active {
  transform: translateY(-50%) scale(0.95); /* 点击缩小效果 */
}

.vs-top-actions {
  display: flex;
  align-items: center;
  gap: 8px; /* 优化：从sm减少到8px，更紧凑 */
  flex-shrink: 0;
  margin-left: auto;
}

/* PC端隐藏移动端按钮组 */
.top-bar-right-group {
  display: none;
}

/* PC端隐藏移动端搜索按钮 */
.mobile-search-btn {
  display: none;
}

.vs-top-action-btn {
  width: 32px; /* 优化：从36px减少到32px，更精致 */
  height: 32px;
  border: 1.5px solid var(--vs-color-border); /* 添加边框，更有层次 */
  background: var(--vs-color-bg-lighter);
  border-radius: var(--vs-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px; /* 优化：使用固定值16px */
  text-decoration: none;
  color: var(--vs-color-text-primary);
  transition: all 0.15s; /* 优化：从fast改为0.15s */
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-sizing: border-box; /* 确保边框包含在宽度内，防止华为浏览器重叠 */
  margin-right: var(--vs-spacing-sm); /* 添加右边距，补充gap，防止华为浏览器重叠 */
}

.vs-top-action-btn:last-child {
  margin-right: 0; /* 最后一个按钮不需要右边距 */
}

.vs-top-action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 204, 204, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.vs-top-action-btn:hover {
  background: var(--vs-color-bg-hover);
  border-color: var(--vs-video-color-primary);
  color: var(--vs-video-color-primary);
  transform: translateY(-2px); /* 上浮效果 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* 添加阴影 */
}

.vs-top-action-btn:hover::before {
  width: 100%;
  height: 100%;
}

.vs-top-action-btn:active {
  transform: translateY(0); /* 点击时回到原位 */
}

.vs-main-content {
  min-height: calc(100vh - 180px);
  padding: 0;
  padding-top: var(--vs-top-bar-height);
  background: transparent; /* 改为透明，让body的背景色显示出来 */
  position: relative;
  overflow: visible;
}

/* ========== 导航区域容器（二级+三级）固定 ========== */
/* 使用 fixed 定位确保导航栏始终固定在顶部栏下方 */
/* top 值由 JavaScript 动态设置，确保紧贴顶部栏，无空隙 */
.vs-nav-sticky-wrapper {
  position: fixed;
  /* top 值由 JavaScript 动态计算并设置，这里使用默认值作为后备 */
  top: var(--vs-top-bar-height); /* 紧贴标题栏底部，无空隙 */
  left: 0;
  right: 0;
  z-index: var(--vs-z-index-nav-sticky);
  width: 100%;
  box-sizing: border-box;
  min-height: 1px;
  margin: 0;
  padding: 0; /* 移除 padding-top，让容器紧贴标题栏 */
}

.vs-nav-sticky-container {
  background: var(--vs-color-bg-white);
  width: 100%;
  box-sizing: border-box;
  min-height: 1px;
  margin: 0;
  padding: 0; /* 移除所有padding，让二级导航紧贴标题栏 */
  line-height: 1; /* 确保行高为1 */
}

/* ========== 底部导航样式 ========== */
.vs-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--vs-bottom-nav-height);
  background: var(--vs-color-bg-body); /* 使用统一的背景色 */
  border-top: 1px solid var(--vs-color-border);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--vs-spacing-xxl);
  z-index: var(--vs-z-index-bottom-nav);
  box-shadow: var(--vs-shadow-nav);
}

.vs-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-decoration: none;
  color: var(--vs-color-text-secondary);
  padding: 2px var(--vs-spacing-sm);
  border-radius: var(--vs-radius-md);
  transition: all var(--vs-transition-fast);
  position: relative;
  line-height: 1;
}

.vs-bottom-nav-item:hover,
.vs-bottom-nav-item.active {
  color: var(--vs-video-color-primary);
  background: var(--vs-color-bg-hover);
}

.vs-bottom-nav-item-icon {
  font-size: var(--vs-font-size-md);
  margin: 0;
  padding: 0;
  line-height: 1;
  display: block;
}

.vs-bottom-nav-item-text {
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  margin: 0;
  margin-top: -2px;
}

/* ========== 统一的导航Canvas基础样式 ========== */
/* 确保所有导航的Canvas样式一致 */
.vs-secondary-nav-item .anti-ocr-canvas,
.vs-secondary-nav-item canvas,
.vs-default-level3-item .anti-ocr-canvas,
.vs-default-level3-item canvas {
  display: block;
  /* max-width: 100%; */ /* 移除最大宽度限制，让canvas完全自适应 */
  width: auto; /* 宽度自适应 */
  height: auto; /* 高度自适应 */
  margin: 0;
  padding: 0;
  line-height: 1;
  vertical-align: top;
  object-fit: contain; /* 保持比例，防止变形 */
}

/* 一级导航Canvas特殊样式（保持原有样式） */
.vs-bottom-nav-item canvas {
  width: 100%;
}

/* ========== 二级导航样式 ========== */
.vs-secondary-nav {
  background: var(--vs-color-bg-body); /* 使用统一的背景色 */
  padding: 0; /* 移除上下padding，让卡片文字紧贴标题栏文字 */
  width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  position: relative; /* 相对定位，自然堆叠 */
  margin-top: 0;
  line-height: 1.5; /* 调整行高 */
}

.vs-secondary-nav-wrapper {
  max-width: var(--vs-container-max-width, 1200px);
  margin: 0; /* 默认靠左（<= 1200px时） */
  padding: 0; /* 紧靠左边界，移除左右padding */
  box-sizing: border-box;
}

.vs-secondary-nav-container {
  display: flex;
  align-items: center;
  gap: 4px; /* 优化：从6px减少到4px，更紧凑 */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch; /* WebKit浏览器支持 */
  touch-action: pan-x; /* 火狐浏览器支持横向滚动 */
  scrollbar-width: thin;
  scrollbar-color: var(--vs-color-border) transparent;
  padding: 4px 0 6px 0; /* 优化：从2px 0 4px 0改为4px 0 6px 0 */
  line-height: 1.5; /* 调整行高 */
}

.vs-secondary-nav-container::-webkit-scrollbar {
  height: 4px;
}

.vs-secondary-nav-container::-webkit-scrollbar-track {
  background: transparent;
}

.vs-secondary-nav-container::-webkit-scrollbar-thumb {
  background: var(--vs-color-border);
  border-radius: 2px;
}

.vs-secondary-nav-container::-webkit-scrollbar-thumb:hover {
  background: var(--vs-color-text-tertiary);
}

/* ========== 统一的导航A标签基础样式 ========== */
.vs-secondary-nav-item,
.vs-default-level3-item {
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  display: flex; /* 统一使用flex，而不是inline-flex */
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.5; /* 调整行高 */
  height: auto; /* 高度自适应，由内容决定 */
  width: auto; /* 宽度自适应，由内容决定 */
  min-width: 0; /* 允许收缩到内容宽度 */
  min-height: 0; /* 允许收缩到内容高度 */
  margin: 0; /* 确保无margin */
  overflow: visible; /* 允许内容完全显示 */
}

/* 二级导航特定样式 */
.vs-secondary-nav-item {
  color: var(--vs-color-text-primary); /* 统一为白色 */
  font-size: 13px; /* 优化：从14px减少到13px，更精致 */
  font-weight: var(--vs-font-weight-normal);
  padding: 4px 10px; /* 优化：从6px 6px改为4px 10px，更紧凑 */
  border-radius: 3px; /* 优化：从sm改为3px，更精致 */
  transition: all 0.15s; /* 优化：从fast改为0.15s */
  min-height: 26px; /* 优化：固定最小高度 */
}

/* 三级导航特定样式 */
.vs-default-level3-item {
  color: var(--vs-color-text-primary); /* 统一为白色 */
  font-size: 11px; /* 优化：从12px减少到11px，更精致 */
  padding: 3px 8px; /* 优化：从4px 10px改为3px 8px，更紧凑 */
  border-radius: 3px; /* 优化：从sm改为3px，更精致 */
  background: var(--vs-color-bg-light); /* 添加背景色 */
  border: 0.5px solid var(--vs-color-border); /* 优化：从1px减少到0.5px，更精致 */
  transition: all 0.15s; /* 优化：从fast改为0.15s */
  min-height: 22px; /* 优化：固定最小高度 */
  line-height: 1.2; /* 优化：添加行高 */
}

/* ========== 统一的导航span基础样式 ========== */
.vs-secondary-nav-item span,
.vs-default-level3-item span {
  display: inline-block;
  margin: 0;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
  width: auto; /* 宽度自适应，由内容决定 */
  min-width: 0; /* 允许收缩到内容宽度 */
  overflow: visible; /* 允许内容完全显示 */
}

/* 二级导航Canvas样式已在统一的导航Canvas基础样式中定义，这里不再重复 */

.vs-secondary-nav-item:hover {
  background-color: var(--vs-color-bg-lighter); /* hover背景 */
  color: var(--vs-video-color-primary); /* hover文字颜色 */
  transform: translateY(-0.5px); /* 优化：从-1px改为-0.5px，更轻微 */
}

.vs-secondary-nav-item.active {
  background: transparent; /* 移除粉色背景 */
  border: 2px solid var(--vs-video-color-primary); /* 添加粉色边框 */
  color: var(--vs-video-color-primary); /* 激活状态颜色改为粉色 */
  font-weight: var(--vs-font-weight-medium); /* 激活状态字体粗细 */
  box-shadow: 0 1px 3px rgba(255, 204, 204, 0.25); /* 优化：更精细的阴影 */
}

.vs-secondary-nav-item.active:hover {
  transform: translateY(-0.5px); /* 优化：从-1px改为-0.5px */
  box-shadow: 0 2px 5px rgba(255, 204, 204, 0.3); /* 优化：更精细的阴影 */
}

/* ========== 三级导航样式 ========== */
.level3-nav-section,
.vs-level3-nav-section {
  background: var(--vs-color-bg-body); /* 使用统一的背景色 */
  padding: 0; /* 移除上下padding，让卡片文字紧贴二级导航 */
  position: relative; /* 相对定位，自然堆叠 */
  margin-top: 0; /* 移除margin-top，紧贴二级导航 */
  line-height: 1.5; /* 调整行高 */
}

.default-level3-preview,
.vs-default-level3-preview {
  max-width: var(--vs-container-max-width);
  margin: 0; /* 默认靠左（<= 1200px时） */
  padding: 0 16px; /* 优化：添加左右padding */
  display: flex;
  flex-wrap: nowrap;
  gap: 4px; /* 优化：从6px减少到4px，更紧凑 */
  align-items: center;
  overflow-x: auto; /* 允许横向滚动 */
  overflow-y: visible; /* 不裁剪上下内容 */
  line-height: 1.5; /* 调整行高 */
  padding: 4px 16px 6px 16px; /* 优化：添加上下padding */
}

/* ========== 大屏幕样式（> 1200px时容器居中，内容靠左） ========== */
@media (min-width: 1201px) {
  .vs-top-bar-container {
    margin: 0 auto; /* 容器居中 */
    padding: 0; /* 容器内内容靠左 */
  }
  
  .vs-secondary-nav-wrapper {
    margin: 0 auto; /* 容器居中 */
    padding: 0; /* 容器内内容靠左 */
  }
  
  .default-level3-preview,
  .vs-default-level3-preview {
    margin: 0 auto; /* 容器居中 */
    padding: 2px 0 4px 0; /* 保留上下padding，移除左右padding */
  }
}

/* 三级导航A标签样式已在统一的导航A标签基础样式中定义，这里只保留特定样式 */

/* 三级导航span样式已在统一的导航span基础样式中定义，这里不再重复 */

/* 三级导航Canvas样式已在统一的导航Canvas基础样式中定义，这里不再重复 */

.vs-default-level3-item:hover {
  background: var(--vs-color-bg-lighter); /* hover背景色 */
  border-color: var(--vs-video-color-primary); /* hover边框颜色 */
  transform: translateY(-0.5px) scale(1.01); /* 优化：更轻微的hover效果 */
}

.vs-default-level3-item.active {
  background: transparent; /* 移除粉色背景 */
  border: 2px solid var(--vs-video-color-primary); /* 激活状态边框改为粉色 */
  color: var(--vs-video-color-primary); /* 激活状态文字颜色改为粉色 */
  box-shadow: 0 1px 3px rgba(255, 204, 204, 0.25); /* 优化：更精细的阴影 */
}

.vs-filter-trigger-btn {
  padding: 3px 8px; /* 优化：从0 5px改为3px 8px，与三级导航项对齐 */
  background: var(--vs-video-color-primary);
  color: #2a2a2a; /* 改为深色文字，在粉色背景上更清晰 */
  border: 1px solid var(--vs-video-color-primary);
  border-radius: 3px; /* 优化：从7px改为3px，更精致 */
  cursor: pointer;
  font-size: 11px; /* 优化：从10px改为11px，与三级导航一致 */
  transition: all 0.15s; /* 优化：从fast改为0.15s */
  white-space: nowrap;
  font-weight: var(--vs-font-weight-medium);
  box-shadow: 0 1px 3px rgba(255, 204, 204, 0.2); /* 优化：更精细的阴影 */
  flex-shrink: 0;
  min-height: 22px; /* 优化：从20px改为22px，与三级导航项高度一致 */
  line-height: 1;
  display: flex; /* 优化：添加flex布局 */
  align-items: center;
  justify-content: center;
}

.vs-filter-trigger-btn:hover {
  background: var(--vs-video-color-primary-hover);
  border-color: var(--vs-video-color-primary-hover);
  box-shadow: var(--vs-shadow-md);
}

.vs-filter-trigger-btn:active {
  background: var(--vs-video-color-primary-hover);
  border-color: var(--vs-video-color-primary-hover);
  transform: scale(0.95);
}

/* ========== 筛选面板样式 ========== */
/* ID选择器保持原样，但添加变量 */
#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6); /* 增强遮罩透明度 */
  backdrop-filter: blur(4px); /* 添加模糊效果 */
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--vs-z-index-overlay);
  transition: opacity var(--vs-transition-normal);
  opacity: 0;
}

#overlay.show {
  opacity: 1;
}

#filterPopup {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--vs-color-bg-white);
  border-radius: 20px 20px 0 0; /* 更大的圆角 */
  z-index: calc(var(--vs-z-index-overlay) + 1);
  max-height: 75vh; /* 稍微增加高度 */
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3), 0 -8px 40px rgba(0, 0, 0, 0.2); /* 增强阴影 */
  transform: translateY(100%); /* 初始位置在屏幕外 */
  transition: transform var(--vs-transition-normal) cubic-bezier(0.4, 0, 0.2, 1); /* 平滑动画 */
}

#filterPopup.show {
  transform: translateY(0); /* 滑入显示 */
}

/* 顶部拖拽指示条 */
#filterPopup::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: var(--vs-color-border);
  border-radius: 2px;
  opacity: 0.6;
}

.vs-filter-popup-header {
  padding: 12px 16px; /* 优化：从lg减少到12px 16px */
  border-bottom: 1px solid var(--vs-color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--vs-color-bg-white);
  position: sticky;
  top: 0;
  z-index: 1;
}

.vs-filter-popup-title {
  font-size: 16px; /* 优化：从md减少到16px */
  font-weight: var(--vs-font-weight-bold);
  color: var(--vs-color-text-primary);
  letter-spacing: 0.3px; /* 减小字间距 */
}

.vs-filter-popup-close {
  width: 28px; /* 减小尺寸 */
  height: 28px;
  border: none;
  background: var(--vs-color-bg-lighter);
  border-radius: var(--vs-radius-circle);
  cursor: pointer;
  font-size: 18px; /* 优化：从16px增加到18px */
  color: var(--vs-color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s; /* 优化：从fast改为0.15s */
  position: relative;
}

.vs-filter-popup-close:hover {
  background: var(--vs-video-color-primary);
  color: var(--vs-color-text-primary);
  transform: scale(1.1) rotate(90deg); /* 旋转动画 */
}

.vs-filter-popup-close:active {
  transform: scale(0.95) rotate(90deg);
}

.vs-filter-categories-container {
  padding: 20px; /* 增加内边距，避免华为浏览器显示拥挤 */
  max-height: calc(75vh - 60px); /* 调整最大高度，适配更小的标题栏 */
  overflow-y: auto;
  overflow-x: hidden;
  /* 自定义滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: var(--vs-color-border) var(--vs-color-bg-white);
}

.vs-filter-categories-container::-webkit-scrollbar {
  width: 6px;
}

.vs-filter-categories-container::-webkit-scrollbar-track {
  background: var(--vs-color-bg-white);
}

.vs-filter-categories-container::-webkit-scrollbar-thumb {
  background: var(--vs-color-border);
  border-radius: 3px;
}

.vs-filter-categories-container::-webkit-scrollbar-thumb:hover {
  background: var(--vs-video-color-primary);
}

.vs-filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* 增加间距，避免华为浏览器显示拥挤 */
}

.vs-filter-item {
  padding: 8px 16px;
  background: var(--vs-color-bg-lighter);
  border: 1px solid var(--vs-color-border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--vs-color-text-primary);
  font-size: 12px;
  font-weight: var(--vs-font-weight-medium);
  transition: all 0.15s;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: fit-content;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  min-height: 32px;
}

/* 悬停时的光效 */
.vs-filter-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left var(--vs-transition-slow);
}

.vs-filter-item:hover::before {
  left: 100%;
}

.vs-filter-item span {
  display: inline-block;
  max-width: none;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.vs-filter-item .anti-ocr-canvas {
  display: inline-block;
  max-width: none;
  height: auto;
  vertical-align: middle;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.vs-filter-item:hover {
  background: var(--vs-color-hover-bg);
  border-color: var(--vs-video-color-primary);
  color: var(--vs-video-color-primary);
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 2px 6px rgba(255, 204, 204, 0.25);
}

.vs-filter-item.active {
  background: var(--vs-video-color-primary);
  border-color: var(--vs-video-color-primary);
  color: #2a2a2a;
  box-shadow: 0 2px 6px rgba(255, 204, 204, 0.3);
  transform: none;
  font-weight: var(--vs-font-weight-bold);
}

/* ========== 移动端搜索样式 ========== */
@media (max-width: 768px) {
  /* 防止移动端水平滚动，确保 sticky 正常工作 */
  html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  body,
  .vs-body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* 确保所有容器不会超出视口 */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* 确保所有导航容器不会超出视口 */
  .vs-top-bar,
  .vs-top-bar-container,
  .vs-secondary-nav,
  .vs-secondary-nav-wrapper,
  .vs-secondary-nav-container,
  .vs-level3-nav-section,
  .vs-default-level3-preview,
  .vs-main-content,
  .vs-site-main {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* 导航容器的横向滚动只影响自身，不影响页面 */
  .vs-secondary-nav-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .vs-secondary-nav-container::-webkit-scrollbar {
    display: none;
    height: 2px !important; /* 更精细的滚动条 */
  }
  
  .vs-default-level3-preview {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .vs-default-level3-preview::-webkit-scrollbar {
    display: none;
    height: 2px !important; /* 更精细的滚动条 */
  }
  
  /* 移动端隐藏 mega menu */
  .nav-mega-menu {
    display: none !important;
    min-width: auto !important;
    max-width: 100% !important;
  }
  
  /* 确保导航栏在移动端也保持固定 */
  /* 使用更强的选择器和 !important 确保优先级 */
  body .vs-top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: var(--vs-z-index-top-bar) !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 2px 0 !important; /* 与PC端一致：2px */
  }
  
  body .vs-nav-sticky-wrapper {
    position: fixed !important;
    /* top 值由 JavaScript 动态设置，这里使用默认值 */
    left: 0 !important;
    right: 0 !important;
    z-index: var(--vs-z-index-nav-sticky) !important;
    width: 100% !important;
    margin: 0 !important;
  }
  
  /* 确保 main-content 有足够的 padding-top 避免内容被导航栏遮挡 */
  body .vs-main-content {
    /* padding-top 由 JavaScript 动态设置 */
    position: relative !important;
  }
  
  .vs-nav-sticky-container {
    width: 100% !important;
  }
  
  /* 确保 main-content 不影响 sticky */
  .vs-main-content {
    overflow: visible !important;
  }
}

.mobile-search-overlay,
.vs-mobile-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--vs-color-overlay);
  z-index: 199;
}

.mobile-search-popup,
.vs-mobile-search-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--vs-color-bg-white);
  padding: var(--vs-spacing-sm) var(--vs-spacing-md);
  z-index: 200;
  box-shadow: var(--vs-shadow-md);
}

.mobile-search-popup.show,
.vs-mobile-search-popup.show {
  display: block;
}

.mobile-search-container,
.vs-mobile-search-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-search-input,
.vs-mobile-search-input {
  flex: 1;
  padding: var(--vs-spacing-sm) var(--vs-spacing-md);
  border: 1px solid var(--vs-color-border);
  border-radius: var(--vs-radius-input);
  font-size: var(--vs-font-size-md);
  outline: none;
}

.mobile-search-cancel,
.vs-mobile-search-cancel {
  padding: var(--vs-spacing-xs) var(--vs-spacing-sm);
  background: transparent;
  border: none;
  color: var(--vs-video-color-primary);
  font-size: var(--vs-font-size-md);
  cursor: pointer;
}

/* ========== 视频列表样式 ========== */
.vod-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--vs-video-list-min-width), 1fr));
  gap: 10px;                      /* 减小间距：从20px改为10px */
  padding: var(--vs-spacing-lg) 0;
}

.vod-item {
  border: 1px solid var(--vs-color-border-lighter);
  border-radius: var(--vs-video-item-border-radius);
  overflow: hidden;
  transition: transform var(--vs-transition-fast);
}

.vod-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--vs-shadow-lg);
}

.vod-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.vod-cover {
  width: 100%;
  /* 高度由 JavaScript 根据分类比例动态设置 */
  background: var(--vs-color-bg-lighter);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

.vod-cover canvas {
  display: block;
  /* 尺寸完全由 JavaScript 的 style.width 和 style.height 控制，避免与 CSS 冲突 */
}

.vod-info {
  padding: var(--vs-spacing-sm) var(--vs-spacing-sm) 0 var(--vs-spacing-sm);  /* 上、右、左：10px，下：0 */
}

.vod-title {
  margin: 0;                      /* 无外边距，紧挨上下 */
  padding-left: 0;                /* 紧挨左边 */
  font-size: 14px;                /* 字体大小：14px */
  font-weight: var(--vs-font-weight-medium);
  white-space: normal;            /* 允许换行 */
  word-wrap: break-word;          /* 允许单词内换行 */
  line-height: 1.4;               /* 行高 */
  color: var(--vs-color-text-primary); /* 白色文字 */
}

.vod-title canvas {
  max-width: 100%;
  height: auto;
}

.vod-remarks {
  font-size: var(--vs-font-size-xs);
  color: var(--vs-color-text-tertiary);
}

/* ========== 加载和错误状态 ========== */
.loading-state, .error-state, .empty-state {
  padding: var(--vs-spacing-xxl) var(--vs-spacing-lg);
  text-align: center;
  color: var(--vs-color-text-secondary);
}

.loading-state {
  color: var(--vs-color-text-tertiary);
}

.error-state {
  color: var(--vs-color-error);
  padding: var(--vs-spacing-xxl) var(--vs-spacing-lg);
  text-align: center;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.error-message {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--vs-color-text-primary);
  line-height: 1.5;
}

.error-action {
  margin-top: 20px;
}

.retry-btn {
  padding: 10px 24px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.retry-btn:hover {
  background: #0056b3;
}

.retry-btn:active {
  background: #004085;
}

.empty-state {
  color: #909399;
}

/* ========== 播放器相关样式 ========== */
/* VideoJS 播放器容器 */
.video-js {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ========== 播放器样式（初始化 - 暂时注释，使用 VideoJS 默认样式） ========== */
/* 以下样式已注释，用于一步步调试 */

/*
.video-js .vjs-control-bar {
  // 控制栏样式
}

.video-js .vjs-big-play-button {
  // 大播放按钮样式
}

.video-js .vjs-progress-control {
  // 进度条容器样式
}

.video-js .vjs-progress-holder {
  // 进度条轨道样式
}

.video-js .vjs-control {
  // 控制按钮样式
}

.video-js .vjs-volume-control {
  // 音量控制样式
}

.video-js .vjs-fullscreen-control {
  // 全屏按钮样式
}

.video-js .vjs-playback-rate {
  // 播放速度控制样式
}
*/

/* ========== 分页样式 ========== */
.pagination,
.vs-video-pagination {
  margin-top: 0 !important; /* 紧挨视频列表 */
  text-align: center;
  padding-top: 20px !important;
  /* 当有底部导航时，添加足够的底部间距避免被遮挡 */
  /* 分页器底部padding + body底部padding = 总间距，确保分页器文字在底部导航上方 */
  padding-bottom: calc(20px + var(--vs-bottom-nav-height)) !important; /* 20px基础 + 60px导航高度 = 80px */
}

/* 如果有底部导航，强制应用底部间距 */
body.has-bottom-nav .pagination,
body.has-bottom-nav .vs-video-pagination {
  padding-bottom: calc(20px + var(--vs-bottom-nav-height)) !important; /* 80px */
}

/* 如果没有底部导航，使用默认底部间距 */
body:not(.has-bottom-nav) .pagination,
body:not(.has-bottom-nav) .vs-video-pagination {
  padding-bottom: 20px !important;
}

.pagination a, .pagination span,
.vs-video-pagination a, .vs-video-pagination span {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  border: 1px solid var(--vs-color-border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--vs-color-text-primary);
  background: var(--vs-color-bg-body);
  transition: all 0.2s;
}

.pagination a:hover,
.vs-video-pagination a:hover {
  background: var(--vs-color-bg-lighter);
  border-color: var(--vs-video-color-primary);
  color: var(--vs-video-color-primary);
}

.pagination .active,
.vs-video-pagination .active {
  background: var(--vs-video-color-primary);
  color: var(--vs-color-text-primary);
  border-color: var(--vs-video-color-primary);
  cursor: default;
}

.pagination .disabled,
.vs-video-pagination .disabled {
  color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== Mega Menu 大屏弹窗式导航菜单样式 ========== */
.site-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--vs-color-border-lighter);
  margin-bottom: 16px;
  background: var(--vs-color-bg-body);
}

.header-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  position: relative;
}

/* 一级菜单 */
.nav-menu-level1 {
  position: relative;
  display: inline-block;
}

.nav-menu-level1-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 15px;
  font-weight: 500;
}

.nav-menu-level1-link:hover {
  background-color: var(--vs-color-bg-lighter);
  color: var(--vs-video-color-primary);
}

.nav-submenu-indicator {
  font-size: 10px;
  margin-left: 4px;
  color: var(--vs-color-text-tertiary);
  transition: transform 0.2s;
}

.nav-menu-level1:hover .nav-submenu-indicator {
  transform: rotate(180deg);
}

.nav-menu-text {
  display: inline-flex;
  align-items: center;
}

.nav-menu-text canvas {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

.nav-separator {
  margin: 0 4px;
  color: #ccc;
  flex-shrink: 0;
}

.nav-home,
.nav-user {
  text-decoration: none;
  color: inherit;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.nav-home:hover,
.nav-user:hover {
  background-color: #f5f5f5;
}

.nav-error {
  color: #999;
  font-size: 14px;
}

.site-main {
  width: 100%;
  max-width: var(--vs-container-max-width, 1200px);
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* ========== PC端 Mega Menu 弹窗样式 ========== */
.nav-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--vs-color-bg-body);
  border: 1px solid var(--vs-color-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 600px;
  max-width: 900px;
  padding: 0;
  display: none;
  z-index: 1000;
  margin-top: 8px;
  overflow: hidden;
}

.nav-menu-level1:hover .nav-mega-menu {
  display: flex;
}

/* 左侧：二级菜单列 */
.mega-menu-level2-column {
  width: 180px;
  background: #fafafa;
  border-right: 1px solid #e8e8e8;
  padding: 12px 0;
  max-height: 500px;
  overflow-y: auto;
}

.mega-menu-level2-item {
  padding: 0;
}

.mega-menu-level2-link {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--vs-color-text-primary);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.mega-menu-level2-link:hover,
.mega-menu-level2-item.active .mega-menu-level2-link {
  background-color: var(--vs-color-bg-lighter);
  border-left-color: #1890ff;
  color: var(--vs-video-color-primary);
}

/* 右侧：三级菜单多列区域 */
.mega-menu-level3-area {
  flex: 1;
  padding: 16px;
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
}

.mega-menu-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.mega-menu-level3-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  column-gap: 16px;
}

.mega-menu-level3-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mega-menu-level3-link {
  display: block;
  padding: 6px 8px;
  text-decoration: none;
  color: var(--vs-color-text-secondary);
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-menu-level3-link:hover {
  background-color: #f0f0f0;
  color: #ffcccc;
}

/* ========== 响应式样式 ========== */
@media (max-width: 768px) {
  .top-bar,
  .vs-top-bar {
    padding: 6px 0 !important; /* 优化：从12px减少到6px，更紧凑 */
    position: sticky !important;
    top: 0 !important;
    z-index: var(--vs-z-index-top-bar) !important;
    line-height: 1.6 !important;
    border-bottom: 1px solid var(--vs-color-border) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important; /* 优化：更精细的阴影 */
  }
  
  .top-bar-container,
  .vs-top-bar-container {
    padding: 0 10px !important; /* 优化：从12px减少到10px */
    gap: 8px !important; /* 优化：从md(15px)减少到8px */
    justify-content: space-between;
    line-height: 1 !important;
    margin: 0 !important;
  }
  
  /* 移动端隐藏 PC 端的搜索框 */
  .vs-top-search {
    display: none !important;
  }
  
  /* 移动端隐藏 PC 端的个人中心、APP下载（不在 top-bar-right-group 内的） */
  .vs-top-bar-container > .vs-top-actions {
    display: none !important;
  }
  
  /* 移动端显示右侧组合按钮组 */
  .top-bar-right-group {
    display: flex !important;
    align-items: center;
    gap: 6px !important; /* 优化：从10px减少到6px */
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }
  
  /* 移动端显示右侧组合按钮组内的搜索按钮 */
  .top-bar-right-group .mobile-search-btn {
    display: flex !important;
  }
  
  /* 移动端显示右侧组合按钮组内的个人中心、APP下载 */
  .top-bar-right-group .vs-top-actions {
    display: flex !important;
    gap: 6px !important; /* 优化：从10px减少到6px */
  }
  
  .vs-top-logo {
    padding: 4px 8px !important; /* 添加内边距 */
  }
  
  .vs-logo-icon {
    height: 28px !important; /* 优化：从32px减少到28px，更精致 */
    width: auto !important; /* 宽度自适应 */
  }
  
  .mobile-search-btn {
    display: flex !important;
    width: 32px !important; /* 优化：从40px减少到32px，更精致 */
    height: 32px !important;
    border: 1.5px solid var(--vs-color-border) !important; /* 添加边框 */
    background: var(--vs-color-bg-lighter) !important;
    border-radius: var(--vs-radius-md) !important;
    align-items: center;
    justify-content: center;
    font-size: 14px !important; /* 优化：从18px减少到14px */
    cursor: pointer;
    flex-shrink: 0 !important;
    transition: all 0.15s !important; /* 优化：从fast改为0.15s */
    box-sizing: border-box !important; /* 确保边框包含在宽度内，防止华为浏览器重叠 */
    margin-right: 6px !important; /* 优化：从10px减少到6px */
  }
  
  .mobile-search-btn:hover {
    background: var(--vs-color-bg-hover) !important;
    border-color: var(--vs-video-color-primary) !important;
    transform: scale(1.05) !important;
  }
  
  .vs-top-action-btn {
    width: 32px !important; /* 优化：从40px减少到32px */
    height: 32px !important;
    font-size: 14px !important; /* 优化：从16px减少到14px */
    border: 1.5px solid var(--vs-color-border) !important; /* 添加边框 */
    border-radius: var(--vs-radius-md) !important;
    box-sizing: border-box !important; /* 确保边框包含在宽度内，防止华为浏览器重叠 */
    margin-right: 6px !important; /* 优化：从10px减少到6px */
  }
  
  .vs-top-action-btn:last-child {
    margin-right: 0 !important; /* 最后一个按钮不需要右边距 */
  }
  
  .vs-secondary-nav {
    padding: 4px 0 !important; /* 优化：从0改为4px 0，更紧凑 */
    -webkit-overflow-scrolling: touch;
    line-height: 1.5 !important; /* 调整行高 */
  }
  
  .vs-secondary-nav-wrapper {
    padding: 0 10px !important; /* 优化：从0改为0 10px */
    margin: 0 !important; /* 靠左对齐 */
  }
  
  /* 移动端三级导航preview也靠左对齐 */
  .default-level3-preview,
  .vs-default-level3-preview {
    margin: 0 !important; /* 靠左对齐 */
    gap: 4px !important; /* 优化：从6px减少到4px，与PC端一致 */
    padding: 4px 10px 6px 10px !important; /* 优化：从2px 0 4px 0改为4px 10px 6px 10px */
    overflow-x: auto !important; /* 允许横向滚动 */
    overflow-y: visible !important; /* 不裁剪上下内容 */
  }
  
  .vs-secondary-nav-container {
    gap: 4px !important; /* 优化：从6px减少到4px，与PC端一致 */
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch !important; /* WebKit浏览器支持 */
    touch-action: pan-x !important; /* 火狐浏览器支持横向滚动 */
    padding: 4px 0 6px 0 !important; /* 优化：从2px 0 4px 0改为4px 0 6px 0 */
    line-height: 1.5 !important; /* 调整行高 */
  }
  
  .vs-secondary-nav-container::-webkit-scrollbar {
    display: none;
    height: 2px !important; /* 优化：更精细的滚动条 */
  }
  
  .vs-secondary-nav-item {
    /* 与PC端保持一致 */
    padding: 4px 10px !important; /* 优化：从6px 6px改为4px 10px，与PC端一致 */
    font-size: 13px !important; /* 优化：与PC端一致 */
    color: var(--vs-color-text-primary) !important; /* 统一为白色 */
    border-radius: 3px !important; /* 优化：从sm改为3px */
    display: flex !important; /* 确保使用flex */
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: auto !important; /* 确保宽度自适应 */
    height: auto !important; /* 确保高度自适应 */
    min-width: 0 !important; /* 允许收缩到内容宽度 */
    min-height: 26px !important; /* 优化：从0改为26px，与PC端一致 */
    transition: all 0.15s !important; /* 优化：从fast改为0.15s */
  }
  
  /* 移动端三级导航样式也保持一致 */
  .vs-default-level3-item {
    padding: 3px 8px !important; /* 优化：从4px 10px改为3px 8px，与PC端一致 */
    font-size: 11px !important; /* 优化：从12px改为11px，与PC端一致 */
    color: var(--vs-color-text-primary) !important; /* 统一为白色 */
    border-radius: 3px !important; /* 优化：从sm改为3px */
    background: var(--vs-color-bg-light) !important; /* 添加背景色 */
    border: 0.5px solid var(--vs-color-border) !important; /* 优化：从1px改为0.5px */
    display: flex !important; /* 确保使用flex */
    align-items: center !important;
    justify-content: center !important;
    width: auto !important; /* 确保宽度自适应 */
    height: auto !important; /* 确保高度自适应 */
    min-width: 0 !important; /* 允许收缩到内容宽度 */
    min-height: 22px !important; /* 优化：从0改为22px，与PC端一致 */
    transition: all 0.15s !important; /* 优化：从fast改为0.15s */
  }
  
  /* 移动端span样式保持一致 */
  .vs-secondary-nav-item span,
  .vs-default-level3-item span {
    width: auto !important; /* 确保宽度自适应 */
    min-width: 0 !important; /* 允许收缩到内容宽度 */
    overflow: visible !important; /* 允许内容完全显示 */
  }
  
  /* 移动端Canvas样式保持一致 */
  .vs-secondary-nav-item canvas,
  .vs-default-level3-item canvas,
  .vs-secondary-nav-item .anti-ocr-canvas,
  .vs-default-level3-item .anti-ocr-canvas {
    width: auto !important; /* 确保宽度自适应 */
    height: auto !important; /* 确保高度自适应 */
    max-width: none !important; /* 移除最大宽度限制 */
  }
  
  .bottom-nav {
    height: 60px !important;
    gap: 0 !important;
    justify-content: space-between !important;
    padding: 0 !important;
  }
  
  .bottom-nav-item {
    flex: 1 !important;
    padding: 8px 4px !important;
    min-height: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    max-width: none !important;
  }
  
  .bottom-nav-item-icon {
    font-size: 22px !important;
    margin-bottom: 4px !important;
  }
  
  .bottom-nav-item-text {
    font-size: 12px !important;
  }
  
  .vs-filter-popup-header {
    padding: 10px 14px !important; /* 优化：从lg减少到10px 14px */
  }
  
  .vs-filter-popup-title {
    font-size: 15px !important; /* 优化：从md减少到15px */
  }
  
  .vs-filter-popup-close {
    width: 28px !important; /* 减小移动端尺寸 */
    height: 28px !important;
    font-size: 16px !important; /* 优化：从20px减少到16px */
  }
  
  .vs-filter-categories-container {
    padding: 16px !important; /* 增加内边距，避免华为浏览器显示拥挤 */
    max-height: calc(75vh - 70px); /* 调整最大高度 */
  }
  
  .vs-filter-categories {
    gap: 10px !important; /* 移动端也增加间距 */
  }
  
  .vs-filter-item {
    padding: 8px 14px !important; /* 增加内边距，避免华为浏览器显示拥挤 */
    font-size: 12px !important; /* 移动端字体也改为12px */
    min-height: 32px !important; /* 增加最小高度，避免华为浏览器显示拥挤 */
    border-radius: 16px !important; /* 优化：从18px减少到16px */
  }
  
  .vs-filter-trigger-btn {
    padding: 3px 8px !important; /* 与三级导航项对齐 */
    font-size: 11px !important; /* 与三级导航一致 */
    min-height: 22px !important; /* 与三级导航项高度一致 */
  }
  
  /* 视频列表在移动端 */
  .vod-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 12px 0;
  }
  
  .vod-cover {
    /* 移除 min-height，高度完全由 JavaScript 根据比例动态设置 */
  }
  
  /* Mega Menu 移动端样式 */
  .site-header {
    padding: 10px 12px;
  }
  
  .header-container {
    gap: 6px;
  }
  
  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    order: 3;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
  }
  
  .nav-menu-level1 {
    width: 100%;
    border-bottom: 1px solid #eee;
  }
  
  .nav-menu-level1-link {
    width: 100%;
    padding: 14px 16px;
    justify-content: space-between;
    font-size: 15px;
  }
  
  /* 移动端：手风琴式展开 */
  .nav-menu-level2-container {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    background: #f9f9f9;
    padding: 0;
    margin-top: 0;
  }
  
  .nav-menu-level1.active .nav-menu-level2-container {
    display: block;
  }
  
  .nav-menu-level2 {
    border-top: 1px solid #eee;
  }
  
  .nav-menu-level2-link {
    padding: 12px 16px 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
  }
  
  /* 移动端三级菜单：2列网格显示 */
  .nav-menu-level3-container {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    background: #f5f5f5;
    padding: 8px;
    margin-left: 0;
  }
  
  .nav-menu-level2.active .nav-menu-level3-container {
    display: block;
  }
  
  .nav-menu-level3-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .nav-menu-level3-link {
    padding: 8px 12px;
    font-size: 13px;
    background: var(--vs-color-bg-body);
    border-radius: 4px;
    text-align: center;
    border: 1px solid var(--vs-color-border-lighter);
  }
  
  .nav-menu-level3-link:hover {
    background-color: var(--vs-color-bg-lighter);
    border-color: var(--vs-video-color-primary);
  }
  
  .nav-separator {
    display: none;
  }
  
  .nav-home,
  .nav-user {
    padding: 6px 10px;
    font-size: 14px;
  }
  
  .site-main {
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .top-bar-container,
  .vs-top-bar-container {
    padding: 0 8px !important; /* 优化：从10px减少到8px */
    gap: 6px !important; /* 优化：从sm(10px)减少到6px */
    margin: 0 !important;
  }
  
  .vs-top-logo {
    padding: 4px 6px !important; /* 超小屏稍微减少内边距 */
  }
  
  .vs-logo-icon {
    height: 24px !important; /* 优化：从28px减少到24px */
    width: auto !important; /* 宽度自适应 */
  }
  
  .mobile-search-btn,
  .vs-top-action-btn {
    width: 28px !important; /* 优化：从36px减少到28px */
    height: 28px !important;
    font-size: 12px !important; /* 优化：从16px减少到12px */
    border: 1.5px solid var(--vs-color-border) !important;
    border-radius: var(--vs-radius-md) !important;
    box-sizing: border-box !important; /* 确保边框包含在宽度内，防止华为浏览器重叠 */
  }
  
  .mobile-search-btn {
    margin-right: 6px !important; /* 优化：从10px减少到6px */
  }
  
  .vs-top-action-btn {
    margin-right: 6px !important; /* 优化：从10px减少到6px */
  }
  
  .vs-top-action-btn:last-child {
    margin-right: 0 !important; /* 最后一个按钮不需要右边距 */
  }
  
  .vs-secondary-nav-wrapper {
    padding: 0 8px !important; /* 优化：从0改为0 8px */
    margin: 0 !important; /* 靠左对齐 */
  }
  
  /* 移动端三级导航preview也靠左对齐 */
  .default-level3-preview,
  .vs-default-level3-preview {
    margin: 0 !important; /* 靠左对齐 */
    gap: 3px !important; /* 优化：从6px减少到3px */
    padding: 4px 8px 6px 8px !important; /* 优化：从2px 0 4px 0改为4px 8px 6px 8px */
    overflow-x: auto !important; /* 允许横向滚动 */
    overflow-y: visible !important; /* 不裁剪上下内容 */
  }
  
  .vs-secondary-nav-container {
    gap: 3px !important; /* 优化：从6px减少到3px */
    -webkit-overflow-scrolling: touch !important; /* WebKit浏览器支持 */
    touch-action: pan-x !important; /* 火狐浏览器支持横向滚动 */
    padding: 4px 0 6px 0 !important; /* 优化：从8px 0改为4px 0 6px 0 */
  }
  
  .vs-secondary-nav-item {
    /* 与PC端保持一致 */
    padding: 3px 8px !important; /* 优化：从6px 6px改为3px 8px */
    font-size: 12px !important; /* 优化：从14px减少到12px */
    color: var(--vs-color-text-primary) !important; /* 统一为白色 */
    border-radius: 3px !important; /* 优化：从sm改为3px */
    display: flex !important; /* 确保使用flex */
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: auto !important; /* 确保宽度自适应 */
    height: auto !important; /* 确保高度自适应 */
    min-width: 0 !important; /* 允许收缩到内容宽度 */
    min-height: 24px !important; /* 优化：从0改为24px */
    transition: all 0.15s !important; /* 优化：从fast改为0.15s */
  }
  
  /* 移动端三级导航样式也保持一致 */
  .vs-default-level3-item {
    padding: 2px 6px !important; /* 优化：从4px 10px改为2px 6px */
    font-size: 10px !important; /* 优化：从12px减少到10px */
    color: var(--vs-color-text-primary) !important; /* 统一为白色 */
    border-radius: 3px !important; /* 优化：从sm改为3px */
    background: var(--vs-color-bg-light) !important; /* 添加背景色 */
    border: 0.5px solid var(--vs-color-border) !important; /* 优化：从1px改为0.5px */
    display: flex !important; /* 确保使用flex */
    align-items: center !important;
    justify-content: center !important;
    width: auto !important; /* 确保宽度自适应 */
    height: auto !important; /* 确保高度自适应 */
    min-width: 0 !important; /* 允许收缩到内容宽度 */
    min-height: 20px !important; /* 优化：从0改为20px */
    transition: all 0.15s !important; /* 优化：从fast改为0.15s */
  }
  
  /* 移动端span样式保持一致 */
  .vs-secondary-nav-item span,
  .vs-default-level3-item span {
    width: auto !important; /* 确保宽度自适应 */
    min-width: 0 !important; /* 允许收缩到内容宽度 */
    overflow: visible !important; /* 允许内容完全显示 */
  }
  
  /* 移动端Canvas样式保持一致 */
  .vs-secondary-nav-item canvas,
  .vs-default-level3-item canvas,
  .vs-secondary-nav-item .anti-ocr-canvas,
  .vs-default-level3-item .anti-ocr-canvas {
    width: auto !important; /* 确保宽度自适应 */
    height: auto !important; /* 确保高度自适应 */
    max-width: none !important; /* 移除最大宽度限制 */
  }
  
  .bottom-nav {
    justify-content: space-between !important;
    padding: 0 !important;
  }
  
  .bottom-nav-item {
    flex: 1 !important;
    max-width: none !important;
  }
  
  .bottom-nav-item-icon {
    font-size: 22px !important;
  }
  
  .bottom-nav-item-text {
    font-size: 12px !important;
  }
  
  .vs-filter-item {
    padding: 5px 10px !important; /* 优化：更紧凑 */
    font-size: 11px !important; /* 优化：从14px减少到11px */
    min-height: 26px !important; /* 优化：从28px减少到26px */
  }
  
  .vs-filter-trigger-btn {
    padding: 2px 6px !important; /* 优化：与三级导航项对齐 */
    font-size: 10px !important; /* 优化：与三级导航一致 */
    min-height: 20px !important; /* 优化：与三级导航项高度一致 */
  }
  
  .filter-item {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  /* Mega Menu 超小屏幕样式 */
  .site-header {
    padding: 8px 10px;
  }
  
  .nav-menu-level1-link {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .nav-menu-level2-link {
    padding: 10px 14px 10px 28px;
    font-size: 13px;
  }
  
  .nav-menu-level3-grid-mobile {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .nav-menu-level3-link {
    padding: 10px 12px;
    font-size: 12px;
  }
  
  .nav-home,
  .nav-user {
    padding: 4px 8px;
    font-size: 13px;
  }
  
  .vod-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .vod-cover {
    /* 移除 min-height，高度完全由 JavaScript 根据比例动态设置 */
  }
}

