/* ==========================================================================
   Professional module headers — Entertainment / Movies / Series / Anime
   Distinct vertical themes + working mega menus (overflow: visible)
   ========================================================================== */

/* Kill leaked global header if it ever renders beside module chrome */
body.fe-module-shell .fe885-header,
body.fe-module-shell .fe885-announce,
body.fe-module-shell .fe885-mega-portal,
body.fe-module-shell .fe885-mega-pointer,
body.fe-module-shell [data-fe885-mobile-drawer],
body:has(.mfc-nav, .sfx-nav, .anx-nav, .ent-xp-nav, .fe-mod-main-header) .fe885-header,
body:has(.mfc-nav, .sfx-nav, .anx-nav, .ent-xp-nav, .fe-mod-main-header) .fe885-announce,
body:has(.mfc-nav, .sfx-nav, .anx-nav, .ent-xp-nav, .fe-mod-main-header) .fe885-mega-portal,
body:has(.mfc-nav, .sfx-nav, .anx-nav, .ent-xp-nav, .fe-mod-main-header) .fe885-mega-pointer,
body:has(.mfc-nav, .sfx-nav, .anx-nav, .ent-xp-nav, .fe-mod-main-header) [data-fe885-mobile-drawer] {
  display: none !important;
}

/* Shared site brand on dark entertainment chrome */
.fe-module-shell .fe-mod-header__site {
  border-right-color: rgba(255, 255, 255, 0.12);
  gap: 0;
  padding-right: 0.65rem;
  margin-right: 0.35rem;
}

.fe-module-shell .fe-mod-header__site--wordmark .fe-mod-header__mark {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.4rem;
  font-size: 0.62rem;
  box-shadow: none;
}

.fe-module-shell .fe-mod-header__site-name {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: rgba(248, 250, 252, 0.92);
  white-space: nowrap;
}

/* White-bg site logos: keep a tight light plate (no giant blank box) */
.fe-module-shell .fe-mod-header--on-dark.fe-mod-header__site--has-logo {
  padding-right: 0.55rem;
  margin-right: 0.25rem;
}

.fe-module-shell .fe-mod-header__site--logo-plate .fe-mod-header__brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0.2rem 0.4rem;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.fe-module-shell .fe-mod-header--on-dark .fe-mod-header__logo--desktop {
  display: block !important;
  height: 26px !important;
  width: auto !important;
  max-width: 118px !important;
  object-fit: contain;
  object-position: left center;
}

.fe-module-shell .fe-mod-header--on-dark .fe-mod-header__logo--compact {
  display: none !important;
}

.fe-module-shell .fe-mod-header__login {
  border-radius: 0.4rem;
  border-color: rgba(255, 255, 255, 0.16);
}

.fe-module-shell .fe-mod-header__signup {
  border-radius: 0.4rem;
  background: #2563eb;
  background-image: none;
}

.fe-module-shell .fe-mod-header__avatar {
  background: #334155;
  background-image: none;
}

/* —— Geometry: NEVER clip mega menus —— */
.fe-module-shell .mfc-nav,
.fe-module-shell .sfx-nav,
.fe-module-shell .anx-nav,
.fe-module-shell .ent-xp-nav {
  top: 0;
  overflow: visible !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
}

.fe-module-shell .mfc-header,
.fe-module-shell .sfx-header,
.fe-module-shell .anx-header,
.fe-module-shell .ent-xp-header {
  overflow: visible !important;
  position: relative;
  z-index: 80;
}

.fe-module-shell .mfc-nav-inner,
.fe-module-shell .mfc-nav-inner--enterprise,
.fe-module-shell .sfx-nav-inner,
.fe-module-shell .sfx-nav-inner--enterprise,
.fe-module-shell .anx-nav__inner,
.fe-module-shell .anx-nav__inner--enterprise,
.fe-module-shell .ent-xp-nav__inner {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-height: 56px;
  padding-block: 0;
  overflow: visible !important;
}

.fe-module-shell .mfc-nav__primary,
.fe-module-shell .sfx-nav__primary,
.fe-module-shell .anx-nav__primary {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible !important;
}

.fe-module-shell .mfc-nav__dropdown,
.fe-module-shell .sfx-nav__dropdown,
.fe-module-shell .anx-nav__dropdown {
  position: relative;
  flex-shrink: 0;
  overflow: visible !important;
  z-index: 90;
}

.fe-module-shell .mfc-nav__dropdown-panel,
.fe-module-shell .sfx-nav__dropdown-panel,
.fe-module-shell .anx-nav__dropdown-panel {
  z-index: 600 !important;
}

.fe-module-shell .mfc-nav__dropdown-panel:not([hidden]),
.fe-module-shell .sfx-nav__dropdown-panel:not([hidden]),
.fe-module-shell .anx-nav__dropdown-panel:not([hidden]) {
  display: flex !important;
}

.fe-module-shell .mfc-nav__dropdown-panel--mega:not([hidden]),
.fe-module-shell .sfx-nav__dropdown-panel--mega:not([hidden]),
.fe-module-shell .anx-nav__dropdown-panel--mega:not([hidden]) {
  display: block !important;
}

.fe-module-shell .mfc-nav__actions,
.fe-module-shell .sfx-nav__actions,
.fe-module-shell .anx-nav__actions,
.fe-module-shell .ent-xp-nav__right {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

/* Shared link language */
.fe-module-shell .mfc-nav__link,
.fe-module-shell .sfx-nav-link,
.fe-module-shell .anx-nav__link,
.fe-module-shell .ent-xp-nav__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border-radius: 0.35rem !important;
  font-size: 0.8125rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  color: rgba(226, 232, 240, 0.72) !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.fe-module-shell .mfc-nav__link:hover,
.fe-module-shell .sfx-nav-link:hover,
.fe-module-shell .anx-nav__link:hover,
.fe-module-shell .ent-xp-nav__links a:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.fe-module-shell .mfc-nav__link.is-active,
.fe-module-shell .mfc-nav__link.is-open,
.fe-module-shell .sfx-nav-link.is-active,
.fe-module-shell .sfx-nav-link.is-open,
.fe-module-shell .anx-nav__link.is-active,
.fe-module-shell .anx-nav__link.is-open,
.fe-module-shell .ent-xp-nav__links a.is-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 -2px 0 var(--fe-mod-accent, #94a3b8) !important;
}

.fe-module-shell .mfc-nav__action,
.fe-module-shell .sfx-nav-search-icon,
.fe-module-shell .anx-nav__action,
.fe-module-shell .ent-xp-nav__icon-btn,
.fe-module-shell .fe-mod-nav-toggle,
.fe-module-shell .ent-xp-nav__toggle {
  width: 2.15rem;
  height: 2.15rem;
  min-width: 2.15rem;
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(226, 232, 240, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  text-decoration: none;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
}

.fe-module-shell .ent-xp-nav__search-bar {
  height: 2.15rem;
  min-width: 2.15rem;
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: rgba(226, 232, 240, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.fe-module-shell .mfc-nav__action:hover,
.fe-module-shell .sfx-nav-search-icon:hover,
.fe-module-shell .anx-nav__action:hover,
.fe-module-shell .ent-xp-nav__icon-btn:hover,
.fe-module-shell .ent-xp-nav__search-bar:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.fe-module-shell .anx-nav__kbd,
.fe-module-shell .ent-xp-nav__search-bar kbd {
  display: none;
}

.fe-module-shell .fe-mod-nav-toggle,
.fe-module-shell .ent-xp-nav__toggle {
  display: none;
}

.fe-module-shell .ent-xp-nav__drawer {
  display: none;
}

/* —— Movies: warm charcoal + brass —— */
.fe-module-shell .mfc-nav {
  --fe-mod-accent: #c4a35a;
  background: #0c0b0a;
  border-bottom: 1px solid rgba(196, 163, 90, 0.22);
}

.fe-module-shell .mfc-nav-brand,
.fe-module-shell .mfc-nav .mfc-nav-brand {
  font-family: inherit !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #c4a35a !important;
  text-shadow: none !important;
  padding: 0.25rem 0.55rem;
  border-left: 2px solid #c4a35a;
  margin-right: 0.35rem;
}

/* —— Series: cool navy + indigo —— */
.fe-module-shell .sfx-nav {
  --fe-mod-accent: #8b9cf7;
  background: #0a0c14;
  border-bottom: 1px solid rgba(139, 156, 247, 0.22);
}

.fe-module-shell .sfx-logo,
.fe-module-shell .sfx-logo span {
  font-family: inherit !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #8b9cf7 !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: unset !important;
  text-shadow: none !important;
  padding: 0.25rem 0.55rem;
  border-left: 2px solid #8b9cf7;
}

/* —— Anime: deep ink + rose —— */
.fe-module-shell .anx-nav {
  --fe-mod-accent: #d4a5c9;
  background: #0d0b10;
  border-bottom: 1px solid rgba(212, 165, 201, 0.22);
}

.fe-module-shell .anx-nav__brand,
.fe-module-shell .anx-nav__brand span {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #d4a5c9 !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: unset !important;
  text-shadow: none !important;
  padding: 0.25rem 0.55rem;
  border-left: 2px solid #d4a5c9;
}

.fe-module-shell .anx-nav__action {
  gap: 0;
  padding-inline: 0;
}

/* —— Entertainment hub —— */
.fe-module-shell .ent-xp-nav {
  --fe-mod-accent: #a78bfa;
  position: sticky;
  top: 0;
  z-index: 60;
  background: #0b0c10;
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.fe-module-shell .ent-xp-nav__inner {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  grid-template-columns: none !important;
  gap: 0.35rem 0.5rem;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.fe-module-shell .ent-xp-nav .fe-mod-header__site {
  padding-right: 0.55rem;
  margin-right: 0.2rem;
}

.fe-module-shell .ent-xp-nav__brand {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto !important;
  flex-shrink: 0;
  gap: 0;
  margin: 0 !important;
  min-width: max-content;
  max-width: none !important;
  z-index: 2;
}

.fe-module-shell .ent-xp-nav__brand::before,
.fe-module-shell .ent-xp-nav__brand::after {
  content: none !important;
  display: none !important;
}

.fe-module-shell .ent-xp-nav__logo {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.fe-module-shell .ent-xp-nav__brand-text {
  display: flex;
  flex-direction: column;
}

.fe-module-shell .ent-xp-nav__brand-main {
  display: inline-block !important;
  position: static !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #a78bfa !important;
  padding: 0.25rem 0.55rem;
  border-left: 2px solid #a78bfa;
  line-height: 1.2;
  white-space: nowrap;
}

.fe-module-shell .ent-xp-nav__brand-sub {
  display: none !important;
}

.fe-module-shell .ent-xp-nav__links {
  position: relative !important;
  display: flex !important;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start !important;
  justify-self: auto !important;
  gap: 0.05rem;
  min-width: 0;
  max-width: 100%;
  margin: 0 !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  /* Must clip — never paint over search / actions */
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.25rem), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.25rem), transparent 100%);
}

.fe-module-shell .ent-xp-nav__links::-webkit-scrollbar {
  display: none;
}

.fe-module-shell .ent-xp-nav__links a {
  flex: 0 0 auto;
}

.fe-module-shell .ent-xp-nav__right {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  background: #0b0c10;
  padding-left: 0.15rem;
}

.fe-module-shell .ent-xp-nav__search-bar {
  width: auto !important;
  max-width: 12.5rem;
  min-width: 2.15rem !important;
  height: 2.15rem !important;
  padding: 0 0.75rem !important;
  gap: 0.45rem;
  border-radius: 0.4rem;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.fe-module-shell .ent-xp-nav__search-bar span {
  display: inline;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fe-module-shell .ent-xp-nav__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Mega menu panel polish per vertical */
.fe-module-shell .mfc-nav__dropdown-panel {
  border-color: rgba(196, 163, 90, 0.28) !important;
  background: #12110f !important;
}

.fe-module-shell .sfx-nav__dropdown-panel {
  border-color: rgba(139, 156, 247, 0.28) !important;
  background: #10121a !important;
}

.fe-module-shell .anx-nav__dropdown-panel {
  border-color: rgba(212, 165, 201, 0.28) !important;
  background: #141018 !important;
}

/* Kill legacy gold-pill / neon rules */
.fe-module-shell .mfc-nav a.is-active,
.fe-module-shell .mfc-nav__primary .mfc-nav__link.is-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  background-image: none !important;
}

.fe-module-shell .sfx-nav__primary .sfx-nav-link.is-active,
.fe-module-shell .anx-nav__primary .anx-nav__link.is-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  background-image: none !important;
}

/* ========== Responsive ========== */
@media (max-width: 1280px) {
  .fe-module-shell .ent-xp-nav__search-bar span,
  .fe-module-shell .ent-xp-nav__search-bar kbd {
    display: none !important;
  }

  .fe-module-shell .ent-xp-nav__search-bar {
    width: 2.15rem !important;
    max-width: 2.15rem;
    padding: 0 !important;
  }

  .fe-module-shell .ent-xp-nav__links {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

@media (max-width: 1100px) {
  .fe-module-shell .ent-xp-nav__search-bar {
    width: 2.15rem !important;
    max-width: 2.15rem;
    padding: 0 !important;
  }
}

@media (max-width: 980px) {
  .fe-module-shell .mfc-nav__primary,
  .fe-module-shell .sfx-nav__primary,
  .fe-module-shell .anx-nav__primary,
  .fe-module-shell .ent-xp-nav__links {
    display: none;
  }

  .fe-module-shell .mfc-nav-inner--enterprise .fe-mod-nav-toggle,
  .fe-module-shell .sfx-nav-inner--enterprise .fe-mod-nav-toggle,
  .fe-module-shell .anx-nav__inner--enterprise .fe-mod-nav-toggle,
  .fe-module-shell .ent-xp-nav__toggle {
    display: inline-flex;
  }

  .fe-module-shell .ent-xp-nav__inner {
    flex-wrap: wrap;
  }

  .fe-module-shell .ent-xp-nav.is-open .ent-xp-nav__drawer,
  .fe-module-shell .ent-xp-nav.is-open .ent-xp-nav__drawer[hidden] {
    display: grid;
    width: 100%;
    order: 8;
    gap: 0;
    padding: 0.35rem 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .fe-module-shell .ent-xp-nav.is-open .ent-xp-nav__drawer a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.5rem 0.15rem;
    color: rgba(226, 232, 240, 0.86);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 550;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .fe-module-shell .ent-xp-nav.is-open .ent-xp-nav__drawer a.is-active {
    color: #fff;
    box-shadow: inset 3px 0 0 var(--fe-mod-accent);
  }
}

@media (min-width: 981px) {
  .fe-module-shell .ent-xp-nav__inner {
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  .fe-module-shell .ent-xp-nav__right {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    margin-left: auto !important;
  }
}

@media (max-width: 720px) {
  .fe-module-shell .mfc-nav-inner--enterprise,
  .fe-module-shell .sfx-nav-inner--enterprise,
  .fe-module-shell .anx-nav__inner--enterprise,
  .fe-module-shell .ent-xp-nav__inner {
    padding-inline: 0.75rem;
    gap: 0.4rem;
  }

  .fe-module-shell .fe-mod-header__site-name {
    max-width: 6.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fe-module-shell .anx-nav__action[aria-label="Profile"] {
    display: none;
  }
}

@supports (padding: max(0px)) {
  .fe-module-shell .mfc-nav-inner--enterprise,
  .fe-module-shell .sfx-nav-inner--enterprise,
  .fe-module-shell .anx-nav__inner--enterprise,
  .fe-module-shell .ent-xp-nav__inner {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
}
