/* SPA→静态视觉桥 · from=m9 · comic-pop 活力片库 */
:root {
  --pink: #E53935;
  --blue: #1565C0;
  --brand: #E53935;
  --accent: #1565C0;
  --portal-accent: #E53935;
  --steel: #616161;
  --steel-light: #757575;
  --bg: #FFF9C4;
  --bg2: #FFF176;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --card-elevated: #FFFDE7;
  --text: #1A1A2E;
  --muted: #5D4037;
  --line: rgba(229, 57, 53, 0.18);
  --gold: #E53935;
  --gold-dim: rgba(229, 57, 53, 0.12);
  --red: #E53935;
  --header-bg: #FFFFFF;
  --body-bg: #FFF9C4;
  color-scheme: light;
}

html,
body {
  background: var(--body-bg) !important;
  color: var(--text) !important;
}

body,
.page,
.site-wrap,
.app-shell,
.layout,
.main-wrap,
.page-main,
#app {
  background: var(--body-bg) !important;
  color: var(--text) !important;
}

.site-header,
.header,
.topbar,
.nav-bar,
.header-main,
.portal-header,
header.site-header,
.header-bar {
  background: var(--header-bg) !important;
  border-bottom: 2px solid var(--line) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text) !important;
  box-shadow: 0 4px 20px rgba(229, 57, 53, 0.08) !important;
}

.brand-text,
.brand-mark,
.site-brand,
.header-brand__title,
.site-title,
.brand a {
  color: #E53935 !important;
}

.header-brand__sub {
  color: var(--muted) !important;
}

.header-brand__logo,
.header-brand--ref .header-brand__logo {
  background: linear-gradient(135deg, #E53935, #C62828) !important;
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.35) !important;
}

.main-nav a,
.header-main-nav__link,
.header-nav a,
.site-nav a {
  color: #424242 !important;
}

.main-nav a:hover,
.main-nav a[aria-current="page"],
.header-main-nav__link:hover,
.header-main-nav__link--active,
.header-main-nav__link[aria-current="page"],
.nav a:hover,
.nav a.active {
  color: #1565C0 !important;
  background: rgba(21, 101, 192, 0.08) !important;
}

.header-main-nav__ico,
.header-main-nav__link--active .header-main-nav__ico {
  color: #E53935 !important;
}

.header-search,
.header-search--ref {
  background: var(--card) !important;
  border-color: var(--line) !important;
}

.header-search input,
.header-search--ref input {
  color: var(--text) !important;
}

.header-search input::placeholder,
.header-search--ref input::placeholder {
  color: #9E9E9E !important;
}

.header-search button,
.nav-search button,
.header-login-btn,
.header-search__submit {
  background: linear-gradient(135deg, #1565C0, #0D47A1) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(21, 101, 192, 0.3) !important;
}

.card,
.movie-card,
.poster-card,
.grid-card,
.media-card,
.item-card,
.tuy-card,
.fsp-hl-card,
.page-panel {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

.section-title h1,
.section-title h2,
h1,
h2,
h3,
.home-h1,
.page-title,
.cq-block__head h2 {
  color: var(--text) !important;
}

.section-sub,
.cq-block__sub,
.page-head-panel p {
  color: var(--muted) !important;
}

.footer,
.site-footer,
footer,
.footer-fsp__upper {
  background: linear-gradient(180deg, #FFF176, #FFF9C4) !important;
  color: #424242 !important;
}

a {
  color: #1565C0;
}

a:hover {
  color: #E53935;
}

/* === LAYOUT ALIGN v3 === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; min-width: 0; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; }
a { min-width: 0; }
.container,
.nx-container,
.jx-container {
  width: min(1180px, calc(100% - 32px)) !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.bbaseo-fly,
.bbaaseo-fly,
[class*="bbaseo-fly"],
[class*="bbaaseo-fly"] { display: none !important; }

.s2-head__bar-inner,
.dsj-header__bar,
.mzy-header__inner,
.header-inner,
.m68-header__inner,
.vlt-header__inner,
.jx-header__row,
.yzz-site-header__top-inner,
.nav-inner,
.nx-header__bar,
.site-head__top,
.paper-head__top {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 16px !important;
  min-width: 0 !important;
  width: 100% !important;
}

.s2-grid,
.s2-grid--dense,
.s2-grid--channel,
.s2-grid--related,
.s2-grid--rank,
.s2-home .movie-grid,
.movie-grid,
.mother-cards,
.paper-card-grid,
.cq-card-grid,
.cq-card-grid--dense,
.nx-poster-grid,
.nx-poster-grid--feat,
.nx-poster-grid--std,
.mzy-grid,
.dsj-grid,
.pop-grid,
.yzz-grid,
.arctic-grid,
.vod-grid,
.category-grid,
.home-section .mother-cards {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}
ul.mother-cards > li,
ul.paper-card-grid > li {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.tuy-card,
.fsp-hl-card,
.mzy-card,
.s2-card,
.paper-vcard,
.wythy-vcard,
.vod-poster-card,
.yzz-poster-card,
.arctic-card,
.movie-card,
.nx-card,
.overview-card,
.dsj-card,
.vlt-card,
.m68-card,
.jx-card,
[data-card] {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: none !important;
}
.tuy-card__media,
.fsp-hl-card__media,
.mzy-card__media,
.s2-card__media,
.paper-vcard__poster,
.wythy-vcard__poster-wrap,
.poster-frame,
.nx-card__poster,
.vod-poster-card__link .poster-frame {
  width: 100% !important;
  display: block !important;
  position: relative !important;
}
.tuy-card img,
.fsp-hl-card img,
.mzy-card__img,
.s2-card__media img,
.paper-vcard__poster img,
.wythy-vcard__poster,
.poster-frame img,
.nx-card__poster img,
.arctic-card img,
.movie-card img,
.vod-poster-card img,
.overview-card img,
[data-card] img {
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  height: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.s2-hero__grid,
.hero-portal__inner,
.paper-hero__inner,
.nx-hero__grid,
.dsj-hero,
.mzy-hero,
.vlt-hero {
  min-width: 0 !important;
}

.page-main,
.s2-home,
.s2-cat,
.s2-play,
.home-wrap,
.paper-home {
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (max-width: 1080px) {
  .s2-grid,
  .s2-grid--dense,
  .movie-grid,
  .mother-cards,
  .paper-card-grid,
  .cq-card-grid,
  .nx-poster-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 900px) {
  .s2-grid,
  .s2-grid--dense,
  .s2-grid--channel,
  .s2-grid--related,
  .s2-grid--rank,
  .s2-home .movie-grid,
  .movie-grid,
  .mother-cards,
  .paper-card-grid,
  .cq-card-grid,
  .nx-poster-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .s2-hero__grid,
  .hero-portal__inner,
  .paper-hero__inner,
  .nx-hero__grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  .s2-burger,
  .mzy-burger,
  .header-nav-toggle,
  .paper-nav-toggle,
  .dsj-nav-toggle,
  .m68-header__menu,
  .vlt-header__menu,
  .jx-header__toggle,
  .yzz-site-header__toggle,
  .mobile-toggle,
  .nx-header__toggle,
  [data-nav-toggle] {
    display: inline-flex !important;
  }
}
@media (max-width: 640px) {
  .s2-grid,
  .s2-grid--dense,
  .s2-grid--channel,
  .s2-grid--related,
  .s2-grid--rank,
  .s2-home .movie-grid,
  .movie-grid,
  .mother-cards,
  .paper-card-grid,
  .cq-card-grid,
  .nx-poster-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

