/* Final refinements: appended after legacy styles to neutralize old page-specific overrides. */
:root{--refine-purple:#9b72e8;--refine-purple-soft:rgba(155,114,232,.14);--refine-panel:rgba(20,27,39,.72);--refine-border:rgba(255,255,255,.105)}

/* Home latest videos and every VOD listing: same card grid and card skin. */
html body.body #videos .category-con .a-con,
html body.body .vod-list-page-panel .category-con .a-con,
html body.body .home-video-list .category-con .a-con,
html body.body .vod-search-page .search-con .a-con,
html body.body .search-content-panel .search-con .a-con,
html body.body .play-like-section .category-con .a-con,
html body.body .play-like-section .a-con,
html body.body .play-related-block .a-con{
 display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:16px 12px!important;
 width:100%!important;max-width:none!important;float:none!important;
}
html body.body #videos .category-con .a-con-inner,
html body.body .vod-list-page-panel .category-con .a-con-inner,
html body.body .home-video-list .category-con .a-con-inner,
html body.body .vod-search-page .search-con .a-con-inner,
html body.body .search-content-panel .search-con .a-con-inner,
html body.body .play-like-section .a-con-inner,
html body.body .play-related-block .a-con-inner{
 display:flex!important;flex-direction:column!important;min-width:0!important;width:auto!important;max-width:none!important;
 margin:0!important;padding:8px!important;border:1px solid var(--refine-border)!important;border-radius:12px!important;
 background:rgba(255,255,255,.035)!important;box-shadow:none!important;overflow:hidden!important;
}
/* Restore every card after old rules hid items 7+ or 17+. */
html body.body #videos .category-con .a-con-inner,
html body.body .vod-list-page-panel .category-con .a-con-inner,
html body.body .home-video-list .category-con .a-con-inner,
html body.body .vod-search-page .search-con .a-con-inner,
html body.body .search-content-panel .search-con .a-con-inner,
html body.body .play-like-section .a-con-inner,
html body.body .play-related-block .a-con-inner{display:flex!important}
html body.body #videos .category-con .a-con-inner:nth-child(n),
html body.body .vod-list-page-panel .category-con .a-con-inner:nth-child(n),
html body.body .home-video-list .category-con .a-con-inner:nth-child(n),
html body.body .vod-search-page .search-con .a-con-inner:nth-child(n),
html body.body .search-content-panel .search-con .a-con-inner:nth-child(n){visibility:visible!important;opacity:1!important}

/* Keep play recommendations visually identical to homepage latest-video cards. */
html body.body .play-like-section{width:100%!important;margin:18px 0!important;padding:16px!important;border:1px solid var(--refine-border)!important;border-radius:14px!important;background:var(--refine-panel)!important;box-shadow:none!important}
html body.body .play-like-section .hub-section-head{margin:0 0 14px!important}
html body.body .play-like-section .a-con-inner .pic{width:100%!important;aspect-ratio:16/9!important;overflow:hidden!important;border-radius:9px!important}
html body.body .play-like-section .a-con-inner .pic img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
html body.body .play-like-section .a-con-inner .s1{display:block!important;margin-top:8px!important;min-width:0!important}
html body.body .play-like-section .a-con-inner .s1 a{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:1!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:normal!important}

/* Play page: each content group gets its own independent panel. */
html body.body .playbox .play-keywords,
html body.body .playbox .play-action-panel,
html body.body .playbox .play-episode-panel,
html body.body .playbox .play-like-section,
html body.body .playbox .play-related-block{
 display:block!important;width:100%!important;box-sizing:border-box!important;margin:16px 0!important;padding:15px!important;
 border:1px solid var(--refine-border)!important;border-radius:14px!important;background:var(--refine-panel)!important;
 box-shadow:none!important;
}
html body.body .playbox .play-keywords{margin-bottom:10px!important}
html body.body .playbox .play-keywords-list{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
/* Keyword tags reuse the compact homepage keyword pill appearance. */
html body.body .playbox .play-keywords-list a{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:30px!important;
 margin:0!important;padding:5px 10px!important;border:1px solid rgba(155,114,232,.28)!important;
 border-radius:7px!important;background:rgba(155,114,232,.10)!important;color:#d8c8ff!important;
 font-size:12px!important;line-height:1.25!important;text-decoration:none!important;box-shadow:none!important;
}
html body.body .playbox .play-keywords-list a:hover{border-color:var(--refine-purple)!important;background:var(--refine-purple-soft)!important;color:#fff!important}
html body.body .playbox .play-keywords-list a.play-category-tag{background:rgba(155,114,232,.22)!important;border-color:rgba(155,114,232,.48)!important;color:#eee6ff!important}
html body.body .playbox .play-keywords-title{margin:0 0 12px!important;padding:0!important;border:0!important;background:none!important;color:var(--zy-color,#f1f3f7)!important}
html body.body .playbox .play-keywords-title:before{display:none!important;content:none!important}

/* Standalone copy/share panel; episode buttons stay inside the All Episodes panel. */
html body.body .playbox .play-action-panel{padding:12px 15px!important}
html body.body .playbox .play-keywords-share,
html body.body .playbox .play-episode-actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;flex-wrap:wrap!important;margin:0!important;padding:0!important;border:0!important}
html body.body .playbox .play-action-note{flex:0 1 auto!important;color:#d6c8fa!important;font-size:13px!important;font-weight:700!important;text-align:center!important}
html body.body .playbox .play-action-btn{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-width:112px!important;min-height:40px!important;
 padding:0 17px!important;border:1px solid rgba(155,114,232,.48)!important;border-radius:9px!important;
 background:linear-gradient(135deg,#7650bd,#56378f)!important;color:#fff!important;font-size:13px!important;font-weight:700!important;cursor:pointer!important;
}
html body.body .playbox .play-action-btn:hover{filter:brightness(1.12)!important;transform:translateY(-1px)!important}
html body.body .playbox .play-episode-actions{margin-top:14px!important;padding-top:13px!important;border-top:1px solid rgba(255,255,255,.09)!important}

/* Purple outline for the homepage refresh button, never green. */
html body.body #videos .hub-latest-random{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
 min-height:34px!important;padding:6px 12px!important;border:1px solid rgba(155,114,232,.72)!important;
 border-radius:9px!important;background:rgba(155,114,232,.13)!important;color:#d9c8ff!important;
 box-shadow:0 0 0 1px rgba(155,114,232,.08) inset!important;text-decoration:none!important;
}
html body.body #videos .hub-latest-random:hover{border-color:#b99af3!important;background:rgba(155,114,232,.24)!important;color:#fff!important}

@media(max-width:900px){
 html body.body #videos .category-con .a-con,
 html body.body .vod-list-page-panel .category-con .a-con,
html body.body .home-video-list .category-con .a-con,
 html body.body .vod-search-page .search-con .a-con,
 html body.body .search-content-panel .search-con .a-con,
 html body.body .play-like-section .category-con .a-con,
 html body.body .play-like-section .a-con,
 html body.body .play-related-block .a-con{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px 8px!important}
}
@media(max-width:600px){
 html body.body #videos .category-con .a-con,
 html body.body .vod-list-page-panel .category-con .a-con,
html body.body .home-video-list .category-con .a-con,
 html body.body .vod-search-page .search-con .a-con,
 html body.body .search-content-panel .search-con .a-con,
 html body.body .play-like-section .category-con .a-con,
 html body.body .play-like-section .a-con,
 html body.body .play-related-block .a-con{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px 7px!important}
 html body.body #videos .category-con .a-con-inner,
 html body.body .vod-list-page-panel .category-con .a-con-inner,
html body.body .home-video-list .category-con .a-con-inner,
 html body.body .vod-search-page .search-con .a-con-inner,
 html body.body .search-content-panel .search-con .a-con-inner,
 html body.body .play-like-section .a-con-inner,
 html body.body .play-related-block .a-con-inner{padding:5px!important;border-radius:8px!important}
 html body.body .playbox .play-keywords,
 html body.body .playbox .play-action-panel,
 html body.body .playbox .play-episode-panel,
 html body.body .playbox .play-like-section,
 html body.body .playbox .play-related-block{padding:11px!important;border-radius:11px!important}
 html body.body .playbox .play-action-note{flex-basis:100%!important;margin-bottom:2px!important}
 html body.body .playbox .play-action-btn{min-width:104px!important;min-height:38px!important}
}


/* V12 homepage refresh control: vivid purple button + purple icon tile, white text. */
html body.body #videos .hub-section-head .hub-section-actions a.hub-latest-random,
html body.body #videos .hub-section-actions a.hub-latest-random {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  min-height:36px!important;padding:6px 14px!important;border:1px solid #9b72e8!important;border-radius:9px!important;
  background:linear-gradient(135deg,#7046c8,#8b5bd6)!important;color:#fff!important;
  font-size:13px!important;font-weight:750!important;text-decoration:none!important;
  box-shadow:0 5px 15px rgba(112,70,200,.28),inset 0 1px 0 rgba(255,255,255,.16)!important;
}
html body.body #videos .hub-section-actions a.hub-latest-random > span {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:23px!important;height:23px!important;flex:0 0 23px!important;border-radius:6px!important;
  background:rgba(55,28,111,.52)!important;color:#fff!important;font-size:15px!important;line-height:1!important;
}
html body.body #videos .hub-section-actions a.hub-latest-random:hover,
html body.body #videos .hub-section-actions a.hub-latest-random:focus-visible {
  border-color:#c4a8ff!important;background:linear-gradient(135deg,#8055dc,#a06be9)!important;
  color:#fff!important;transform:translateY(-1px)!important;
}

/* V13: keep the refresh control purple on hover/focus; no green hover state. */
html body.body #videos .hub-section-actions a.hub-latest-random:hover,
html body.body #videos .hub-section-actions a.hub-latest-random:focus-visible,
html body.body #videos .hub-section-actions a.hub-latest-random:active {
  border-color:#9b72e8!important;
  background:linear-gradient(135deg,#7046c8,#8b5bd6)!important;
  color:#fff!important;box-shadow:0 5px 15px rgba(112,70,200,.28),inset 0 1px 0 rgba(255,255,255,.16)!important;
}
/* More videos uses the same quiet text-link treatment as More novels. */
html body.body #videos .hub-section-head .hub-section-actions > a:not(.hub-latest-random) {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:34px!important;padding:5px 2px!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;color:var(--site-green,#86d99a)!important;
  font-size:13px!important;font-weight:600!important;text-decoration:none!important;
}
html body.body #videos .hub-section-head .hub-section-actions > a:not(.hub-latest-random):hover {
  background:transparent!important;border:0!important;box-shadow:none!important;color:#b8efc4!important;transform:none!important;
}
