* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #090b10;
  color: #fff;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  overflow: hidden;
}

header {
  height: 78px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid #242833;
  background: #10131a;
  gap: 40px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 222px;
  overflow: visible;
}

.brand-logo {
  display: block;
  width: 206px;
  height: 66px;
  object-fit: contain;
  object-position: left center;
  transform-origin: left center;
  animation: silmar-logo-arrival 820ms cubic-bezier(.18,.82,.27,1) both;
}

@keyframes silmar-logo-arrival {
  0% {
    opacity: 0;
    transform: translateX(-84px) scale(.72);
  }

  72% {
    opacity: 1;
    transform: translateX(5px) scale(1.07);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo {
    animation: none;
  }
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand small {
  color: #8c93a2;
}

nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav {
  border: 0;
  background: transparent;
  color: #9da3af;
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 15px;
}

.nav.active {
  background: #242936;
  color: #fff;
}

#status {
  color: #8d95a5;
  font-size: 13px;
}

main {
  height: calc(100vh - 78px);
  display: grid;
  grid-template-columns:
    minmax(220px, 20%)
    minmax(340px, 30%)
    1fr;
}

aside,
.channels-panel,
.player-panel {
  min-width: 0;
}

aside {
  background: #10131a;
  border-right: 1px solid #242833;
  padding: 20px 12px;
  overflow: hidden;
}

.title {
  padding: 0 12px 12px;
  font-size: 12px;
  color: #707887;
  font-weight: 700;
  letter-spacing: 1px;
}

.search {
  padding: 0 8px 14px;
}

.search input {
  width: 100%;
  border: 1px solid #2a303d;
  outline: none;
  background: #171b23;
  color: white;
  padding: 13px;
  border-radius: 10px;
}

#categories {
  overflow-y: auto;
  height: calc(100% - 75px);
}

.category {
  padding: 13px 14px;
  border-radius: 9px;
  color: #aab0bd;
  cursor: pointer;
  margin: 2px 0;
}

.category:hover,
.category.active,
.category:focus {
  background: #272c38;
  color: white;
  outline: none;
}

.channels-panel {
  border-right: 1px solid #242833;
  background: #0d1016;
  display: flex;
  flex-direction: column;
}

.panel-title {
  padding: 22px;
  border-bottom: 1px solid #20242e;
}

.panel-title h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

.panel-title span {
  color: #7f8796;
  font-size: 13px;
}

#channels {
  overflow-y: auto;
  padding: 8px;
}

.channel {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px;
  border-radius: 10px;
  cursor: pointer;
}

.channel:hover,
.channel:focus,
.channel.active {
  background: #242936;
  outline: none;
}

.channel-logo {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 8px;
  object-fit: contain;
}

.channel-logo-fallback {
  width: 48px;
  height: 48px;
  background: #242a36;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.channel-name {
  font-size: 14px;
  font-weight: 600;
}

.channel-id {
  color: #737b89;
  font-size: 11px;
  margin-top: 4px;
}

.channel-info {
  min-width: 0;
  flex: 1;
}

.channel-program,
.channel-program-next {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-program {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #dce2ed;
  font-size: 11px;
  margin-top: 5px;
}

.channel-program-label {
  color: #0d1016;
  background: #f2c14e;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  padding: 3px 4px;
  flex: 0 0 auto;
}

.channel-program-next {
  color: #7f8796;
  font-size: 10px;
  margin-top: 3px;
}

.player-panel {
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, #171c27, #090b10 55%);
  overflow-y: auto;
}

.player {
  /* 65vh é a altura máxima. Sem limitar a largura junto, a caixa
     ficava mais larga que 16:9 e aparentava cortar a transmissão. */
  width: min(100%, 115.56vh);
  max-width: 115.56vh;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  max-height: 65vh;
  background: #050608;
  border: 1px solid #252a34;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.player-empty {
  color: #747c8b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.player-empty strong {
  color: #c6cad2;
}

.play-icon {
  font-size: 40px;
  opacity: .45;
}

.now {
  margin-top: 22px;
}

.now > span {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  background: #fff;
  color: #111;
  padding: 5px 8px;
  border-radius: 5px;
}

.now h2 {
  margin: 10px 0 5px;
}

.now p {
  margin: 0;
  color: #858d9c;
}

.remote-help {
  display: flex;
  gap: 20px;
  margin-top: 28px;
  color: #626a79;
  font-size: 12px;
}

.loading {
  color: #737b89;
  padding: 20px;
}

@media (max-width: 900px) {
  header nav {
    display: none;
  }

  main {
    grid-template-columns: 34% 66%;
  }

  .player-panel {
    display: none;
  }
}

.channel-info {
  min-width: 0;
  flex: 1;
}

.favorite {
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #697180;
  font-size: 27px;
  cursor: pointer;
  border-radius: 8px;
}

.favorite:hover,
.favorite:focus {
  background: #303644;
  color: #fff;
  outline: none;
}

.favorite.on {
  color: #ffd43b;
}

.player {
  position: relative;
}

.external-live-player {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  background: #000;
  border-radius: inherit;
}

@media (max-width: 640px) {
  .external-live-player {
    min-height: 220px;
  }
}

#video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain !important;
  object-position: center center;
}

.player-hover-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 12;
  display: flex;
  gap: 8px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease;
}

.player:hover .player-hover-controls,
.player:focus-within .player-hover-controls,
.player.show-controls .player-hover-controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.player-hover-controls button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,.76);
  font-size: 17px;
  cursor: pointer;
}

.player-hover-controls button:hover,
.player-hover-controls button:focus-visible {
  border-color: #42d77d;
  background: rgba(19,29,30,.96);
  outline: none;
}

@media (max-width: 700px) {
  .player-hover-controls {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.player-empty {
  position: absolute;
  inset: 0;
  justify-content: center;
}

.player-loading {
  position: absolute;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.78);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.empty-list {
  padding: 50px 20px;
  text-align: center;
  color: #737b89;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-list > div {
  font-size: 40px;
}

.empty-list strong {
  color: #c6cad2;
}

.nav.disabled {
  opacity: .45;
  cursor: default;
}

.live-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 5px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2d2d;
  box-shadow: 0 0 8px rgba(255,45,45,.8);
}

.enable-sound {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 55px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  background: rgba(0,0,0,.82);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.enable-sound:hover,
.enable-sound:focus {
  background: rgba(20,20,20,.95);
  outline: 2px solid rgba(255,255,255,.35);
}

/* ==========================================
   ROLAGEM WEBTV
   ========================================== */

/* A página pode rolar normalmente */
html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/*
  Dentro de layouts flex/grid, min-height: 0
  permite que os elementos internos tenham scroll.
*/
main,
.main,
.app,
.content,
.layout,
.sidebar,
.channels,
.channel-list,
.categories,
.category-list {
  min-height: 0;
}

/* Lista de categorias */
#categories,
.categories,
.category-list {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Lista de canais */
#channels,
.channels,
.channel-list {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/*
  Melhora bastante o uso em telas touch,
  tablets e navegadores de Smart TV.
*/
#categories,
#channels,
.categories,
.channels,
.category-list,
.channel-list {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}



/* ==========================================================
   SCROLL INTERNO DEFINITIVO
   Categorias + canais independentes
   ========================================================== */

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}

body {
  min-height: 0 !important;
}

/* Área abaixo do cabeçalho */
main {
  height: calc(100vh - 78px);
  min-height: 0 !important;
  overflow: hidden !important;
}

/* As três colunas ficam limitadas à altura disponível */
aside,
.channels-panel,
.player-panel {
  height: 100%;
  min-height: 0 !important;
  overflow: hidden;
}

/* --------------------------
   CATEGORIAS
   -------------------------- */

aside {
  display: flex;
  flex-direction: column;
}

/* Título e busca permanecem parados */
aside .title,
aside .search {
  flex: 0 0 auto;
}

/* Somente as categorias rolam */
#categories {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0 !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  scrollbar-width: thin;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* --------------------------
   CANAIS
   -------------------------- */

.channels-panel {
  display: flex;
  flex-direction: column;
}

/* Título da categoria permanece parado */
.channels-panel .panel-title {
  flex: 0 0 auto;
}

/* Somente a lista de canais rola */
#channels {
  flex: 1 1 0;
  min-height: 0 !important;
  height: 0;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  padding: 8px;

  scrollbar-width: thin;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* --------------------------
   PLAYER
   -------------------------- */

.player-panel {
  overflow-y: auto;
  overscroll-behavior: contain;
}


/* Scrollbar no Chrome / Edge */
#categories::-webkit-scrollbar,
#channels::-webkit-scrollbar {
  width: 8px;
}

#categories::-webkit-scrollbar-track,
#channels::-webkit-scrollbar-track {
  background: transparent;
}

#categories::-webkit-scrollbar-thumb,
#channels::-webkit-scrollbar-thumb {
  background: #343a48;
  border-radius: 20px;
}

#categories::-webkit-scrollbar-thumb:hover,
#channels::-webkit-scrollbar-thumb:hover {
  background: #555e70;
}


/* ==========================================
   LOGOS DOS CANAIS
   ========================================== */

.channel-logo,
.channel-logo-fallback {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 9px;
}

/* Logo real */
.channel-logo {
  background: #171b23 !important;
  object-fit: contain !important;
  padding: 5px;
}

/* Canal realmente sem logo */
.channel-logo-fallback {
  background: #171b23 !important;
  color: #707887;
  display: grid;
  place-items: center;
  font-size: 20px;
}



/* ==========================================================
   FILMES
   ========================================================== */

.movie-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 6px;
}

.movie-card {
  min-width: 0;
  cursor: pointer;
  border-radius: 11px;
  padding: 6px;
  transition:
    background .15s ease,
    transform .15s ease;
}

.movie-card:hover,
.movie-card:focus,
.movie-card.active {
  background: #242936;
  outline: none;
}

.movie-card:hover {
  transform: translateY(-2px);
}

.movie-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 9px;
  background: #171b23;
}

.movie-poster {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #171b23;
}

.movie-poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 38px;
  background:
    linear-gradient(
      145deg,
      #202631,
      #11151c
    );
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform:
    translate(-50%, -50%)
    scale(.88);

  border-radius: 50%;
  display: grid;
  place-items: center;

  background: rgba(0,0,0,.72);
  color: #fff;

  font-size: 19px;

  opacity: 0;

  transition:
    opacity .15s ease,
    transform .15s ease;

  pointer-events: none;
}

.movie-card:hover .movie-play,
.movie-card:focus .movie-play,
.movie-card.active .movie-play {
  opacity: 1;
  transform:
    translate(-50%, -50%)
    scale(1);
}

.movie-title {
  padding: 8px 3px 5px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;

  overflow: hidden;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (min-width: 1500px) {
  .movie-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}



/* ==========================================================
   DETALHES DAS SÉRIES
   ========================================================== */

.series-details {
  padding: 8px;
}

.series-back {
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 11px 13px;
  margin-bottom: 15px;

  background: #1b202a;
  color: #cbd0da;

  text-align: left;
  cursor: pointer;
}

.series-back:hover,
.series-back:focus {
  background: #292f3c;
  color: #fff;
  outline: none;
}


.series-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}


.series-detail-cover {
  width: 92px;
  aspect-ratio: 2 / 3;

  object-fit: cover;

  border-radius: 9px;

  background: #171b23;

  flex: 0 0 92px;
}


.series-meta {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 7px;
}


.series-meta strong {
  font-size: 17px;
  line-height: 1.25;
}


.series-meta span {
  color: #929aa9;
  font-size: 12px;
}


.series-plot {
  color: #9ca4b2;

  font-size: 12px;
  line-height: 1.5;

  margin:
    14px 2px 18px;
}


.season-title {
  color: #747d8d;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: .8px;

  text-transform: uppercase;

  margin:
    0 2px 9px;
}


.season-selector {
  display: flex;

  gap: 7px;

  overflow-x: auto;

  padding-bottom: 10px;

  scrollbar-width: thin;
}


.season-button {
  flex: 0 0 auto;

  border: 1px solid #303744;

  background: #171b23;

  color: #aab1be;

  border-radius: 8px;

  padding: 9px 13px;

  cursor: pointer;
}


.season-button:hover,
.season-button:focus,
.season-button.active {
  background: #303746;
  color: #fff;
  outline: none;
}


.episodes {
  display: flex;
  flex-direction: column;

  gap: 5px;

  margin-top: 6px;
}


.episode {
  display: flex;

  gap: 11px;

  padding: 12px 10px;

  border-radius: 10px;

  cursor: pointer;
}


.episode:hover,
.episode:focus,
.episode.active {
  background: #242936;
  outline: none;
}


.episode-number {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #303746;

  font-size: 12px;
}


.episode-info {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 4px;
}


.episode-info strong {
  font-size: 13px;
}


.episode-info span {
  color: #7d8695;
  font-size: 11px;
}


.episode-info p {
  margin: 3px 0 0;

  color: #7f8795;

  font-size: 11px;
  line-height: 1.4;

  display: -webkit-box;

  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;

  overflow: hidden;
}


/* ===== ERRO / RETRY TV AO VIVO ===== */

.stream-error {
  width: min(420px, calc(100% - 40px));
  margin: auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.stream-error strong {
  font-size: 20px;
  color: #fff;
}

.stream-error span {
  max-width: 360px;
  color: #aab2c0;
  font-size: 14px;
  line-height: 1.5;
}

.retry-live-channel {
  margin-top: 8px;
  border: 0;
  border-radius: 9px;
  padding: 11px 18px;
  background: #fff;
  color: #11151d;
  font-weight: 700;
  cursor: pointer;
}

.retry-live-channel:hover {
  opacity: .9;
}



/* =========================================================
   FOCO TV / CONTROLE REMOTO
   ========================================================= */

.nav,
.category,
.channel,
.movie-card,
.series-card,
.season-button,
.episode-card,
.episode,
.retry-live-channel,
#series-back,
#enable-sound {
  outline: none;
}


/*
  Destaque forte para ser visível à distância
  em uma televisão.
*/
.nav:focus-visible,
.category:focus-visible,
.channel:focus-visible,
.movie-card:focus-visible,
.series-card:focus-visible,
.season-button:focus-visible,
.episode-card:focus-visible,
.episode:focus-visible,
.retry-live-channel:focus-visible,
#series-back:focus-visible,
#enable-sound:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow:
    0 0 0 5px rgba(255,255,255,.14);
}


/* Cards ganham uma pequena elevação */
.channel:focus-visible,
.movie-card:focus-visible,
.series-card:focus-visible,
.episode-card:focus-visible,
.episode:focus-visible {
  position: relative;
  z-index: 5;
}


/* Busca também precisa ficar clara na TV */
#search:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}


/*
  Em aparelhos que aplicam :focus mas não
  :focus-visible corretamente.
*/
@media (hover: none) {
  .nav:focus,
  .category:focus,
  .channel:focus,
  .movie-card:focus,
  .series-card:focus,
  .season-button:focus,
  .episode-card:focus,
  .episode:focus,
  .retry-live-channel:focus,
  #series-back:focus,
  #enable-sound:focus,
  #search:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
  }
}



/* =========================================================
   SÉRIES - INTERFACE TV
   ========================================================= */

.dream-series {
  padding-bottom: 30px;
}

.dream-series-hero {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 14px;
  margin-bottom: 26px;
}

.dream-series-cover-wrap {
  width: 185px;
}

.dream-series-cover-wrap .series-detail-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #171b23;
}

.dream-series-main {
  min-width: 0;
}

.dream-series-name {
  margin: 3px 0 10px;
  font-size: 28px;
  line-height: 1.1;
}

.dream-series-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.dream-series-tags > span {
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(255,255,255,.07);
  font-size: 12px;
  color: #cfd4dd;
}

.dream-series-plot {
  margin: 0 0 18px;
  max-width: 850px;
  color: #aeb5c0;
  line-height: 1.55;
  font-size: 14px;
}


/* CONTINUAR */

.series-continue {
  width: min(100%, 540px);
  min-height: 68px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(255,255,255,.075);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  cursor: pointer;
  text-align: left;
}

.series-continue:hover,
.series-continue:focus {
  background: rgba(255,255,255,.13);
}

.continue-play {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111;
  padding-left: 2px;
}

.continue-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.continue-text strong {
  font-size: 15px;
}

.continue-text small {
  color: #adb4bf;
  font-size: 12px;
}

.continue-percent {
  color: #cfd4dd;
  font-size: 13px;
}


/* TÍTULOS */

.dream-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 10px;
}

.dream-section-head strong {
  font-size: 17px;
}

.dream-section-head span {
  color: #8e96a3;
  font-size: 12px;
}


/* TEMPORADAS */

.dream-season-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 3px 10px;
  scroll-behavior: smooth;
}

.dream-season-selector .season-button {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 10px 14px;
  border-radius: 8px;
}


/* EPISÓDIOS */

.dream-episodes {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(230px, 1fr)
    );
  gap: 14px;
}

.dream-episode {
  display: block;
  padding: 0;
  overflow: hidden;
  border-radius: 11px;
  background: #171b23;
  border: 1px solid rgba(255,255,255,.07);
}

.dream-episode:hover,
.dream-episode:focus {
  border-color: rgba(255,255,255,.35);
}

.dream-episode-image {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(
      135deg,
      #202630,
      #11151c
    );
  overflow: hidden;
}

.dream-episode-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #d7dce5;
}

.dream-episode-placeholder strong {
  font-size: 16px;
}

.dream-episode-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  font-size: 17px;
  padding-left: 2px;
}

.episode-completed {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.episode-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255,255,255,.15);
}

.episode-progress > div {
  height: 100%;
  background: #fff;
}

.dream-episode-info {
  padding: 12px;
}

.dream-episode-info > strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 7px;
}

.dream-episode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  color: #9099a6;
}

.watch-position {
  color: #fff !important;
}

.dream-episode-info p {
  margin: 9px 0 0;
  color: #8f97a3;
  font-size: 11px;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* FOCO DO CONTROLE */

.series-continue:focus-visible,
.dream-season-selector
  .season-button:focus-visible,
.dream-episode:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}


/* TELAS MENORES */

@media (max-width: 900px) {

  .dream-series-hero {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 16px;
  }

  .dream-series-cover-wrap {
    width: 130px;
  }

  .dream-series-name {
    font-size: 22px;
  }

  .dream-episodes {
    grid-template-columns:
      repeat(
        auto-fill,
        minmax(190px, 1fr)
      );
  }
}


/* =========================================================
   INDICADOR DE FONTE - TV AO VIVO
   ========================================================= */

.live-playback-selector {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-source-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #737b89;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .35px;
  opacity: .55;
  transition:
    opacity .2s ease,
    color .2s ease;
}

.live-source-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #596170;
  box-shadow: none;
  transition:
    background .2s ease,
    box-shadow .2s ease;
}

.live-source-status.active {
  color: #d7dce5;
  opacity: 1;
}

.live-source-status.active
.live-source-dot {
  background: #42d77d;
  box-shadow:
    0 0 5px rgba(66,215,125,.65);
}

.live-source-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #aeb7c7;
  font-size: 11px;
  font-weight: 700;
}

.live-source-control select {
  max-width: 190px;
  min-height: 30px;
  border: 1px solid #384153;
  border-radius: 8px;
  padding: 4px 26px 4px 9px;
  color: #edf2fb;
  background: #171d29;
  font: inherit;
}

.live-source-control select:focus {
  outline: 2px solid rgba(66, 215, 125, .5);
  outline-offset: 1px;
}

@media (max-width: 560px) {
  .live-source-control {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .live-source-control select {
    flex: 1;
    max-width: none;
  }
}

/* ==========================================================
   FILMES V2 - FASE 5B.1
   ========================================================== */

body.movies-v2-mode main.movies-v2-main {
  grid-template-columns:
    minmax(210px, 250px)
    minmax(0, 1fr);
}

body.movies-v2-mode
main.movies-v2-main
.movies-v2-player-panel {
  display: none !important;
}

body.movies-v2-mode
main.movies-v2-main
.movies-v2-content {
  min-width: 0;
  width: 100%;
}

body.movies-v2-mode
main.movies-v2-main
.movies-v2-aside {
  min-width: 0;
}

body.movies-v2-mode #channels {
  padding-right: 4px;
}

.movie-v2-genres {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.movie-v2-genre {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 11px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  background: transparent;
  color: #b9bfca;

  font: inherit;
  text-align: left;

  cursor: pointer;
}

.movie-v2-genre span {
  opacity: .6;
  font-size: 11px;
}

.movie-v2-genre:hover,
.movie-v2-genre:focus,
.movie-v2-genre.active {
  background: #252b36;
  color: #fff;
  outline: none;
}

.movie-v2-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;

  margin-bottom: 16px;
  padding: 2px 2px 12px;

  border-bottom:
    1px solid rgba(255,255,255,.07);
}

.movie-v2-toolbar > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.movie-v2-toolbar strong {
  font-size: 18px;
}

.movie-v2-toolbar span {
  color: #8f96a3;
  font-size: 12px;
}

.movie-v2-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(145px, 1fr)
    );

  gap: 18px 14px;
}

.movie-v2-card {
  min-width: 0;

  border-radius: 10px;

  cursor: pointer;

  transition:
    transform .16s ease,
    background .16s ease;

  outline: none;
}

.movie-v2-card:hover,
.movie-v2-card:focus {
  transform: translateY(-4px);
}

.movie-v2-poster-wrap {
  position: relative;

  aspect-ratio: 2 / 3;

  overflow: hidden;

  border-radius: 10px;

  background: #151922;

  box-shadow:
    0 8px 24px rgba(0,0,0,.25);
}

.movie-v2-poster {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform .2s ease,
    filter .2s ease;
}

.movie-v2-card:hover
.movie-v2-poster,
.movie-v2-card:focus
.movie-v2-poster {
  transform: scale(1.035);
  filter: brightness(.65);
}

.movie-v2-poster-fallback {
  width: 100%;
  height: 100%;

  place-items: center;

  font-size: 40px;

  background:
    linear-gradient(
      145deg,
      #202633,
      #11151d
    );
}

.movie-v2-badges {
  position: absolute;

  left: 7px;
  right: 7px;
  bottom: 7px;

  display: flex;
  flex-wrap: wrap;
  gap: 4px;

  z-index: 2;
}

.movie-v2-badge {
  display: inline-flex;

  padding: 4px 6px;

  border-radius: 5px;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: .035em;

  color: #fff;

  backdrop-filter:
    blur(6px);
}

.movie-v2-badge.dub {
  background:
    rgba(29,126,82,.88);
}

.movie-v2-badge.leg {
  background:
    rgba(45,73,145,.9);
}

.movie-v2-card-hover {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;

  background:
    rgba(0,0,0,.25);

  transition:
    opacity .16s ease;
}

.movie-v2-card-hover span {
  padding: 8px 11px;

  border-radius: 999px;

  background:
    rgba(10,12,17,.88);

  color: #fff;

  font-size: 11px;
  font-weight: 700;
}

.movie-v2-card:hover
.movie-v2-card-hover,
.movie-v2-card:focus
.movie-v2-card-hover {
  opacity: 1;
}

.movie-v2-card-body {
  padding: 8px 2px 0;
}

.movie-v2-card-body > strong {
  display: -webkit-box;

  overflow: hidden;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  min-height: 34px;

  color: #f4f5f7;

  font-size: 13px;
  line-height: 1.3;
}

.movie-v2-meta {
  display: flex;
  flex-direction: column;

  gap: 2px;

  margin-top: 5px;

  color: #858c98;

  font-size: 10px;
}

.movie-v2-pagination {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 16px;

  padding: 28px 0 10px;
}

.movie-v2-page-button,
.movie-v2-back,
.movie-v2-watch {
  border: 0;

  border-radius: 8px;

  padding: 10px 15px;

  background: #242a35;
  color: #fff;

  font: inherit;
  font-weight: 650;

  cursor: pointer;
}

.movie-v2-page-button:hover,
.movie-v2-back:hover,
.movie-v2-watch:hover {
  background: #313846;
}

.movie-v2-page-button:disabled {
  opacity: .35;
  cursor: default;
}

.movie-v2-page-status {
  color: #949ba7;
  font-size: 12px;
}

.movie-v2-page-status strong {
  color: #fff;
}

.movie-v2-loading,
.movie-v2-empty {
  min-height: 320px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 10px;

  color: #9299a5;
  text-align: center;
}

.movie-v2-empty > div {
  font-size: 40px;
}

.movie-v2-empty strong {
  color: #fff;
  font-size: 17px;
}

.movie-v2-spinner {
  width: 28px;
  height: 28px;

  border:
    3px solid rgba(255,255,255,.12);

  border-top-color:
    rgba(255,255,255,.85);

  border-radius: 50%;

  animation:
    movie-v2-spin .75s linear infinite;
}

@keyframes movie-v2-spin {
  to {
    transform: rotate(360deg);
  }
}


/* DETALHES */

.movie-v2-details {
  max-width: 1100px;
  margin: 0 auto;
}

.movie-v2-back {
  margin-bottom: 18px;
}

.movie-v2-details-hero {
  display: grid;

  grid-template-columns:
    minmax(190px, 270px)
    minmax(0, 1fr);

  gap: 28px;

  align-items: start;
}

.movie-v2-detail-poster {
  aspect-ratio: 2 / 3;

  overflow: hidden;

  border-radius: 13px;

  background: #151922;

  box-shadow:
    0 14px 35px rgba(0,0,0,.35);
}

.movie-v2-detail-poster img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.movie-v2-detail-fallback {
  width: 100%;
  height: 100%;

  display: grid;
  place-items: center;

  font-size: 60px;
}

.movie-v2-detail-info {
  padding-top: 8px;
}

.movie-v2-detail-info h2 {
  margin:
    10px 0 9px;

  font-size:
    clamp(25px, 3vw, 42px);

  line-height: 1.08;
}

.movie-v2-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-v2-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;

  color: #9aa1ad;

  font-size: 13px;
}

.movie-v2-detail-description {
  max-width: 720px;

  margin-top: 24px;

  color: #c0c5ce;

  line-height: 1.65;
}

.series-v2-synopsis {
  margin: 0 0 20px;
}

.series-v2-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 12px;
}

.series-v2-episode-card {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}

.series-v2-episode-card:hover,
.series-v2-episode-card:focus-visible {
  border-color: rgba(255,255,255,.42);
}

.series-v2-episode-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #202630, #11151c);
}

.series-v2-episode-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-v2-episode-placeholder {
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(135deg, #202630, #11151c);
  color: #d7dce5;
  font-size: 18px;
  font-weight: 800;
}

.series-v2-episode-info {
  display: block;
  padding: 11px 12px 12px;
}

.series-v2-episode-info strong {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.series-v2-episode-info > span {
  display: block;
  color: rgba(255,255,255,.54);
  font-size: 11px;
}

@media (max-width: 620px) {
  .series-v2-episodes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
}

.movie-v2-rating {
  color: #f5c451;
}

.movie-v2-detail-actions {
  margin-top: 25px;
}

.movie-v2-watch {
  padding: 12px 22px;

  background: #fff;
  color: #10131a;
}

.movie-v2-watch:hover {
  background: #e3e5e8;
}

.movie-v2-detail-note {
  margin-top: 12px;

  color: #747c88;

  font-size: 11px;
}


@media (min-width: 1450px) {
  .movie-v2-grid {
    grid-template-columns:
      repeat(
        auto-fill,
        minmax(165px, 1fr)
      );
  }
}


@media (max-width: 900px) {
  body.movies-v2-mode
  main.movies-v2-main {
    grid-template-columns:
      190px minmax(0, 1fr);
  }

  .movie-v2-grid {
    grid-template-columns:
      repeat(
        auto-fill,
        minmax(125px, 1fr)
      );

    gap: 14px 10px;
  }

  .movie-v2-details-hero {
    grid-template-columns:
      180px minmax(0, 1fr);

    gap: 20px;
  }
}


@media (max-width: 650px) {
  body.movies-v2-mode
  main.movies-v2-main {
    display: block;
  }

  body.movies-v2-mode
  main.movies-v2-main
  .movies-v2-aside {
    display: block;
    width: 100%;
  }

  .movie-v2-genres {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 7px;
  }

  .movie-v2-genre {
    width: auto;
    flex: 0 0 auto;
  }

  .movie-v2-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .movie-v2-details-hero {
    display: block;
  }

  .movie-v2-detail-poster {
    width: min(220px, 65vw);
    margin: 0 auto 22px;
  }
}


/* MOVIE_V2_DETAIL_SELECTOR_V1 */

.movie-v2-details {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 4px 0 48px;
}

.movie-v2-detail-topbar {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
}

.movie-v2-details-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(255,255,255,.07),
      transparent 34%
    ),
    rgba(255,255,255,.025);
  overflow: hidden;
}

.movie-v2-detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.05);
  box-shadow: 0 22px 50px rgba(0,0,0,.32);
}

.movie-v2-detail-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.movie-v2-detail-fallback {
  width: 100%;
  height: 100%;
  min-height: 380px;
  display: grid;
  place-items: center;
  font-size: 58px;
}

.movie-v2-detail-info {
  min-width: 0;
  padding-top: 6px;
}

.movie-v2-detail-info h2 {
  margin: 14px 0 14px;
  max-width: 820px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.03;
  letter-spacing: -.035em;
}

.movie-v2-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.movie-v2-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.movie-v2-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  font-size: 12px;
  color: rgba(255,255,255,.78);
}

.movie-v2-availability {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0 0 24px;
}

.movie-v2-availability span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.48);
}

.movie-v2-availability strong {
  font-size: 14px;
  letter-spacing: .02em;
}

.movie-v2-source-section {
  margin-top: 12px;
}

.movie-v2-source-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.movie-v2-source-heading strong {
  font-size: 16px;
}

.movie-v2-source-heading span {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

.movie-v2-source-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.movie-v2-source-option {
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: inherit;
  cursor: pointer;
  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease;
}

.movie-v2-source-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
}

.movie-v2-source-option.active {
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.11);
}

.movie-v2-source-option:disabled {
  opacity: .32;
  cursor: not-allowed;
}

.movie-v2-source-number {
  flex: 0 0 auto;
  min-width: 44px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}

.movie-v2-source-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.movie-v2-source-copy strong {
  font-size: 13px;
}

.movie-v2-source-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: rgba(255,255,255,.48);
}

.movie-v2-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.movie-v2-watch {
  min-height: 48px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  font-weight: 800;
}

.movie-v2-watch:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.movie-v2-detail-note {
  margin-top: 12px;
  max-width: 600px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,.46);
}

.movie-v2-info-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.movie-v2-info-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.movie-v2-info-card > span {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.42);
}

.movie-v2-info-card > strong {
  display: block;
  font-size: 15px;
}

.movie-v2-info-card p {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,.48);
}

@media (max-width: 980px) {
  .movie-v2-details-hero {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
  }

  .movie-v2-source-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .movie-v2-details-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .movie-v2-detail-poster {
    width: min(240px, 72vw);
    margin: 0 auto;
  }

  .movie-v2-detail-info h2 {
    font-size: 30px;
  }

  .movie-v2-info-section {
    grid-template-columns: 1fr;
  }
}

/* fim MOVIE_V2_DETAIL_SELECTOR_V1 */

/* MOVIE_V2_REAL_PLAYBACK_V1 */

/*
 * Em Filmes V2 o player continua oculto durante
 * navegação e detalhes. Esta classe só é aplicada
 * depois do clique em Assistir.
 */
body.movies-v2-mode
main.movies-v2-main
.player-panel.movies-v2-playing-panel {
  display: block !important;
  grid-column: 1 / -1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 24px;
}

/* fim MOVIE_V2_REAL_PLAYBACK_V1 */

/* MOVIE_V2_CINEMA_MODE_V1 */

/*
 * Quando um filme está reproduzindo:
 * catálogo/detalhes e sidebar desaparecem.
 */
body.movie-v2-cinema-mode
.movies-v2-aside {
  display: none !important;
}

body.movie-v2-cinema-mode
.movies-v2-content {
  display: none !important;
}

body.movie-v2-cinema-mode
main.movies-v2-main {
  display: block !important;
  width: 100%;
  max-width: none;
}

/*
 * Player vira a área principal.
 */
body.movie-v2-cinema-mode
main.movies-v2-main
.player-panel.movies-v2-playing-panel {
  display: block !important;
  width: min(1280px, calc(100% - 40px));
  max-width: 1280px;
  margin: 22px auto 40px;
  padding: 0;
}

/*
 * Barra superior exclusiva do filme.
 */
.movie-v2-cinema-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.movie-v2-cinema-back {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.movie-v2-cinema-back:hover {
  background: rgba(255,255,255,.11);
}

.movie-v2-cinema-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.movie-v2-cinema-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.movie-v2-cinema-title span {
  font-size: 11px;
  color: rgba(255,255,255,.45);
}

/*
 * Vídeo grande e centralizado.
 */
body.movie-v2-cinema-mode
.player-video-wrap,
body.movie-v2-cinema-mode
.video-wrap,
body.movie-v2-cinema-mode
.player-screen {
  width: 100%;
  max-width: none;
}

/*
 * O próprio elemento video recebe a regra,
 * independentemente do nome do wrapper.
 */
body.movie-v2-cinema-mode
.player-panel video {
  display: block;
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: 16 / 9;
  height: auto !important;
  max-height: calc(100vh - 230px);
  margin: 0 auto;
  object-fit: contain;
  background: #000;
  border-radius: 14px;
}

@media (max-width: 700px) {
  body.movie-v2-cinema-mode
  main.movies-v2-main
  .player-panel.movies-v2-playing-panel {
    width: calc(100% - 20px);
    margin-top: 12px;
  }

  .movie-v2-cinema-bar {
    gap: 10px;
  }

  body.movie-v2-cinema-mode
  .player-panel video {
    max-height: calc(100vh - 190px);
    border-radius: 10px;
  }
}

/* fim MOVIE_V2_CINEMA_MODE_V1 */

/* DreamTV ON/OFF */

.header-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dreamtv-toggle {
  border: 1px solid #343a47;
  background: #191d26;
  color: #8d95a5;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.dreamtv-toggle:hover,
.dreamtv-toggle:focus {
  background: #242936;
  color: #fff;
  outline: none;
}

.dreamtv-toggle.on {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.dreamtv-toggle:disabled {
  opacity: .55;
  cursor: wait;
}

@media (max-width: 900px) {
  .header-status {
    margin-left: auto;
  }

  #status {
    display: none;
  }
}

/* ==========================================================
   WEBTV TOUCH — CELULAR E TABLET
   O player não é ocultado em telas pequenas. Em vez disso, a
   interface vira uma página de leitura: player, categorias e
   então a lista de canais. Isso evita os três painéis estreitos
   e deixa a troca de canal prática no toque.
   ========================================================== */
@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto !important;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    min-height: 64px;
    padding: 8px 14px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    flex: 0 0 auto;
  }

  .brand-logo {
    width: 104px;
    height: 46px;
  }

  header nav {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  header nav::-webkit-scrollbar {
    display: none;
  }

  .nav {
    flex: 0 0 auto;
    padding: 9px 11px;
    font-size: 13px;
    white-space: nowrap;
  }

  .header-status {
    display: none;
  }

  main,
  body.movies-v2-mode main.movies-v2-main {
    height: auto;
    min-height: calc(100vh - 64px) !important;
    display: grid;
    grid-template-columns: minmax(180px, 30%) minmax(0, 1fr);
    grid-template-areas:
      "player player"
      "categories channels";
    overflow: visible !important;
  }

  aside,
  .channels-panel,
  .player-panel {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .player-panel {
    grid-area: player;
    display: block !important;
    padding: 16px;
    border-bottom: 1px solid #242833;
  }

  aside {
    grid-area: categories;
    padding: 14px 10px;
    border-right: 1px solid #242833;
  }

  .channels-panel {
    grid-area: channels;
    min-height: 52vh;
    border-right: 0;
  }

  #categories,
  #channels {
    height: auto !important;
    max-height: none;
    overflow: visible !important;
  }

  .player {
    max-height: none;
    border-radius: 11px;
  }

  .remote-help {
    display: none;
  }

  .now {
    margin-top: 14px;
  }

  .now h2 {
    font-size: 18px;
  }

  .live-playback-selector {
    margin-top: 8px;
  }
}

/* Celular em pé: player no meio, categorias horizontais abaixo e
   canais surgem na sequência ao escolher uma categoria. */
@media (max-width: 640px) {
  header {
    padding: 7px 10px;
  }

  .brand-logo {
    width: 78px;
    height: 40px;
  }

  .nav {
    padding: 8px 9px;
    font-size: 12px;
  }

  main,
  body.movies-v2-mode main.movies-v2-main {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px) !important;
  }

  .player-panel {
    order: 1;
    padding: 12px;
  }

  aside {
    order: 2;
    width: 100%;
    padding: 12px 10px 8px;
    border-right: 0;
    border-bottom: 1px solid #242833;
  }

  .channels-panel {
    order: 3;
    width: 100%;
    min-height: 45vh;
  }

  aside .title {
    padding: 0 4px 8px;
  }

  .search {
    padding: 0 2px 10px;
  }

  .search input {
    padding: 11px 12px;
  }

  #categories {
    display: flex;
    gap: 7px;
    padding: 0 2px 4px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  .category {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #2a303d;
    font-size: 13px;
    white-space: nowrap;
  }

  .panel-title {
    padding: 16px 14px 12px;
  }

  .panel-title h1 {
    font-size: 19px;
  }

  #channels {
    padding: 7px 9px 24px;
  }

  .channel {
    min-height: 62px;
    padding: 8px;
  }

  .channel-logo,
  .channel-logo-fallback {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .enable-sound {
    bottom: 15px;
    padding: 9px 13px;
    font-size: 12px;
  }

  .live-badge {
    left: 10px;
    bottom: 10px;
  }
}

/* Em telas baixas na horizontal, mantém o player visível sem ocupar
   praticamente toda a altura útil. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 560px) {
  .player-panel {
    padding: 10px 16px;
  }

  .player {
    width: min(760px, 100%);
    margin: 0 auto;
    max-height: 54vh;
  }

  .now,
  .live-playback-selector {
    display: none !important;
  }
}

/* Entrada protegida da WebTV. */
.login-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  background: radial-gradient(circle at top, #142442 0%, #080c15 62%);
}

.login-screen.hidden {
  display: none;
}

.adult-pin-dialog {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 13, .8);
}

.adult-pin-dialog.hidden {
  display: none;
}

.adult-pin-card {
  width: min(100%, 360px);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: #151927;
  color: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}

.adult-pin-card h2,
.adult-pin-card p {
  margin-top: 0;
}

.adult-pin-card label,
.adult-pin-card input {
  display: block;
  width: 100%;
}

.adult-pin-card input {
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px;
  background: #0c101b;
  color: #fff;
  font-size: 18px;
  letter-spacing: .18em;
}

.adult-pin-message {
  min-height: 1.25em;
  margin: 12px 0 0;
  color: #ffb7b7;
}

.adult-pin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.login-card {
  width: min(100%, 390px);
  display: grid;
  gap: 14px;
  padding: 32px;
  border: 1px solid #294765;
  border-radius: 20px;
  background: rgba(13, 25, 42, .97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  color: #f6f9ff;
}

@supports (-webkit-touch-callout: none) {
  .login-screen {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

.login-logo {
  width: 154px;
  max-height: 92px;
  object-fit: contain;
  justify-self: center;
}

.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
}

.login-card > p {
  margin: -4px 0 8px;
  color: #9eb4cf;
  text-align: center;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: #c9d8ea;
  font-size: .9rem;
}

.login-card input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #385878;
  border-radius: 9px;
  background: #09131f;
  color: #fff;
  font: inherit;
}

.login-card button {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: #4199f6;
  color: #07111f;
  font: 700 1rem inherit;
  cursor: pointer;
}

.login-card button:disabled {
  opacity: .65;
  cursor: wait;
}

.login-message {
  min-height: 1.2em;
  margin: 0 !important;
  color: #ffb4b4 !important;
  font-size: .9rem;
}
