/* MacCMS adapter for 蘑菇短剧 shell */
:root{
  --accent:#ff2d6a;
  --accent-2:#ff7a45;
  --bg:#080808;
  --hg-asset: var(--mogudj-asset, /template/mogudj/asset/huangguo);
  --mark-c1:#ff7a45;
  --mark-c2:#ff2d6a;
  --name-c1:#ffffff;
  --name-c2:#ff8fa3;
}
html,body{
  background:var(--bg)!important;
  color:#eee;
  min-height:100%;
}
/* LOGO 更大更清晰 */
.hg-header__logo img,
.hg-mobile-nav__logo img{
  height:78px!important;
  width:auto!important;
  max-width:none!important;
}
@media (max-width:1023px){
  .hg-header__logo img{height:54px!important}
}

/* 默认按 PC；手机再加底栏留白 */
body.mogudj-body{
  padding-bottom:0;
}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
/* 顶栏占位贴合实际高度，去掉多余黑空 */
html{
  --hg-float-top:0px!important;
  --dx-header-height:56px;
}
.hg-layout #app-header{
  padding-top:56px!important;
  min-height:0!important;
  margin:0!important;
}
.hg-layout .hg-header,
.hg-layout .hg-header.header{
  top:0!important;
}
/* PC 宽度：只由 .mogudj-main 控制左右 gutter；禁止 .hg-section 再叠一层 */
.mogudj-main,.mogudj-main.hg-main{
  max-width:none!important;
  width:100%!important;
  margin:0 auto!important;
  padding:4px var(--hg-page-gutter,24px) 40px!important;
  box-sizing:border-box!important;
}
.np-ads{margin-top:0!important}
.mogudj-main .hg-section,
.mogudj-main .mogudj-section.hg-section,
.mogudj-main.hg-main .hg-section{
  padding-left:0!important;
  padding-right:0!important;
  width:100%!important;
  box-sizing:border-box!important;
}
.mogudj-main .hg-announce{
  margin-left:0!important;
  margin-right:0!important;
  width:100%!important;
  box-sizing:border-box!important;
}
/* 站内广告：文字链 + 横幅（html/ads/nupai_ads.html） */
.np-ads{width:100%;box-sizing:border-box;margin:0 0 14px}
.np-ads--text{
  display:flex;align-items:stretch;gap:0;
  min-height:36px;border-radius:8px;overflow:hidden;
  background:linear-gradient(90deg,rgba(255,45,106,.16),rgba(255,122,69,.08));
  border:1px solid rgba(255,255,255,.08);
}
.np-ads__label{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  padding:0 12px;font-size:12px;font-weight:700;color:#111;
  background:linear-gradient(90deg,#ffd21c,#ff7a45);
}
.np-ads__text-list{
  flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;
  padding:8px 12px;
}
.np-ads__text-item{
  font-size:13px;line-height:1.4;text-decoration:none;font-weight:600;
  white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;
}
.np-ads__text-item:hover{text-decoration:underline;filter:brightness(1.12)}
.np-ads--banner{display:flex;flex-direction:column;gap:10px}
.np-ads__banner{
  display:block;border-radius:10px;overflow:hidden;
  background:#161616;border:1px solid rgba(255,255,255,.06);
}
.np-ads__banner img{display:block;width:100%;height:auto;max-height:160px;object-fit:cover}
@media (max-width:720px){
  .np-ads__label{padding:0 8px;font-size:11px}
  .np-ads__text-list{padding:7px 10px;gap:4px 10px}
  .np-ads__text-item{font-size:12px}
  .np-ads__banner img{max-height:110px}
}
.mogudj-main .mogudj-grid,
.mogudj-main .hg-category-grid,
.mogudj-main .mogudj-detail,
.mogudj-main .mogudj-section{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.mogudj-section{margin:0 0 8px}
.mogudj-section__head,.hg-section-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.mogudj-section__title{font-size:22px;font-weight:600;color:#fff;margin:0;line-height:30px}
.mogudj-section__more{color:rgba(255,255,255,.45);font-size:13px;text-decoration:none}
.hg-section-title{display:flex;align-items:center;gap:12px}
.hg-section-accent{width:4px;height:20px;border-radius:999px;background:var(--color-primary,#ffd21c);flex-shrink:0}
/* 分类推荐：蘑菇四栏 */
.hg-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin-top:20px}
.hg-category-col{background:#161616;border:1px solid rgba(255,255,255,.06);border-radius:16px;overflow:hidden;min-width:0}
.hg-category-col__title{display:block;padding:16px 16px 12px;font-size:16px;line-height:22px;font-weight:600;color:#fff;text-decoration:none}
.hg-category-col__title:hover{color:var(--color-primary,#ffd21c)}
.hg-category-item{display:flex;gap:12px;padding:10px 16px;align-items:flex-start;text-decoration:none;color:inherit}
.hg-category-item+.hg-category-item{border-top:1px solid rgba(255,255,255,.12)}
.hg-category-item__thumb{position:relative;width:104px;height:120px;border-radius:8px;overflow:hidden;flex-shrink:0;background:#1a1a1a}
.hg-category-item__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.hg-category-item__info{min-width:0;flex:1}
.hg-category-item__title{font-size:13px;line-height:20px;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px}
.hg-category-item:hover .hg-category-item__title{color:var(--color-primary,#ffd21c)}
.hg-category-item__desc{margin:0;font-size:11px;line-height:17px;color:rgba(255,255,255,.4);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hg-category-item__thumb .cover-pay-badge{
  position:absolute;top:4px;right:4px;padding:2px 6px;border-radius:4px;font-size:10px;line-height:1.2;font-weight:700
}
.hg-category-item__thumb .cover-pay-badge.is-paid{background:rgba(15,23,42,.82);color:#fbbf24}
.hg-category-item__thumb .cover-pay-badge.is-free{background:rgba(22,163,74,.92);color:#fff}
@media (max-width:1280px){
  .hg-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
}
@media (max-width:720px){
  .hg-category-grid{grid-template-columns:1fr;gap:10px;margin-top:14px}
  .hg-category-item__thumb{width:70px;height:90px}
  .mogudj-section__title{font-size:16px;line-height:24px}
  .hg-section-accent{width:3px;height:16px}
}
/* PC 一横排 4 个封面 */
.mogudj-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
@media (max-width:900px){.mogudj-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}}
@media (max-width:640px){.mogudj-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
.mogudj-card{display:block;color:inherit;text-decoration:none}
.mogudj-card__cover{position:relative;display:block;border-radius:10px;overflow:hidden;aspect-ratio:3/4;background:#1a1a1a}
.mogudj-card__cover img{width:100%;height:100%;object-fit:cover;display:block;background:#1a1a1a;transition:opacity .2s ease}
.mogudj-card__cover img.js-lazy:not(.is-loaded),
.mogudj-card__cover img[src*="cover-placeholder"]{object-fit:contain!important;background:#121212!important;opacity:1}
.mogudj-card__cover img.is-loaded{opacity:1;object-fit:cover}
.hg-category-item__thumb img.js-lazy:not(.is-loaded),
.hg-category-item__thumb img[src*="cover-placeholder"]{object-fit:contain!important;background:#121212!important;opacity:1}
.hg-category-item__thumb img.is-loaded{opacity:1;object-fit:cover}
.mogudj-card__badge{position:absolute;left:8px;top:8px;background:linear-gradient(90deg,#ff7a45,#ff2d6a);color:#fff;font-size:11px;padding:2px 6px;border-radius:4px}
.mogudj-card__remark{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.72);color:#fff;font-size:11px;padding:2px 6px;border-radius:4px}
.mogudj-card__vip{position:absolute;left:8px;bottom:8px;background:#ff2d6a;color:#fff;font-size:11px;padding:2px 6px;border-radius:4px}
.mogudj-card__title{margin:8px 0 0;font-size:14px;line-height:1.35;color:#fff;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mogudj-empty{padding:40px 16px;text-align:center;color:#888}
.mogudj-pager{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:24px 0}
.mogudj-pager a,.mogudj-pager span{display:inline-block;min-width:36px;text-align:center;padding:6px 10px;border-radius:8px;background:#1c1c1c;color:#ddd;text-decoration:none}
.mogudj-pager .current,.mogudj-pager .active{background:#ff2d6a;color:#fff}
.mogudj-detail{
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:28px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  align-items:start;
}
.mogudj-detail>*{min-width:0}
@media (max-width:720px){.mogudj-detail{grid-template-columns:1fr;gap:16px}}
.mogudj-detail__pic{border-radius:12px;overflow:hidden;background:#1a1a1a;width:100%}
.mogudj-detail__pic img{width:100%;display:block;aspect-ratio:3/4;object-fit:cover}
.mogudj-detail__title{margin:0 0 10px;font-size:22px;color:#fff}
.mogudj-detail__meta{color:#aaa;font-size:13px;line-height:1.7}
.mogudj-detail__content{margin-top:12px;color:#ccc;line-height:1.7;max-width:72ch}
.mogudj-epgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:8px;margin-top:16px}
.mogudj-epgrid a{display:block;text-align:center;padding:10px 6px;border-radius:8px;background:#1c1c1c;color:#eee;text-decoration:none}
.mogudj-epgrid a.on,.mogudj-epgrid a:hover{background:#ff2d6a;color:#fff}
.mogudj-crumb{color:#888;font-size:13px;margin:0 0 10px}
.mogudj-crumb a{color:#ff8fa3;text-decoration:none}
.mogudj-play-title{margin:0 0 14px;font-size:20px;color:#fff;line-height:1.35}
/* 竖屏短剧播放窗：居中 9:16，不再强制 16:9 横屏 */
.mogudj-playbox{
  background:#050505;
  border-radius:14px;
  overflow:hidden;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:360px;
  padding:12px 0;
}
.mogudj-play-stage{
  position:relative;
  width:min(100%,420px);
  aspect-ratio:9/16;
  max-height:min(78vh,760px);
  height:auto;
  margin:0 auto;
  background:#000;
  border-radius:12px;
  overflow:hidden;
}
.mogudj-play-stage .MacPlayer,
.mogudj-play-stage .embed-responsive,
.mogudj-play-stage .dplayer,
.mogudj-play-stage #player,
.mogudj-play-stage .player,
.mogudj-play-stage iframe,
.mogudj-play-stage video{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:#000!important;
}
.mogudj-play-stage video{object-fit:contain!important}
.mogudj-play-stage .player-lock{position:absolute;inset:0;z-index:20}
.mogudj-play-stage:has(.player-lock){
  aspect-ratio:auto;
  width:min(100%,420px);
  min-height:420px;
  height:auto;
  max-height:none;
}
.mogudj-play-stage:has(.player-lock) .player-lock{
  position:relative;
  inset:auto;
  min-height:420px;
}
@media (max-width:640px){
  .mogudj-playbox{padding:0;border-radius:0;min-height:0;background:#000}
  .mogudj-play-stage{
    width:100%;
    max-width:100%;
    max-height:none;
    aspect-ratio:9/16;
    border-radius:0;
  }
  .mogudj-play-stage:has(.player-lock){
    aspect-ratio:auto;
    width:100%;
  }
  .mogudj-play-title{font-size:17px}
}
.mogudj-vipgate{margin:20px auto;max-width:420px;padding:28px 20px;border-radius:16px;background:linear-gradient(180deg,#1a1218,#120d12);border:1px solid rgba(255,45,106,.35);text-align:center}
.mogudj-vipgate h3{margin:0 0 8px;color:#fff}
.mogudj-vipgate p{margin:0 0 16px;color:#bbb;font-size:13px}
.mogudj-vipgate .btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.mogudj-vipgate a{display:inline-block;padding:10px 16px;border-radius:999px;text-decoration:none;font-size:14px}
.mogudj-vipgate .btn-vip{background:linear-gradient(90deg,#ff7a45,#ff2d6a);color:#fff}
.mogudj-vipgate .btn-login{background:#2a2a2a;color:#fff}
.mogudj-userbox{max-width:480px;margin:0 auto;padding:24px;border-radius:16px;background:#141414;border:1px solid #222}
.mogudj-userbox h1{margin:0 0 16px;font-size:20px;color:#fff}
.mogudj-userbox label{display:block;margin:0 0 6px;color:#aaa;font-size:13px}
.mogudj-userbox input{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:8px;border:1px solid #333;background:#0f0f0f;color:#fff;margin-bottom:12px}
.mogudj-userbox .btn{width:100%;border:0;border-radius:999px;padding:12px;background:linear-gradient(90deg,#ff7a45,#ff2d6a);color:#fff;font-size:15px;cursor:pointer}
.mogudj-userbox .links{margin-top:14px;text-align:center}
.mogudj-userbox .links a{color:#ff8fa3;margin:0 8px;text-decoration:none;font-size:13px}

/* ===== 个人中心 / 登录注册 ===== */
.np-user,.np-auth{max-width:520px;margin:0 auto 28px;padding:0 4px}
.np-user__hero{
  display:flex;align-items:center;gap:16px;
  padding:22px 18px;border-radius:18px;
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%,rgba(255,45,106,.28),transparent 55%),
    linear-gradient(135deg,#1a1218,#120d12 60%,#161018);
  border:1px solid rgba(255,45,106,.28);
  box-shadow:0 10px 36px rgba(0,0,0,.35);
}
.np-user__avatar{
  width:72px;height:72px;border-radius:50%;overflow:hidden;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#ff7a45,#ff2d6a);
  border:2px solid rgba(255,255,255,.18);
  color:#fff;font-size:28px;font-weight:800;
}
.np-user__avatar img{width:100%;height:100%;object-fit:cover;display:block}
.np-user__name{margin:0 0 6px;font-size:22px;color:#fff;font-weight:800;letter-spacing:.5px}
.np-user__sub{margin:0;color:#ffb0c4;font-size:13px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.np-user__sub i{font-style:normal;opacity:.5}
.np-user__vip{
  margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 18px;border-radius:16px;text-decoration:none;
  background:linear-gradient(90deg,#ff7a45,#ff2d6a);
  box-shadow:0 8px 24px rgba(255,45,106,.28);
}
.np-user__vip strong{display:block;color:#fff;font-size:16px}
.np-user__vip em{display:block;margin-top:4px;color:rgba(255,255,255,.85);font-size:12px;font-style:normal}
.np-user__vip>span{
  flex:none;padding:8px 12px;border-radius:999px;background:rgba(0,0,0,.22);
  color:#fff;font-size:12px;font-weight:700;white-space:nowrap
}
.np-user__grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.np-user__item{
  display:flex;align-items:center;gap:10px;padding:16px 14px;border-radius:14px;
  background:#141014;border:1px solid #2a1a22;color:#fff;text-decoration:none;font-size:14px;font-weight:600
}
.np-user__item:hover{border-color:rgba(255,45,106,.45);background:#1a1218}
.np-user__ico{width:28px;height:28px;border-radius:8px;flex:none;position:relative;background:rgba(255,45,106,.15)}
.np-user__ico::before{content:'';position:absolute;inset:7px;border-radius:3px;background:#ff2d6a}
.np-user__ico--fav::before{border-radius:50% 50% 45% 45%;transform:rotate(-45deg) scale(.9)}
.np-user__ico--play::before{clip-path:polygon(30% 20%,90% 50%,30% 80%);border-radius:0;background:#ff7a45}
.np-user__ico--coin::before{border-radius:50%}
.np-user__ico--set::before{border-radius:2px;box-shadow:0 0 0 3px rgba(255,45,106,.25) inset}
.np-user__logout,.np-btn{
  display:inline-flex;align-items:center;justify-content:center;
  border:0;border-radius:999px;text-decoration:none;cursor:pointer;font-weight:700
}
.np-user__logout{
  margin-top:16px;width:100%;box-sizing:border-box;padding:13px 16px;
  background:#2a141c;color:#ff8fa3;border:1px solid #4a2030;font-size:14px
}
.np-user__auth{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.np-btn{padding:12px 18px;font-size:14px}
.np-btn--primary{background:linear-gradient(90deg,#ff7a45,#ff2d6a);color:#fff;box-shadow:0 6px 18px rgba(255,45,106,.28)}
.np-btn--ghost{background:#1a1218;color:#ffb0c4;border:1px solid rgba(255,45,106,.35)}
.np-btn--block{width:100%;box-sizing:border-box;padding:13px 16px;font-size:15px}
.np-auth__brand{text-align:center;margin:6px 0 16px}
.np-auth__brand img{height:56px;width:auto;max-width:100%;display:inline-block}
.np-auth__brand p{margin:10px 0 0;color:#c46b88;font-size:13px}
.np-auth__card{
  padding:22px 18px;border-radius:18px;
  background:linear-gradient(180deg,#171217,#120d12);
  border:1px solid rgba(255,45,106,.28);
  box-shadow:0 12px 40px rgba(0,0,0,.35)
}
.np-auth__card h1{margin:0 0 8px;font-size:22px;color:#fff;font-weight:800}
.np-auth__desc{margin:0 0 16px;color:#aaa;font-size:13px;line-height:1.5}
.np-auth__form{display:grid;gap:12px;margin-top:14px}
.np-field{display:grid;gap:6px}
.np-field span{color:#ffb0c4;font-size:13px}
.np-field input{
  width:100%;box-sizing:border-box;padding:12px 14px;border-radius:12px;
  border:1px solid #333;background:#0c0a0c;color:#fff;font-size:15px;outline:none
}
.np-field input:focus{border-color:#ff2d6a;box-shadow:0 0 0 3px rgba(255,45,106,.18)}
.np-auth__links{margin-top:16px;display:flex;justify-content:center;gap:16px;flex-wrap:wrap}
.np-auth__links a{color:#ff8fa3;text-decoration:none;font-size:13px}
.np-vip-list{display:grid;gap:10px;margin-bottom:4px}
.np-vip-item{
  display:flex;align-items:flex-start;gap:10px;padding:14px;border-radius:12px;
  background:#0f0c0f;border:1px solid #2a1a22;cursor:pointer;color:#eee
}
.np-vip-item:has(input:checked){border-color:#ff2d6a;background:#1a1218}
.np-vip-item input{margin-top:3px}
.np-vip-item__body{display:grid;gap:4px}
.np-vip-item__body strong{font-size:15px;color:#fff}
.np-vip-item__body em{font-style:normal;color:#ff8fa3;font-size:12px}

/* 旧会员子页强制深色+粉色，避免白底回潮 */
body.mogudj-body .member-wrap,
body.page-user-favs,
body.page-user-plays,
body.user-info-page-wrap,
body#upgrade,
body#reg{
  background:#080808!important;color:#eee!important
}
body.mogudj-body .member-wrap-bg,
body.page-user-favs .member-wrap,
body.page-user-plays .member-wrap,
body.user-info-page-wrap .member-wrap{
  background:transparent!important
}
body.mogudj-body #member,
body.page-user-favs #member,
body.page-user-plays #member,
body.user-info-page-wrap #member{
  background:transparent!important;color:#eee!important
}
body.mogudj-body .co-right,
body.mogudj-body .co-right-bg,
body.page-user-favs .co-right,
body.page-user-plays .co-right,
body.user-info-page-wrap .co-right{
  background:#141014!important;border:1px solid #2a1a22!important;border-radius:14px!important;color:#eee!important
}
body.mogudj-body .m-nav,
body.page-user-favs .m-nav,
body.page-user-plays .m-nav,
body.user-info-page-wrap .m-nav{
  background:#120d12!important;color:#fff!important;border-bottom:1px solid #2a1a22!important
}
body.mogudj-body .m-nav .mb-title,
body.page-user-favs .mb-title,
body.page-user-plays .mb-title{color:#fff!important}
body.mogudj-body .filter-tabs a,
body.page-user-favs .filter-tabs a,
body.page-user-plays .filter-tabs a{
  background:#1c1418!important;color:#ccc!important;border-radius:999px!important
}
body.mogudj-body .filter-tabs a.on,
body.mogudj-body .filter-tabs a:hover,
body.page-user-favs .filter-tabs a.on,
body.page-user-plays .filter-tabs a.on{
  background:linear-gradient(90deg,#ff7a45,#ff2d6a)!important;color:#fff!important
}
@media (max-width:640px){
  .np-user__grid{grid-template-columns:1fr}
  .np-auth__brand img{height:48px}
}
/* ===== PC / 移动端分离 ===== */
/* 底栏：仅手机显示；PC 彻底隐藏，避免 SVG 被全局 img 样式撑爆 */
.mogudj-tabbar{
  display:none!important;
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  background:rgba(12,12,12,.96);border-top:1px solid #222;
  padding:6px 0 calc(6px + env(safe-area-inset-bottom,0px));
  backdrop-filter:blur(8px);
  box-sizing:border-box;
  height:auto;max-height:72px;
  overflow:hidden;
}
.mogudj-tabbar a{
  flex:1 1 0;min-width:0;max-width:25%;
  text-align:center;color:#999;text-decoration:none;
  font-size:11px;line-height:1.2;padding:4px 0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.mogudj-tabbar a.on,.mogudj-tabbar a:hover{color:#ff2d6a}
.mogudj-tabbar img,
.mogudj-tabbar a img{
  width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important;
  display:block!important;margin:0 auto 2px!important;opacity:.75;
  object-fit:contain!important;flex:0 0 auto!important;
}
.mogudj-tabbar a.on img{opacity:1}

/* PC：顶栏完整；汉堡/移动搜索隐藏；底栏隐藏；页脚不必抬高 */
@media (min-width:1024px){
  body.mogudj-body{padding-bottom:0!important}
  body.mogudj-body.hg-has-mtab{padding-bottom:0!important}
  .mogudj-tabbar{display:none!important;height:0!important;overflow:hidden!important;pointer-events:none!important}
  .mogudj-footer{padding-bottom:28px!important}
  .hg-header__menu,
  .btn-menu-collapse,
  .hg-header__search-btn{display:none!important}
  .hg-topbar-nav{display:flex!important}
  .hg-header__search{display:flex!important}
  .hg-header__auth{display:flex!important}
  .dx-drawer{display:none!important}
  .hg-layout #app-header{padding-top:56px!important}
  .mogudj-main,.mogudj-main.hg-main{
    padding-top:4px!important;
    padding-bottom:40px!important;
    padding-left:var(--hg-page-gutter,24px)!important;
    padding-right:var(--hg-page-gutter,24px)!important;
    max-width:none!important;
    width:100%!important;
  }
  .mogudj-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
  .hg-category-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
}

/* 平板/手机：底栏四格；顶栏收起部分 PC 元素 */
@media (max-width:1023px){
  body.mogudj-body,
  body.mogudj-body.hg-has-mtab{
    padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))!important;
  }
  .mogudj-tabbar{display:flex!important}
  .mogudj-footer{padding-bottom:16px!important}
  .hg-header__menu,
  .btn-menu-collapse{display:inline-flex!important}
  .hg-header__search-btn{display:inline-flex!important}
  .hg-topbar-nav{display:none!important}
  .hg-header__auth{display:none!important}
  /* 修复：顶栏 overflow:hidden 会裁掉下拉搜索框 */
  .hg-layout #app-header,
  .hg-layout .hg-header.header,
  .hg-layout .hg-header__inner{
    overflow:visible!important;
  }
  .hg-layout .hg-header__search:not(.is-mobile-open){
    display:none!important;
  }
  .hg-layout .hg-header.is-mobile-search .hg-header__search,
  .hg-layout .hg-header__search.is-mobile-open{
    display:flex!important;
    flex-direction:column!important;
    visibility:visible!important;
    pointer-events:auto!important;
    position:fixed!important;
    left:0!important;
    right:0!important;
    top:56px!important;
    z-index:2147483646!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:12px!important;
    background:#0d0d0d!important;
    border-bottom:1px solid rgba(255,45,106,.25)!important;
    box-shadow:0 16px 40px rgba(0,0,0,.55)!important;
  }
  .hg-layout .hg-header.is-mobile-search .hg-search,
  .hg-layout .hg-header__search.is-mobile-open .hg-search{
    display:flex!important;
    width:100%!important;
    max-width:none!important;
    border:1.5px solid #ff2d6a!important;
    border-radius:999px!important;
    background:#161616!important;
    padding:8px 14px!important;
    box-sizing:border-box!important;
  }
  .hg-layout .hg-header.is-mobile-search .hg-search input,
  .hg-layout .hg-header__search.is-mobile-open .hg-search input{
    flex:1!important;
    min-width:0!important;
    color:#fff!important;
    background:transparent!important;
    border:0!important;
    outline:none!important;
    font-size:15px!important;
  }
  .hg-layout .hg-header.is-mobile-search .hg-header__search-btn-icon--search{display:none!important}
  .hg-layout .hg-header.is-mobile-search .hg-header__search-btn-icon--close{
    display:block!important;
  }
  .hg-layout #app-header{padding-top:56px!important}
  .mogudj-main,.mogudj-main.hg-main{
    padding:2px 12px 20px!important;
    max-width:none!important;
    width:100%!important;
  }
  .mogudj-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}

.dx-drawer{position:fixed;inset:0;z-index:80;pointer-events:none;opacity:0;transition:.2s}
.dx-drawer.dx-drawer--open{pointer-events:auto;opacity:1}
.dx-drawer::before{content:'';position:absolute;inset:0;background:rgba(0,0,0,.55)}
.hg-mobile-nav{position:absolute;left:0;top:0;bottom:0;width:min(82vw,320px);transform:translateX(-105%);transition:.22s;background:#111}
.dx-drawer--open .hg-mobile-nav{transform:none}
.hg-header__auth a,.hg-auth-btn{display:inline-block;padding:6px 12px;border-radius:999px;background:linear-gradient(90deg,#ff7a45,#ff2d6a);color:#fff!important;text-decoration:none;font-size:13px;border:0;cursor:pointer}
.hg-rank-hero{background-image:url('../images/rank-intro-bg.png');background-size:cover;background-position:center}

/* 顶栏：默认白字；只有 .is-active 才黄胶囊（复刻蘑菇） */
.hg-layout .hg-topbar-nav__item{
  color:rgba(255,255,255,.78)!important;
  background:transparent!important;
  font-weight:500!important;
}
.hg-layout .hg-topbar-nav__item:hover{
  color:#fff!important;
  background:rgba(255,255,255,.06)!important;
}
.hg-layout .hg-topbar-nav__item.is-active{
  color:#111!important;
  background:var(--color-primary,#ffd21c)!important;
  font-weight:600!important;
}

/* 排行榜序号由 JS 写入 .hg-rank-num 文本 */
.hg-rank-list .hg-rank-num{color:rgba(255,255,255,.28)}
.hg-rank-list .hg-rank-num.is-top{color:var(--color-primary,#ffd21c)!important}
.hg-rank-page .hg-pill-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 8px}
.hg-rank-page .hg-pill-tabs__item{
  display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;
  border-radius:999px;background:#1a1a1a;color:rgba(255,255,255,.7);
  text-decoration:none;font-size:13px;border:1px solid rgba(255,255,255,.08)
}
.hg-rank-page .hg-pill-tabs__item.is-active{
  background:var(--color-primary,#ffd21c);color:#111;border-color:transparent;font-weight:700
}
.hg-rank-page .hg-pill-tabs__icon{width:16px;height:16px}
.hg-rank-page .hg-breadcrumb{margin:0 0 14px;color:#888;font-size:13px}
.hg-rank-page .hg-breadcrumb a{color:#ffd21c;text-decoration:none}
/* hide default MacCMS chrome leftovers if any */
#topnav.site-head-wrap,.foot_nav,.member-wrap > .container.home-unified > .home-detail{all:unset}
.popedom-upgrade-gate{background:transparent!important}
.popedom-upgrade-gate-inner{background:linear-gradient(180deg,#1a1218,#120d12)!important;border:1px solid rgba(255,45,106,.35)!important;border-radius:16px!important;color:#eee!important}
.popedom-upgrade-title{color:#fff!important}
.popedom-upgrade-btn,.popedom-upgrade-gate a.btn{background:linear-gradient(90deg,#ff7a45,#ff2d6a)!important;border:0!important;color:#fff!important;border-radius:999px!important}

/* ajax 登录/注册弹窗统一粉色 */
.auth-ui-popup .auth-shell,
.auth-ui-popup .reg-w,
.auth-ui-popup .auth-panel{
  background:linear-gradient(180deg,#171217,#120d12)!important;
  border:1px solid rgba(255,45,106,.28)!important;
  border-radius:16px!important;
  color:#eee!important;
}
.auth-ui-popup .auth-field-label,
.auth-ui-popup .auth-forgot-link{color:#ffb0c4!important}
.auth-ui-popup .reg-control{
  background:#0c0a0c!important;border:1px solid #333!important;color:#fff!important;border-radius:12px!important
}
.auth-ui-popup .auth-page-btn.is-active,
.auth-ui-popup .btn-brand,
.auth-ui-popup .login_form_submit{
  background:linear-gradient(90deg,#ff7a45,#ff2d6a)!important;border:0!important;color:#fff!important;border-radius:999px!important
}
.hg-auth-card,.hg-auth-modal__box .hg-auth-card{
  background:linear-gradient(180deg,#171217,#120d12)!important;
  border:1px solid rgba(255,45,106,.28)!important
}
