/*
 * AVLOG 全站统一布局 v1
 * 统一首页、搜索、分类、详情/播放页的面板、分类导航及视频网格。
 * 本文件必须在所有旧版页面 CSS 之后加载。
 */
:root {
  --unified-content-width: 1240px;
  --unified-gutter: 16px;
  --unified-panel-bg: rgba(16, 26, 20, .72);
  --unified-panel-border: rgba(255,255,255,.09);
  --unified-panel-radius: 14px;
  --unified-panel-padding: 17px;
}

/* 统一内容列：与顶部「必备资源」区域同宽 */
body.body .hub-wrap,
body.body .main > .container,
body.body main.main > .container,
body.body .container.vod-search-page,
body.body .vip-nav-area,
body.body .vip-text-area {
  width: min(var(--unified-content-width), calc(100% - 2 * var(--unified-gutter))) !important;
  max-width: var(--unified-content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}
body.body .hub-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.body .main,
body.body main.main,
body.body .vod-search-main {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
body.body .container.vod-search-page,
body.body .main > .container,
body.body main.main > .container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 全站面板统一：不再出现深绿渐变框、荧光边框或双层阴影 */
body.body .hub-section,
body.body .home-friend-links,
body.body #search-hot-keywords,
body.body .search-content-panel .search-con,
body.body .container.vod-search-page .category-con,
body.body .play-episode-panel,
body.body .play-keywords,
body.body .play-like-section,
body.body .play-related-block,
body.body .home-keyword-directory {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 18px !important;
  padding: var(--unified-panel-padding) !important;
  border: 1px solid var(--unified-panel-border) !important;
  border-radius: var(--unified-panel-radius) !important;
  background: var(--unified-panel-bg) !important;
  box-shadow: none !important;
}
/* 避免 type/show 的外框内再套一个不同风格的框 */
body.body .container.vod-search-page .category-con {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.body .search-content-panel {
  width: 100% !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 标题：搜索热门关键词及关键词大全不显示绿色横线和左侧小点 */
body.body .hub-section-head,
body.body #search-hot-keywords .hub-section-head,
body.body .home-keyword-directory .hub-section-head,
body.body .search-content-panel .res,
body.body .play-episode-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 0 !important;
  margin: 0 0 15px !important;
  padding: 0 0 11px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--unified-panel-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.body #search-hot-keywords .hub-section-head,
body.body .home-keyword-directory .hub-section-head {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 14px !important;
}
body.body .hub-section-head::before,
body.body .hub-section-head::after,
body.body #search-hot-keywords .hub-section-head::before,
body.body #search-hot-keywords .hub-section-head::after,
body.body .home-keyword-directory .hub-section-head::before,
body.body .home-keyword-directory .hub-section-head::after,
body.body .home-list-heading::before,
body.body .home-list-heading::after,
body.body .play-episode-heading::before,
body.body .play-episode-heading::after,
body.body .play-episode-heading-mark {
  content: none !important;
  display: none !important;
}
body.body .hub-section-head h2,
body.body .hub-section-head h1 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--zy-color, #edf5ef) !important;
}

/* 分类导航、热门关键词、关键词大全：电脑 10 列 */
body.body .home-video-category-grid,
body.body .vod-search-categories,
body.body .article-categories,
body.body .keyword-directory-grid,
body.body .vod-category-panel nav {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  gap: 9px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.body .home-video-category-grid > a,
body.body .vod-search-categories > a,
body.body .article-categories > a,
body.body .keyword-directory-grid > a,
body.body .vod-category-panel nav > a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 7px 5px !important;
  overflow: hidden !important;
  border: 1px solid var(--unified-panel-border) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.035) !important;
  color: var(--zy-color, #e6eee8) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  box-shadow: none !important;
  transform: none !important;
}
body.body .home-video-category-grid > a:hover,
body.body .vod-search-categories > a:hover,
body.body .article-categories > a:hover,
body.body .keyword-directory-grid > a:hover,
body.body .vod-category-panel nav > a:hover {
  border-color: rgba(16,185,129,.48) !important;
  background: rgba(16,185,129,.12) !important;
  color: #fff !important;
}

/* 视频网格：所有页面使用首页同一套 6 列/3 列规则 */
body.body #videos .category-con .a-con,
body.body .container.vod-search-page .category-con .a-con,
body.body .search-content-panel .search-con > .a-con,
body.body .search-content-panel .a-con,
body.body .play-like-section .category-con .a-con,
body.body .play-related-block .category-con .a-con,
body.body .home-latest-video-list .a-con {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 20px 14px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
body.body #videos .a-con-inner,
body.body .container.vod-search-page .category-con .a-con-inner,
body.body .search-content-panel .a-con-inner,
body.body .play-like-section .a-con-inner,
body.body .play-related-block .a-con-inner {
  display: block !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.body #videos .category-con .pic,
body.body .container.vod-search-page .category-con .pic,
body.body .search-content-panel .pic,
body.body .play-like-section .pic,
body.body .play-related-block .pic {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 3 / 4 !important;
  overflow: hidden !important;
  border: 1px solid var(--unified-panel-border) !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.035) !important;
}
body.body #videos .category-con .pic > a:first-child,
body.body .container.vod-search-page .category-con .pic > a:first-child,
body.body .search-content-panel .pic > a:first-child,
body.body .play-like-section .pic > a:first-child,
body.body .play-related-block .pic > a:first-child {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
body.body #videos .category-con .pic img,
body.body .container.vod-search-page .category-con .pic img,
body.body .search-content-panel .pic img,
body.body .play-like-section .pic img,
body.body .play-related-block .pic img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
body.body #videos .a-con-inner .s1,
body.body .container.vod-search-page .a-con-inner .s1,
body.body .search-content-panel .a-con-inner .s1,
body.body .play-like-section .a-con-inner .s1,
body.body .play-related-block .a-con-inner .s1 {
  display: -webkit-box !important;
  overflow: hidden !important;
  margin: 8px 0 0 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
}
body.body #videos .a-con-inner .s1 a,
body.body .container.vod-search-page .a-con-inner .s1 a,
body.body .search-content-panel .a-con-inner .s1 a,
body.body .play-like-section .a-con-inner .s1 a,
body.body .play-related-block .a-con-inner .s1 a {
  overflow: hidden !important;
  color: var(--zy-color, #e8eee9) !important;
  text-decoration: none !important;
  text-overflow: ellipsis !important;
}
body.body #videos .a-con-inner .vod-time,
body.body .container.vod-search-page .a-con-inner .vod-time,
body.body .search-content-panel .a-con-inner .vod-time,
body.body .play-like-section .a-con-inner .vod-time,
body.body .play-related-block .a-con-inner .vod-time {
  display: block !important;
  margin-top: 4px !important;
  color: var(--zy-gray, #91a197) !important;
  font-size: 11px !important;
}

/* 清除旧版卡片宽度/浮动/最小宽度造成的网格失效 */
body.body #videos .a-con-inner *,
body.body .container.vod-search-page .category-con .a-con-inner *,
body.body .search-content-panel .a-con-inner *,
body.body .play-like-section .a-con-inner *,
body.body .play-related-block .a-con-inner * {
  min-width: 0;
  box-sizing: border-box;
}

/* 平板与手机断点明确覆盖旧媒体查询 */
@media (max-width: 900px) {
  body.body #videos .category-con .a-con,
  body.body .container.vod-search-page .category-con .a-con,
  body.body .search-content-panel .search-con > .a-con,
  body.body .search-content-panel .a-con,
  body.body .play-like-section .category-con .a-con,
  body.body .play-related-block .category-con .a-con {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px 10px !important;
  }
}
@media (max-width: 600px) {
  :root { --unified-gutter: 10px; --unified-panel-padding: 12px; }
  body.body .home-video-category-grid,
  body.body .vod-search-categories,
  body.body .article-categories,
  body.body .keyword-directory-grid,
  body.body .vod-category-panel nav {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
  body.body .home-video-category-grid > a,
  body.body .vod-search-categories > a,
  body.body .article-categories > a,
  body.body .keyword-directory-grid > a,
  body.body .vod-category-panel nav > a {
    min-height: 34px !important;
    padding: 6px 3px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
  }
  body.body #videos .category-con .a-con,
  body.body .container.vod-search-page .category-con .a-con,
  body.body .search-content-panel .search-con > .a-con,
  body.body .search-content-panel .a-con,
  body.body .play-like-section .category-con .a-con,
  body.body .play-related-block .category-con .a-con {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px 8px !important;
  }
  body.body .hub-section-head { margin-bottom: 12px !important; }
  body.body .home-keyword-directory { margin-bottom: 16px !important; }
}
