/* MylsPlay V4 — interface TV / Fire Stick */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
  --v4-bg: #07090e;
  --v4-panel: rgba(8, 12, 20, 0.62);
  --v4-muted: rgba(255, 255, 255, 0.46);
  --v4-text: #f4f6fb;
  --v4-accent: #e8b84a;
  --v4-card: rgba(18, 24, 36, 0.78);
  --v4-card-border: rgba(255, 255, 255, 0.08);
  --v4-focus-glow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.22);
  --v4-rail: 88px;
  --v4-cats: 280px;
  --v4-cards: min(42vw, 520px);
}

html.ui-v4,
html.ui-v4 body,
body.ui-v4 {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.ui-v4 {
  font-family: "Outfit", "Quicksand", sans-serif;
  background: var(--v4-bg);
}

body.ui-v4 #sidebar,
body.ui-v4 .channel-list,
body.ui-v4 .content .datetime,
body.ui-v4 .currentPlaying,
body.ui-v4 .currentPlayingPGM {
  display: none !important;
}

body.ui-v4 iframe.ifplayer,
body.ui-v4 #ifplayer {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.v4-rail,
.v4-cats-list,
.v4-cards,
.v4-epg-list,
.v4-shortcuts-row,
#v4-root {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.34) rgba(255, 255, 255, 0.06);
}

#v4-root *::-webkit-scrollbar,
.v4-rail::-webkit-scrollbar,
.v4-cats-list::-webkit-scrollbar,
.v4-cards::-webkit-scrollbar,
.v4-epg-list::-webkit-scrollbar,
.v4-shortcuts-row::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#v4-root *::-webkit-scrollbar-track,
.v4-rail::-webkit-scrollbar-track,
.v4-cats-list::-webkit-scrollbar-track,
.v4-cards::-webkit-scrollbar-track,
.v4-epg-list::-webkit-scrollbar-track,
.v4-shortcuts-row::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

#v4-root *::-webkit-scrollbar-thumb,
.v4-rail::-webkit-scrollbar-thumb,
.v4-cats-list::-webkit-scrollbar-thumb,
.v4-cards::-webkit-scrollbar-thumb,
.v4-epg-list::-webkit-scrollbar-thumb,
.v4-shortcuts-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

#v4-root *::-webkit-scrollbar-thumb:hover,
.v4-rail::-webkit-scrollbar-thumb:hover,
.v4-cats-list::-webkit-scrollbar-thumb:hover,
.v4-cards::-webkit-scrollbar-thumb:hover,
.v4-epg-list::-webkit-scrollbar-thumb:hover,
.v4-shortcuts-row::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
  background-clip: padding-box;
}

#v4-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8000;
  color: var(--v4-text);
  overflow: hidden;
  font-family: "Outfit", "Quicksand", sans-serif;
}

body.ui-v4 #v4-root {
  display: grid;
  grid-template-columns: var(--v4-rail) var(--v4-cats) var(--v4-cards) minmax(0, 1fr);
  grid-template-rows: 72px 1fr;
  grid-template-areas:
    "rail top top hero"
    "rail cats cards hero";
}

body.ui-v4.v4-playing:not(.v4-player-fill) #v4-root:not(.mode-home) {
  grid-template-columns: var(--v4-rail) minmax(196px, 22vw) minmax(240px, 28vw) minmax(0, 1fr);
}

.v4-hero-bg {
  position: absolute;
  inset: 0;
  background: #0b1018 center / cover no-repeat;
  z-index: 0;
  transition: background-image 0.6s ease;
}

.v4-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #07090e 0%, rgba(7, 9, 14, 0.92) 28%, rgba(7, 9, 14, 0.42) 58%, rgba(7, 9, 14, 0.12) 100%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.45) 0%, transparent 22%, transparent 52%, rgba(7, 9, 14, 0.92) 100%);
}

.v4-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: stretch;
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  width: auto;
  max-width: none;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 18px 28px 0 18px;
  pointer-events: none;
}

.v4-topbar > * {
  pointer-events: auto;
}

.v4-clock {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.v4-app-version {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--v4-muted, rgba(255, 255, 255, 0.72));
  text-transform: lowercase;
}

.v4-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--v4-muted);
  font-size: 16px;
}

.v4-icon-btn,
.v4-avatar {
  display: none !important;
}

.v4-title-logo {
  position: absolute;
  z-index: 4;
  left: calc(var(--v4-rail) + 24px);
  top: 84px;
  max-height: 18vh;
  max-width: 25vw;
  width: 25vw;
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.65));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.v4-title-logo[hidden] {
  display: none;
}

.v4-icon-btn svg {
  width: 20px;
  height: 20px;
}

.v4-icon-btn.is-focused,
.v4-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--v4-focus-glow);
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.08);
}

.v4-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.v4-rail {
  grid-area: rail;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 0 28px;
  min-height: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.v4-rail-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.v4-rail-btn svg {
  width: 24px;
  height: 24px;
}

.v4-rail-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.v4-rail-btn.is-focused,
.v4-rail-btn:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.12);
  box-shadow: var(--v4-focus-glow), 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.v4-rail-btn.is-active.is-focused {
  background: rgba(255, 255, 255, 0.26);
}

.v4-toast {
  position: absolute;
  left: calc(var(--v4-rail) + 16px);
  bottom: 28px;
  z-index: 40;
  max-width: min(52vw, 420px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(12, 12, 16, 0.9);
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.v4-toast[hidden] {
  display: none;
}

.v4-rail-spacer {
  flex: 1;
}

.v4-cats {
  grid-area: cats;
  position: relative;
  z-index: 2;
  padding: 8px 8px 32px 4px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.v4-cats-title {
  margin: 0 0 18px 18px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.v4-cats-list {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 12px 8px 8px;
  overscroll-behavior: contain;
}

.v4-cat {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 6px 10px;
  border-radius: 18px;
  opacity: 0.42;
  transform: scale(0.92);
  transform-origin: left center;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.v4-cat.is-selected {
  opacity: 0.78;
}

.v4-cat.is-focused,
.v4-cat:focus-visible {
  outline: none;
  opacity: 1;
  transform: scale(1.06);
  background: transparent;
}

.v4-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  overflow: hidden;
}

.v4-cat.is-focused .v4-cat-icon {
  width: 58px;
  height: 58px;
  font-size: 28px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.v4-cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v4-cat-text {
  min-width: 0;
}

.v4-cat-name {
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v4-cat.is-focused .v4-cat-name {
  font-size: 22px;
  font-weight: 600;
}

.v4-cat-count {
  display: none;
  margin-top: 2px;
  font-size: 13px;
  color: var(--v4-muted);
}

.v4-cat.is-focused .v4-cat-count {
  display: block;
}

.v4-content {
  grid-area: cards;
  position: relative;
  z-index: 2;
  padding: 4px 12px 28px 0;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.v4-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.v4-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  background: var(--v4-card);
  border: 1px solid var(--v4-card-border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transform: scale(0.98);
  opacity: 0.78;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.v4-card.is-focused,
.v4-card:focus-visible {
  outline: none;
  opacity: 1;
  transform: scale(1.03);
  background: rgba(28, 36, 52, 0.94);
  box-shadow: var(--v4-focus-glow);
  border-color: rgba(255, 255, 255, 0.22);
}

.v4-card.is-focused::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: #fff;
}

.v4-card-thumb {
  width: 78px;
  height: 66px;
  border-radius: 12px;
  background: #141a24 center / cover no-repeat;
  overflow: hidden;
}

.v4-card.kind-movie .v4-card-thumb,
.v4-card.kind-series .v4-card-thumb,
.v4-card.kind-series-fav .v4-card-thumb {
  width: 52px;
  height: 74px;
  border-radius: 8px;
}

.v4-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0e131c;
}

.v4-card.kind-movie .v4-card-thumb img,
.v4-card.kind-series .v4-card-thumb img,
.v4-card.kind-series-fav .v4-card-thumb img {
  object-fit: cover;
}

.v4-card.has-tmdb-logo .v4-card-thumb {
  width: 124px;
  height: 42px;
  border-radius: 10px;
  background: rgba(8, 12, 20, 0.55);
}

.v4-card.has-tmdb-logo .v4-card-thumb img {
  object-fit: contain;
  background: transparent;
}

.v4-card-body {
  min-width: 0;
}

.v4-card-title {
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v4-card-sub {
  margin-top: 3px;
  font-size: 13px;
  color: var(--v4-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v4-card-sub:empty {
  display: none;
}

.v4-card.kind-episode .v4-card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
}

.v4-card.kind-episode .v4-card-title {
  flex: 0 1 auto;
  max-width: calc(100% - 7.5rem);
}

.v4-card.kind-episode .v4-card-sub {
  flex: 0 0 auto;
  margin-top: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.v4-card.kind-episode .v4-badges {
  flex: 1 0 100%;
}

.v4-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.v4-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.v4-card-fav {
  align-self: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v4-card-fav svg {
  width: 20px;
  height: 20px;
}

.v4-card.is-focused .v4-card-fav {
  color: rgba(232, 184, 74, 0.78);
}

.v4-card.is-fav .v4-card-fav {
  color: var(--v4-accent);
}

.v4-card-fav.is-focused {
  color: var(--v4-accent);
  background: rgba(232, 184, 74, 0.16);
  box-shadow: 0 0 0 2px rgba(232, 184, 74, 0.7);
}

.v4-stage {
  grid-area: hero;
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.v4-detail {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 40px 56px 8px;
  min-width: 0;
  pointer-events: none;
}

body.ui-v4.v4-playing:not(.v4-player-fill) .v4-detail {
  display: none;
}

body.ui-v4.v4-playing:not(.v4-player-fill) #v4-root:not(.mode-home) .v4-stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  padding: 8px 22px 18px 8px;
}

body.ui-v4.v4-playing:not(.v4-player-fill) #v4-root:not(.mode-home) #v4-player.is-open {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: none;
  max-height: min(42vh, 100%);
  flex: 0 0 auto;
}

body.ui-v4.v4-playing:not(.v4-player-fill) #v4-root:not(.mode-home) .v4-detail {
  display: flex;
  position: relative;
  inset: auto;
  flex: 1 1 auto;
  justify-content: flex-start;
  padding: 0 4px 4px;
  pointer-events: auto;
  overflow: hidden auto;
  min-height: 0;
}

body.ui-v4.v4-playing:not(.v4-player-fill) #v4-root:not(.mode-home) .v4-detail-title {
  font-size: clamp(22px, 2.1vw, 34px);
  max-width: none;
  margin-bottom: 8px;
}

body.ui-v4.v4-playing:not(.v4-player-fill) #v4-root:not(.mode-home) .v4-detail-desc {
  -webkit-line-clamp: 6;
  max-width: none;
  margin-bottom: 12px;
}

.v4-now {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 10px;
}

.v4-now:empty {
  display: none;
}

.v4-detail-title {
  margin: 0 0 14px;
  font-size: clamp(40px, 5.4vw, 72px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.65);
  max-width: 16ch;
  cursor: pointer;
}

.v4-detail-original {
  margin: -6px 0 14px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  font-style: italic;
}

.v4-detail-desc {
  margin: 0 0 16px;
  max-width: 38ch;
  font-size: 17px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v4-detail-meta {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}

.v4-detail-meta div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
}

.v4-detail-meta dt {
  margin: 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.46);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  padding-top: 3px;
}

.v4-detail-meta dd {
  margin: 0;
}

.v4-detail-cta {
  display: none;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 4px 0 18px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.v4-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.v4-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.v4-progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}

.v4-epg-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  min-height: 0;
  overflow: hidden auto;
}

.v4-epg-list[hidden] {
  display: none;
}

.v4-epg-heading {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: 4px 0 8px;
}

.v4-epg-row {
  display: grid;
  grid-template-columns: 7.5ch minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.v4-epg-row.is-now {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.v4-epg-time {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.v4-epg-row.is-now .v4-epg-time {
  color: var(--v4-accent);
}

.v4-epg-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-epg-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff;
  color: #111;
}

.v4-empty,
.v4-loading {
  padding: 28px 12px;
  color: var(--v4-muted);
  font-size: 16px;
}

/* Home: destaque cinematográfico + faixa de posters maior */
body.ui-v4 #v4-root.mode-home,
.v4-root.mode-home {
  grid-template-columns: var(--v4-rail) minmax(0, 1fr);
  grid-template-rows: 72px 1fr;
  grid-template-areas:
    "rail top"
    "rail hero";
  max-width: 100vw;
}

.v4-root.mode-home .v4-cats {
  display: none;
}

.v4-root.mode-home .v4-content {
  display: none;
}

.v4-hero-nav {
  display: none;
  position: absolute;
  left: calc(var(--v4-rail) + 12px);
  right: 4vw;
  top: auto;
  bottom: 148px;
  z-index: 4;
  pointer-events: none;
  justify-content: space-between;
  align-items: center;
}

.v4-root.mode-home .v4-hero-nav:not([hidden]) {
  display: flex;
}

.v4-hero-arrow {
  pointer-events: auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.42);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.55;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.v4-hero-arrow svg {
  width: 14px;
  height: 14px;
}

.v4-hero-arrow:hover,
.v4-hero-arrow:focus-visible,
.v4-hero-nav.is-focused .v4-hero-arrow {
  outline: none;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.v4-root.mode-home.v4-playing .v4-hero-nav {
  display: none !important;
}

.v4-shortcuts {
  display: none;
}

.v4-root.mode-home .v4-shortcuts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: absolute;
  left: var(--v4-rail);
  right: 0;
  bottom: 18px;
  z-index: 3;
  height: auto;
  max-height: 112px;
  padding: 0;
  overflow: visible;
}

.v4-root.mode-home .v4-shortcuts[hidden] {
  display: none;
}

.v4-shortcuts-label {
  display: none;
}

.v4-shortcuts-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  height: auto;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 8px 20px;
}

.v4-shortcut {
  flex: 0 0 auto;
  width: 108px;
  height: 62px;
  border-radius: 12px;
  background: rgba(8, 12, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.7;
  transform: scale(0.96);
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.v4-shortcut.is-focused {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 0px 10px 3px #ffffff44, 0 14px 32px rgba(0, 0, 0, 0.5);
}

.v4-shortcut img {
  max-width: 86%;
  max-height: 68%;
  object-fit: contain;
  pointer-events: none;
}

.v4-root.mode-home .v4-cards {
  flex-direction: row;
  align-items: flex-end;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  height: auto;
  padding: 20px 8px 10px;
}

.v4-root.mode-home .v4-card {
  display: flex;
  flex-direction: column;
  min-width: 168px;
  width: 168px;
  min-height: 0;
  padding: 0;
  gap: 0;
  background: transparent;
  border: 0;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  opacity: 0.78;
  transform: scale(0.94);
  transform-origin: center bottom;
}

.v4-root.mode-home .v4-card.kind-movie,
.v4-root.mode-home .v4-card.kind-featured {
  grid-template-columns: unset;
}

.v4-root.mode-home .v4-card.is-focused {
  opacity: 1;
  transform: scale(1.12);
}

.v4-root.mode-home .v4-card.is-focused::before {
  display: none;
}

.v4-root.mode-home .v4-card-thumb {
  width: 168px;
  height: 252px;
  border-radius: 14px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.v4-root.mode-home .v4-card.kind-movie .v4-card-thumb,
.v4-root.mode-home .v4-card.kind-featured .v4-card-thumb {
  width: 168px;
  height: 252px;
}

.v4-root.mode-home .v4-card.is-focused .v4-card-thumb {
  box-shadow: 0 0 0 3px #fff, 0 18px 40px rgba(0, 0, 0, 0.55);
}

.v4-root.mode-home .v4-card-body {
  display: none;
}

.v4-root.mode-home .v4-card-fav {
  display: none;
}

.v4-root.mode-home .v4-topbar {
  justify-content: flex-end;
  padding: 18px 28px 0 24px;
}

.v4-root.mode-home .v4-detail {
  justify-content: flex-start;
  padding: 86px 8vw 160px 24px;
  max-width: 42vw;
  opacity: 1;
  visibility: visible;
}

.v4-root.mode-home.has-title-logo .v4-detail {
  padding-top: 22vh;
}

.v4-root.mode-home .v4-title-logo:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  cursor: pointer;
}

.v4-root.mode-home.v4-playing:not(.v4-player-fill) .v4-title-logo,
.v4-root.mode-home.v4-playing:not(.v4-player-fill) .v4-title-logo:not([hidden]),
.v4-root.mode-home.v4-playing:not(.v4-player-fill) .v4-detail {
  opacity: 0;
  visibility: hidden;
}

.v4-root.mode-home.has-title-logo .v4-detail-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.v4-root.mode-home .v4-card.kind-tv .v4-card-thumb {
  width: 168px;
  height: 252px;
  background: rgba(8, 12, 20, 0.88);
}

.v4-root.mode-home .v4-card.kind-series-fav .v4-card-thumb {
  width: 168px;
  height: 72px;
  background: rgba(8, 12, 20, 0.88);
}

.v4-root.mode-home .v4-card.kind-series-fav .v4-card-thumb img {
  object-fit: contain;
}

.v4-root.mode-home .v4-hero-bg::after {
  background:
    linear-gradient(90deg, #07090e 0%, rgba(7, 9, 14, 0.78) 34%, rgba(7, 9, 14, 0.18) 68%, rgba(7, 9, 14, 0.05) 100%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.35) 0%, transparent 24%, transparent 48%, rgba(7, 9, 14, 0.94) 100%);
}

#v4-player {
  display: none;
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: none;
  max-height: none;
  z-index: 5;
  background: #000;
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

#v4-player.is-open {
  display: block;
}

#v4-player.is-focused,
body.ui-v4.v4-playing:not(.v4-player-fill) #v4-player.is-open.is-focused {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.7);
}

/* Preenche a janela da app (#v4-root), nunca o monitor / Fullscreen API */
#v4-root.v4-player-fill .v4-stage {
  position: absolute;
  inset: 0;
  z-index: 40;
  grid-area: unset;
}

#v4-root.v4-player-fill .v4-rail,
#v4-root.v4-player-fill .v4-cats,
#v4-root.v4-player-fill .v4-content,
#v4-root.v4-player-fill .v4-shortcuts,
#v4-root.v4-player-fill .v4-topbar,
#v4-root.v4-player-fill .v4-title-logo,
#v4-root.v4-player-fill .v4-hero-nav {
  visibility: hidden;
  pointer-events: none;
}

#v4-root.v4-player-fill #v4-player,
#v4-root.v4-player-fill #v4-player.is-open,
body.ui-v4.v4-player-fill #v4-player,
body.ui-v4.v4-player-fill #v4-player.is-open {
  position: absolute;
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  transform: none;
  width: auto;
  height: auto;
  aspect-ratio: unset;
  max-width: none;
  max-height: none;
  z-index: 50;
  border-radius: 0;
  box-shadow: none;
  border: 0;
}

body.v4-android-pip #v4-root .v4-rail,
body.v4-android-pip #v4-root .v4-cats,
body.v4-android-pip #v4-root .v4-content,
body.v4-android-pip #v4-root .v4-shortcuts,
body.v4-android-pip #v4-root .v4-topbar,
body.v4-android-pip #v4-root .v4-title-logo,
body.v4-android-pip #v4-root .v4-hero-nav,
body.v4-android-pip #v4-root .v4-hero-bg,
body.v4-android-pip #v4-root .v4-detail,
body.v4-android-pip #v4-root .v4-now-info,
body.v4-android-pip #v4-player-osd {
  display: none !important;
}

body.v4-android-pip #v4-root,
body.v4-android-pip #v4-root.v4-player-fill,
body.v4-android-pip #v4-player,
body.v4-android-pip #v4-player.is-open,
body.v4-android-pip #v4-video {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #000;
  z-index: 9999;
}

.v4-root.mode-home.v4-playing:not(.v4-player-fill) #v4-player.is-open {
  position: absolute;
  top: 20px;
  bottom: 140px;
  left: 25px;
  right: 32px;
  transform: none;
  aspect-ratio: unset;
  height: auto;
  max-height: none;
  max-width: calc(100% - 70px);
}

#v4-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

#v4-video::cue {
  font-family: "Quicksand", system-ui, sans-serif;
  font-size: 1.15em;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  text-shadow: 0 1px 2px #000;
}

body.ui-v4.v4-player-fill #v4-video,
#v4-root.v4-player-fill #v4-video {
  object-fit: contain;
}

.v4-player-osd {
  position: absolute;
  inset: 0;
  padding: 0;
  background:
    linear-gradient(180deg, transparent 0%, transparent 52%, rgba(0, 0, 0, 0.78) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.v4-player-chrome {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.v4-player-actions,
.v4-player-play,
.v4-player-bottom,
.v4-player-bar,
.v4-player-bar-row,
.v4-player-seek-row,
.v4-player-progress,
.v4-player-title,
.v4-player-meta {
  pointer-events: auto;
}

.v4-player-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.28);
}

.v4-player-logo[hidden] {
  display: none !important;
}

.v4-player-live {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 8px 4px 18px;
  border-radius: 999px;
  color: #fff;
  background: #ff2d2d;
  position: relative;
}

.v4-player-live::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #fff;
}

.v4-player-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
}

.v4-player-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: none;
  flex: 0 1 auto;
  cursor: pointer;
  pointer-events: auto;
}

.v4-player-title:hover,
.v4-player-title:focus-visible,
.v4-player-title.is-focused {
  text-decoration: underline;
  outline: none;
}

.v4-player-title.is-focused {
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(255, 45, 45, 0.4);
  border-radius: 8px;
  padding: 2px 8px;
}

.v4-player-program-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.v4-player-program-row[hidden] {
  display: none;
}

.v4-player-program {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.v4-player-program:empty {
  display: none;
}

.v4-player-epcode {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.58);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.v4-player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.v4-player-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.v4-player-icon-btn svg {
  width: 18px;
  height: 18px;
}

#v4-player-next {
  position: relative;
  overflow: visible;
}

#v4-player-next .v4-next-cancel-icon {
  display: none;
  width: 16px;
  height: 16px;
}

#v4-player-next.is-cancel {
  background: rgba(255, 255, 255, 0.16);
}

#v4-player-next.is-cancel.is-focused,
#v4-player-next.is-cancel:focus-visible {
  box-shadow: none;
}

#v4-player-next.is-cancel .v4-next-ep-icon {
  display: none;
}

#v4-player-next.is-cancel .v4-next-cancel-icon {
  display: block;
}

#v4-player-next .v4-next-countdown {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  transform: rotate(-90deg);
  pointer-events: none;
  color: #fff;
}

#v4-player-next .v4-next-countdown[hidden] {
  display: none;
}

#v4-player-next .v4-next-countdown-track {
  opacity: 0.22;
}

#v4-player-next .v4-next-countdown-bar {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.2s linear;
}

.v4-player-icon-btn[hidden] {
  display: none !important;
}

.v4-player-skip {
  position: relative;
}

.v4-player-skip svg {
  width: 24px;
  height: 24px;
}

.v4-player-prev-ep svg {
  transform: scaleX(-1);
}

.v4-player-vlc svg {
  width: 20px;
  height: 20px;
}

.v4-player-icon-btn[aria-pressed="true"] {
  background: rgba(255, 45, 45, 0.28);
  color: #ffd4d4;
}

.v4-player-icon-btn.is-focused,
.v4-player-icon-btn:focus-visible,
.v4-player-play.is-focused,
.v4-player-play:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(255, 45, 45, 0.45);
}

#v4-player-subs .v4-subs-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

#v4-player-subs[aria-pressed="true"] {
  background: rgba(79, 195, 247, 0.28);
  color: #4fc3f7;
}

#v4-player-mute .v4-mute-off {
  display: none;
}

#v4-player-mute.is-muted .v4-mute-on {
  display: none;
}

#v4-player-mute.is-muted .v4-mute-off {
  display: block;
}

#v4-player-fs .v4-fs-exit {
  display: none;
}

#v4-player-fs.is-fs .v4-fs-enter {
  display: none;
}

#v4-player-fs.is-fs .v4-fs-exit {
  display: block;
}

.v4-player-play svg {
  width: 18px;
  height: 18px;
}

#v4-player .v4-player-pause-icon {
  display: none;
}

#v4-player:not(.is-paused) .v4-player-play-icon {
  display: none;
}

#v4-player:not(.is-paused) .v4-player-pause-icon {
  display: block;
}

#v4-player.is-paused .v4-player-play-icon {
  display: block;
}

#v4-player.is-paused .v4-player-pause-icon {
  display: none;
}

.v4-player-bottom {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 8px 0 10px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0) 0%, rgba(8, 10, 14, 0.78) 38%, rgba(8, 10, 14, 0.94) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.v4-player-bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 0 18px;
}

.v4-player-seek-row {
  width: 100%;
  min-width: 0;
  padding: 4px 0 0;
}

.v4-player-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 2px 18px 0;
}

.v4-player-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  max-width: none;
}

.v4-player-status {
  min-height: 0;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 18vw;
  flex-shrink: 1;
}

.v4-player-status:empty {
  display: none;
}

.v4-player-hide-btn {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.v4-player-hide-btn.is-focused,
.v4-player-hide-btn:focus-visible {
  outline: none;
  background: #fff;
  color: #111;
  box-shadow: var(--v4-focus-glow), 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.v4-player-bar {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.v4-player-progress {
  position: relative;
  height: 18px;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  cursor: pointer;
}

.v4-player-progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.v4-player-progress.is-focused,
.v4-player-progress:focus-visible {
  outline: none;
}

.v4-player-progress.is-focused::before,
.v4-player-progress:focus-visible::before {
  height: 4px;
  top: 7px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 6px rgba(255, 45, 45, 0.35);
}

.v4-player-progress > span:first-child {
  display: block;
  position: absolute;
  left: 0;
  top: 8px;
  height: 2px;
  width: 0;
  border-radius: 0;
  background: #ff2d2d;
}

.v4-player-progress.is-focused > span:first-child,
.v4-player-progress:focus-visible > span:first-child {
  top: 7px;
  height: 4px;
}

.v4-player-progress-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #ff2d2d;
  box-shadow: none;
  pointer-events: none;
}

.v4-player-time {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  min-width: 9ch;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.v4-player-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
}

#v4-player.v4-player-chrome-hidden .v4-player-osd {
  opacity: 0;
  pointer-events: none;
}

.v4-player-hint-fill {
  display: none;
}

#v4-root.v4-player-fill .v4-player-hint-docked {
  display: none;
}

#v4-root.v4-player-fill .v4-player-hint-fill {
  display: block;
}

.v4-now-info {
  position: absolute;
  right: 28px;
  top: 72px;
  z-index: 60;
  width: min(440px, 42vw);
  max-height: calc(100% - 96px);
  overflow: auto;
  padding: 22px 24px 24px;
  border-radius: 18px;
  background: rgba(10, 14, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.v4-now-info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.v4-now-info-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--v4-muted);
}

.v4-now-info-title {
  margin: 0 36px 8px 0;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
}

.v4-now-info-original {
  margin: 0 0 12px;
  font-size: 14px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.58);
}

.v4-now-info-plot {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.v4-now-info-plot:empty,
.v4-now-info-plot[hidden] {
  display: none;
}

.v4-now-info-ep-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.v4-now-info-ep-row:hover,
.v4-now-info-ep-row:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.14);
}

.v4-now-info-ep-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--v4-muted);
}

.v4-now-info-ep-name {
  font-size: 14px;
  line-height: 1.3;
}

.v4-now-info-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.v4-now-info-meta div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.v4-now-info-meta dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v4-muted);
}

.v4-now-info-meta dd {
  margin: 0;
}

.v4-now-info-epg {
  display: grid;
  gap: 8px;
}

.v4-now-info-epg-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--v4-muted);
}

.v4-now-info-epg-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  font-size: 14px;
}

.v4-now-info-epg-row.is-now .v4-now-info-epg-time {
  color: var(--v4-accent);
}

@media (max-width: 1280px) {
  :root {
    --v4-rail: 72px;
    --v4-cats: 230px;
    --v4-cards: min(46vw, 440px);
  }
  .v4-cats-title {
    font-size: 22px;
  }
  .v4-detail-title {
    font-size: 36px;
  }
}

body.ui-v4.page_epg_full .v4-topbar {
  z-index: 10060;
}

body.ui-v4 #epg-full-screen:not(.d-none) {
  top: 52px;
}
