/* ============================================================
   B站风格首页重制  bilibili-style home   v=20261006a
   ============================================================ */

/* ---------- 顶部频道 Tab ---------- */
.bili-channels{
  display:flex; align-items:center;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  position:sticky; top:56px; z-index:200;
  background:#ffffff;
  padding:6px 0;
  margin:0 0 14px;
  border-bottom:1px solid #f1f2f3;
}
.bili-channels::-webkit-scrollbar{display:none;}
.bili-channels a{
  flex:0 0 auto;
  padding:7px 13px;
  font-size:14px; color:#61666d;
  border-radius:8px;
  text-decoration:none;
  position:relative;
  white-space:nowrap;
}
.bili-channels a:first-child{margin-left:6px;}
.bili-channels a:last-child{margin-right:6px;}
.bili-channels a.bili-ch-active{color:#fb7299; font-weight:600;}
.bili-channels a.bili-ch-active::after{
  content:''; position:absolute; left:50%; bottom:-7px;
  width:18px; height:3px; border-radius:2px;
  background:#fb7299; transform:translateX(-50%);
}

/* ---------- 视频网格（替代 slick 横滑） ---------- */
.video-player-page .home-page-categories .videos .row{
  display:grid !important;
  margin-left:0 !important; margin-right:0 !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px 8px;
}
@media(min-width:768px){
  .video-player-page .home-page-categories .videos .row{
    grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px 12px;
  }
}
@media(min-width:1100px){
  .video-player-page .home-page-categories .videos .row{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
@media(min-width:1500px){
  .video-player-page .home-page-categories .videos .row{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
}

/* ---------- 卡片 ---------- */
.bili-card{min-width:0;}
.bili-cover{
  display:block; position:relative;
  border-radius:6px; overflow:hidden;
  aspect-ratio:16/9; background:#f1f2f3;
}
.bili-cover img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover; display:block;
}
.bili-dur{
  position:absolute; right:6px; top:6px; z-index:3;
  background:rgba(0,0,0,.72); color:#fff;
  font-size:11px; line-height:1; padding:3px 5px; border-radius:4px;
}
.bili-dur:empty{display:none;}
.bili-meta{
  position:absolute; left:0; right:0; bottom:0; z-index:2;
  display:flex; justify-content:space-between; align-items:center;
  gap:6px; padding:16px 6px 4px;
  background:linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  color:#fff; font-size:11px; pointer-events:none;
}
.bili-meta span{display:inline-flex; align-items:center; gap:3px; white-space:nowrap;}
.bili-meta svg{width:15px; height:15px; flex:0 0 auto;}
.bili-title{
  display:block; margin-top:7px;
  font-size:13px; line-height:1.4; color:#18191c;
  text-decoration:none; min-height:2.8em;
  -webkit-line-clamp:2; -webkit-box-orient:vertical; display:-webkit-box; overflow:hidden;
}

/* ---------- 移动端：去容器卡片、隐藏特色大卡 ---------- */
@media(max-width:767px){
  .bili-channels{top:50px;}
  .video-player-page .pt_featured_video{display:none;}
  .video-player-page .content.pt_shadow{
    background:transparent !important;
    box-shadow:none !important;
    border-radius:0 !important;
    padding:0 !important;
    margin-bottom:20px;
  }
  .video-player-page hr.dark_hr{display:none;}
  .video-player-page .last_hr{margin:0;}
  .video-player-page .home-page-categories .title{margin-bottom:8px;}
}

/* 修复：Bootstrap .row 清浮动伪元素会占用 grid 首尾格子（v=20261006b） */
.video-player-page .home-page-categories .videos .row::before,
.video-player-page .home-page-categories .videos .row::after{
    content: none;
}

/* 修复 v=20261006c：侧滑包裹层 .yp_side_menu 的 overflow:hidden 会成为频道条的
   滚动容器，导致 sticky 偏移且无法吸附。改用 overflow-x:clip：仍防横向滚动，
   但不建立滚动容器，sticky 恢复正常（抽屉为 fixed 定位，不受影响）。 */
@media (max-width:530px){
  .yp_side_menu.has_side_menu{
    overflow-x: clip;
    overflow-y: visible;
  }
}

/* 收紧 v=20261006d：频道条到“热门视频”的间距
   - 特色大卡手机端隐藏后，其外壳 .top-video 残留 padding+margin（约40px）-> 清零
   - 频道条下外边距 14 -> 8 */
@media(max-width:767px){
  .video-player-page .top-video{
    padding: 0 !important;
    margin: 0 !important;
  }
  .bili-channels{margin-bottom: 8px;}
}

/* 底部改 B站配色 v=20261006e：浅灰底 + 灰字，悬停/选中 B站粉 */
.pt_footer .container-fluid{
  background: #f4f4f4 !important;
  color: #9499a0 !important;
  border-top: 1px solid #e5e6e7;
}
.pt_footer a{color: #61666d !important;}
.pt_footer a:hover{color: #fb7299 !important; border-bottom: 1px solid #fb7299;}
.pt_footer .rss-icon{color: #61666d;}
