/* mother-diversity · mango-tv · 正红顶栏 + 亮黄CTA + 黄热门徽章 · 白底娱乐影视站 */
:root{
  --div-accent:var(--mg-primary,#ef4444);
  --div-secondary:var(--mg-secondary,#facc15);
  --div-highlight:var(--mg-hot,#facc15);
  --div-bg:var(--mg-bg,#fff8f0);
  --div-surface:var(--mg-surface,#ffffff);
  --div-text:var(--mg-text,#1c1917);
  --div-muted:var(--mg-muted,#78716c);
  color-scheme:light;
}

/* ── 全局 ── */
body.body-mg{
  margin:0;min-height:100vh;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(250,204,21,.12), transparent 55%),
    radial-gradient(600px 300px at 0% 100%, rgba(239,68,68,.08), transparent 50%),
    var(--mg-bg)!important;
  color:var(--mg-text)!important;
  font-family:"Segoe UI","PingFang SC","Noto Sans SC",sans-serif;
}
body.body-mg a{color:var(--mg-primary)}
body.body-mg a:hover{color:#dc2626}

/* ── 头部：彩色顶栏 + 黄色彩带 + 胶囊导航（非 me masthead） ── */
.mg-head{
  position:sticky;top:0;z-index:100;
  background:var(--mg-primary);
  box-shadow:0 4px 24px rgba(239,68,68,.35);
}
.mg-head__bar{
  display:grid;
  grid-template-columns:auto 1fr minmax(160px,260px) auto auto;
  align-items:center;gap:12px 16px;
  max-width:1280px;margin:0 auto;padding:10px 20px;
}
.mg-logo{
  display:flex;align-items:center;gap:10px;
  color:#fff!important;font-weight:800;text-decoration:none;
}
.mg-logo__icon{
  display:grid;place-items:center;
  width:40px;height:40px;
  background:var(--mg-secondary);color:#422006;
  font-size:1rem;font-weight:900;border-radius:10px;
}
.mg-logo__text{display:flex;flex-direction:column;gap:2px;line-height:1.2}
.mg-logo__text strong{font-size:1.08rem;color:#fff!important}
.mg-logo__text em{font-size:.68rem;font-style:normal;color:rgba(255,255,255,.82);font-weight:600}

.mg-pills{
  display:flex;flex-wrap:wrap;gap:6px;justify-content:center;
}
.mg-pills a{
  padding:6px 14px;border-radius:999px;
  color:rgba(255,255,255,.88)!important;
  font-size:.84rem;font-weight:700;
  background:rgba(255,255,255,.12);
  transition:background .2s,transform .15s;
}
.mg-pills a:hover,.mg-pills a[aria-current="page"]{
  background:var(--mg-secondary)!important;color:#422006!important;
  transform:translateY(-1px);
}

.mg-search{display:flex;align-items:stretch;min-width:0}
.mg-search input{
  flex:1;min-width:0;padding:8px 12px;
  border:2px solid rgba(255,255,255,.3);border-right:0;border-radius:999px 0 0 999px;
  background:rgba(255,255,255,.95);color:var(--mg-text);outline:none;
}
.mg-search input:focus{border-color:var(--mg-secondary)}
.mg-search__go{
  padding:8px 16px;border:0;border-radius:0 999px 999px 0;
  background:var(--mg-secondary);color:#422006!important;
  font-weight:900;font-size:.86rem;cursor:pointer;
}
.mg-search__go:hover{background:#fde047}

.mg-cta{
  display:inline-flex;align-items:center;padding:8px 16px;border-radius:999px;
  background:var(--mg-secondary)!important;color:#422006!important;
  font-weight:900;font-size:.84rem;white-space:nowrap;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.mg-cta:hover{background:#fde047!important;transform:translateY(-1px)}

.mg-burger{
  display:none;flex-direction:column;justify-content:center;gap:5px;
  width:38px;height:38px;padding:8px;
  border:2px solid rgba(255,255,255,.35);border-radius:10px;
  background:rgba(255,255,255,.1);cursor:pointer;
}
.mg-burger span{display:block;height:2px;background:#fff;border-radius:1px}

.mg-head__ribbon{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 16px;
  padding:6px 20px;
  background:var(--mg-secondary);color:#422006;
  font-size:.74rem;font-weight:800;letter-spacing:.03em;
}
.mg-head__dot{width:4px;height:4px;border-radius:50%;background:#422006;opacity:.5}

/* ── 主内容 ── */
.mg-main{max-width:1280px;margin:0 auto;padding:24px 20px 56px}

/* ── 首页横幅（非 me-spotlight 双栏编辑风） ── */
.mg-banner{
  position:relative;display:flex;align-items:center;
  margin-bottom:32px;padding:36px 32px;border-radius:20px;overflow:hidden;
  background:linear-gradient(125deg,#ef4444 0%,#f87171 45%,#facc15 100%);
  color:#fff;min-height:200px;
}
.mg-banner__inner{position:relative;z-index:1;max-width:620px}
.mg-banner__tag{
  margin:0 0 12px;font-size:.76rem;font-weight:800;
  letter-spacing:.06em;text-transform:uppercase;
  color:rgba(255,255,255,.92);
}
.mg-banner h1{
  margin:0 0 14px;font-size:clamp(1.5rem,3.8vw,2.3rem);
  font-weight:900;line-height:1.25;color:#fff;
}
.mg-banner__lead{margin:0 0 22px;line-height:1.75;color:rgba(255,255,255,.9);font-size:.95rem}
.mg-banner__btns{display:flex;flex-wrap:wrap;gap:10px}
.mg-btn{
  display:inline-flex;align-items:center;padding:10px 22px;border-radius:999px;
  font-weight:900;font-size:.88rem;text-decoration:none;cursor:pointer;
  transition:transform .15s,box-shadow .15s;
}
.mg-btn--hot{background:var(--mg-secondary)!important;color:#422006!important;box-shadow:0 4px 14px rgba(0,0,0,.2)}
.mg-btn--hot:hover{background:#fde047!important;transform:translateY(-2px)}
.mg-btn--line{
  background:rgba(255,255,255,.18)!important;color:#fff!important;
  border:2px solid rgba(255,255,255,.5)!important;
}
.mg-btn--line:hover{background:rgba(255,255,255,.28)!important}
.mg-banner__deco{position:absolute;right:5%;top:50%;transform:translateY(-50%);pointer-events:none}
.mg-banner__ring{
  display:block;width:140px;height:140px;border-radius:50%;
  border:3px solid rgba(255,255,255,.25);
}
.mg-banner__ring--2{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:90px;height:90px;border-color:rgba(250,204,21,.5);
}

/* ── 热播横滑（非 me-edit-grid 非对称栅格） ── */
.mg-strip{margin-bottom:36px}
.mg-strip__head{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;margin-bottom:16px;
}
.mg-strip__head h2{
  margin:0;font-size:1.12rem;font-weight:900;color:var(--mg-text);
  display:flex;align-items:center;gap:8px;
}
.mg-strip__icon{font-size:1rem}
.mg-strip__more{color:var(--mg-primary)!important;font-size:.86rem;font-weight:800}

.mg-scroll{
  overflow-x:auto;overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x mandatory;
  scrollbar-width:thin;scrollbar-color:var(--mg-primary) transparent;
  padding-bottom:8px;
}
.mg-scroll__track{
  display:flex;gap:14px;width:max-content;padding:4px 2px;
}
.mg-scroll .mg-card{
  flex:0 0 160px;width:160px;scroll-snap-align:start;
}
.mg-scroll .mg-card__frame img{aspect-ratio:3/4}

/* ── 分类入口色块网格（非 me-chips 胶囊条） ── */
.mg-tax{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:10px;margin-bottom:36px;
}
.mg-tax__item{
  display:grid;place-items:center;
  padding:16px 8px;border-radius:14px;
  background:var(--mg-surface);
  border:2px solid rgba(239,68,68,.12);
  color:var(--mg-text)!important;font-weight:800;font-size:.84rem;
  text-align:center;transition:transform .2s,border-color .2s,background .2s;
}
.mg-tax__item:hover{
  transform:translateY(-3px);border-color:var(--mg-primary);
  background:var(--mg-panel);
}
.mg-tax__item--all{
  background:var(--mg-primary)!important;color:#fff!important;
  border-color:var(--mg-primary)!important;
}
.mg-tax__item--all:hover{background:#dc2626!important}

/* ── 片库网格分区 ── */
.mg-section{margin-bottom:40px}
.mg-section__head{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;margin-bottom:18px;
}
.mg-section__head h2{
  margin:0;font-size:1.12rem;font-weight:900;
  display:flex;align-items:center;gap:10px;
}
.mg-section__bar{
  width:5px;height:22px;border-radius:3px;
  background:linear-gradient(180deg,var(--mg-primary),var(--mg-secondary));
}
.mg-section__link{color:var(--mg-primary)!important;font-size:.86rem;font-weight:800}

.mg-poster-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(148px,1fr));
  gap:14px;
}
.mg-poster-grid--cat{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}

/* ── 卡片：圆角竖版 + 底部渐变标题 + 黄徽章（非 me 直角编辑风） ── */
.mg-card{
  border-radius:14px;overflow:hidden;
  background:var(--mg-surface);
  box-shadow:0 2px 12px rgba(239,68,68,.08);
  transition:transform .25s,box-shadow .25s;
}
.mg-card:hover{transform:translateY(-4px);box-shadow:0 10px 28px rgba(239,68,68,.18)}
.mg-card__link{display:block;color:inherit;text-decoration:none}
.mg-card__frame{position:relative;display:block;overflow:hidden}
.mg-card__frame img{
  width:100%;aspect-ratio:3/4;object-fit:cover;display:block;
  background:#fef2f2;transition:transform .35s ease;
}
.mg-card:hover .mg-card__frame img{transform:scale(1.06)}
.mg-card__badge{
  position:absolute;left:8px;top:8px;
  padding:3px 9px;border-radius:999px;
  background:var(--mg-secondary);color:#422006;
  font-size:10px;font-weight:900;letter-spacing:.03em;
  box-shadow:0 2px 6px rgba(0,0,0,.15);
}
.mg-card__year{
  position:absolute;right:8px;top:8px;
  padding:2px 8px;border-radius:999px;
  background:rgba(0,0,0,.65);color:#fff;
  font-size:10px;font-weight:700;
}
.mg-card__play{
  position:absolute;inset:0;display:grid;place-items:center;
  background:rgba(239,68,68,.35);color:#fff;
  font-size:1.6rem;opacity:0;transition:opacity .25s;
}
.mg-card:hover .mg-card__play{opacity:1}
.mg-card__shade{
  position:absolute;left:0;right:0;bottom:0;
  padding:28px 10px 10px;
  background:linear-gradient(transparent,rgba(0,0,0,.82));
}
.mg-card__shade h3{
  margin:0 0 4px;font-size:.84rem;line-height:1.35;font-weight:800;color:#fff!important;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.mg-card__shade p{margin:0;display:flex;gap:6px;font-size:10px;color:rgba(255,255,255,.75)}
.mg-card__shade p span:first-child{color:var(--mg-secondary)}

/* compact 横条排行卡片 */
.mg-rank{
  display:grid;grid-template-columns:130px 1fr auto;gap:12px;
  align-items:center;padding:12px 14px;border-radius:14px;
  background:var(--mg-surface);
  border:2px solid rgba(239,68,68,.08);
  transition:border-color .2s,transform .2s;
}
.mg-rank:hover{border-color:var(--mg-primary);transform:translateX(4px)}
.mg-rank__thumb{position:relative;display:block;border-radius:10px;overflow:hidden}
.mg-rank__thumb img{width:130px;aspect-ratio:16/9;object-fit:cover}
.mg-rank__badge{
  position:absolute;left:6px;top:6px;
  padding:2px 7px;border-radius:999px;
  background:var(--mg-secondary);color:#422006;
  font-size:9px;font-weight:900;
}
.mg-rank__info h3{margin:0 0 4px;font-size:.88rem;line-height:1.3}
.mg-rank__info h3 a{color:var(--mg-text)!important}
.mg-rank__info h3 a:hover{color:var(--mg-primary)!important}
.mg-rank__info p{margin:0;font-size:11px;color:var(--mg-muted);display:flex;gap:6px}
.mg-rank__play{
  display:grid;place-items:center;
  width:40px;height:40px;border-radius:50%;
  background:var(--mg-primary);color:#fff!important;
  font-size:.8rem;font-weight:900;
}
.mg-rank__play:hover{background:#dc2626}

/* ── 分类页：红底标题带 + 筛选条 + 网格（非 me-cathead 灰线分割） ── */
.mg-cat-banner{
  margin:-24px -20px 28px;padding:28px 20px 24px;
  background:linear-gradient(135deg,var(--mg-primary),#f87171);
  color:#fff;border-radius:0 0 24px 24px;
}
.mg-crumb{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;font-size:.84rem;font-weight:600;color:rgba(255,255,255,.75)}
.mg-crumb a{color:#fff!important;text-decoration:underline;text-underline-offset:3px}
.mg-crumb--play{color:var(--mg-muted);margin-bottom:16px}
.mg-crumb--play a{color:var(--mg-primary)!important;text-decoration:none}
.mg-cat-banner h1{margin:0 0 8px;font-size:clamp(1.4rem,3vw,2rem);font-weight:900}
.mg-cat-banner p{margin:0;max-width:640px;line-height:1.65;color:rgba(255,255,255,.88)}

.mg-cat-filter{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  margin-bottom:20px;padding:14px 16px;
  background:var(--mg-surface);border-radius:14px;
  border:2px solid rgba(250,204,21,.35);
  box-shadow:0 2px 12px rgba(239,68,68,.06);
}
.mg-cat-filter__tag{
  padding:5px 12px;border-radius:999px;
  background:var(--mg-primary);color:#fff;
  font-size:.72rem;font-weight:900;
}
.mg-cat-filter input,.mg-cat-filter select{
  flex:1;min-width:130px;padding:9px 12px;
  border:1px solid rgba(239,68,68,.2);border-radius:8px;
  background:var(--mg-bg);color:var(--mg-text);outline:none;
}
.mg-cat-filter input:focus,.mg-cat-filter select:focus{border-color:var(--mg-primary)}
.mg-empty{
  padding:20px;text-align:center;color:var(--mg-muted);font-weight:700;
  background:var(--mg-panel);border-radius:12px;margin-bottom:16px;
}

/* ── 播放页：左右分栏剧场（非 me 全宽置顶播放器） ── */
.mg-play{
  margin-bottom:28px;padding:20px;border-radius:20px;
  background:#1c1917;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
}
.mg-play__stage{
  display:grid;grid-template-columns:1fr 240px;gap:20px;align-items:start;
}
.mg-play__screen{border-radius:12px;overflow:hidden;background:#000}
.mg-play__screen video,.mg-play__screen #movie-player{
  width:100%;aspect-ratio:16/9;background:#000;display:block;
  border:0;border-bottom:3px solid var(--mg-secondary);
}
.mg-play__panel{color:#fff}
.mg-play__thumb{
  width:100%;border-radius:12px;aspect-ratio:2/3;object-fit:cover;
  margin-bottom:14px;border:2px solid rgba(250,204,21,.4);
}
.mg-play__panel h1{margin:0 0 12px;font-size:1.05rem;font-weight:900;line-height:1.35;color:#fff}
.mg-play__meta{
  display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px;padding:0;list-style:none;
}
.mg-play__meta li{
  padding:4px 10px;border-radius:999px;
  background:rgba(250,204,21,.18);color:var(--mg-secondary);
  font-size:.72rem;font-weight:700;
}
.mg-play__meta li:nth-child(2n){background:rgba(239,68,68,.25);color:#fca5a5}
.mg-play__brief{margin:0 0 16px;font-size:.84rem;line-height:1.65;color:rgba(255,255,255,.7)}

.mg-synopsis{
  margin-bottom:36px;padding:24px;border-radius:16px;
  background:var(--mg-surface);
  border:2px solid rgba(239,68,68,.1);
}
.mg-synopsis h2{margin:0 0 12px;font-size:1rem;font-weight:900;color:var(--mg-primary)}
.mg-synopsis p{margin:0;line-height:1.8;color:var(--mg-muted);font-size:.92rem}

.mg-strip--related .mg-scroll .mg-card{flex:0 0 148px;width:148px}
.mg-card--sm .mg-card__shade h3{font-size:.78rem;-webkit-line-clamp:2}
.mg-card--sm .mg-card__shade{padding:20px 8px 8px}

/* ── 页脚：四列 + 黄顶线（非 me 三列编辑风） ── */
.mg-foot{
  margin-top:48px;
  background:var(--mg-surface);
  border-top:4px solid var(--mg-secondary);
  box-shadow:0 -4px 20px rgba(239,68,68,.06);
}
.mg-foot__cols{
  display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:28px;
  max-width:1280px;margin:0 auto;padding:36px 20px 28px;
}
.mg-foot__brand strong{display:block;margin-bottom:10px;font-size:1.15rem;color:var(--mg-primary)}
.mg-foot__brand p,.mg-foot__seo,.mg-foot__about{margin:0 0 8px;color:var(--mg-muted);font-size:.86rem;line-height:1.65}
.mg-foot__nav h3{margin:0 0 12px;font-size:.78rem;font-weight:900;letter-spacing:.06em;color:var(--mg-text)}
.mg-foot__nav{display:flex;flex-direction:column;gap:8px}
.mg-foot__nav a{color:var(--mg-muted)!important;font-size:.86rem;font-weight:600}
.mg-foot__nav a:hover{color:var(--mg-primary)!important}
.mg-foot__copy{
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;
  max-width:1280px;margin:0 auto;padding:14px 20px;
  border-top:1px solid rgba(239,68,68,.1);
  color:var(--mg-muted);font-size:.78rem;font-weight:600;
}

/* ── 移动端 ── */
@media (max-width:960px){
  .mg-head__bar{grid-template-columns:auto 1fr auto auto}
  .mg-pills{
    display:none;flex-direction:column;gap:4px;
    grid-column:1/-1;padding:12px 0 4px;
    border-top:1px solid rgba(255,255,255,.2);
  }
  .mg-pills.open{display:flex}
  .mg-pills a{padding:10px 14px;border-radius:10px}
  .mg-search{grid-column:1/-1;order:10}
  .mg-cta{display:none}
  .mg-burger{display:flex}
  .mg-tax{grid-template-columns:repeat(4,1fr)}
  .mg-play__stage{grid-template-columns:1fr}
  .mg-play__panel{display:grid;grid-template-columns:100px 1fr;gap:14px;align-items:start}
  .mg-play__thumb{width:100px;margin-bottom:0;grid-row:span 3}
  .mg-play__panel h1{font-size:.95rem}
  .mg-foot__cols{grid-template-columns:1fr 1fr}
  .mg-banner__deco{display:none}
}
@media (max-width:560px){
  .mg-tax{grid-template-columns:repeat(2,1fr)}
  .mg-poster-grid,.mg-poster-grid--cat{grid-template-columns:repeat(2,1fr)}
  .mg-scroll .mg-card{flex:0 0 130px;width:130px}
  .mg-rank{grid-template-columns:100px 1fr auto}
  .mg-rank__thumb img{width:100px}
  .mg-foot__cols{grid-template-columns:1fr}
  .mg-cat-banner{margin:-24px -20px 24px;border-radius:0 0 16px 16px}
}

/* 兼容旧 class */
.page-main{max-width:1280px;margin:0 auto;padding:24px 20px 56px}
.div-shell,.div-rail,.div-maincol{display:block}
.filter-panel{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px;padding:14px 16px;background:var(--mg-surface);border:2px solid rgba(239,68,68,.12);border-radius:12px}
.filter-panel input,.filter-panel select{flex:1;min-width:130px;padding:9px 12px;border:1px solid rgba(239,68,68,.2);border-radius:8px;background:var(--mg-bg);color:var(--mg-text)}
