/* 51 视频全站视觉覆盖。
   common.css 是上游构建产物，所有品牌级覆写集中在本文件，避免下一次前端出包丢失。 */
:root{
  --color-primary:#5df2b8;
  --color-primary-rgb:93,242,184;
  --hg-badge-gradient:var(--color-primary);
  --hg-51-bg:#0d0d0d;
  --hg-51-panel:#161616;
  --hg-51-panel-soft:#222327;
  --hg-51-line:rgba(255,255,255,.08);
  --hg-51-muted:#96979d;
  --hg-51-danger:#ff565d;
  color-scheme:dark
}
html,body,.hg-layout{background:var(--hg-51-bg);color:#fff}
::selection{background:rgba(var(--color-primary-rgb),.28);color:#fff}
:focus-visible,a:focus-visible{outline:2px solid var(--color-primary)!important;outline-offset:2px}

/* 全局交互与品牌色。 */
.hg-section-accent,.hg-hero__dot.is-active,.hg-play__progress-fill,
.xgplayer-progress-played,.xgplayer-drag{background:var(--color-primary)!important}
.hg-nav-item.is-active,.hg-channel-tabs__item.is-active,
.hg-pill-tabs__item.is-active,.hg-web-detail__expand,.hg-play__link,
.hg-search-page mark{color:var(--color-primary)!important}
.hg-nav-item.is-active{background:rgba(var(--color-primary-rgb),.12)!important}
.hg-topbar-nav__item.is-active{color:#000!important}
.hg-drama-card__badge:not(.hg-drama-card__badge--new){
  box-sizing:border-box;
  display:inline-flex;align-items:center;justify-content:center;
  padding:4px 8px;border:0;border-radius:999px;
  background:linear-gradient(100.155deg,#afffe8 1.508%,#66ff99 98.492%);
  color:#0d0d0d;
  font-family:"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:14px;font-style:normal;font-weight:500;line-height:15px;
  letter-spacing:.1172px;white-space:nowrap;box-shadow:none
}
.hg-layout .hg-see-more:hover{border-color:rgba(var(--color-primary-rgb),.45);color:var(--color-primary)}
.hg-search-suggest__tags a:hover{background:rgba(var(--color-primary-rgb),.1);color:var(--color-primary)}
.hg-btn--primary,.hg-empty__action,.hg-hero__play,.hg-web-detail__play,
.hg-play__ep.is-active,.hg-web-play__ep.is-active,
button.hg-web-play__composer-submit,button.hg-play__replybox-send,
button.hg-web-play__replybox-send,button.hg-fb__btn--submit{
  border-color:var(--color-primary)!important;
  background:var(--color-primary)!important;
  background-image:none!important;color:#09130f!important
}
.hg-btn--outline{
  border-color:rgba(var(--color-primary-rgb),.45)!important;
  color:var(--color-primary)!important
}

/* 内容发现：搜索、标签、榜单、分类。 */
.hg-search-page__input,.hg-search-page__form,.hg-filter,.hg-channel-tabs,
.hg-pill-tabs,.hg-rank-item,.hg-topic-card,.hg-post-card{
  border-color:var(--hg-51-line);background:var(--hg-51-panel)
}
.hg-search-page__submit,.hg-filter .is-active,.hg-rank-tabs .is-active{
  background:var(--color-primary)!important;color:#09130f!important
}
.hg-51-rank .hg-pill-tabs{background:transparent}
.hg-drama-card,.hg-author-card,.hg-search-page__result{
  border-color:transparent;background:transparent
}
.hg-drama-card:hover,.hg-author-card:hover,.hg-search-page__result:hover{
  border-color:rgba(var(--color-primary-rgb),.35);box-shadow:0 8px 24px rgba(0,0,0,.2)
}

/* 详情、播放、面板。 */
.hg-web-detail__hero,.hg-web-detail__episodes,.hg-web-play__side,
.hg-web-play__comments,.hg-play__panel,.hg-play__sheet,
.hg-play__episode-panel,.hg-play__comment-panel{
  border-color:var(--hg-51-line)!important;background:var(--hg-51-panel)!important
}
.hg-web-detail__topic,.hg-web-play__follow.is-followed,.hg-play__follow.is-followed{
  border-color:rgba(var(--color-primary-rgb),.42)!important;
  background:rgba(var(--color-primary-rgb),.08)!important;color:var(--color-primary)!important
}
.hg-web-play__follow:not(.is-followed),.hg-play__follow:not(.is-followed){
  background:var(--color-primary)!important;color:#09130f!important
}
.hg-web-play__scorenum,.hg-web-play__scorenum small,.hg-play__scorenum,
.hg-play__scorenum small{color:var(--color-primary)!important}

/* 个人中心及私有列表。 */
.hg-profile-hero,.hg-settings__card,.hg-msg-card,.hg-history-card,
.hg-follow-card{border:1px solid var(--hg-51-line);background:var(--hg-51-panel)!important}
.hg-profile-card__bg,.hg-profile-logout__bg{opacity:0}
.hg-profile-card__icon{background:rgba(var(--color-primary-rgb),.1)}
.hg-profile-card__title,.hg-profile-fav__stat{color:var(--color-primary)}
.hg-settings__input{border-color:var(--color-primary)}
.hg-settings__save,.hg-avatar-pick__ok{background:var(--color-primary)!important;color:#09130f!important}
.hg-msg-card__tag,.hg-msg-card.is-unread h3{color:var(--color-primary)}

/* 分享、邀请、反馈、帮助与通用空态。 */
.hg-share-dialog__box,.hg-share-sheet,.hg-invite-card,.hg-feedback-card,
.hg-page__card,.hg-site-info__card,.hg-homeway-panel,.hg-empty{
  border-color:var(--hg-51-line)!important;background:var(--hg-51-panel)!important
}
.hg-share-dialog__copy,.hg-invite-copy,.hg-feedback-submit{
  background:var(--color-primary)!important;color:#09130f!important
}
.hg-empty__art{filter:grayscale(1);opacity:.72}
.hg-brand-declare a{color:var(--color-primary)}
.hg-page__updated{border-left-color:rgba(var(--color-primary-rgb),.38)}
body.theme-app .app-footer-col a:hover{color:var(--color-primary)!important}
body.theme-app .app-footer-compliance .app-footer-age{border-color:var(--color-primary)!important;color:var(--color-primary)!important}
.hg-fab__btn:focus-visible,.hg-fab__btn:hover{color:var(--color-primary)}

/* H5 统一成 Figma 的 375px 双列与安全区交互尺寸。 */
@media(max-width:1023px){
  .hg-drama-card .hg-tag{color:var(--color-primary);background:rgba(var(--color-primary-rgb),.1);border-color:rgba(var(--color-primary-rgb),.25)}
}
@media(max-width:767px){
  .hg-header__menu,.hg-header__search-btn{width:44px;height:44px}
  .hg-profile,.hg-settings,.hg-profile-fav,.hg-profile-follow,.hg-profile-history,
  .hg-profile-msg{width:auto;max-width:none!important;padding:16px 16px calc(32px + env(safe-area-inset-bottom))}
  .hg-breadcrumb{display:none}
  .hg-profile-fav__head h1,.hg-profile-msg__titles h1,.hg-settings__titles h1{font-size:20px;line-height:28px}
  .hg-profile-fav .hg-card-grid,.hg-history-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}
  .hg-profile-fav .hg-drama-card__cover,.hg-history-grid .hg-drama-card__cover{aspect-ratio:172/193}
  .hg-profile-card{min-height:64px}
  .hg-profile-msg__head{align-items:center}
  .hg-msg-card{border-radius:8px;padding:14px}
  .hg-share-sheet,.hg-play__sheet{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
  button,a,input,select,textarea{touch-action:manipulation}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
