/* ─── Design tokens — idênticos ao APK Android TV (Brand.kt / LoginScreen.kt / HomeScreen.kt) ─── */
:root {
  /* Backgrounds */
  --bg-top:      #080406;
  --bg-bottom:   #12060B;
  --bg:          #070305;
  --mid:         #2A0914;
  --panel:       #16080F;
  --idle:        #280D1A;

  /* Glass card */
  --card:        rgba(26, 12, 19, 0.94);
  --card-border: #44172C;

  /* Active state (focused tile / selected chip) */
  --active:    #FFF0F2;
  --selected:  #DC2626;   /* categoria/aba selecionada em Vermelho Supremo */
  --on-light:  #2B040B;

  /* Accent */
  --accent:    #EF4444;   /* Vermelho Rubi vibrante */
  --accent-hov:#F87171;
  --mint:      #FFFFFF;   /* Números, contadores e títulos em Branco de alto contraste na TV */

  /* Text */
  --text:      #FFF4F6;
  --muted:     #B58A97;

  /* Inputs */
  --field:       #14070E;
  --field-line:  #381525;

  /* Catalog-specific muted */
  --cat-muted: #C498A6;

  /* Danger */
  --danger: #FF4D4D;

  /* Misc */
  --icon-idle:  #F87171;
  --icon-active:#991B1B;
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }

html, body {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #070305;
  color: var(--text);
  font-family: "Roboto", "Noto Sans", "LG Smart UI", "Segoe UI", sans-serif;
  letter-spacing: 0.15px;
  line-height: 1.25;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-synthesis: none;
  overflow: hidden;
}

button, input {
  font-family: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
button:focus, input:focus { outline: none; }

/* webOS desenha setas na barra de rolagem — esconder em tudo */
html, body, #stage, #app,
.sidebar, .live-list, .grid, .settings-pane, .settings-menu, .epg, .detail-body, .playlists-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
  contain: layout style;
  -webkit-overflow-scrolling: touch;
}
::-webkit-scrollbar,
::-webkit-scrollbar-button,
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment,
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-corner {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
}

/* ─── Stage & app canvas — fixed 1920×1080, JS zoom fills the TV ─────────────── */
#stage {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #070305;
  overflow: hidden;
}

#app {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
}

/* ─── Backgrounds (no inset / no center/cover shorthand — old webOS WebKit) ─── */
.backdrop,
.catalog-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.backdrop {
  background-color: #070305;
  background-image: linear-gradient(180deg, rgba(7, 3, 5, 0.28), rgba(7, 3, 5, 0.52)), url("../assets/bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-background-size: cover;
  background-size: cover;
}
.backdrop.dim {
  background-image: linear-gradient(180deg, rgba(7, 3, 5, 0.42), rgba(12, 4, 7, 0.65)), url("../assets/bg.png");
}
.catalog-bg {
  background: linear-gradient(180deg, #220710 0%, #070305 100%);
}

/* Decorative orbs (match Android TV's CircleShape overlays) */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.orb.tr {
  top: 32px; right: 48px;
  width: 200px; height: 200px;
  background: rgba(220, 38, 38, 0.08); /* Accent.copy(alpha=0.08) */
}
.orb.bl {
  left: 40px; bottom: 16px;
  width: 160px; height: 160px;
  background: rgba(220, 38, 38, 0.06); /* 0x0F4F8CFF */
}

/* ─── Screen management ──────────────────────────────────────────────────────── */
.screen {
  display: none !important;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.screen.active { display: flex !important; }
.center { align-items: center; justify-content: center; }

/* ─── Login no formato de entrada: código, usuário e senha ─────────────────── */
.login-screen {
  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(7, 3, 5, 0.30) 0%, rgba(7, 3, 5, 0.60) 100%), url("../assets/bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-background-size: cover;
  background-size: cover;
  -webkit-box-align: stretch;
  align-items: stretch;
  -webkit-box-pack: center;
  justify-content: center;
}
.login-stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(7, 3, 5, 0.32) 0%, rgba(7, 3, 5, 0.62) 100%), url("../assets/bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-background-size: cover;
  background-size: cover;
}
.login-stage .logo {
  height: 150px;
  margin: 0 0 42px;
  position: relative;
  z-index: 2;
}
.login-screen .login-form {
  width: 760px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  position: relative;
  z-index: 2;
}
.login-screen .pill {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  width: 760px;
  height: 78px;
  margin: 11px 0;
  padding: 0 28px;
  border: none;
  border-radius: 40px;
  background: #f3f4f2;
  color: #1c1c1c;
  font-size: 30px;
  font-weight: 600;
  text-align: center;
  outline: none;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}
.login-screen .pill[data-empty="1"]:before { content: attr(data-placeholder); color: #8d8d8d; font-weight: 600; }
.login-screen .pill.on,
.login-screen .pill:focus {
  background: #DC2626;
  color: #fff;
}
.login-screen .pill.on[data-empty="1"]:before,
.login-screen .pill:focus[data-empty="1"]:before { color: rgba(255, 255, 255, 0.92); }
.login-screen .error {
  width: 760px;
  min-height: 28px;
  margin: 4px 0 0;
  text-align: center;
  color: #ffd2d2;
}
.login-screen .pill-btn {
  width: 460px;
  height: 74px;
  margin-top: 22px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 40px;
  background: transparent;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
}
.login-screen .pill-btn.on,
.login-screen .pill-btn:focus {
  background: #DC2626;
  border-color: #DC2626;
  color: #fff;
}
.login-foot {
  position: absolute;
  right: 48px;
  bottom: 28px;
  left: 48px;
  z-index: 2;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  align-items: flex-end;
  -webkit-box-pack: justify;
  justify-content: space-between;
  color: #f4f7f4;
  font-size: 22px;
  line-height: 1.45;
}
.login-foot-side { width: 560px; }
.login-foot-side.left { width: 720px; }
.login-foot-side.left { text-align: left; }
.login-foot-side.right { text-align: right; }
.login-wave {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 240px;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}
.so-keys {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 80;
  width: 1180px;
  margin-left: -590px;
  padding: 18px 22px 20px;
  background: #121418;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}
.so-keys[hidden] { display: none; }
.kb-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  justify-content: center;
  margin-top: 10px;
}
.kb-key {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 72px;
  flex: 0 0 72px;
  width: 72px;
  height: 58px;
  margin: 0 4px;
  border: none;
  border-radius: 12px;
  background: #2c3038;
  color: #f4f6f8;
  font-size: 26px;
  font-weight: 700;
}
.kb-key.kb-wide { -webkit-flex: 0 0 118px; flex: 0 0 118px; width: 118px; font-size: 22px; }
.kb-key.kb-space { -webkit-flex: 0 0 320px; flex: 0 0 320px; width: 320px; }
.kb-key.on,
.kb-key.kb-hot,
.kb-key:focus {
  background: #fff;
  color: #15171c;
}
.login-split {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-flex-direction: row;
  flex-direction: row;
  width: 100%;
  height: 100%;
  padding: 72px 64px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.login-notice.glass,
.login-form.glass {
  width: auto;
  max-width: none;
  height: 100%;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
  padding: 48px 52px;
}
.login-notice.glass {
  margin-right: 28px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  align-items: center;
  text-align: center;
}
.login-notice-msg {
  max-width: 90%;
  color: #F4F8FF;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.35;
}
.login-code-label {
  margin-top: 40px;
  color: var(--muted);
  font-size: 22px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.login-code-value {
  margin-top: 18px;
  color: #FFFFFF;
  font-size: 108px;
  font-weight: 700;
  letter-spacing: 8px;
  line-height: 1.05;
  word-break: break-all;
}
.login-form.glass {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  justify-content: center;
  text-align: left;
}
.login-form .logo {
  height: 132px;
  margin: 0 auto 14px;
}
.login-form .sub {
  text-align: left;
  margin-top: 4px;
  margin-bottom: 8px;
}
.login-form input.field:focus {
  border-color: #FFFFFF;
  -webkit-box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.42);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.42);
}

/* ─── Glass card (GlassCard composable: cardWidth=480dp, cardPadH=28dp*1, cardPadV=32dp*1) */
.glass {
  width: 720px;
  max-width: 86%;
  padding: 48px 48px 40px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  text-align: center;
}
.boot-only {
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
}
.boot-only .logo {
  height: 180px;
  margin: 0 0 28px;
}
.boot-msg {
  color: rgba(226, 232, 240, 0.75);
  font-size: 18px;
  margin-top: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-align: center;
  min-height: 24px;
}
.boot-card .sub { margin-top: 22px; }
.boot-card .bar { margin-top: 22px; }
.glass.wide { width: 840px; }

/* ─── Logo ───────────────────────────────────────────────────────────────────── */
.logo {
  display: block;
  height: 168px;
  max-width: 80%;
  margin: 0 auto 18px;
  -o-object-fit: contain;
  object-fit: contain;
}
.logo.sm { height: 40px; margin: 0; }

/* ─── Typography ─────────────────────────────────────────────────────────────── */
.lead  { color: #fff; font-size: 40px; font-weight: 600; }
#notice-msg { font-size: 22px; line-height: 1.4; color: #ffd59a; }
.sub   { color: var(--muted); font-size: 24px; margin-top: 12px; }
.hint  { color: rgba(196, 152, 166, 0.7); font-size: 16px; margin-top: 20px; text-align: center; }
.accent { color: #FFFFFF; font-weight: 700; font-size: 28px; text-shadow: 0 0 16px rgba(255, 255, 255, 0.45); }
.error  { color: var(--danger); font-size: 18px; min-height: 24px; margin-top: 12px; text-align: left; }

/* ─── Field label ────────────────────────────────────────────────────────────── */
.field-label {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--muted);
  font-size: 18px;
  margin: 20px 0 10px;
}

/* ─── Input field (fieldHeight = 52dp) ─────────────────────────────────────── */
input.field {
  width: 100%;
  height: 76px;
  border: 1px solid var(--field-line);
  border-radius: 20px;
  padding: 0 24px;
  font-size: 26px;
  color: #fff;
  background: var(--field);
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
}
input.field:focus {
  border-color: var(--accent);    /* FieldFocus */
  background: #151d2c;
}
.pin-slots { margin-top: 4px; }
input.pin-digit {
  display: inline-block;
  width: 84px;
  height: 84px;
  margin: 0 10px 0 0;
  padding: 0;
  text-align: center;
  font-size: 34px;
}

/* ─── Primary button (buttonHeight = 52dp, full width, cardRadius=24dp) ─────── */
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 76px;
  border-radius: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  border: 0;
  margin-top: 8px;
  transition: background 180ms ease, box-shadow 180ms ease;
}
.primary:focus,
.primary:hover {
  background: var(--accent-hov);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}
.primary:active { background: #EF4444; }
.primary:disabled { background: #3B0D1C; cursor: default; }

/* ─── Generic chip / row (matches CatalogFocusRow composable) ───────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--idle);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 64px;
  min-height: 64px;
  padding: 14px 22px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  background: var(--idle);
  color: #fff;
  font-size: 22px;
  font-weight: 400;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease,
              transform 150ms ease;
}
/* Selecionado = azul. Foco do controle = branco. Assim não se confundem. */
.chip.on,
.row.on {
  background: var(--selected);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.chip:focus,
.chip:hover,
.row:focus,
.row:hover {
  background: var(--active);
  color: var(--on-light);
  border-color: transparent;
  box-shadow: inset 0 0 0 2px #fff;
}
.chip.on { box-shadow: none; }
.chip.on:focus,
.chip.on:hover,
.row.on:focus,
.row.on:hover {
  background: var(--active);
  color: var(--on-light);
  box-shadow: inset 0 0 0 2px #fff;
}

/* ─── Spinner (56dp, 5dp track, matching BootSpinner composable) ─────────────── */
.spinner {
  width: 56px;
  height: 56px;
  margin: 18px auto 0;
  border: 5px solid #3B0D1C;
  border-top-color: #EF4444;
  border-radius: 50%;
  -webkit-animation: spin 0.9s linear infinite;
  animation: spin 0.9s linear infinite;
}
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
@keyframes spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }

/* ─── Boot progress bar (BootProgressBar composable: 10dp h, radius 10dp) ───── */
.bar {
  width: 100%;
  height: 10px;
  margin-top: 16px;
  border-radius: 10px;
  background: #1C0812;   /* 0xFF152033 */
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 8%;
  background: var(--accent);
  border-radius: 10px;
  transition: width 420ms ease;
}

.hub {
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: start;
  justify-content: flex-start;
  padding: 36px 56px 150px;
  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(7, 3, 5, 0.28) 0%, rgba(7, 3, 5, 0.58) 100%), url("../assets/bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-background-size: cover;
  background-size: cover;
}
.hub .logo {
  height: 168px;
  margin: 18px 0 10px;
  position: relative;
  z-index: 2;
}
.tiles {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 2;
}
.tile {
  font-family: inherit;
  -webkit-appearance: none;
  width: 232px;
  height: 388px;
  margin: 0 14px;
  padding: 18px 12px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(10, 28, 68, 0.42);
  color: #fff;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
}
.tile span:not(.tile-badge) {
  display: block;
  max-width: 204px;
  line-height: 1.16;
  text-align: center;
  font-size: 24px;
}
.tile:focus,
.tile:hover,
.tile.on {
  background: rgba(42, 9, 20, 0.78);
  border-color: rgba(255, 255, 255, 0.92);
  color: #fff;
  outline: none;
}
.tile-badge {
  width: 108px;
  height: 108px;
  margin-bottom: 22px;
  border-radius: 26px;
  background: #DC2626;
  background: -webkit-linear-gradient(145deg, #EF4444 0%, #9B1428 100%);
  background: linear-gradient(145deg, #EF4444 0%, #9B1428 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
}
.tile:focus .tile-badge,
.tile:hover .tile-badge,
.tile.on .tile-badge {
  background: -webkit-linear-gradient(145deg, #F87171 0%, #DC2626 100%);
  background: linear-gradient(145deg, #F87171 0%, #DC2626 100%);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.65);
}
.tile .ico { width: 56px; height: 56px; color: #fff; }
.hub-foot {
  position: absolute;
  right: 48px;
  bottom: 28px;
  left: 48px;
  z-index: 2;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  align-items: flex-end;
  -webkit-box-pack: justify;
  justify-content: space-between;
  color: #f4f7f4;
  font-size: 22px;
  line-height: 1.45;
}
.hub-foot-side { width: 560px; }
.hub-foot-side.left { width: 720px; }
.hub-foot-side.left { text-align: left; }
.hub-foot-side.right { text-align: right; }
.reload {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  align-items: center;
  height: 64px;
  padding: 0 28px;
  border: none;
  border-radius: 16px;
  background: rgba(8, 16, 32, 0.72);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}
.reload:focus,
.reload:hover,
.reload.on { background: #DC2626; color: #fff; outline: none; }
.reload-icon { width: 28px; height: 28px; margin-right: 12px; }
.hub-wave {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 820px;
  height: 260px;
  z-index: 1;
  pointer-events: none;
}

/* ─── Catalog screen ─────────────────────────────────────────────────────────── */
.catalog {
  flex-direction: column;
  padding: 22px 36px 16px;
}
/* Top bar (header row with back/tab chips + search) */
.topbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
  height: 58px;
}
.topbar .chip { margin: 0 8px 0 0; }
.topbar #btn-back-catalog {
  width: auto;
  min-width: 140px;
  max-width: 180px;
  -webkit-box-flex: 0;
  flex: 0 0 auto;
}
.topbar .grow { flex: 1 1 auto; min-width: 24px; }
/* Search field (300dp wide, fieldHeight=52dp, radius=16dp) */
.search {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  width: 340px;
  height: 58px;
  border-radius: 16px;
  flex: 0 0 340px;
  margin-left: auto;
  border: 1px solid var(--field-line);
  background: var(--field);
  padding: 0 20px;
  font-size: 18px;
  color: #fff;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  transition: border-color 150ms ease;
}
.search[data-empty="1"]:before { content: attr(data-placeholder); color: rgba(255, 255, 255, 0.55); }
.search:focus { border-color: var(--accent); outline: none; }

/* Content layout (sidebar + main) */
.layout {
  display: flex;
  flex: 1;
  min-height: 0;
  margin-top: 14px;
}
/* Category sidebar (sideBar = 220dp) */
.sidebar {
  width: 420px;
  flex: 0 0 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-right: 22px;
}
#sidebar, #live-sidebar {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.side-title {
  color: #FFFFFF;
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 700;
}
/* Category rows (CatalogFocusRow) */
.row {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 64px;
  text-align: left;
  margin: 0 0 12px 0;
  justify-content: space-between;
  padding: 14px 18px;
}
.row .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}
.row .num {
  flex-shrink: 0;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.92;
}
.row.on .num { color: #FFFFFF; opacity: 1; }
.row:focus .num { color: #FFFFFF; opacity: 1; }

/* Main content area */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.catalog-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.head-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
/* CategoryHeading composable */
.heading { color: #fff; font-size: 28px; font-weight: 600; margin-right: 12px; }
.count   { color: #FFFFFF; font-size: 20px; font-weight: 600; opacity: 0.95; }

/* VodSortBar composable (rounded pill container) */
.sort {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  background: rgba(34, 7, 16, 0.45);   /* 0x3312305A */
  border: 1px solid rgba(239, 68, 68, 0.35);  /* 0x554DA3FF */
  border-radius: 14px;
}
.sort span { color: #FFFFFF; font-size: 16px; font-weight: 600; padding: 0 10px; }
/* Sort chips inside VodSortBar */
.sort .chip {
  background: #16060E;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 18px;
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  margin-left: 8px;
}
.sort .chip.on {
  background: var(--selected);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
}
.sort .chip:focus {
  background: var(--active);
  color: var(--on-light);
  border-color: transparent;
  box-shadow: inset 0 0 0 2px #fff;
}
.sort .chip.on:focus {
  background: var(--active);
  color: var(--on-light);
}

.status { color: var(--mint); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* ─── VOD grid (poster cards) ───────────────────────────────────────────────── */
.grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 8px 28px;
}
.grid::after { content: ""; display: table; clear: both; }
.grid-pad {
  float: left;
  width: 100%;
  height: 0;
  clear: both;
  pointer-events: none;
}
/* PosterCard composable (Adaptive min ~118dp, ratio 2:3, fills the row) */
.poster {
  float: left;
  width: 186px;
  margin: 0 12px 12px 0;
  background: rgba(34, 7, 16, 0.75);
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  overflow: hidden;
  padding: 0 0 8px;
  color: #fff;
  display: block;
  height: auto;
  position: relative;
  z-index: 1;
  opacity: 1;
  box-sizing: border-box;
  -webkit-transform: none !important;
  transform: none !important;
  contain: layout paint;
}
.poster:focus,
.poster.on,
.poster:hover {
  z-index: 25 !important;
  opacity: 1 !important;
  border: 3px solid #FFFFFF !important;
  outline: none !important;
  box-shadow: 0 0 0 3px #EF4444, 0 6px 16px rgba(0, 0, 0, 0.85) !important;
  -webkit-transform: none !important;
  transform: none !important;
}
.poster:focus > span,
.poster.on > span,
.poster:hover > span {
  background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border-radius: 0 0 10px 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
.poster .art {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 150%;   /* 2:3 aspect ratio */
  background: #16060E;
  overflow: hidden;
  border-radius: 10px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.poster .art img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  -webkit-object-fit: cover;
  display: block;
  opacity: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transition: -webkit-transform 0.12s ease-out, opacity 0.15s ease;
  transition: transform 0.12s ease-out, opacity 0.15s ease;
}
.poster:focus .art img,
.poster.on .art img,
.poster:hover .art img {
  -webkit-transform: scale(1.08) translateZ(0);
  transform: scale(1.08) translateZ(0);
}
.poster .art img.ready { opacity: 1; }
.badge-leg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 3;
  padding: 6px 0;
  background: #E0B423;
  color: #1A1403;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-align: center;
  pointer-events: none;
}
.poster .badge-leg { font-size: 14px; padding: 5px 0; }
.poster-star {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
  color: #FFD54F;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 2px 6px #000;
}
.poster .art .ph {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}
.poster > span {
  display: block;
  height: 52px;
  padding: 8px 10px 0;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  line-height: 20px;
}
.poster:focus > span {
  color: #fff;
}

/* ─── Live TV layout ─────────────────────────────────────────────────────────── */
/* Channel list column (channelBar = 280dp) */
.live-mid {
  width: 440px;
  flex: 0 0 440px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-right: 16px;
}
.live-mid .heading { font-size: 20px; font-weight: 600; }
.live-list {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: auto;
}
.live-list .row { margin-bottom: 8px; contain: layout style; }
/* Preview + EPG column */
/* Preview + EPG column — block layout so EPG stays below, not under the video */
.live-right {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
}
.preview {
  display: block;
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
  flex-shrink: 0;
}
.preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 0;
  padding-top: 50%;
  position: relative;
  background: rgba(11, 23, 51, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}
.preview-empty-card {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  text-align: center;
}
.preview-empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-empty-icon svg { width: 100%; height: 100%; }
.preview-empty-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.preview-empty-sub {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
  line-height: 1.35;
}
.preview-frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 44%;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.preview.has-play .preview-frame { background: #000; }
.preview.avplay.has-play .preview-frame,
.preview.avplay .preview-frame { background: transparent; }
.preview-frame video,
.preview-frame img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  -webkit-object-fit: contain;
  background: #000;
}
.preview-loading {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 32, 68, 0.96) 0%, rgba(4, 9, 22, 0.98) 100%);
  z-index: 5;
  transition: opacity 0.3s ease;
}
.preview-loading[hidden] { display: none !important; }
.preview-loading img {
  position: relative;
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6));
}
.preview-spin-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.preview-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #EF4444;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
#preview-loading-txt {
  font-size: 15px;
  color: #FECACA;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.preview-fail-content {
  text-align: center;
  padding: 16px;
}
.preview-fail-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.preview-fail-title {
  margin: 0 0 4px;
  color: #ffb74d;
  font-size: 18px;
  font-weight: 700;
}
.preview-fail-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}
/* AVPlay: vídeo nativo fica atrás do HTML — tela cheia precisa de fundo transparente */
.preview.avplay,
.preview.avplay .preview-frame,
.preview.avplay video,
#preview.avplay #preview-video { background: transparent; }
#screen-player.avplay,
#screen-player.avplay .player-wrap,
#screen-player.avplay #video { background: transparent; }
html.avplay-on,
body.avplay-on,
html.avplay-on #stage,
body.avplay-on #stage,
html.avplay-on #app,
body.avplay-on #app,
html.avplay-preview,
body.avplay-preview,
html.avplay-preview #stage,
body.avplay-preview #stage,
html.avplay-preview #app,
body.avplay-preview #app {
  background: transparent !important;
  -webkit-transform: none !important;
  transform: none !important;
}
/* Show/hide helpers */
.preview.has-play .preview-empty { display: none; }
.preview:not(.has-play) .preview-frame { display: none; }

/* EPG guide (EpgGuide composable: radius=16dp, bg 0xE60B1733) */
.epg {
  position: relative;
  z-index: 3;
  flex: 1;
  min-height: 380px;
  margin-top: 14px;
  background: rgba(11, 23, 51, 0.96);
  border-radius: 16px;
  overflow: hidden;
}
.epg h3 {
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  padding: 14px 18px 10px;
}
.epg-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  align-items: flex-start;
  padding: 12px 18px;
  color: #fff;
  font-size: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.epg-row.now { background: rgba(34, 7, 16, 0.45); }
.epg-row .tag {
  width: 120px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  margin-right: 14px;
}
.epg-row.now .tag { color: #FFD54F; }
.epg-row .prog { flex: 1; min-width: 0; line-height: 1.35; }
.epg-row .prog small { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.epg-row .clock {
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 12px;
  min-width: 118px;
  text-align: right;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.star { color: #FFD54F; }

/* ─── Settings screen — cabe no quadro 1920×1080 da TV ──────────────────────── */
#screen-settings.active {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}
.settings {
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 40px 56px 36px;
  overflow: hidden;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.settings-header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 64px;
  flex: 0 0 64px;
  height: 64px;
  margin-bottom: 18px;
}
.settings-header svg { margin-right: 12px; }
.settings-title {
  color: #fff;
  font-size: 44px;
  font-weight: 700;
}

.settings-body {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: stretch;
  -webkit-align-items: stretch;
  align-items: stretch;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  height: 1px;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: rgba(11, 23, 51, 0.90);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 28px;
  padding: 22px 26px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.settings-menu {
  width: 480px;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 480px;
  flex: 0 0 480px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  margin-right: 26px;
}
.smenu-item {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  width: 100%;
  min-height: 82px;
  height: auto;
  padding: 16px 22px;
  border: 0;
  border-radius: 14px;
  background: #1A0812;
  color: #fff;
  font-size: 26px;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  margin: 0 0 10px 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.smenu-item.on {
  background: var(--selected);
  color: #fff;
}
.smenu-item:focus,
.smenu-item:hover {
  background: var(--active);
  color: var(--on-light);
  outline: none;
}

.settings-pane {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 8px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* Section notice (Ok = #FCA5A5, Danger = #FF8A80) */
.settings-notice {
  font-size: 15px;
  margin-bottom: 16px;
}
.settings-notice.ok     { color: #FCA5A5; }
.settings-notice.danger { color: #FF8A80; }

/* Section panel */
.spane { display: flex; flex-direction: column; }
.spane[hidden] { display: none; }
.spane-title {
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  margin: 8px 0 16px;
}
.spane-title + .spane-title,
.info-row + .spane-title {
  margin-top: 28px;
}
.spane-sub {
  color: #C498A6;
  font-size: 20px;
  margin: 0 0 20px;
}
#spane-pin {
  -webkit-box-align: center;
  align-items: center;
  height: 100%;
  min-height: 100%;
  padding-top: 18px;
}
.pin-head {
  width: 100%;
  margin: 8px 0 34px;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  text-align: center;
}
.pin-boxes {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  justify-content: center;
}
.pin-box {
  width: 124px;
  height: 146px;
  margin: 0 12px;
  border-radius: 18px;
  background: #10141c;
  color: #fff;
  font-size: 52px;
  font-weight: 700;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
}
.pin-pad {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  justify-content: center;
  margin-top: 42px;
}
.pin-key {
  width: 70px;
  height: 70px;
  margin: 0 6px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #1b2028;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}
.pin-key:focus,
.pin-key.on {
  background: #fff;
  color: #15171c;
  border-color: #fff;
  outline: none;
}
.pin-default {
  margin-top: auto;
  padding: 28px 0 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 22px;
  text-align: center;
}
.muted-label { color: #C498A6; font-size: 13px; }

/* InfoRow composable (label + value, separator line) */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  margin: 0 0 12px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #1A0812;
}
.info-label { color: #fff; font-size: 24px; font-weight: 700; max-width: 52%; }
.info-label.wide { max-width: 68%; font-size: 20px; }
.info-val   { color: #fff; font-size: 24px; font-weight: 600; max-width: 46%; text-align: right; word-wrap: break-word; }
.cat-kind {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  margin: 0 0 12px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #1A0812;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  text-align: left;
}
.cat-kind:focus { outline: 3px solid #fff; background: #250915; }
.cat-manage {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  min-height: 72px;
  margin: 0 0 12px;
  padding: 0 16px 0 22px;
  border-radius: 12px;
  background: #1A0812;
  color: #fff;
}
.cat-manage .name {
  -webkit-box-flex: 1;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 700;
}
.cat-manage .num { margin: 0 14px; font-size: 22px; font-weight: 600; }
.cat-act {
  -webkit-box-flex: 0;
  flex: 0 0 auto;
  min-width: 132px;
  height: 48px;
  margin-left: 10px;
  border: 0;
  border-radius: 10px;
  background: #200A15;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.cat-act.on { background: #DC2626; }
.cat-act:focus { outline: 3px solid #fff; }

/* StreamFormatCard composable */
.sformat-card {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 14px;
  background: #1A0812;
  border: 1px solid transparent;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.sformat-card:focus,
.sformat-card:hover {
  background: #381122;
  border-color: #EF4444;
  outline: none;
}
.sformat-card.on { background: #3B0D1C;
  border: 2px solid #EF4444;
}
/* Radio dot */
.sformat-radio {
  width: 22px;
  height: 22px;
  border: 2px solid #B58A97;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
}
.sformat-card.on .sformat-radio {
  border-color: #8B1224;
  background: transparent;
}
.sformat-card.on .sformat-radio::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8B1224;
  display: block;
}
.sformat-info { display: flex; flex-direction: column; flex: 1; }
.sformat-row  { display: flex; align-items: center; }
.sformat-row .sformat-title { margin-right: 10px; }
.schoice-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}
.schoice-row .schoice { margin: 0 10px 10px 0; }
.sformat-title  { color: #fff; font-size: 24px; font-weight: 600; }
.sformat-card.on .sformat-title { color: #1F050D; }
.sformat-badge  { color: #FCA5A5; font-size: 12px; font-weight: 500; }
.sformat-card.on .sformat-badge { color: #8B1224; }
.sformat-detail { color: #C498A6; font-size: 14px; margin-top: 4px; }
.sformat-card.on .sformat-detail { color: #FCA5A5; }

/* ChoiceRow composable (min-width=140dp, height=44dp, radius=8dp) */
.schoice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: #1A0812;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.schoice.on,
.schoice:focus,
.schoice:hover {
  background: #DC2626;
  color: #1F050D;
  outline: none;
}
.schoice.on { box-shadow: inset 0 0 0 1px #EF4444; }

/* SettingsToggleItem composable (toggle switch) */
.stoggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #1A0812;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.stoggle:focus,
.stoggle:hover { background: #DC2626; color: #1F050D; outline: none; }
.stoggle-label { flex: 1; text-align: left; }
.stoggle-track {
  width: 46px;
  height: 24px;
  border-radius: 12px;
  background: #3A0C1C;
  position: relative;
  flex-shrink: 0;
  transition: background 150ms ease;
  margin-left: 16px;
}
.stoggle.on .stoggle-track { background: #EF4444; }
.stoggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 150ms ease;
}
.stoggle.on .stoggle-thumb { left: 25px; }

/* Confirm dialog overlay (ConfirmDialog composable) */
.sconfirm-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 5, 9, 0.80); /* 0xCC050B1C */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
#pin-gate .sconfirm-dialog {
  width: 760px;
  max-width: 92%;
  text-align: center;
}
#pin-gate .sconfirm-title { font-size: 32px; text-align: center; }
#pin-gate .sconfirm-msg { font-size: 20px; text-align: center; }
#pin-gate .pin-box { width: 78px; height: 92px; font-size: 36px; }
#pin-gate .pin-pad {
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  max-width: 560px;
  margin: 18px auto 0;
}
#pin-gate .pin-key { margin: 6px; }
#pin-gate .pin-default { margin-top: 12px; }
#pin-gate .sconfirm-actions { -webkit-box-pack: center; justify-content: center; margin-top: 8px; }
#pin-gate .pin-slots { margin: 14px 0 8px; text-align: center; }
.sconfirm-overlay[hidden] { display: none; }
.sconfirm-dialog {
  max-width: 540px;
  background: #1A0812;
  border-radius: 16px;
  padding: 28px;
}
.sconfirm-title { color: #fff; font-size: 22px; font-weight: 600; margin: 0 0 10px; }
.sconfirm-msg   { color: #C498A6; font-size: 15px; margin: 0 0 24px; }
.sconfirm-actions { display: flex; }
.sconfirm-actions .schoice { margin-right: 12px; }
.hub-toast {
  position: absolute;
  top: 28px;
  right: 36px;
  z-index: 50;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  max-width: 720px;
  padding: 16px 22px;
  background: rgba(8, 16, 36, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  pointer-events: none;
}
.hub-toast[hidden] { display: none; }
.hub-toast.ok { border-color: #43A047; }
.hub-toast.bad { border-color: #E53935; }
.hub-toast-emoji { font-size: 40px; line-height: 1; margin-right: 14px; }
.hub-toast-copy { min-width: 0; }
.hub-toast strong { display: block; color: #fff; font-size: 26px; font-weight: 700; }
.hub-toast p { margin: 2px 0 0; color: #FFE4E6; font-size: 18px; line-height: 1.3; }

/* ─── VOD Detail Screen (Responsive & Distributed Cinematic Layout) ──────── */
.detail {
  padding: 0;
  background: #070305;
  overflow: hidden;
}
.detail-hero {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.detail-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  -webkit-background-size: cover;
  opacity: 0.65;
}
.detail-veil {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(18, 5, 9, 0.98) 0%, rgba(18, 5, 9, 0.92) 38%, rgba(18, 5, 9, 0.65) 68%, rgba(18, 5, 9, 0.35) 100%),
    linear-gradient(0deg, rgba(18, 5, 9, 1) 0%, rgba(18, 5, 9, 0.85) 35%, transparent 100%),
    linear-gradient(180deg, rgba(18, 5, 9, 0.85) 0%, transparent 22%);
}
.detail-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: clamp(24px, 3.5vh, 44px) clamp(36px, 4.5vw, 68px) clamp(60px, 9vh, 110px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
  scrollbar-width: none;
}
.detail-content::-webkit-scrollbar { display: none; }

/* Top Navigation Bar */
.detail-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: clamp(16px, 2.2vh, 26px);
  flex-shrink: 0;
}
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: clamp(42px, 5vh, 48px);
  padding: 0 clamp(18px, 1.8vw, 24px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-back-btn svg {
  stroke: #FFFFFF;
  transition: transform 0.18s ease;
}
.detail-back-btn:focus,
.detail-back-btn.on {
  background: #FFFFFF !important;
  color: #070305 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.08);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.7);
}
.detail-back-btn:focus svg,
.detail-back-btn.on svg {
  stroke: #070305 !important;
  transform: translateX(-3px);
}

/* Main Hero Row (Poster + Information) */
.detail-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: clamp(24px, 3.2vh, 40px);
  flex-shrink: 0;
}
.detail-poster-wrap {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  flex: 0 0 260px;
  flex-shrink: 0;
  margin-right: clamp(32px, 3.8vw, 56px);
}
.detail-poster {
  position: relative;
  width: 260px;
  height: 390px;
  min-width: 260px;
  min-height: 390px;
  max-width: 260px;
  max-height: 390px;
  border-radius: 18px;
  overflow: hidden;
  background-color: #16060E;
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-background-size: cover;
  background-size: cover;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 0 1.5px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.detail-poster img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  -webkit-object-fit: cover;
  display: block;
  z-index: 1;
}
.detail-poster .badge-leg {
  position: absolute;
  top: 12px; right: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.92);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Body & Metadata */
.detail-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.detail-type-badge-row {
  display: flex;
  align-items: center;
  margin-bottom: clamp(8px, 1.2vh, 14px);
}
.detail-type-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.50);
  color: #FECACA;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.detail-body h1 {
  margin: 0 0 clamp(10px, 1.4vh, 16px) 0;
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
  max-width: 1100px;
}
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 clamp(10px, 1.4vh, 16px) 0;
}
.detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(5px, 0.7vh, 8px) clamp(12px, 1.2vw, 18px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #E2E8F0;
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 600;
  white-space: nowrap;
  margin-right: clamp(8px, 1vw, 14px);
  margin-bottom: 6px;
}
.detail-pill.score {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #FCD34D;
  font-weight: 700;
}
.detail-pill.quality {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6EE7B7;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.detail-sinopse {
  margin: 0 0 clamp(12px, 1.6vh, 20px) 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.6;
  max-width: 1040px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.detail-specs-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: clamp(8px, 1.1vh, 12px) clamp(14px, 1.5vw, 22px);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  width: fit-content;
  max-width: 100%;
  margin: 0 0 clamp(14px, 1.8vh, 22px) 0;
}
.detail-specs-row[hidden] { display: none !important; }
.detail-spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(13px, 0.95vw, 15px);
  font-weight: 600;
  white-space: nowrap;
  margin-right: clamp(12px, 1.5vw, 22px);
  margin-bottom: 4px;
}
.detail-spec-tag strong {
  color: #FFFFFF;
}

/* Action Buttons */
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: clamp(4px, 0.8vh, 10px);
}
.detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: clamp(48px, 5.8vh, 58px);
  padding: 0 clamp(22px, 2.2vw, 32px);
  border-radius: 999px;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 700;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  margin-right: clamp(12px, 1.4vw, 18px);
  margin-bottom: 8px;
  transition: transform 0.1s ease;
  will-change: transform;
}
.detail-btn svg {
  flex-shrink: 0;
}
.detail-btn-primary {
  background: linear-gradient(135deg, #E50914 0%, #B91C1C 100%);
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.45);
}
.detail-btn-primary svg {
  fill: #FFFFFF;
}
.detail-btn-primary:focus,
.detail-btn-primary.on {
  background: #FFFFFF !important;
  color: #E50914 !important;
  border-color: #FFFFFF !important;
  font-weight: 900 !important;
  transform: scale(1.08);
  box-shadow: 0 0 0 4px #E50914, 0 8px 30px rgba(229, 9, 20, 0.9) !important;
}
.detail-btn-primary:focus svg,
.detail-btn-primary.on svg {
  fill: #E50914 !important;
}
.detail-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}
.detail-btn-secondary:focus,
.detail-btn-secondary.on {
  background: #FFFFFF !important;
  color: #070305 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}
.detail-btn-secondary:focus svg,
.detail-btn-secondary.on svg {
  stroke: #070305 !important;
}
.detail-btn-secondary:focus .fav-active,
.detail-btn-secondary.on .fav-active {
  fill: #D97706 !important;
  stroke: #D97706 !important;
}

/* Series Section: Seasons Bar & Episodes Carousel */
.detail-series-section {
  display: flex;
  flex-direction: column;
  margin-top: clamp(18px, 2.8vh, 36px);
  padding-top: clamp(20px, 2.8vh, 34px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.detail-series-section[hidden] { display: none !important; }
.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: clamp(14px, 1.8vh, 22px);
}
.detail-section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.3px;
}
.detail-section-title svg {
  stroke: #F87171;
}
.seasons-bar {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 2px;
  margin-bottom: clamp(12px, 1.6vh, 20px);
}
.seasons-bar::-webkit-scrollbar { display: none; }
.season-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 1vh, 11px) clamp(18px, 1.6vw, 26px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 700;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: clamp(10px, 1vw, 14px);
  margin-bottom: 4px;
  transition: transform 0.1s ease;
  will-change: transform;
}
.season-pill.on {
  background: #DC2626;
  border-color: #F87171;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
}
.season-pill:focus {
  background: #FFFFFF !important;
  color: #0B0306 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

/* Episodes Horizontal Carousel */
.episodes-carousel {
  display: flex;
  flex-direction: row;
  padding: 10px 6px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.episodes-carousel::-webkit-scrollbar { display: none; }
.detail-ep-card {
  display: flex;
  flex-direction: column;
  width: clamp(270px, 22vw, 340px);
  min-width: clamp(270px, 22vw, 340px);
  max-width: clamp(270px, 22vw, 340px);
  border-radius: clamp(14px, 1.4vw, 20px);
  background: rgba(22, 8, 15, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: clamp(16px, 1.8vw, 24px);
  margin-bottom: 4px;
  transition: transform 0.1s ease;
  will-change: transform;
}
.detail-ep-card.is-current {
  border-color: #EF4444;
  background: rgba(220, 38, 38, 0.2);
}
.detail-ep-card:focus {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: #FFFFFF !important;
  transform: scale(1.06) translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.6);
  z-index: 5;
}
.detail-ep-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: clamp(152px, 12.4vw, 192px);
  background: #0D0408;
  overflow: hidden;
}
.detail-ep-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.detail-ep-num-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FECACA;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.detail-ep-dur-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  font-family: monospace, sans-serif;
}
.ep-thumb-play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 3;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.detail-ep-card:focus .ep-thumb-play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.detail-ep-info {
  padding: clamp(12px, 1.4vh, 18px) clamp(14px, 1.4vw, 20px);
  display: flex;
  flex-direction: column;
  background: rgba(15, 5, 10, 0.96);
  flex: 1;
}
.detail-ep-title {
  margin: 0 0 6px 0;
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-ep-plot {
  margin: 0;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cast Section */
.detail-cast-wrap {
  margin-top: clamp(18px, 2.8vh, 36px);
  padding-top: clamp(20px, 2.8vh, 34px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.detail-cast-wrap[hidden] { display: none !important; }
.detail-cast {
  display: flex;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.detail-cast::-webkit-scrollbar { display: none; }
.detail-actor {
  width: clamp(105px, 9vw, 135px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  outline: none;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 16px;
  margin-right: clamp(16px, 2vw, 30px);
  margin-bottom: 4px;
  transition: transform 0.12s ease;
  will-change: transform;
}
.detail-actor.focusable:focus,
.detail-actor.focusable:hover {
  transform: translateY(-6px) scale(1.08);
}
.detail-actor.focusable:focus .detail-actor-photo,
.detail-actor.focusable:hover .detail-actor-photo {
  border-color: #EF4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.65), 0 10px 24px rgba(0, 0, 0, 0.75);
}
.detail-actor.focusable:focus .detail-actor-name,
.detail-actor.focusable:hover .detail-actor-name {
  color: #F87171;
}
.detail-actor-photo {
  width: clamp(90px, 8vw, 115px);
  height: clamp(90px, 8vw, 115px);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(34, 7, 16, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}
.detail-actor-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.detail-actor-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FED7D7;
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 800;
}
.detail-actor-name {
  margin: 0;
  color: #FFFFFF;
  font-size: clamp(13px, 0.98vw, 15px);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.detail-actor-role {
  margin-top: 3px;
  color: #94A3B8;
  font-size: clamp(11px, 0.85vw, 13px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Movie vs Series Specific Expansions */
.screen.detail.is-movie .detail-sinopse {
  -webkit-line-clamp: 5;
  max-width: 1080px;
}
.screen.detail.is-movie .detail-row {
  margin-bottom: clamp(32px, 4.5vh, 56px);
}
.screen.detail.is-movie .detail-cast-wrap {
  margin-top: clamp(24px, 3.5vh, 48px);
}

/* ─── Device Specific Responsive Breakpoints ──────────────────────────────── */
/* 720p TV Screens / Low-density TV boxes (Fire TV Lite, Mi Stick, generic boxes) */
@media (max-height: 740px) {
  .detail-content {
    padding: 18px 36px 28px;
  }
  .detail-row {
    margin-bottom: 18px;
  }
  .detail-poster-wrap {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    flex: 0 0 180px;
    margin-right: 28px;
  }
  .detail-poster {
    width: 180px;
    height: 270px;
    min-width: 180px;
    min-height: 270px;
    max-width: 180px;
    max-height: 270px;
  }
  .detail-body h1 {
    font-size: 28px;
    margin-bottom: 10px;
  }
  .detail-meta {
    margin-bottom: 10px;
  }
  .detail-pill {
    padding: 4px 10px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 4px;
  }
  .detail-sinopse {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 12px;
    -webkit-line-clamp: 3;
  }
  .detail-specs-row {
    padding: 6px 12px;
    margin-bottom: 14px;
  }
  .detail-spec-tag {
    font-size: 12px;
    margin-right: 12px;
  }
  .detail-btn {
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
    margin-right: 12px;
  }
  .season-pill {
    padding: 6px 16px;
    font-size: 13px;
    margin-right: 10px;
  }
  .detail-ep-card {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    margin-right: 14px;
  }
  .detail-actor {
    width: 100px;
    margin-right: 12px;
  }
  .detail-series-section,
  .detail-cast-wrap {
    margin-top: 16px;
    padding-top: 16px;
  }
}

/* 4K UHD TV Screens (Large 55"+ 4K displays) */
@media (min-width: 2500px) or (min-height: 1300px) {
  .detail-content {
    padding: 56px 96px 72px;
  }
  .detail-row {
    margin-bottom: 48px;
  }
  .detail-poster-wrap {
    width: 340px;
    min-width: 340px;
    max-width: 340px;
    flex: 0 0 340px;
    margin-right: 64px;
  }
  .detail-poster {
    width: 340px;
    height: 510px;
    min-width: 340px;
    min-height: 510px;
    max-width: 340px;
    max-height: 510px;
    border-radius: 26px;
  }
  .detail-body h1 {
    font-size: 58px;
    margin-bottom: 20px;
  }
  .detail-meta {
    margin-bottom: 20px;
  }
  .detail-pill {
    padding: 8px 18px;
    font-size: 18px;
    margin-right: 14px;
  }
  .detail-sinopse {
    font-size: 24px;
    line-height: 1.6;
    margin-bottom: 24px;
  }
  .detail-specs-row {
    padding: 14px 26px;
    margin-bottom: 26px;
  }
  .detail-spec-tag {
    font-size: 18px;
    margin-right: 22px;
  }
  .detail-btn {
    height: 72px;
    padding: 0 40px;
    font-size: 24px;
    margin-right: 22px;
  }
  .season-pill {
    padding: 12px 30px;
    font-size: 20px;
    margin-right: 16px;
  }
  .detail-ep-card {
    width: 420px;
    min-width: 420px;
    max-width: 420px;
    margin-right: 24px;
  }
  .detail-actor {
    width: 170px;
    margin-right: 22px;
  }
  .detail-actor-photo {
    width: 145px;
    height: 145px;
  }
  .detail-actor-name {
    font-size: 19px;
  }
  .detail-actor-role {
    font-size: 16px;
  }
}
.detail-stage { min-height: 0; margin-top: 6px; }

/* ─── Player screen (Netflix & YouTube TV Style) ───────────────────────── */
.player-wrap { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
.hud {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.hud.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.chan-name {
  position: absolute;
  left: 0; top: 0; width: 100%;
  z-index: 8;
  padding: 16px 24px 44px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), transparent);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-align: left;
}
.chan-name.fs {
  padding: 28px 48px 90px;
  font-size: 38px;
}
.chan-name[hidden] { display: none; }
#video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
#preview .preview-frame #preview-video {
  position: absolute;
  left: 0; top: 0; right: auto; bottom: auto;
  max-width: 100%;
  object-fit: contain;
  -webkit-object-fit: contain;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
.sub-overlay {
  position: absolute;
  left: 10%; right: 10%;
  bottom: 80px;
  z-index: 8;
  text-align: center;
  pointer-events: none;
  color: #FFF;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 6px #000, 0 0 12px rgba(0,0,0,0.9);
  transition: bottom 0.25s ease;
}
.sub-overlay.raised { bottom: 220px; }
.sub-overlay span { display: inline-block; padding: 2px 10px; background: rgba(0,0,0,0.4); border-radius: 6px; }

/* ─── HUD Top Bar ────────────────────────────────────────────────────────── */
.hud-top {
  position: absolute;
  left: 0; right: 0; top: 0;
  padding: 32px 56px 80px;
  background: linear-gradient(180deg, rgba(2, 6, 16, 0.95) 0%, rgba(2, 6, 16, 0.6) 60%, transparent 100%);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: auto;
}
.hud-top-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.hud-circle-btn {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-circle-btn:focus {
  background: #FFFFFF !important;
  color: #0B0306 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.12);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.65);
}
.hud-circle-btn:focus svg {
  stroke: #0B0306 !important;
}
.hud-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.hud-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
#hud-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 820px;
}
.hud-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(220, 38, 38, 0.28);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #FECACA;
  text-transform: uppercase;
  flex-shrink: 0;
}
.hud-live-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.hud-live-badge[hidden] { display: none !important; }
.hud-subtitle {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 820px;
}
.hud-subtitle[hidden] { display: none !important; }
.hud-top-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.hud-quality-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hud-tag {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 700;
  color: #E2E8F0;
  letter-spacing: 0.5px;
}
#hud-audio-tag {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.4);
  color: #6EE7B7;
}
#hud-audio-tag[hidden] { display: none !important; }
.hud-clock {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  font-family: monospace, sans-serif;
}

/* ─── Center OSD Feedback (Play/Pause/Skip Flash) ────────────────────────── */
.player-osd-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-osd-center[hidden] { display: none !important; }
.osd-icon-wrap {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(8, 14, 28, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}
.osd-icon-wrap svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
}
.osd-text {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  letter-spacing: 1px;
}

/* ─── Player Modals (Audio & Subtitles / Episodes) ───────────────────────── */
.player-modal {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.player-modal[hidden] { display: none !important; }
.player-modal-backdrop {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(2, 6, 16, 0.92);
}
.player-modal-dialog {
  position: relative;
  z-index: 2;
  width: 840px;
  max-width: 90%;
  max-height: 85%;
  background: rgba(13, 23, 44, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-modal-dialog.small-dialog {
  width: 500px;
}
.player-modal-sheet {
  position: relative;
  z-index: 2;
  width: 1100px;
  max-width: 92%;
  max-height: 85%;
  background: rgba(13, 23, 44, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.player-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}
.player-modal-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
}
.player-modal-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #FECACA;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}
.hud-modal-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.18s;
}
.hud-modal-close:focus {
  background: #FFFFFF !important;
  color: #0B0306 !important;
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
}
.audio-sub-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 20px;
  max-height: 440px;
  overflow-y: auto;
}
.audio-sub-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.col-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #FECACA;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}
.track-item.selected {
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(239, 68, 68, 0.55);
  color: #FECACA;
}
.track-item:focus {
  background: #FFFFFF !important;
  color: #0B0306 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}
.track-item:focus * {
  color: #0B0306 !important;
  stroke: #0B0306 !important;
}
.player-seasons-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 6px 4px 16px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  scrollbar-width: none;
}
.player-seasons-row::-webkit-scrollbar { display: none; }
.season-tab,
.player-season-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.season-tab.on,
.player-season-chip.on {
  background: #DC2626;
  border-color: #F87171;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
}
.season-tab:focus,
.player-season-chip:focus {
  background: #FFFFFF !important;
  color: #0B0306 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.7);
}
.player-episodes-list {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 20px;
  padding: 12px 6px 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.player-episodes-list::-webkit-scrollbar { display: none; }
.player-ep-card {
  display: flex;
  flex-direction: column;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.player-ep-card.is-current {
  border-color: #EF4444;
  background: rgba(220, 38, 38, 0.18);
}
.player-ep-card:focus {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: #FFFFFF !important;
  transform: scale(1.06) translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 255, 255, 0.55);
  z-index: 5;
}
.ep-card-thumb {
  position: relative;
  width: 100%;
  height: 165px;
  background: #0B1220;
  overflow: hidden;
}
.ep-thumb-fallback {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #260B18, #0F172A);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F87171;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}
.ep-card-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.ep-badge-playing {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.92);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.ep-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.ep-card-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(8, 14, 26, 0.85);
  flex: 1;
}
.ep-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ep-number {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #F87171;
  text-transform: uppercase;
}
.ep-duration {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  font-family: monospace, sans-serif;
}
.ep-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-card-overview {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── HUD Bottom Controls ────────────────────────────────────────────────── */
.hud-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 24px 64px 38px;
  background: linear-gradient(0deg, rgba(2, 6, 16, 0.98) 0%, rgba(2, 6, 16, 0.75) 60%, transparent 100%);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vod-progress {
  width: 100%;
}
.progress-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seek-row {
  width: 100%;
  padding: 8px 0;
  cursor: pointer;
  outline: none;
  border: none;
  background: transparent;
  position: relative;
}
.seek-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: visible;
  transition: height 0.15s ease;
}
.seek-row:focus .seek-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.32);
}
.seek-buffered {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.3s ease;
  pointer-events: none;
}
.seek {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
}
.seek > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #DC2626, #EF4444, #F87171);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}
.seek-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(0,0,0,0.5);
  pointer-events: none;
  transition: width 0.15s, height 0.15s;
}
.seek-row:focus .seek-knob {
  width: 26px;
  height: 26px;
  background: #F87171;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.9);
}
.seek-thumb {
  position: absolute;
  top: -38px;
  left: 0;
  width: 0;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.seek-row:focus .seek-thumb { opacity: 1; }
.seek-thumb span {
  display: inline-block;
  min-width: 78px;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(14, 5, 9, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
}
.seek-times {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 19px;
  font-weight: 600;
  font-family: monospace, sans-serif;
}
.hud-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.hud-action-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-btn-main {
  height: 60px;
  min-width: 150px;
  padding: 0 28px;
  font-size: 20px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}
.hud-btn-accent {
  background: rgba(220, 38, 38, 0.28);
  border-color: rgba(239, 68, 68, 0.50);
  color: #FECACA;
}
.hud-btn-icon {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
}
.hud-btn-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-btn-skip svg {
  width: 22px;
  height: 22px;
  stroke: #FFFFFF;
  flex-shrink: 0;
}
.hud-btn-skip span {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.hud-btn-skip:focus {
  background: #FFFFFF !important;
  color: #0B0306 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.65);
}
.hud-btn-skip:focus svg {
  stroke: #0B0306 !important;
}
.hud-btn-skip:focus span {
  color: #0B0306 !important;
}
.hud-btn:focus {
  background: #FFFFFF !important;
  color: #0B0306 !important;
  border-color: #FFFFFF !important;
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.65);
}
.hud-btn:focus svg {
  stroke: #0B0306;
  fill: #0B0306;
}
.hud-btn:focus text {
  fill: #0B0306 !important;
}
.hud-live-hint {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 20px;
  text-align: center;
}
.track-menu {
  margin: 0 auto 18px;
  width: 560px;
  max-width: 90%;
  padding: 18px 20px;
  background: rgba(20, 34, 56, 0.96);
  border: 1px solid var(--card-border);
  border-radius: 18px;
}
.track-menu-title {
  color: var(--mint);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}
.track-menu .chip {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  text-align: left;
}
#preview-video.live-fs,
#video.live-fs {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 5;
  opacity: 1 !important;
  object-fit: contain;
  background: #000;
}
.player-status { text-align: center; color: var(--mint); min-height: 18px; margin-top: 6px; font-size: 15px; }

.preview-fail {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 5, 9, 0.78);
  z-index: 6;
}
.preview-fail[hidden] { display: none !important; }
.preview-fail p {
  margin: 0;
  color: #ffd59a;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding: 0 24px;
}

/* ─── Player Loading Overlay (Cinematic Minimalist) ─────────────────────────── */
.player-loading {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 12;
  overflow: hidden;
  background: #000000;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.player-loading[hidden] { display: none !important; }
.player-loading-backdrop,
.player-loading-veil,
.player-loading-art {
  display: none !important;
}
.player-loading-stage {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
.player-loading-status-row {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.loading-ring {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(255, 255, 255, 0.14);
  border-top-color: #EF4444;
  border-right-color: #F87171;
  border-radius: 50%;
  -webkit-animation: spin 0.75s linear infinite;
  animation: spin 0.75s linear infinite;
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.55);
}
.player-loading-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.player-loading-meta h2 {
  order: 2;
  margin: 0 0 12px 0;
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  max-width: 840px;
  text-align: center;
}
.player-loading-badge {
  order: 3;
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.40);
  color: #FECACA;
  text-transform: uppercase;
}

/* ─── Play Fail Dialog ───────────────────────────────────────────────────────── */
.play-fail {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 3, 5, 0.96);
  z-index: 18;
}
.play-fail[hidden] { display: none !important; }
.play-fail-card {
  width: 640px;
  max-width: 86%;
  background: rgba(26, 8, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 42px 40px 36px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}
.play-fail-icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}
.play-fail-card h2 {
  margin: 0;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}
.play-fail-card p {
  margin: 14px 0 28px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  line-height: 1.45;
}
.play-fail-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.play-fail-actions button {
  min-width: 180px;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 700;
}

.up-next {
  position: absolute;
  right: 64px;
  bottom: 136px;
  width: 620px;
  box-sizing: border-box;
  padding: 28px 36px 30px;
  background: rgba(13, 23, 44, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  z-index: 20;
}
.up-next[hidden] { display: none !important; }
.up-next-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #FECACA;
  text-transform: uppercase;
}
.up-next-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.up-next-count {
  margin: 6px 0 0;
  min-height: 24px;
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.up-next-actions {
  display: flex;
  gap: 16px;
  margin-top: 22px;
}

/* ─── Content Preloader (Cinematic Minimalist) ────────────────────────────── */
.catalog-loader {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 25;
  overflow: hidden;
  background: #070305;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.catalog-loader[hidden] { display: none !important; }
.catalog-loader-backdrop {
  position: absolute;
  top: -30px; left: -30px;
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  transform: scale(1.02);
}
.catalog-loader-veil {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(18, 5, 9, 0.5) 0%, rgba(7, 3, 5, 0.96) 100%);
}
.catalog-loader-stage {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.catalog-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
.catalog-loader-art {
  display: none !important;
}
.catalog-loader-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.catalog-loader-spin-row {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.catalog-loader-meta h2 {
  order: 2;
  margin: 0 0 12px 0;
  font-size: 34px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  max-width: 860px;
  text-align: center;
}
.catalog-loader-badge {
  order: 3;
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.40);
  color: #FECACA;
  text-transform: uppercase;
}

/* Sem translateZ no palco: no webOS essa camada cobre o vídeo do AVPlay e a imagem não aparece. */
/* Acelerar apenas o elemento focado para evitar exaustão de textura VRAM no webOS */
.focusable:focus,
.focusable.on,
.tile:focus,
.tile.on {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#debug-log {
  position: absolute;
  left: 16px;
  bottom: 12px;
  z-index: 80;
  width: 640px;
  max-height: 280px;
  overflow: hidden;
  margin: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.78);
  color: #FFE082;
  font-size: 15px;
  line-height: 1.35;
  font-family: monospace;
  border-radius: 8px;
  pointer-events: none;
  white-space: pre-wrap;
}

/* ─── Busy / loading state ───────────────────────────────────────────────────── */
.busy {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 12, 28, 0.82);
  color: var(--mint);
  z-index: 8;
}
.busy[hidden] { display: none !important; }
.busy .spinner {
  width: 64px;
  height: 64px;
  margin: 0 0 18px;
  border-width: 6px;
}
.busy p {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #FFE4E6;
  text-align: center;
  max-width: 80%;
  line-height: 1.35;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SISTEMA DE ADAPTAÇÃO MULTIDISPOSITIVO (CELULARES PEQUENOS A TVS GRANDES 4K)
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

/* ─── Suporte a Toque em Celulares e Tablets ───────────────────────────────── */
html.is-mobile,
html.is-mobile body,
html.is-mobile #stage,
html.is-mobile #app {
  -webkit-overflow-scrolling: touch;
}

html.is-mobile .grid,
html.is-mobile .live-list,
html.is-mobile .sidebar,
html.is-mobile #sidebar,
html.is-mobile #live-sidebar,
html.is-mobile .detail-content,
html.is-mobile .episodes-carousel,
html.is-mobile .seasons-bar,
html.is-mobile .detail-cast-wrap,
html.is-mobile .settings-pane,
html.is-mobile .settings-menu {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

/* ══════════════════════════════════════════════════════════════════════════════
   1. MODO CELULAR PEQUENO / RETRATO (PORTRAIT)
   ══════════════════════════════════════════════════════════════════════════════ */
html.is-portrait #stage,
html.is-portrait #app,
[data-scale-mode="fluid-portrait"] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  transform: none !important;
  -webkit-transform: none !important;
  overflow: hidden !important;
}

/* Tela de Boot em Celular Retrato */
html.is-portrait #screen-boot .logo {
  height: clamp(60px, 9vh, 90px);
  margin-bottom: 20px;
}

/* Tela de Login em Celular Retrato */
html.is-portrait .login-stage {
  padding: calc(24px + var(--sat)) calc(20px + var(--sar)) calc(24px + var(--sab)) calc(20px + var(--sal));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}
html.is-portrait .login-stage .logo {
  height: clamp(65px, 9vh, 95px);
  margin: 16px 0 24px;
}
html.is-portrait .login-screen .login-form {
  width: 100%;
  max-width: 400px;
}
html.is-portrait .login-screen .pill {
  width: 100%;
  height: 54px;
  font-size: 16px;
  margin: 8px 0;
  padding: 0 20px;
  border-radius: 27px;
}
html.is-portrait .login-screen .pill-btn {
  width: 100%;
  height: 52px;
  font-size: 17px;
  margin-top: 16px;
  border-radius: 26px;
}
html.is-portrait .login-screen .error {
  width: 100%;
  font-size: 13px;
}
html.is-portrait .login-foot {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-top: 24px;
  left: auto;
  right: auto;
  bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  text-align: center;
}
html.is-portrait .login-foot-side.left,
html.is-portrait .login-foot-side.right {
  float: none;
  text-align: center;
}
html.is-portrait .login-wave {
  display: none;
}

/* Teclado Virtual em Celular Retrato */
html.is-portrait .so-keys {
  width: calc(100% - 16px) !important;
  margin-left: 0 !important;
  left: 8px !important;
  right: 8px !important;
  bottom: calc(12px + var(--sab)) !important;
  padding: 10px 6px !important;
  border-radius: 16px !important;
}
html.is-portrait .kb-row {
  margin-top: 6px !important;
}
html.is-portrait .kb-key {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: 42px !important;
  margin: 0 2px !important;
  font-size: 15px !important;
  border-radius: 8px !important;
}
html.is-portrait .kb-key.kb-wide {
  flex: 1.5 1 0 !important;
  font-size: 13px !important;
}
html.is-portrait .kb-key.kb-space {
  flex: 3 1 0 !important;
}

/* Tela Hub (Início) em Celular Retrato - Grade Moderna 2x2 */
html.is-portrait .hub {
  padding: calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}
html.is-portrait .hub .logo {
  height: clamp(55px, 8vh, 75px);
  margin: 8px 0 20px;
}
html.is-portrait .tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  flex: none;
}
html.is-portrait .tile {
  width: 100%;
  height: 144px;
  margin: 0;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
}
html.is-portrait .tile-badge {
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  border-radius: 16px;
}
html.is-portrait .tile .ico {
  width: 32px;
  height: 32px;
}
html.is-portrait .hub-foot {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-top: 24px;
  left: auto;
  right: auto;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-align: center;
}
html.is-portrait .hub-foot-side {
  width: 100%;
  text-align: center;
}
html.is-portrait .hub-foot-side.left,
html.is-portrait .hub-foot-side.right {
  text-align: center;
}
html.is-portrait .reload {
  margin: 6px 0;
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 20px;
}
html.is-portrait .hub-wave {
  display: none;
}

/* Tela de Catálogo (Filmes e Séries) em Celular Retrato */
html.is-portrait .catalog {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
html.is-portrait .catalog .topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: calc(10px + var(--sat)) calc(12px + var(--sar)) 10px calc(12px + var(--sal));
  height: auto;
  align-items: center;
  background: rgba(18, 5, 9, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}
html.is-portrait .catalog .topbar .chip {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 18px;
  margin: 0;
}
html.is-portrait .catalog .topbar .grow {
  display: none;
}
html.is-portrait .catalog .topbar .search {
  width: 100%;
  height: 40px;
  margin: 4px 0 0;
  font-size: 14px;
  border-radius: 20px;
  padding: 0 16px;
}
html.is-portrait #vod-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: calc(100% - 100px);
  overflow: hidden;
}
html.is-portrait #vod-layout .sidebar {
  width: 100%;
  height: auto;
  max-height: 48px;
  padding: 6px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-overflow-scrolling: touch;
  display: block;
  flex-shrink: 0;
}
html.is-portrait #vod-layout .side-title {
  display: none;
}
html.is-portrait #vod-layout #sidebar {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-portrait .cat-item {
  display: inline-flex;
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  font-size: 13px;
  align-items: center;
  white-space: nowrap;
}
html.is-portrait #vod-layout .main {
  width: 100%;
  flex: 1;
  padding: 10px 12px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html.is-portrait .head-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}
html.is-portrait .heading {
  font-size: 18px;
  font-weight: 700;
}
html.is-portrait .count {
  font-size: 12px;
}
html.is-portrait .sort {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  margin-left: auto;
}
html.is-portrait .sort .chip {
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 15px;
  margin: 0;
}
html.is-portrait .catalog-stage {
  flex: 1;
  overflow: hidden;
  display: flex;
}
html.is-portrait .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 2px 0 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 360px) {
  html.is-portrait .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
html.is-portrait .poster {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  margin: 0 !important;
}
html.is-portrait .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
html.is-portrait .poster .title {
  font-size: 11px;
  line-height: 1.25;
  padding: 4px;
}
html.is-portrait .poster .rating-badge {
  font-size: 10px;
  padding: 2px 5px;
}

/* TV ao Vivo em Celular Retrato: Player no topo (16:9) + canais abaixo */
html.is-portrait #live-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: calc(100% - 100px);
  overflow: hidden;
}
html.is-portrait #live-layout .live-right {
  order: 1;
  width: 100%;
  padding: 8px 12px;
  flex-shrink: 0;
}
html.is-portrait #live-layout .preview {
  width: 100%;
  height: clamp(180px, 26vh, 230px);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
}
html.is-portrait #live-layout .epg {
  display: none;
}
html.is-portrait #live-layout .sidebar {
  order: 2;
  width: 100%;
  height: auto;
  max-height: 48px;
  padding: 6px 12px;
  overflow-x: auto;
  white-space: nowrap;
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
html.is-portrait #live-layout .side-title {
  display: none;
}
html.is-portrait #live-layout #live-sidebar {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-portrait #live-layout .live-mid {
  order: 3;
  width: 100%;
  flex: 1;
  padding: 8px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.is-portrait #live-layout .live-stage {
  flex: 1;
  overflow: hidden;
  display: flex;
}
html.is-portrait .live-list {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-portrait .live-item {
  height: 50px;
  padding: 0 12px;
  font-size: 14px;
  margin-bottom: 6px;
  border-radius: 10px;
}
html.is-portrait .live-item .logo {
  width: 32px;
  height: 32px;
  margin-right: 10px;
}

/* Tela de Detalhes (Filmes e Séries) em Celular Retrato */
html.is-portrait .detail-content {
  padding: calc(14px + var(--sat)) calc(14px + var(--sar)) calc(36px + var(--sab)) calc(14px + var(--sal));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-portrait .detail-top-bar {
  margin-bottom: 12px;
}
html.is-portrait .detail-back-btn {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 19px;
}
html.is-portrait .detail-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
html.is-portrait .detail-poster-wrap {
  width: 130px;
  height: 195px;
  flex-shrink: 0;
}
html.is-portrait .detail-poster {
  width: 130px;
  height: 195px;
  border-radius: 12px;
}
html.is-portrait .detail-body {
  width: 100%;
  align-items: center;
  text-align: center;
}
html.is-portrait .detail-title {
  font-size: 22px;
  line-height: 1.25;
  text-align: center;
}
html.is-portrait .detail-meta {
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
html.is-portrait .detail-pill {
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
}
html.is-portrait .detail-specs-row {
  justify-content: center;
  font-size: 11px;
  gap: 8px;
}
html.is-portrait .detail-spec-tag {
  padding: 4px 10px;
  font-size: 11px;
}
html.is-portrait .detail-actions {
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
html.is-portrait .detail-play-btn {
  width: 100%;
  height: 48px;
  font-size: 15px;
  border-radius: 24px;
  justify-content: center;
}
html.is-portrait .detail-action-btn {
  flex: 1;
  min-width: 120px;
  height: 42px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 21px;
  justify-content: center;
}
html.is-portrait .detail-sinopse {
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 14px;
  -webkit-line-clamp: 6;
}
html.is-portrait .seasons-bar {
  gap: 8px;
  margin: 10px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-portrait .season-pill {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 17px;
  flex-shrink: 0;
}
html.is-portrait .episodes-carousel {
  gap: 10px;
  padding-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-portrait .detail-ep-card {
  width: 200px;
  flex-shrink: 0;
  border-radius: 10px;
}
html.is-portrait .detail-ep-thumb {
  height: 112px;
}
html.is-portrait .detail-ep-body {
  padding: 8px 10px;
}
html.is-portrait .detail-ep-title {
  font-size: 12px;
}
html.is-portrait .detail-cast-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
}
html.is-portrait .detail-cast-card {
  flex-shrink: 0;
  width: 80px;
}
html.is-portrait .detail-cast-avatar {
  width: 60px;
  height: 60px;
}
html.is-portrait .detail-cast-name {
  font-size: 11px;
}

/* Configurações em Celular Retrato */
html.is-portrait .settings {
  padding: calc(14px + var(--sat)) calc(14px + var(--sar)) calc(20px + var(--sab)) calc(14px + var(--sal));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-portrait .settings-menu {
  width: 100%;
  height: auto;
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  flex-direction: row;
  gap: 8px;
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
html.is-portrait .settings-menu-item {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 19px;
  flex-shrink: 0;
}
html.is-portrait .settings-pane {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
html.is-portrait .settings-card {
  padding: 16px;
  border-radius: 16px;
}
html.is-portrait .settings-title {
  font-size: 18px;
}

/* Player em Celular */
html.is-mobile #screen-player {
  width: 100% !important;
  height: 100% !important;
}
html.is-mobile #video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
html.is-mobile .hud {
  padding: calc(14px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal));
}
html.is-mobile .hud-btn {
  min-width: 44px;
  min-height: 44px;
}
html.is-mobile .seek-bar {
  height: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   2. MODO CELULAR PEQUENO / PAISAGEM (LANDSCAPE)
   ══════════════════════════════════════════════════════════════════════════════ */
html.is-mobile.is-landscape .login-stage .logo {
  height: 70px;
  margin: 0 0 16px;
}
html.is-mobile.is-landscape .login-screen .pill {
  height: 48px;
  font-size: 18px;
  margin: 6px 0;
}
html.is-mobile.is-landscape .login-screen .pill-btn {
  height: 46px;
  font-size: 18px;
  margin-top: 12px;
}
html.is-mobile.is-landscape .hub .logo {
  height: 75px;
  margin: 4px 0 8px;
}
html.is-mobile.is-landscape .tile {
  height: 220px;
  margin: 0 10px;
  font-size: 18px;
}
html.is-mobile.is-landscape .tile-badge {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
}
html.is-mobile.is-landscape .tile .ico {
  width: 38px;
  height: 38px;
}
html.is-mobile.is-landscape .hub-foot {
  font-size: 13px;
  bottom: calc(8px + var(--sab));
}

/* ══════════════════════════════════════════════════════════════════════════════
   3. MODO TVS GRANDES / 4K UHD (3840×2160)
   ══════════════════════════════════════════════════════════════════════════════ */
html.is-4k .heading {
  font-size: 42px;
}
html.is-4k .cat-item {
  font-size: 24px;
  height: 64px;
}
html.is-4k .live-item {
  height: 84px;
  font-size: 26px;
}
html.is-4k .tile {
  font-size: 34px;
}
html.is-4k .tile-badge {
  width: 140px;
  height: 140px;
}
html.is-4k .tile .ico {
  width: 74px;
  height: 74px;
}
html.is-4k .focusable:focus,
html.is-4k .focusable.on {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95), 0 0 32px rgba(45, 121, 246, 0.7);
}

/* ══════════════════════════════════════════════════════════════════════════════
   LISTAS DE REPRODUÇÃO (PLAYLISTS & MULTI-SERVER SCREEN)
   ══════════════════════════════════════════════════════════════════════════════ */
.playlists-screen {
  padding: 36px 56px 150px;
  background: transparent;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #fff;
  overflow: hidden;
}
.playlists-screen:not(.active) {
  display: none !important;
}
.playlists-screen.active {
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
}
.playlists-content-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 3;
}
.playlists-header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-shrink: 0;
}
.playlists-header-left {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  gap: 16px;
}
.btn-playlists-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  color: #fff;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  cursor: pointer;
  -webkit-transition: transform 0.15s, background 0.15s, border-color 0.15s;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn-playlists-back:focus,
.btn-playlists-back.on {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
  -webkit-transform: scale(1.08);
  transform: scale(1.08);
  outline: none;
}
.playlists-title {
  font-size: 42px;
  font-weight: 800;
  margin: 0;
  color: #fff;
  letter-spacing: -0.5px;
}
.btn-add-square {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(22, 27, 38, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  cursor: pointer;
  -webkit-transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-add-square:focus,
.btn-add-square.on {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
  -webkit-transform: scale(1.08);
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.45);
  outline: none;
}
.playlists-body {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}
.playlists-loading {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  padding: 60px 0;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.7);
  gap: 16px;
}
.playlists-empty {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  padding: 60px 0;
  text-align: center;
}
.playlists-empty-icon {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.4);
}
.playlists-empty h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
}
.playlists-empty p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}
.btn-primary-action,
#btn-add-playlist-empty {
  font-family: inherit;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 36px;
  background: -webkit-linear-gradient(135deg, #DC2626, #B91C1C);
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(220, 38, 38, 0.3);
  -webkit-transition: -webkit-transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s, background 0.18s, border-color 0.18s;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s, background 0.18s, border-color 0.18s;
  outline: none;
}
.btn-primary-action:focus,
.btn-primary-action:hover,
.btn-primary-action.on,
.btn-primary-action.focused,
#btn-add-playlist-empty:focus,
#btn-add-playlist-empty:hover,
#btn-add-playlist-empty.on,
#btn-add-playlist-empty.focused {
  background: -webkit-linear-gradient(135deg, #EF4444, #DC2626);
  background: linear-gradient(135deg, #EF4444, #DC2626);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 32px rgba(239, 68, 68, 0.85), 0 8px 24px rgba(0, 0, 0, 0.5);
  -webkit-transform: scale(1.06);
  transform: scale(1.06);
}
.btn-primary-action:active,
#btn-add-playlist-empty:active {
  -webkit-transform: scale(0.98);
  transform: scale(0.98);
}
.playlists-list {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 16px;
  padding: 6px 4px;
}
.playlist-row-container {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.playlist-bar {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  height: 74px;
  background: rgba(14, 25, 52, 0.68);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #ffffff;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  padding: 0 28px;
  font-family: inherit;
  cursor: pointer;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-transition: -webkit-transform 0.12s ease-out, background 0.12s ease-out, border-color 0.12s ease-out;
  transition: transform 0.12s ease-out, background 0.12s ease-out, border-color 0.12s ease-out;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  text-align: left;
}
.playlist-bar.is-active {
  border-color: rgba(34, 197, 94, 0.55);
}
.playlist-bar:focus,
.playlist-bar.on {
  background: #ffffff !important;
  color: #0a0a0a !important;
  border-color: #ffffff !important;
  -webkit-transform: translateZ(0) scale(1.015);
  transform: translateZ(0) scale(1.015);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  outline: none;
}
.pl-num {
  font-size: 24px;
  font-weight: 700;
  width: 36px;
  color: inherit;
  flex-shrink: 0;
}
.pl-name {
  font-size: 22px;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 12px;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
}
.playlists-alert {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  font-size: 20px;
  line-height: 1.35;
}
.playlists-alert[hidden] { display: none; }
.pl-dead-pill {
  font-size: 15px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.45);
  margin-left: 16px;
  flex-shrink: 0;
}
.pl-active-pill {
  font-size: 15px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.45);
  margin-left: 16px;
  flex-shrink: 0;
}
.playlist-bar:focus .pl-active-pill,
.playlist-bar.on .pl-active-pill {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}
.playlist-btn-trash {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(22, 27, 38, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  cursor: pointer;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-transition: -webkit-transform 0.12s ease-out, background 0.12s ease-out, border-color 0.12s ease-out;
  transition: transform 0.12s ease-out, background 0.12s ease-out, border-color 0.12s ease-out;
  flex-shrink: 0;
}
.playlist-btn-trash:focus,
.playlist-btn-trash.on {
  background: #dc2626;
  border-color: #ffffff;
  color: #ffffff;
  -webkit-transform: translateZ(0) scale(1.1);
  transform: translateZ(0) scale(1.1);
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.6);
  outline: none;
}
.playlists-foot {
  position: absolute;
  right: 48px;
  bottom: 28px;
  left: 48px;
  z-index: 2;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  align-items: flex-end;
  -webkit-box-pack: justify;
  justify-content: space-between;
  color: #f4f7f4;
  font-size: 22px;
  line-height: 1.45;
}
.playlists-foot-side {
  width: 560px;
}
.playlists-foot-side.left {
  width: 720px;
  text-align: left;
}
.playlists-foot-side.right {
  text-align: right;
}
.playlists-foot-side p {
  margin: 0;
}
.playlists-foot-side strong,
.playlists-foot-side span {
  color: #fff;
}
html.is-portrait .playlists-foot {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-top: 24px;
  left: auto;
  right: auto;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-align: center;
}
html.is-portrait .playlists-foot-side {
  width: 100%;
  text-align: center;
}
html.is-portrait .playlists-foot-side.left,
html.is-portrait .playlists-foot-side.right {
  text-align: center;
}
html.is-mobile.is-landscape .playlists-foot {
  font-size: 13px;
  bottom: calc(8px + var(--sab));
}
.playlist-dialog {
  background: #1A0812;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 32px 36px;
  width: 640px;
  max-width: 90vw;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.pmodal-head {
  margin-bottom: 20px;
}
.pmodal-title {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
}
.pmodal-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}
.pmode-tabs {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 12px;
  margin: 16px 0 20px;
}
.pmode-tab {
  font-family: inherit;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  -webkit-transition: background 0.15s, border-color 0.15s;
  transition: background 0.15s, border-color 0.15s;
}
.pmode-tab.on {
  background: -webkit-linear-gradient(135deg, #DC2626, #B91C1C);
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  border-color: #fff;
  color: #fff;
}
.pmode-tab:focus,
.pmode-tab:hover,
.pmode-tab.focused {
  border-color: #fff !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.85) !important;
  outline: 2px solid #F87171 !important;
  color: #fff !important;
}
.pform-group {
  margin-bottom: 14px;
}
.pform-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}
.pform-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 12px;
}
.pfield {
  width: 100%;
  min-height: 48px;
  height: 48px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 18px;
  color: #fff;
  outline: none;
  font-family: inherit;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.pfield[data-empty="1"]:before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.38);
  font-weight: 400;
  pointer-events: none;
}
.pfield:focus,
.pfield.on,
.pfield.focused {
  border-color: #EF4444;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.65);
}
.pmodal-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 16px;
  margin: 12px 0 4px;
}
.pmodal-msg.err {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.pmodal-msg.ok {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.pmodal-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: end;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 22px;
}
.pbtn-primary {
  font-family: inherit;
  background: -webkit-linear-gradient(135deg, #DC2626, #B91C1C);
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 12px 26px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  -webkit-transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.pbtn-primary:focus,
.pbtn-primary:hover,
.pbtn-primary.on,
.pbtn-primary.focused {
  background: -webkit-linear-gradient(135deg, #EF4444, #DC2626);
  background: linear-gradient(135deg, #EF4444, #DC2626);
  border-color: #fff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.75);
  -webkit-transform: scale(1.03);
  transform: scale(1.03);
  outline: none;
}
.pbtn-quiet {
  font-family: inherit;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  -webkit-transition: border-color 0.15s, color 0.15s, transform 0.15s;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.pbtn-quiet:focus,
.pbtn-quiet:hover,
.pbtn-quiet.on,
.pbtn-quiet.focused {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
  -webkit-transform: scale(1.03);
  transform: scale(1.03);
  outline: none;
}
