/* Mayi 接入层：不改官网视觉，只补播放器/公告兼容 */
html:has(.hg-layout),
.hg-layout {
  --hg-asset: /assets/huangguo;
  min-height: 100vh;
  background: #080808 !important;
  color: #fff !important;
}
.hg-layout a { color: inherit; }
.hg-layout .hg-main,
.hg-layout .main {
  background: transparent !important;
  color: #fff;
}
.hg-layout .hg-header {
  background: rgba(8, 8, 8, 0.92) !important;
}
.hg-layout .site-footer,
.hg-layout .mobile-tabbar {
  display: none !important;
}
/* 隐藏误注入的作者版权底条（PC/手机） */
.hg-layout [data-mayi-copy],
body.hg-layout > div[data-mayi-copy],
body.hg-layout > div[style*="z-index:99999"],
body.hg-layout > div[style*="z-index: 99999"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* PC 顶栏「注册/登录」黄胶囊（对齐黄果稿） */
a.hg-header__login,
a.hg-auth-btn.hg-header__login,
button.hg-auth-btn.hg-header__login,
button.hg-header__login.hg-header__login {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  height: 34px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background-color: #ffd21c !important;
  background-image: linear-gradient(90deg, #ffd21c, #ffeb98) !important;
  color: #000 !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
button.hg-header__login.hg-header__login:hover,
a.hg-header__login:hover {
  filter: brightness(1.05);
}

/* 手机底部导航 */
.hg-m-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding: 6px 4px env(safe-area-inset-bottom, 0px);
  background: rgba(12, 12, 12, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}
.hg-m-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
}
.hg-m-tab-ico {
  display: flex;
  color: inherit;
}
.hg-m-tab.is-active {
  color: #ffd21c;
}
@media (max-width: 1023px) {
  .hg-m-tabbar {
    display: flex;
  }
  .hg-layout.hg-has-mtab {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .hg-layout.hg-has-mtab .hg-footer {
    margin-bottom: 8px;
  }
}
@media (min-width: 1024px) {
  .hg-m-tabbar {
    display: none !important;
  }
}
/* 页头 Logo：略放大保证域名可读，又不撑破顶栏 */
.hg-layout .hg-header__logo {
  flex: 0 0 auto;
  max-width: min(340px, 48vw);
  display: flex;
  align-items: center;
}
.hg-layout .hg-header__logo img {
  height: 54px !important;
  width: auto !important;
  max-width: 100% !important;
  max-height: 54px !important;
  object-fit: contain !important;
  background: transparent !important;
}
@media (min-width: 1280px) {
  .hg-layout .hg-header__logo img {
    height: 58px !important;
    max-height: 58px !important;
  }
}
@media (max-width: 1023px) {
  .hg-layout .hg-header__logo img {
    height: 44px !important;
    max-height: 44px !important;
  }
}
.hg-layout .hg-mobile-nav__logo img {
  height: 48px !important;
  max-height: 48px !important;
  width: auto !important;
  object-fit: contain !important;
  background: transparent !important;
}
.hg-layout .hg-footer__logo img {
  height: 52px !important;
  max-height: 52px !important;
  width: auto !important;
  object-fit: contain !important;
  background: transparent !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hg-header__search.is-mobile-open {
  display: flex !important;
  position: absolute;
  left: 12px;
  right: 12px;
  top: 100%;
  z-index: 50;
  background: #111;
  padding: 8px;
  border-radius: 10px;
}
/* 播放页：沿用站内播放器，套进黄果深色壳 */
.hg-layout .player-wrap,
.hg-layout .video-player,
.hg-layout .play-box {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.hg-layout .section-title,
.hg-layout .video-grid .title {
  color: #fff;
}
.hg-vd-mayi .related-grid,
.hg-vd-mayi .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 900px) {
  .hg-vd-mayi .related-grid,
  .hg-vd-mayi .video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.dx-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.55);
  display: none;
}
.dx-drawer.dx-drawer--open {
  display: block;
}
.dx-drawer .hg-mobile-nav {
  width: min(320px, 86vw);
  height: 100%;
  background: #121212;
}
.hg-empty-tip {
  color: rgba(255, 255, 255, 0.45);
  padding: 28px 8px;
  text-align: center;
}
