/**
 * Platform 33.3 — Entertainment Hub mockup parity overrides
 */
.ent-xp-body { background: #05070a; }
.ent-xp-hub { background: #05070a; }

/* Nav */
.ent-xp-nav {
  background: rgba(5, 7, 10, 0.94);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.ent-xp-nav__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1440px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.ent-xp-nav__brand {
  flex-direction: row;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}
.ent-xp-nav__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff, #5b21b6);
  color: #fff;
  font-size: .9rem;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.35);
}
.ent-xp-nav__brand-text { display: flex; flex-direction: column; }
.ent-xp-nav__brand-main { font-size: .9375rem; color: #fff; }
.ent-xp-nav__brand-sub { font-size: .5625rem; letter-spacing: .16em; color: #8b95a8; margin-top: .12rem; }
.ent-xp-nav__links {
  flex: 1;
  justify-content: center;
  gap: .1rem;
}
.ent-xp-nav__links a {
  color: #a3adc0;
  font-weight: 500;
  font-size: .8125rem;
  padding: .5rem .75rem;
}
.ent-xp-nav__links a.is-active {
  color: #fff;
  background: rgba(124, 92, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.25);
}
.ent-xp-nav__right {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}
.ent-xp-nav__search-bar {
  width: min(360px, 28vw);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #8b95a8;
}

/* Hero */
.ent-xp-hero,
.ent-xp-hero__slides {
  min-height: clamp(520px, 68vh, 780px);
}
.ent-xp-hero__overlay {
  background:
    linear-gradient(90deg, rgba(5,7,10,.97) 0%, rgba(5,7,10,.82) 38%, rgba(5,7,10,.25) 68%, rgba(5,7,10,.45) 100%),
    linear-gradient(0deg, rgba(5,7,10,.98) 0%, rgba(5,7,10,.2) 50%, rgba(5,7,10,.35) 100%);
}
.ent-xp-hero__layout {
  min-height: clamp(520px, 68vh, 780px);
  padding-bottom: calc(2.5rem + 3rem);
  max-width: 1440px;
  margin: 0 auto;
}
.ent-xp-hero__content { max-width: 580px; padding-top: 6rem; }
.ent-xp-hero__label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #f59e0b;
  font-size: .6875rem;
  letter-spacing: .14em;
}
.ent-xp-hero__title {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  max-width: 14ch;
  color: #fff;
}
.ent-xp-hero__meta {
  color: #c8d0de;
  font-size: .875rem;
}
.ent-xp-hero__meta > span + span::before {
  content: '•';
  margin: 0 .55rem;
  opacity: .45;
}
.ent-xp-hero__rating i { color: #f59e0b; }
.ent-xp-hero__synopsis { color: #b4bdd0; line-height: 1.6; }
.ent-xp-hero__btn-primary {
  padding: .75rem 1.5rem;
  background: linear-gradient(135deg, #7c5cff, #6d28d9);
  border: none;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.ent-xp-hero__btn-secondary {
  padding: .75rem 1.25rem;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  color: #eef0f8;
}
.ent-xp-provider-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .75rem;
  overflow: hidden;
}
.ent-xp-provider-logo img { width: 100%; height: 100%; object-fit: cover; }
.ent-xp-provider-logo--netflix { background: #e50914; }
.ent-xp-provider-logo--prime-video { background: #00a8e1; }
.ent-xp-provider-logo--disney-plus { background: #113ccf; }
.ent-xp-provider-logo--max { background: #002be7; }
.ent-xp-provider-logo--apple-tv { background: #1d1d1f; }
.ent-xp-provider-logo--youtube { background: #ff0000; }

.ent-xp-hero__playlist {
  right: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
  bottom: calc(2.5rem + 3.5rem);
  width: 200px;
  gap: .55rem;
}
.ent-xp-hero__playlist-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .4rem;
  border-radius: 12px;
  background: rgba(5, 7, 10, 0.65);
}
.ent-xp-hero__playlist-item.is-active {
  border-color: #7c5cff;
  background: rgba(124, 92, 255, 0.18);
}
.ent-xp-hero__playlist-thumb {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
}
.ent-xp-hero__playlist-thumb img,
.ent-xp-hero__playlist-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ent-xp-hero__playlist-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .2s;
  font-size: .75rem;
  color: #fff;
}
.ent-xp-hero__playlist-item.is-active .ent-xp-hero__playlist-play,
.ent-xp-hero__playlist-item:hover .ent-xp-hero__playlist-play { opacity: 1; }
.ent-xp-hero__playlist-title {
  font-size: .75rem;
  color: #eef0f8;
}

.ent-xp-hero__controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ent-xp-hero__arrow {
  position: static;
  transform: none;
  width: 36px;
  height: 36px;
  background: rgba(5,7,10,.75);
  backdrop-filter: blur(8px);
}
.ent-xp-hero__dots { display: flex; align-items: center; gap: .45rem; }
.ent-xp-hero__dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: #7c5cff;
}
.ent-xp-hero__progress-bar { background: #7c5cff; }

/* Hub cards */
.ent-xp-hub-row { gap: 1rem; margin-bottom: 2rem; }
.ent-xp-hub-card {
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.ent-xp-hub-card--movies {
  background: linear-gradient(145deg, rgba(212,175,55,.12) 0%, rgba(255,255,255,.02) 60%);
  border-color: rgba(212,175,55,.28);
}
.ent-xp-hub-card--series {
  background: linear-gradient(145deg, rgba(168,85,247,.12) 0%, rgba(255,255,255,.02) 60%);
  border-color: rgba(168,85,247,.28);
}
.ent-xp-hub-card--anime {
  background: linear-gradient(145deg, rgba(34,211,238,.1) 0%, rgba(255,255,255,.02) 60%);
  border-color: rgba(34,211,238,.25);
}
.ent-xp-hub-card__top {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: .85rem;
}
.ent-xp-hub-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 0;
}
.ent-xp-hub-card__title-link { text-decoration: none; color: inherit; }
.ent-xp-hub-card__links a {
  color: #8b95a8;
  text-decoration: none;
  font-size: .6875rem;
}
.ent-xp-hub-card__links a:hover { color: #c8d0de; }
.ent-xp-hub-card__links a:not(:last-child)::after {
  content: '·';
  margin-left: .5rem;
  opacity: .5;
}
.ent-xp-continue { grid-template-columns: 56px 1fr; }
.ent-xp-continue__thumb img,
.ent-xp-continue__fallback { width: 56px; height: 76px; }
.ent-xp-continue__title { font-size: .8125rem; color: #fff; }
.ent-xp-continue__empty { margin: 0; font-size: .8125rem; color: #8b95a8; }

/* AI picks */
.ent-xp-ai-picks {
  padding: 1.35rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,92,255,.14) 0%, rgba(5,7,10,.6) 55%, rgba(45,212,191,.05) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.ent-xp-ai-picks__head { align-items: center; margin-bottom: 1.15rem; }
.ent-xp-ai-picks__title { color: #c4b5fd; font-size: 1.0625rem; }
.ent-xp-ai-picks__refresh {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #eef0f8;
  font-size: .8125rem;
  cursor: pointer;
}
.ent-xp-ai-picks__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.ent-xp-ai-pick__link {
  display: flex;
  gap: .75rem;
  padding: .65rem;
  border-radius: 12px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  color: inherit;
}
.ent-xp-ai-pick__link:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(124,92,255,.25);
}
.ent-xp-ai-pick__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
}
.ent-xp-ai-pick__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ent-xp-ai-pick__reason { font-size: .625rem; color: #8b95a8; }
.ent-xp-ai-pick__title { font-size: .8125rem; color: #fff; }

/* Shelves */
.ent-xp-shelf__head { margin-bottom: 1rem; }
.ent-xp-shelf__title { font-size: 1.125rem; color: #fff; }
.ent-xp-shelf__title .fa-fire { color: #f59e0b; }
.ent-xp-shelf__actions { display: flex; align-items: center; gap: .5rem; }
.ent-xp-shelf__see-all { font-size: .8125rem; color: #8b95a8; text-decoration: none; margin-right: .25rem; }
.ent-xp-shelf__see-all:hover { color: #fff; }

.ent-xp-shelf__wrap { position: relative; }

.ent-xp-shelf__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8,10,18,.92);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .8125rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  opacity: 1;
  pointer-events: auto;
  transition: background .2s, border-color .2s, opacity .2s;
}
.ent-xp-shelf__nav--prev { left: .35rem; }
.ent-xp-shelf__nav--next { right: .35rem; }
.ent-xp-shelf__nav:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
}
.ent-xp-shelf__nav.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}
.ent-xp-shelf__track {
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-left: 2.75rem;
  padding-right: 2.75rem;
}
.ent-xp-shelf__track::-webkit-scrollbar { display: none; height: 0; }

.ent-xp-shelf__arrow { display: none !important; }

/* Cards */
.ent-xp-card__frame {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.ent-xp-card__score {
  background: rgba(245, 158, 11, .92);
  color: #1a1200;
  font-weight: 800;
  border-radius: 6px;
}
.ent-xp-card__body {
  padding-top: .65rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: auto;
}
.ent-xp-card__title { font-size: .875rem; color: #fff; }
.ent-xp-card__meta { font-size: .6875rem; color: #8b95a8; margin: 0; }
.ent-xp-card__module { position: static; }

/* Floating dock pill */
.ent-xp-dock {
  gap: 0;
  padding: .35rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(5, 7, 10, 0.88);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}
.ent-xp-dock__btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #a3adc0;
}
.ent-xp-dock__btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.ent-xp-dock__btn--ai { color: #c4b5fd; }
.ent-xp-dock__btn--ai:hover { background: rgba(124,92,255,.25); color: #e9d5ff; }

.ent-wrap-wide { max-width: 1440px; padding-left: 1.5rem; padding-right: 1.5rem; }
.ent-xp-page { padding-top: 2rem; padding-bottom: 4rem; }

@media (max-width: 1280px) {
  .ent-xp-nav__search-bar span { display: none; }
  .ent-xp-nav__search-bar { width: auto; min-width: 42px; justify-content: center; padding-inline: .75rem; }
  .ent-xp-hero__playlist { display: none; }
  .ent-xp-ai-picks__row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile hub layout (/entertainment) — fit viewport, no horizontal bleed ── */
@media (max-width: 900px) {
  .ent-xp-ai-picks__row { grid-template-columns: 1fr; }

  body.ent-xp-body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .ent-xp-hub {
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
  }

  .ent-xp-nav {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .ent-xp-hero {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 0;
  }

  .ent-xp-hero__slides,
  .ent-xp-hero__slide,
  .ent-xp-hero__bg,
  .ent-xp-hero__bg img {
    max-width: 100%;
  }

  .ent-xp-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
  }

  .ent-wrap-wide {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  /* Nav: brand + actions on top, scrollable links below (keep all links visible) */
  .ent-xp-nav__inner {
    display: flex !important;
    grid-template-columns: unset !important;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .65rem;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: .55rem max(1rem, env(safe-area-inset-left, 0px)) .45rem max(1rem, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .ent-xp-nav__brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 7rem);
  }

  .ent-xp-nav__brand-main {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ent-xp-nav__brand-sub {
    display: none;
  }

  .ent-xp-nav__links {
    display: flex !important;
    flex: 1 1 100%;
    order: 3;
    gap: .2rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: .15rem 0 .35rem;
    margin: 0;
    box-sizing: border-box;
  }

  .ent-xp-nav__links::-webkit-scrollbar {
    display: none;
  }

  .ent-xp-nav__links a {
    flex-shrink: 0;
    font-size: .75rem;
    padding: .4rem .62rem;
  }

  .ent-xp-nav__right {
    flex-shrink: 0;
    margin-left: auto;
    max-width: 100%;
  }

  .ent-xp-nav__search-bar {
    display: none;
  }

  .ent-xp-nav__signin {
    font-size: .75rem;
    padding: .4rem .7rem;
    white-space: nowrap;
  }

  .ent-xp-nav__icon-btn,
  .ent-xp-nav__avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  /* Hero: shorter, content anchored to bottom */
  .ent-xp-hero,
  .ent-xp-hero__slides,
  .ent-xp-hero__layout {
    min-height: clamp(380px, 62vh, 520px);
  }

  .ent-xp-hero__layout {
    align-items: flex-end;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 max(1rem, env(safe-area-inset-left, 0px)) 2.75rem max(1rem, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .ent-xp-hero__content {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .ent-xp-hero__title {
    max-width: 100%;
    font-size: clamp(1.5rem, 7vw, 2rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .ent-xp-hero__synopsis {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .8125rem;
    margin-bottom: .85rem;
    max-width: 100%;
  }

  .ent-xp-hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    width: 100%;
    max-width: 100%;
  }

  .ent-xp-hero__actions .ent-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding: .65rem .75rem;
    font-size: .8125rem;
    box-sizing: border-box;
  }

  .ent-xp-hero__actions .ent-xp-hero__btn-primary {
    grid-column: 1 / -1;
  }

  .ent-xp-hero__meta {
    font-size: .75rem;
    gap: .35rem .5rem;
    max-width: 100%;
  }

  .ent-xp-hero__providers {
    margin-top: .75rem;
    max-width: 100%;
  }

  .ent-xp-hero__provider-row {
    flex-wrap: wrap;
  }

  .ent-xp-hero__controls {
    display: flex !important;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: .85rem;
    gap: .65rem;
    max-width: calc(100% - 2rem);
  }

  .ent-xp-hero__arrow {
    display: none;
  }

  .ent-xp-hero__overlay {
    background:
      linear-gradient(0deg, rgba(5, 7, 10, .98) 0%, rgba(5, 7, 10, .55) 42%, rgba(5, 7, 10, .2) 100%),
      linear-gradient(90deg, rgba(5, 7, 10, .92) 0%, rgba(5, 7, 10, .35) 100%);
  }

  .ent-xp-page {
    padding-top: 1.25rem;
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }

  .ent-xp-hub-row {
    grid-template-columns: 1fr;
    gap: .75rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ent-xp-hub-card {
    padding: 1rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ent-xp-hub-card__links {
    flex-wrap: wrap;
    row-gap: .25rem;
  }

  .ent-xp-hub-card--continue {
    grid-column: auto;
  }

  /* AI picks */
  .ent-xp-ai-picks {
    padding: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ent-xp-ai-picks__head {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }

  .ent-xp-ai-picks__refresh {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .ent-xp-ai-pick,
  .ent-xp-ai-pick__link {
    min-width: 0;
    max-width: 100%;
  }

  .ent-xp-ai-pick__link {
    align-items: center;
  }

  .ent-xp-ai-pick__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Shelves */
  .ent-xp-shelf {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .ent-xp-shelf__head {
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    max-width: 100%;
  }

  .ent-xp-shelf__title {
    font-size: 1rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ent-xp-shelf__actions {
    flex-shrink: 0;
  }

  .ent-xp-shelf__wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .ent-xp-shelf__track {
    gap: .65rem;
    padding-bottom: .25rem;
    max-width: 100%;
  }

  .ent-xp-card {
    flex: 0 0 124px;
    min-width: 0;
    max-width: 42vw;
  }

  .ent-xp-card:hover .ent-xp-card__frame {
    transform: none;
  }

  .ent-xp-card__title {
    font-size: .8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ent-xp-card__body {
    min-width: 0;
    max-width: 100%;
  }

  /* Floating dock — compact, safe area */
  .ent-xp-dock {
    right: max(.75rem, env(safe-area-inset-right, 0px));
    bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
    border-radius: 999px;
    max-width: calc(100% - 1.5rem);
  }

  .ent-xp-dock__btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .ent-xp-search-modal {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .ent-xp-search-panel {
    width: min(680px, 100%);
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .ent-xp-hero,
  .ent-xp-hero__slides,
  .ent-xp-hero__layout {
    min-height: clamp(340px, 58vh, 460px);
  }

  .ent-xp-hero__actions {
    grid-template-columns: 1fr;
  }

  .ent-xp-hero__actions .ent-xp-hero__btn-primary {
    grid-column: auto;
  }

  .ent-xp-card {
    flex: 0 0 112px;
  }

  .ent-xp-nav__brand-main {
    font-size: .875rem;
  }

  .ent-xp-nav__logo {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 390px) {
  .ent-xp-card {
    flex: 0 0 106px;
  }

  .ent-xp-ai-pick__thumb {
    width: 64px;
    height: 44px;
  }
}
