/* ============================================================
   VPRIME — Style guide Netflix
   Cores:  fundo #141414 · vermelho #E50914 · texto #FFFFFF
           texto secundário #B3B3B3 · terciário #808080
   Fonte:  Netflix Sans → Helvetica Neue → Segoe UI → Roboto
   ============================================================ */

:root {
  --bg: #141414;
  --bg-raised: #181818;
  --bg-hover: #2f2f2f;
  --red: #e50914;
  --red-hover: #f6121d;
  --text: #ffffff;
  --text-2: #b3b3b3;
  --text-3: #808080;
  --gold: #ffd54a;
  --header-h: 68px;
  --pad-x: 4%;
  --card-radius: 4px;
  --ease: cubic-bezier(.25, .8, .3, 1);      /* desacelera suave */
  --ease-snap: cubic-bezier(.3, 1.2, .4, 1); /* leve "mola" */
  --font: "Netflix Sans", "Helvetica Neue", "Segoe UI", Roboto, Ubuntu, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-color: #4d4d4d var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(0,0,0,.7) 10%, transparent);
  transition: background-color .4s;
}
.header.solid {
  background-color: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
  padding: 0 var(--pad-x);
}
.header__logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-svg { height: 30px; width: auto; }
.logo-text {
  font-family: var(--font);
  font-size: 78px;
  font-weight: 900;
  letter-spacing: 2px;
  fill: var(--red);
}
.header__nav { display: flex; gap: 20px; }
.nav-link {
  font-size: 14px;
  color: var(--text-2);
  transition: color .3s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-3); }
.nav-link.active { color: var(--text); font-weight: 700; }
.header__right { margin-left: auto; display: flex; gap: 8px; }
.header__icon-btn {
  background: none; border: 0; color: var(--text);
  padding: 8px; border-radius: 4px; display: flex;
}
.header__icon-btn:hover { color: var(--text-2); }

/* CTA "Entrar" — só aparece deslogado.
   (.header .header__cta ganha do display do .btn, definido depois) */
.header .header__cta {
  display: none;
  margin-left: auto;
  padding: 8px 20px;
  font-size: 15px;
}
body.noauth .header__cta { display: inline-flex; }

/* barra de busca */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  margin: 0 var(--pad-x) 10px;
  padding: 8px 12px;
  background: rgba(0,0,0,.75);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 6px;
  max-width: 420px;
  margin-left: auto;
  margin-right: var(--pad-x);
  transition: border-color .2s, box-shadow .2s;
  animation: fadein .2s var(--ease);
}
.searchbar:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.searchbar input {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--text); font-size: 15px; font-family: inherit;
}
.searchbar input::placeholder { color: var(--text-3); }
.searchbar input::-webkit-search-cancel-button,
.searchbar input::-webkit-search-decoration { -webkit-appearance: none; }
.searchbar button {
  background: none; border: 0; color: var(--text-2);
  font-size: 15px; padding: 6px 8px;
}
.searchbar button:hover { color: var(--text); }

/* ============ BOOT LOADER ============ */
.boot-loader {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
}
.boot-loader__logo {
  font-size: 44px; font-weight: 900; letter-spacing: 3px; color: var(--red);
}
.boot-loader__spinner {
  width: 42px; height: 42px;
  border: 4px solid rgba(229,9,20,.25);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-loader__msg { color: var(--text-2); font-size: 14px; }

/* ============ APP / VIEWS ============ */
.app { min-height: 100vh; padding-bottom: 90px; }
.view { animation: viewin .4s var(--ease); }
@keyframes viewin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.view-title {
  padding: calc(var(--header-h) + 24px) var(--pad-x) 8px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
}

/* cabeçalho de view com seletor de categoria ao lado do título */
.view-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: calc(var(--header-h) + 24px) var(--pad-x) 12px;
}
.view-head .view-title { padding: 0; }

/* ============ HERO (billboard) ============ */
.hero {
  position: relative;
  height: min(82vh, 720px);
  min-height: 420px;
  display: flex;
  align-items: flex-end;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 20%;
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(77deg, rgba(20,20,20,.85) 0%, rgba(20,20,20,.35) 45%, transparent 70%),
    linear-gradient(180deg, transparent 55%, rgba(20,20,20,.6) 82%, var(--bg) 100%);
}
.hero__content {
  position: relative;
  padding: 0 var(--pad-x) 12vh;
  max-width: 640px;
}
.hero__kicker {
  color: var(--red); font-weight: 700; font-size: 14px;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px;
}
.hero__title {
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 2px 2px 6px rgba(0,0,0,.5);
  margin-bottom: 14px;
}
.hero__meta { display: flex; gap: 14px; color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.hero__meta .match { color: #46d369; font-weight: 700; }
.hero__plot {
  font-size: clamp(14px, 1.3vw, 18px);
  color: var(--text);
  text-shadow: 1px 1px 4px rgba(0,0,0,.6);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 22px;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: 4px;
  padding: 10px 26px;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 700;
  transition: background-color .2s, opacity .2s, transform .15s var(--ease), border-color .2s, color .2s;
}
.btn:active { transform: scale(.965); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .pbtn:focus-visible, .header__icon-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 2px;
}
.btn--play { background: var(--text); color: #000; }
.btn--play:hover { background: rgba(255,255,255,.8); }
.btn--info { background: rgba(109,109,110,.7); color: var(--text); }
.btn--info:hover { background: rgba(109,109,110,.5); }
.btn--red { background: var(--red); color: var(--text); }
.btn--red:hover { background: var(--red-hover); }
.btn--ghost { background: transparent; color: var(--text-2); border: 1px solid var(--text-3); }
.btn--ghost:hover { border-color: var(--text); color: var(--text); }

/* ============ ROWS ============ */
.rows { display: flex; flex-direction: column; gap: 4px; }
.hero + .rows { margin-top: -8vh; position: relative; z-index: 2; }
/* home sem hero (ex.: perfil infantil): fileiras abaixo do header fixo */
.view--no-hero .rows { padding-top: calc(var(--header-h) + 20px); }

.row { padding: 12px 0; min-height: 190px; }
.row__title {
  font-size: clamp(15px, 1.4vw, 22px);
  font-weight: 700;
  margin: 0 var(--pad-x) 10px;
  color: #e5e5e5;
}
/* cabeçalho de fileira com ação (ex.: "Limpar histórico") */
.row__head {
  display: flex; align-items: baseline; gap: 16px;
  margin: 0 var(--pad-x) 10px;
}
.row__head .row__title { margin: 0; }
.row__action {
  background: none; border: 0;
  color: var(--text-3); font-size: 13px;
  transition: color .2s;
}
.row__action:hover { color: var(--text); text-decoration: underline; }
/* carrossel com scroll horizontal NATIVO: toque, trackpad e
   shift+roda funcionam, e a rolagem vertical da página segue livre.
   O respiro vertical (padding + margem negativa) impede o recorte
   do zoom dos cards no hover — nada de overflow "cortando" a fileira. */
.row__slider-wrap { position: relative; }
.row__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;               /* barra escondida (Firefox) */
  -webkit-overflow-scrolling: touch;
  padding: 24px 0;                     /* área extra para o hover crescer */
  margin: -24px 0;
}
.row__viewport::-webkit-scrollbar { display: none; }
.row__track {
  display: flex; gap: 8px;
  padding: 0 var(--pad-x);
  width: max-content;
  user-select: none;
  -webkit-user-select: none;
}
.row__arrow {
  position: absolute; top: 0; bottom: 0;
  width: 46px;
  border: 0;
  background: linear-gradient(90deg, rgba(20,20,20,.85), rgba(20,20,20,.35));
  color: var(--text);
  z-index: 5;
  opacity: 0;
  transition: opacity .25s var(--ease), background-color .2s;
  display: flex; align-items: center; justify-content: center;
}
.row__arrow svg { transition: transform .2s var(--ease-snap); }
.row__arrow:hover svg { transform: scale(1.25); }
.row__slider-wrap:hover .row__arrow { opacity: 1; }
.row__arrow--left { left: 0; }
.row__arrow--right { right: 0; background: linear-gradient(270deg, rgba(20,20,20,.85), rgba(20,20,20,.35)); }
.row__arrow--off { opacity: 0 !important; pointer-events: none; }

/* ============ CARDS ============ */
.card {
  flex: 0 0 auto;
  width: clamp(110px, 15.5vw, 200px);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--bg-raised);
  cursor: pointer;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
  aspect-ratio: 2 / 3;
}
.card:hover, .card:focus-visible {
  transform: scale(1.07);
  z-index: 3;
  box-shadow: 0 8px 24px rgba(0,0,0,.7);
  outline: none;
}
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.card img { position: relative; z-index: 1; }
.card img.loaded, .card img[src^="data:"] { opacity: 1; }
.card--resume img, .episode__thumb, .endscreen__card img { opacity: 1; }

/* skeleton: brilho enquanto a capa carrega; some ao carregar ou no fallback */
.card::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, #191919 30%, #272727 50%, #191919 70%);
  background-size: 220% 100%;
  animation: card-shimmer 1.25s ease-in-out infinite;
}
.card:has(img.loaded)::before,
.card:has(.card__fallback)::before,
.card--resume::before, .card--wide::before { display: none; }
@keyframes card-shimmer {
  0% { background-position: 180% 0; }
  100% { background-position: -120% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .card::before { animation: none; }
}

/* ---------- onboarding de primeiro acesso ---------- */
.onboard {
  position: relative;
  margin: 4px 4vw 8px;
  padding: 20px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(229,9,20,.16), rgba(20,20,20,.6));
  border: 1px solid rgba(255,255,255,.08);
}
.onboard__title { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.onboard__tips {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 24px; margin-bottom: 16px;
}
.onboard__tip { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.onboard__tip span { font-size: 18px; line-height: 1.2; }
.onboard__tip b { color: var(--text); font-weight: 700; }
.onboard__close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--text-3);
  font-size: 18px; cursor: pointer; line-height: 1;
}
.onboard__close:hover { color: var(--text); }

/* saída suave ao desfavoritar (fileiras/grades de favoritos) */
.card--leaving {
  opacity: 0 !important;
  transform: scale(.85) !important;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  pointer-events: none;
}
.card__fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  text-align: center;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  background: linear-gradient(160deg, #232323, #181818);
}
.card__badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--red); color: var(--text);
  font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
}

/* botão ✕ de remover (minha lista / continuar assistindo) */
.card__remove {
  position: absolute; top: 6px; right: 6px; z-index: 4;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(20,20,20,.75); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.card__remove:hover { background: var(--red); border-color: var(--red); }
.card:has(.card__remove) .card__badge { display: none; }
@media (hover: hover) {
  .card__remove { opacity: 0; transition: opacity .2s; }
  .card:hover .card__remove,
  .card:focus-within .card__remove,
  .card:focus-visible .card__remove { opacity: 1; }
}

/* estrela de favorito (cards de canal) */
.card__fav {
  position: absolute; top: 6px; right: 6px; z-index: 4;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(20,20,20,.75); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.card__fav svg { fill: none; stroke: currentColor; transition: fill .2s, stroke .2s; }
.card__fav:hover { border-color: var(--gold); color: var(--gold); }
.card__fav.active { border-color: rgba(255,213,74,.7); color: var(--gold); }
.card__fav.active svg { fill: currentColor; }
.card__fav.pop svg, .pbtn.pop svg { animation: favpop .4s var(--ease-snap); }
@keyframes favpop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45) rotate(8deg); }
  100% { transform: scale(1); }
}
.card:has(.card__remove) .card__fav { display: none; }
@media (hover: hover) {
  .card__fav { opacity: 0; transition: opacity .2s; }
  .card__fav.active,
  .card:hover .card__fav,
  .card:focus-within .card__fav,
  .card:focus-visible .card__fav { opacity: 1; }
}

/* card wide (canais / continuar) */
.card--wide { aspect-ratio: 16 / 9; width: clamp(180px, 24vw, 320px); }
.card--wide img { object-fit: contain; padding: 14px; background: #1d1d1d; }
.card--wide .card__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 10px 8px;
  font-size: 13px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* card "continuar assistindo" */
.card--resume img { object-fit: cover; padding: 0; }
.card--resume .card__label { bottom: 4px; }
.card__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: rgba(255,255,255,.3);
}
.card__progress > div { height: 100%; background: var(--red); }
.card__resume-ico {
  position: absolute; top: 50%; left: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%;
  border: 2px solid var(--text);
  background: rgba(20,20,20,.55);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  opacity: 0; transition: opacity .2s;
}
.card--resume:hover .card__resume-ico { opacity: 1; }

/* ============ GRID (busca, categorias, tv) ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 10px var(--pad-x) 30px;
}
.grid .card { width: auto; }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.empty {
  padding: 60px var(--pad-x);
  text-align: center;
  color: var(--text-2);
  font-size: 16px;
  animation: fadein .3s var(--ease);
}
.empty strong { color: var(--text); }

/* sentinela do lazy load das grades */
.grid__sentinel { height: 2px; grid-column: 1 / -1; }

/* ============ DROPDOWN DE CATEGORIAS ============ */
.dropdown { position: relative; }
.dropdown__btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 14px 9px 16px;
  font-size: 14px; font-weight: 600;
  max-width: min(320px, 70vw);
  transition: background-color .2s, border-color .2s, transform .15s var(--ease);
}
.dropdown__btn:hover { background: rgba(255,255,255,.12); border-color: var(--text-2); }
.dropdown__btn:active { transform: scale(.97); }
.dropdown__btn svg { flex-shrink: 0; transition: transform .25s var(--ease); color: var(--text-2); }
.dropdown__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dropdown__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown__menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: min(340px, 86vw);
  max-height: min(480px, 60vh);
  overflow-y: auto;
  background: rgba(24,24,24,.97);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.65);
  padding: 6px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform-origin: top left;
  animation: dropin .22s var(--ease);
  scrollbar-width: thin;
}
@keyframes dropin { from { opacity: 0; transform: scale(.96) translateY(-6px); } to { opacity: 1; transform: none; } }
.dropdown__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: none; border: 0;
  color: var(--text-2);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: left;
  transition: background-color .15s, color .15s;
}
.dropdown__item:hover { background: rgba(255,255,255,.09); color: var(--text); }
.dropdown__item.selected { color: var(--text); font-weight: 700; }
.dropdown__check { width: 16px; flex-shrink: 0; color: var(--red); font-weight: 800; }
.dropdown__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown__count {
  flex-shrink: 0;
  font-size: 11.5px; font-weight: 700;
  color: var(--text-3);
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 2px 8px;
}

/* mobile: o menu ancorado ao botão estourava a lateral da tela
   (deslocamento horizontal) — vira uma folha fixa centralizada */
@media (max-width: 640px) {
  .dropdown__menu {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(420px, calc(100vw - 32px));
    height: fit-content;
    min-width: 0;
    max-height: min(480px, 72vh);
    transform-origin: center;
  }
}

/* ============ BUSCA ============ */
.search-section-title {
  padding: 18px var(--pad-x) 4px;
  font-size: 18px; font-weight: 700; color: #e5e5e5;
}

/* filtro segmentado dos resultados (Tudo · Filmes · Séries · TV) */
.seg {
  display: inline-flex; gap: 4px;
  margin: 4px var(--pad-x) 8px;
  padding: 4px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  animation: fadein .25s var(--ease);
}
.seg__btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0;
  color: var(--text-2);
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 13.5px; font-weight: 600;
  transition: background-color .2s var(--ease), color .2s, transform .15s var(--ease);
}
/* o ativo tem fundo claro e texto preto — o hover genérico pintava o
   texto de branco sobre branco; ele só vale para os inativos */
.seg__btn:hover:not(:disabled):not(.active) { color: var(--text); }
.seg__btn:active:not(:disabled) { transform: scale(.96); }
.seg__btn:disabled { opacity: .35; cursor: default; }
.seg__btn.active { background: var(--text); color: #000; }
.seg__btn.active:hover { background: #fff; }
.seg__count { font-size: 11px; font-weight: 800; opacity: .65; }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 4vh 12px; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); }
.modal__card {
  position: relative;
  width: min(860px, 100%);
  background: var(--bg-raised);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0,0,0,.8);
  animation: modalin .3s ease;
}
@keyframes modalin { from { opacity: 0; transform: scale(.97) translateY(10px); } to { opacity: 1; transform: none; } }
.modal__hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  display: flex; align-items: flex-end;
}
.modal__hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg-raised) 100%);
}
.modal__hero-content { position: relative; z-index: 1; padding: 0 40px 24px; width: 100%; }
.modal__title { font-size: clamp(22px, 3vw, 38px); font-weight: 900; margin-bottom: 14px; text-shadow: 1px 1px 6px rgba(0,0,0,.6); }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--bg); color: var(--text);
  font-size: 17px; display: flex; align-items: center; justify-content: center;
}
.modal__body { padding: 22px 40px 36px; }
.modal__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.modal__meta .match { color: #46d369; font-weight: 700; }
.modal__meta .tag { border: 1px solid var(--text-3); border-radius: 3px; padding: 0 5px; font-size: 12px; }
.modal__plot { font-size: 15px; line-height: 1.55; color: var(--text); margin-bottom: 16px; }
.modal__facts { font-size: 13.5px; color: var(--text-3); line-height: 1.7; }
.modal__facts b { color: var(--text-2); font-weight: 600; }

/* episódios */
.season-select {
  appearance: none;
  -webkit-appearance: none;
  background: #242424 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="%23b3b3b3" stroke-width="2.4" stroke-linecap="round"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 12px center;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25); border-radius: 6px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  padding: 9px 38px 9px 14px; margin: 18px 0 10px;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.season-select:hover { border-color: var(--text-2); }
.season-select:focus-visible { outline: none; border-color: var(--text); background-color: #2c2c2c; }
.episodes { display: flex; flex-direction: column; }
.episode {
  display: flex; gap: 16px; align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid #303030;
  border-radius: 6px;
  cursor: pointer;
}
.episode:hover { background: var(--bg-hover); }
.episode__num { font-size: 22px; color: var(--text-3); width: 28px; text-align: center; flex-shrink: 0; }
.episode__thumb {
  width: 128px; aspect-ratio: 16/9; border-radius: 4px;
  object-fit: cover; background: #232323; flex-shrink: 0;
}
.episode__info { flex: 1; min-width: 0; }
.episode__title { font-size: 15px; font-weight: 600; margin-bottom: 4px; display: flex; justify-content: space-between; gap: 10px; }
.episode__title .dur { color: var(--text-3); font-weight: 400; font-size: 13px; }
.episode__plot {
  font-size: 13px; color: var(--text-2); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============ PLAYER (estilo Netflix) ============ */
.player {
  position: fixed; inset: 0; z-index: 300;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
.player video { width: 100%; height: 100%; }
.player__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(0,0,0,.6), transparent 18%),
    linear-gradient(transparent 70%, rgba(0,0,0,.75));
  opacity: 1; transition: opacity .4s;
}
.player__click { position: absolute; inset: 0; }
.player__top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  opacity: 1; transition: opacity .4s;
}
.player.idle .player__top,
.player.idle .player__controls,
.player.idle .player__shade { opacity: 0; }
.player.idle .player__controls { pointer-events: none; }
.player.idle { cursor: none; }
.player__back { background: none; border: 0; color: var(--text); display: flex; }
.player__title { font-size: 17px; font-weight: 700; text-shadow: 1px 1px 4px #000; }
.player__status {
  position: absolute; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  color: var(--text-2); font-size: 15px; text-align: center; padding: 0 30px;
}
.player__status .boot-loader__spinner { border-width: 3px; width: 36px; height: 36px; }
.status__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* botão central de estado: ▶ pausado (toque para retomar) · ⏸ tocando.
   Some junto com os controles quando o player fica ocioso. */
.player__bigbtn {
  position: absolute; z-index: 4;
  width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
  background: rgba(20,20,20,.45);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  opacity: 1;
  transition: opacity .4s, transform .15s var(--ease), background-color .2s;
}
.player__bigbtn svg { width: 44px; height: 44px; }
.player__bigbtn:hover { transform: scale(1.07); background: rgba(20,20,20,.7); }
.player.idle .player__bigbtn { opacity: 0; pointer-events: none; }

/* barra de controles */
.player__controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 0 24px 16px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 1; transition: opacity .4s;
}
.player__seekrow { display: flex; align-items: center; gap: 16px; }
.seekbar {
  position: relative; flex: 1; height: 20px;
  display: flex; align-items: center; cursor: pointer;
  touch-action: none;
}
.seekbar::before {
  content: ""; position: absolute; left: 0; right: 0;
  height: 4px; background: rgba(255,255,255,.3); border-radius: 2px;
}
.seekbar__buffer {
  position: absolute; left: 0; height: 4px; width: 0;
  background: rgba(255,255,255,.45); border-radius: 2px;
}
.seekbar__played {
  position: absolute; left: 0; height: 4px; width: 0;
  background: var(--red); border-radius: 2px;
}
.seekbar__thumb {
  position: absolute; right: -7px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  background: var(--red); border-radius: 50%;
  transform: scale(0); transition: transform .15s;
}
.seekbar:hover .seekbar__thumb, .seekbar.dragging .seekbar__thumb { transform: scale(1); }
.player__time {
  font-size: 14px; font-variant-numeric: tabular-nums;
  color: var(--text); text-shadow: 1px 1px 2px #000; min-width: 52px; text-align: right;
}

.player__btnrow { display: flex; align-items: center; gap: 6px; }
.pbtn {
  background: none; border: 0; color: var(--text);
  width: 44px; height: 44px; padding: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.pbtn svg { width: 100%; height: 100%; }
.pbtn:hover { transform: scale(1.18); }
.player__vol { display: flex; align-items: center; }
.player__vol input[type=range] {
  width: 0; opacity: 0; transition: width .25s, opacity .25s;
  accent-color: var(--red); cursor: pointer;
}
.player__vol:hover input[type=range] { width: 90px; opacity: 1; }
.player__subtitle {
  flex: 1; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 1px 1px 2px #000;
}
.player__livebadge {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: var(--text); padding: 0 10px;
}
.player__livebadge .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red);
  animation: livepulse 1.6s infinite;
}
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* painel lateral de programação (EPG) */
.player__epg {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 7;
  width: min(420px, 100%);
  background: rgba(12,12,12,.96);
  border-left: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column;
  animation: epgslide .25s ease;
}
@keyframes epgslide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.epg__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.epg__title { font-size: 17px; font-weight: 800; }
.epg__channel {
  font-size: 13px; color: var(--text-2); margin-top: 2px;
  max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.epg__close { background: none; border: 0; color: var(--text-2); font-size: 16px; padding: 8px; }
.epg__close:hover { color: var(--text); }
.epg__list { flex: 1; overflow-y: auto; padding: 8px 0 20px; }
.epg__day {
  padding: 12px 20px 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-3);
}
.epg-item { display: flex; gap: 14px; padding: 9px 20px; }
.epg-item--past { opacity: .45; }
.epg-item--now { background: rgba(229,9,20,.12); border-left: 3px solid var(--red); padding-left: 17px; }
.epg-item__time {
  flex-shrink: 0; padding-top: 1px;
  font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.epg-item__body { min-width: 0; }
.epg-item__title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.epg-item__badge {
  flex-shrink: 0;
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  background: var(--red); border-radius: 3px; padding: 1px 5px;
}
.epg-item__desc {
  font-size: 12.5px; color: var(--text-2); line-height: 1.4; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* lista de canais no player (zapping sem sair do vídeo) */
.epg__headmain { flex: 1; min-width: 0; }
.chsearch {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 7px 10px;
}
.chsearch:focus-within { border-color: var(--text-2); }
.chsearch svg { flex-shrink: 0; color: var(--text-2); }
.chsearch input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: 0;
  color: var(--text); font-size: 14px;
}
.ch-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 8px 20px;
  background: none; border: 0;
  color: var(--text-2);
  text-align: left; font-size: 14px;
  transition: background-color .15s, color .15s;
}
.ch-item:hover { background: rgba(255,255,255,.07); color: var(--text); }
.ch-item--now {
  background: rgba(229,9,20,.12);
  border-left: 3px solid var(--red);
  padding-left: 17px;
  color: var(--text); font-weight: 600;
}
.ch-item__logo {
  width: 34px; height: 34px; flex-shrink: 0;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,.06);
}
.ch-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-item__more { padding: 14px 20px; color: var(--text-3); font-size: 12.5px; text-align: center; }

/* botão flutuante "Próximo episódio" */
.player__skipnext {
  position: absolute; right: 40px; bottom: 110px; z-index: 5;
  box-shadow: 0 4px 18px rgba(0,0,0,.6);
}

/* contagem para o próximo episódio */
.player__nextcard {
  position: absolute; right: 40px; bottom: 110px; z-index: 6;
  background: rgba(15,15,15,.95);
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 380px;
  box-shadow: 0 8px 30px rgba(0,0,0,.7);
  animation: fadein .3s;
}
.nextcard__label { color: var(--text-2); font-size: 14px; margin-bottom: 6px; }
.nextcard__label b { color: var(--text); font-size: 16px; }
.nextcard__title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.nextcard__actions { display: flex; gap: 10px; }

/* tela de fim: sugestões */
.player__endscreen {
  position: absolute; inset: 0; z-index: 6;
  background: rgba(0,0,0,.82);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; padding: 60px 5vw 30px;
  overflow-y: auto;
  animation: fadein .35s;
}
.endscreen__title { font-size: clamp(18px, 2.4vw, 28px); font-weight: 800; }
.endscreen__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 150px));
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 1040px;
}
.endscreen__card {
  border: 0; padding: 0; background: var(--bg-raised);
  border-radius: 4px; overflow: hidden; cursor: pointer;
  aspect-ratio: 2/3; position: relative;
  transition: transform .2s;
}
.endscreen__card:hover { transform: scale(1.06); }
.endscreen__card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.endscreen__card span {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 12px; font-weight: 600; color: var(--text);
  padding: 18px 6px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.endscreen__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============ VITRINE DE CAPAS (landing/login) ============ */
/* mosaico de pôsteres do catálogo, levemente inclinado, sob um scrim */
.wall { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wall__grid {
  position: absolute; inset: -12% -8%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  transform: rotate(-4deg) scale(1.12);
  transform-origin: center;
}
.wall__grid img {
  width: 100%; aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.wall__grid img.loaded { opacity: .55; }

/* ============ LOGIN ============ */
.auth {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--header-h) + 20px) 16px 60px;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 70% -10%, #2a0a0d, var(--bg) 60%);
}
.auth__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(10,10,10,.35), rgba(10,10,10,.88) 78%),
    linear-gradient(180deg, rgba(20,20,20,.5), rgba(20,20,20,.35) 40%, var(--bg) 100%);
}
.auth-card {
  position: relative;
  width: min(430px, 100%);
  background: rgba(8,8,8,.8);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  padding: 46px 8% 34px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: viewin .4s var(--ease);
}
.auth-card h1 { font-size: 30px; margin-bottom: 8px; }
.auth-card .sub { color: var(--text-2); font-size: 14px; margin-bottom: 26px; line-height: 1.5; }
.auth-card__submit { width: 100%; justify-content: center; margin-top: 14px; padding: 13px; font-size: 16px; }
.auth-card__foot {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.09);
  font-size: 13px; color: var(--text-3);
}
.auth-card__link {
  background: none; border: 0; padding: 0;
  align-self: flex-start;
  color: var(--text-2); font-size: 13.5px; text-decoration: underline;
}
.auth-card__link:hover { color: var(--text); }

/* ============ CAMPOS DE FORMULÁRIO ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input {
  width: 100%;
  background: #333; border: 1px solid transparent; border-radius: 6px;
  color: var(--text); font-size: 15px; font-family: inherit;
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field input:hover { background: #3b3b3b; }
.field input:focus {
  border-color: var(--text-2);
  background: #454545;
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.4; }

/* variação com rótulo flutuante (login) */
.field--float { position: relative; }
.field--float input { padding: 24px 14px 9px; }
.field--float label {
  position: absolute; left: 15px; top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-size: 15px; color: var(--text-3);
  pointer-events: none;
  transition: top .15s var(--ease), font-size .15s var(--ease), color .15s;
}
.field--float input:focus + label,
.field--float input:not(:placeholder-shown) + label {
  top: 14px;
  font-size: 11.5px;
  color: var(--text-2);
}
.field--pass input { padding-right: 48px; }
.field__eye {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none; border: 0;
  color: var(--text-3);
  padding: 9px;
  display: flex; border-radius: 6px;
}
.field__eye:hover { color: var(--text); }

.config-msg { margin-top: 14px; font-size: 13.5px; color: #e87c03; line-height: 1.4; }

/* ============ CONTA ============ */
.acct {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px var(--pad-x) 40px;
  display: flex; flex-direction: column; gap: 14px;
}
.acct-card {
  background: var(--bg-raised);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 20px 22px;
}
.acct-card--profile { display: flex; align-items: center; gap: 16px; }
.acct-avatar {
  width: 54px; height: 54px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), #7d060c);
  font-size: 26px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.acct-user { font-size: 18px; font-weight: 700; margin-bottom: 6px; overflow-wrap: anywhere; }
.acct-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: var(--text-2);
}
.badge--ok { background: rgba(70,211,105,.15); color: #46d369; }
.badge--warn { background: rgba(229,9,20,.18); color: #ff6b72; }
.acct-card__title {
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px;
}
.acct-rows { display: flex; flex-direction: column; }
.acct-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0; font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.acct-row:last-child { border-bottom: 0; padding-bottom: 0; }
.acct-row:first-child { padding-top: 0; }
.acct-row span { color: var(--text-2); }

/* linha "texto + controle" (toggle do parental, apagar histórico) */
.acct-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.acct-item__text { min-width: 0; }
.acct-item__label { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.acct-item__hint { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.btn--slim { padding: 8px 18px; font-size: 14px; flex-shrink: 0; }
.acct-link {
  background: none; border: 0; padding: 0; margin-top: 14px;
  color: var(--text-2); font-size: 13.5px; text-decoration: underline;
}
.acct-link:hover { color: var(--text); }
.acct-footer { display: flex; justify-content: center; padding-top: 8px; }
.acct-footer .btn { min-width: 220px; justify-content: center; }

/* interruptor */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.switch__track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #454545; transition: background .2s; pointer-events: none;
}
.switch__track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text);
  transition: transform .2s;
}
.switch input:checked + .switch__track { background: var(--red); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--text); outline-offset: 2px; }

/* painel de PIN (criar / confirmar / trocar) */
.pin-panel {
  margin-top: 16px; padding: 16px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  animation: fadein .25s;
}
.pin-panel__text { font-size: 13.5px; color: var(--text-2); line-height: 1.45; margin-bottom: 12px; }
.pin-panel__fields { display: flex; gap: 10px; flex-wrap: wrap; }
.pin-panel .field { flex: 1 1 120px; margin-bottom: 0; }
.pin-panel .field input { letter-spacing: 6px; font-size: 17px; text-align: center; padding: 10px; }
.pin-panel__actions { display: flex; gap: 10px; margin-top: 14px; }
.pin-panel .config-msg { margin-top: 12px; }

/* ============ SUPER ADMIN ============ */
body.adminmode .header__nav,
body.adminmode .header__right,
body.adminmode .bottomnav { display: none; }

.admin-view {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: calc(var(--header-h) + 34px) var(--pad-x) 80px;
}
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.admin-kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.admin-head h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}
.admin-section {
  background: var(--bg-raised);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 16px;
}
.admin-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.admin-section__head h2 {
  font-size: 18px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.admin-stat {
  min-height: 112px;
  padding: 16px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
}
.admin-stat__label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 12px;
}
.admin-stat__value {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  line-height: 1;
}
.admin-stat__hint {
  color: var(--text-3);
  font-size: 12.5px;
  margin-top: 10px;
  line-height: 1.35;
}
.admin-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 28px;
}
.admin-upload {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-mysql {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.admin-mysql label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.admin-mysql span {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.admin-mysql input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.admin-mysql input:focus {
  border-color: rgba(255,255,255,.38);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.admin-mysql__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.admin-file {
  flex: 1 1 320px;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
}
.admin-file:hover { border-color: rgba(255,255,255,.34); color: var(--text); }
.admin-file input { position: absolute; opacity: 0; pointer-events: none; }
.admin-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.45;
}
.admin-result--ok {
  background: rgba(70,211,105,.12);
  color: #66df83;
}
.admin-result--error {
  background: rgba(229,9,20,.15);
  color: #ff8087;
}

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 90px; left: 50%;
  z-index: 400;
  background: #f3f3f3; color: #141414;
  font-size: 14px; font-weight: 600;
  padding: 12px 22px; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.55);
  animation: toastin .3s var(--ease-snap);
  max-width: 90vw; text-align: center;
}
@keyframes toastin {
  from { opacity: 0; transform: translate(-50%, 14px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.toast--out { animation: toastout .25s var(--ease) forwards; }
@keyframes toastout {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, 10px); }
}

/* ============ SKELETON ============ */
.skel {
  background: linear-gradient(90deg, #1c1c1c 25%, #262626 50%, #1c1c1c 75%);
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--card-radius);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ============ BOTTOM NAV (mobile) ============ */
.bottomnav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: rgba(10,10,10,.96);
  border-top: 1px solid #262626;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px;
  font-size: 10.5px; color: var(--text-3);
}
.bottomnav a.active { color: var(--text); }

/* ============ ESTADO DESLOGADO ============ */
/* antes do login: só logo + CTA "Entrar" — nada de navegação ou busca */
body.noauth .header__nav,
body.noauth .header__right,
body.noauth .bottomnav { display: none; }

/* ============ LANDING (home deslogada) ============ */
.landing {
  animation: fadein .35s ease;
  background:
    linear-gradient(180deg, #050505 0%, var(--bg) 34%, #0f0f0f 100%);
}
.landing__hero {
  position: relative;
  min-height: min(76vh, 680px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 42px) var(--pad-x) 62px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(20,20,20,.1), rgba(20,20,20,.55) 62%, var(--bg)),
    radial-gradient(1200px 680px at 78% 24%, rgba(128,14,20,.42), rgba(20,20,20,0) 62%),
    radial-gradient(900px 520px at 14% 26%, rgba(229,9,20,.2), rgba(20,20,20,0) 54%),
    #070707;
  border-bottom: 8px solid #232323;
}
.landing__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.72) 33%, rgba(0,0,0,.18) 70%, rgba(0,0,0,.62) 100%),
    linear-gradient(180deg, rgba(20,20,20,.46), rgba(20,20,20,.06) 42%, var(--bg) 100%);
}
.landing__content {
  position: relative;
  width: min(720px, 100%);
  padding-top: 22px;
}
.landing__eyebrow {
  color: var(--text-2);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.landing__title {
  color: var(--red);
  font-size: clamp(58px, 11vw, 126px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-shadow:
    0 1px 0 rgba(255,255,255,.1),
    0 18px 42px rgba(0,0,0,.75);
}
.landing__sub {
  max-width: 650px;
  color: var(--text);
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.32;
  margin-bottom: 28px;
  text-shadow: 0 2px 14px rgba(0,0,0,.75);
}
.landing__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.landing__cta {
  font-size: clamp(16px, 1.6vw, 21px);
  min-height: 50px;
  padding: 13px 34px;
  gap: 8px;
}
.landing__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
  max-width: 700px;
}
.landing__proof span {
  color: #e5e5e5;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.landing__features {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 16px;
  padding: 34px var(--pad-x) 48px;
  max-width: 1240px;
  margin: 0 auto;
}
.feature {
  min-height: 206px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.09), rgba(255,255,255,.026) 44%, rgba(229,9,20,.1)),
    #171717;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}
.feature--wide {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.feature svg {
  flex: 0 0 auto;
  color: var(--red);
  margin-bottom: 18px;
  filter: drop-shadow(0 10px 20px rgba(229,9,20,.25));
}
.feature__label {
  display: inline-flex;
  color: #e5e5e5;
  background: rgba(229,9,20,.18);
  border: 1px solid rgba(229,9,20,.38);
  border-radius: 4px;
  padding: 5px 8px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .9px;
  text-transform: uppercase;
}
.feature h3 {
  max-width: 440px;
  font-size: clamp(19px, 1.65vw, 25px);
  line-height: 1.12;
  margin-bottom: 11px;
}
.feature p {
  max-width: 520px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.55;
}

@media (max-width: 980px) and (min-width: 761px) {
  .landing__features {
    grid-template-columns: 1fr 1fr;
  }
  .feature--wide {
    grid-column: 1 / -1;
  }
}

/* ============ AVATARES (perfis) ============ */
.avatar {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 6px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar svg { width: 68%; height: 68%; }
.av-0 { background: linear-gradient(135deg, #e50914, #7d060c); }
.av-1 { background: linear-gradient(135deg, #3b6cf0, #1c2f7c); }
.av-2 { background: linear-gradient(135deg, #22a06b, #0e4f34); }
.av-3 { background: linear-gradient(135deg, #8b5cf6, #4c1d95); }
.av-4 { background: linear-gradient(135deg, #f5a623, #c2410c); }
.av-5 { background: linear-gradient(135deg, #14b8a6, #0f5c56); }
.avatar--kids { background: linear-gradient(135deg, #ffd54a 0%, #ff7a30 55%, #e50914 100%); }

.avatar--sm { width: 30px; height: 30px; border-radius: 5px; }
.avatar--sm:empty, #headerAvatar:empty { background: #333; }
.avatar--menu { width: 32px; height: 32px; border-radius: 5px; }
.avatar--acct { width: 46px; height: 46px; border-radius: 8px; }
.avatar--form { width: 88px; height: 88px; border-radius: 10px; }
.avatar--tile {
  width: clamp(84px, 10vw, 130px);
  height: clamp(84px, 10vw, 130px);
  border-radius: 8px;
  border: 3px solid transparent;
  transition: border-color .2s, transform .2s var(--ease);
}
.avatar--add {
  background: transparent;
  border: 2px dashed rgba(255,255,255,.35);
  color: var(--text-2);
}

/* botão do header com o avatar do perfil ativo */
.header__profile-btn { gap: 7px; align-items: center; }
.header__caret { color: var(--text-2); transition: transform .25s var(--ease); }
.header__profile-btn[aria-expanded="true"] .header__caret { transform: rotate(180deg); }

/* menu do avatar (trocar perfil · gerenciar · conta · sair) */
.pmenu {
  position: absolute; top: calc(var(--header-h) - 8px); right: var(--pad-x);
  z-index: 120;
  min-width: 230px;
  background: rgba(20,20,20,.97);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.65);
  padding: 6px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform-origin: top right;
  animation: dropin .2s var(--ease);
}
.pmenu__loading { display: flex; justify-content: center; padding: 18px; }
.pmenu__loading .boot-loader__spinner { width: 26px; height: 26px; border-width: 3px; }
.pmenu__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: none; border: 0;
  color: var(--text-2);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px; font-weight: 500;
  text-align: left;
  transition: background-color .15s, color .15s;
}
.pmenu__item:hover { background: rgba(255,255,255,.09); color: var(--text); }
.pmenu__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmenu__sep { height: 1px; background: rgba(255,255,255,.12); margin: 6px 8px; }

/* ============ PERFIS (tela "Quem está assistindo?") ============ */
.profiles {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--header-h) + 24px) 5% 60px;
  animation: fadein .35s var(--ease);
}
.profiles__inner { width: 100%; max-width: 820px; text-align: center; }
.profiles__loading { display: flex; justify-content: center; padding: 60px 0; }
.profiles__title {
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 800;
  margin-bottom: 8px;
}
.profiles__sub { color: var(--text-2); font-size: 15px; margin: 2px 0 10px; line-height: 1.5; }
.profiles__grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(14px, 2.4vw, 26px);
  margin-top: clamp(22px, 4vh, 40px);
}
.profiles__actions { margin-top: clamp(28px, 5vh, 48px); }

.ptile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: clamp(90px, 11vw, 140px);
  background: none; border: 0; padding: 0;
  color: var(--text-2);
  transition: color .2s;
}
.ptile:hover, .ptile:focus-visible { color: var(--text); outline: none; }
.ptile:hover .avatar--tile, .ptile:focus-visible .avatar--tile {
  border-color: var(--text);
  transform: scale(1.04);
}
.ptile--busy .avatar--tile { animation: livepulse 1s infinite; }
.ptile__name {
  font-size: 14px; font-weight: 600;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ptile__kids {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffd54a;
  background: rgba(255,213,74,.14);
  border: 1px solid rgba(255,213,74,.35);
  border-radius: 999px;
  padding: 2px 9px;
}
.ptile__kids--inline { display: inline-block; margin-top: 4px; letter-spacing: .4px; text-transform: none; font-size: 12px; font-weight: 600; }
.ptile__pen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,.55);
  border-radius: inherit;
  color: #fff;
}

/* formulário de criar/editar perfil */
.pform {
  max-width: 460px;
  margin: clamp(20px, 4vh, 36px) auto 0;
  text-align: left;
}
.pform__row { display: flex; gap: 20px; align-items: flex-start; }
.pform__avatar { flex-shrink: 0; }
.pform__fields { flex: 1; min-width: 0; }
.pform__kids {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0 2px;
  cursor: pointer;
}
.pform__kids-text b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.pform__kids-text small { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.pform__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* conta: linha do perfil em uso */
.acct-profile-now { display: flex; align-items: center; gap: 14px; min-width: 0; }
.acct-profile-actions { display: flex; gap: 8px; flex-shrink: 0; }
.acct-profiles-note { margin-top: 14px; }

/* ============ RESPONSIVO ============ */
@media (max-width: 760px) {
  :root { --header-h: 56px; --pad-x: 4.5%; }
  .header__nav, .header__right #btnSearch { display: none; }
  .logo-svg { height: 24px; }
  .bottomnav { display: flex; }
  /* busca em largura total; 16px evita o zoom automático do iOS */
  .searchbar {
    max-width: none;
    margin: 0 var(--pad-x) 10px;
    padding: 10px 14px;
    border-radius: 6px;
  }
  .searchbar input { font-size: 16px; }
  .searchbar button { font-size: 17px; padding: 8px 10px; margin: -4px -6px -4px 0; }
  /* a barra de busca ocupa espaço abaixo do header fixo */
  .view--search { padding-top: 56px; }
  .header__cta { padding: 7px 16px; font-size: 14px; }
  .landing__hero {
    min-height: 74vh;
    padding-top: calc(var(--header-h) + 32px);
    padding-bottom: 44px;
  }
  .landing__scrim {
    background:
      linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.58)),
      linear-gradient(180deg, rgba(20,20,20,.44), rgba(20,20,20,.1) 44%, var(--bg) 100%);
  }
  .landing__title { font-size: clamp(48px, 18vw, 76px); letter-spacing: 1px; }
  .landing__eyebrow { font-size: 10.5px; letter-spacing: 1px; line-height: 1.35; }
  .landing__sub { font-size: 17px; max-width: 96%; }
  .landing__cta { width: 100%; justify-content: center; }
  .landing__proof { gap: 7px; margin-top: 20px; }
  .landing__proof span { font-size: 11px; padding: 6px 8px; }
  .landing__features {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }
  .feature { min-height: 0; padding: 22px 18px; }
  .feature--wide { display: block; }
  .hero { height: 68vh; min-height: 360px; }
  .hero__content { padding-bottom: 9vh; }
  .modal { padding: 0; }
  .modal__card { border-radius: 0; min-height: 100vh; }
  .modal__hero-content, .modal__body { padding-left: 5%; padding-right: 5%; }
  .episode__thumb { width: 96px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  .player__controls { padding: 0 12px 10px; }
  .pbtn { width: 40px; height: 40px; }
  .player__vol input[type=range] { display: none; }
  .player__subtitle { display: none; }
  .player__skipnext, .player__nextcard { right: 14px; bottom: 84px; }
  .player__nextcard { max-width: calc(100vw - 28px); }
  .player__epg { width: 100%; border-left: 0; }
  .player__bigbtn { width: 68px; height: 68px; }
  .player__bigbtn svg { width: 32px; height: 32px; }
  /* perfis e login no celular */
  .profiles { padding-bottom: 40px; align-items: flex-start; }
  .avatar--tile { width: clamp(76px, 24vw, 104px); height: clamp(76px, 24vw, 104px); }
  .ptile { width: clamp(80px, 26vw, 110px); }
  .pform__row { flex-direction: column; align-items: center; }
  .pform__fields { width: 100%; }
  .pform__actions { justify-content: center; }
  .pmenu { right: var(--pad-x); left: auto; min-width: 210px; }
  .auth { padding-top: calc(var(--header-h) + 12px); }
  .auth-card { padding: 34px 7% 26px; }
  .wall__grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 7px; }
  .acct-item { flex-wrap: wrap; }
  .acct-profile-actions { width: 100%; justify-content: flex-end; }
  .admin-head { align-items: flex-start; flex-direction: column; }
  .admin-head .btn { width: 100%; justify-content: center; }
  .admin-section { padding: 18px; }
  .admin-section__head { align-items: flex-start; flex-direction: column; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-mysql { grid-template-columns: 1fr; }
  .admin-mysql__actions .btn { flex: 1 1 180px; justify-content: center; }
  .admin-upload .btn { width: 100%; justify-content: center; }
  .toast { bottom: calc(64px + env(safe-area-inset-bottom) + 12px); }
}

/* ---------- instruções de instalação da PWA ---------- */
.modal__card--sheet { max-width: 460px; }
.install-steps {
  margin: 14px 0 4px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.install-steps li { padding-left: 4px; }
.install-steps b { color: #fff; font-weight: 700; }
