:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #080808;
  --surface-elevated: #0f0f0f;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text: #ffffff;
  --muted: #767676;
  --accent: #ffffff;
  --accent-dark: #000000;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Header Minimalista ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(3vw, env(safe-area-inset-right, 16px)) 14px max(3vw, env(safe-area-inset-left, 16px));
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  transition: opacity 0.18s ease;
}

.brand:hover {
  opacity: 0.85;
}

.brand-logo {
  width: 30px;
  height: 24px;
  color: #ffffff;
  flex-shrink: 0;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-text strong {
  font-weight: 800;
  color: #ffffff;
}

.brand-text em {
  font-style: normal;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
}

/* ---- Navegação Principal ---- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav button {
  position: relative;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.main-nav button:hover {
  color: #ffffff;
}

.main-nav button.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
}

/* ---- Busca e Ações do Topo ---- */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 230px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #060606;
  transition: border-color 0.18s ease, width 0.22s ease;
}

.header-search:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
}

.header-search svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  flex-shrink: 0;
}

.header-search input {
  width: 100%;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

.header-search input::placeholder {
  color: #555;
}

.header-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover {
  color: #fff;
  border-color: var(--border);
}

.icon-btn.active {
  color: #000;
  background: #fff;
}

/* ---- Views & Estrutura Geral ---- */
.view {
  padding: 0 3vw 56px;
}

.view[hidden], #live-view[hidden] {
  display: none !important;
}

/* ---- Hero Minimalista ---- */
.hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  margin: 0 -3vw;
  background-position: center 22%;
  background-size: cover;
  background-color: #050505;
  border-bottom: 1px solid var(--border);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.78) 42%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.4) 38%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
  padding: 52px 3vw 48px;
  transition: opacity 0.25s ease;
}

.hero-kicker {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #d4d4d4;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4.2vw, 52px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero p {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.primary-button {
  margin-top: 18px;
  padding: 11px 24px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #000000;
}

.primary-button:hover:not(:disabled) {
  background: #e6e6e6;
}

.primary-button:disabled {
  opacity: 0.4;
  cursor: wait;
}

.primary-button svg, .secondary-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.detail-play-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.detail-play-row .primary-button,
.detail-play-row .secondary-button {
  margin-top: 0;
}

.secondary-button {
  padding: 11px 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.secondary-button:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-dots {
  display: flex;
  gap: 6px;
  margin-top: 22px;
}

.hero-dots button {
  width: 18px;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dots button:hover {
  background: rgba(255, 255, 255, 0.55);
}

.hero-dots button.active {
  width: 30px;
  background: #ffffff;
}

/* ---- Linhas de Catálogo e Cards Minimalistas ---- */
.rows {
  position: relative;
  z-index: 2;
  margin-top: 12px;
}

.row {
  margin-top: 34px;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.row-head h2 {
  margin: 0 !important;
}

.search-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.search-channels-grid .channel-card {
  border: 1px solid var(--border);
  background: #080808;
}

.search-channels-grid .channel-card:hover,
.search-channels-grid .channel-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.45);
  background: #121212;
}

.row h2, .section-heading h1 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #f0f0f0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.section-heading h1 {
  margin: 0;
  font-size: 22px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.catalog-search {
  display: none;
}

.poster-grid, .row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 24px 14px;
}

.poster-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.poster-img {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.poster-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #080808;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.poster-card:hover .poster-img {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.poster-card:hover img {
  transform: scale(1.02);
}

.poster-card .poster-title {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 500;
  color: #d8d8d8;
}

.poster-card:hover .poster-title {
  color: #ffffff;
}

.poster-rate {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}

.fav-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.poster-card:hover .fav-dot, .fav-dot.active {
  opacity: 1;
}

.fav-dot svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.fav-dot.active {
  color: #ffffff;
  background: #000000;
  border-color: #ffffff;
}

.fav-dot.active svg {
  fill: #ffffff;
}

/* ---- Chips de Filtro / Categorias ---- */
.cat-chips-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
}

.cat-chips-wrap[hidden] {
  display: none !important;
}

.cat-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 10px 0 12px;
  padding: 3px 2px;
  cursor: grab;
  user-select: none;
}

.cat-chips-wrap > .cat-chips {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.cat-chips.dragging {
  cursor: grabbing;
}

.cat-chips::-webkit-scrollbar {
  display: none;
}

.cat-scroll-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #111111;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.cat-scroll-btn:hover:not(:disabled) {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: scale(1.06);
}

.cat-scroll-btn:disabled {
  opacity: 0.26;
  cursor: default;
  pointer-events: none;
}

.cat-scroll-btn[hidden] {
  display: none !important;
}

.cat-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #050505;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.16s ease;
}

.cat-chip:hover {
  color: #ffffff;
  border-color: var(--border-hover);
}

.cat-chip.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  font-weight: 600;
}

/* ---- Seção Ao Vivo (#live-view) — Minimalismo em Preto ---- */
#live-view {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 68px);
  padding-top: 2px;
  padding-bottom: 12px;
  overflow: hidden;
}

#live-view > #live-cats,
#live-view > .cat-chips-wrap {
  flex: 0 0 auto;
  margin: 8px 0 10px;
}

.live-split {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.live-list {
  flex: 0 0 clamp(220px, 24vw, 290px);
  max-width: clamp(220px, 24vw, 290px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  padding-right: 12px;
}

.live-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #060606;
  transition: border-color 0.18s ease;
}

.live-search:focus-within {
  border-color: rgba(255, 255, 255, 0.38);
}

.live-search svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  flex-shrink: 0;
}

.live-search input {
  width: 100%;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

.live-search input::placeholder {
  color: #555;
}

.live-count {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #222 transparent;
}

.channel-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: #d4d4d4;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ch-fav-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #888888;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ch-fav-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.ch-fav-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
}

.ch-fav-btn.active {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.48);
  background: rgba(239, 68, 68, 0.14);
}

.ch-fav-btn.active svg {
  fill: currentColor;
}

.live-fav-action[hidden] {
  display: none !important;
}

.live-fav-action.active {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.live-fav-action.active svg {
  fill: currentColor;
}

.channel-card:hover {
  background: #0b0b0b;
  border-color: var(--border);
  color: #ffffff;
}

.channel-card.active {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.channel-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.channel-card strong, .channel-card small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.channel-card strong {
  font-size: 13.5px;
  font-weight: 500;
}

.channel-card.active strong {
  font-weight: 600;
}

.channel-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.live-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.live-screen {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.live-screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  z-index: 1;
}

/* Oculta permanentemente os controles nativos do navegador/WebView (botão Pause central travado) na TV Ao Vivo */
#live-video::-webkit-media-controls,
#live-video::-webkit-media-controls-enclosure,
#live-video::-webkit-media-controls-panel,
#live-video::-webkit-media-controls-overlay-play-button,
#live-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body:not(.live-mini) #live-mini-bar,
.player:not(.player-mini) #player-mini-bar {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.live-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #4a4a4a;
  font-size: 13.5px;
  z-index: 2;
  background: #030303;
}

.live-placeholder[hidden] {
  display: none;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.placeholder-inner svg {
  width: 44px;
  height: 34px;
  opacity: 0.35;
}

#live-msg {
  z-index: 3;
}

.live-meta {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.live-meta-txt {
  min-width: 0;
  flex: 1;
}

.live-meta h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-meta p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.live-meta select {
  flex: 0 0 auto;
  max-width: 170px;
  padding: 7px 12px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: #080808;
  color: #fff;
  font-size: 12.5px;
}

.live-fs-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: #101010;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.live-fs-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.live-fs-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
}

body.live-fs {
  overflow: hidden !important;
}

body.live-fs .live-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  height: 100dvh !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.live-osd {
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(460px, 85vw);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(12px);
  color: #ffffff;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.live-osd.visible {
  opacity: 1;
  transform: translateY(0);
}

.live-osd-main strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.live-osd-main span {
  display: block;
  margin-top: 2px;
  color: #bbbbbb;
  font-size: 13px;
}

.live-osd small {
  color: #888888;
  font-size: 11.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 6px;
}

/* ---- Detalhes do Título (#detail-view) ---- */
.detail-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  margin: 0 -3vw;
  background-position: center 18%;
  background-size: cover;
  background-color: #050505;
  border-bottom: 1px solid var(--border);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.25) 100%),
    linear-gradient(0deg, #000000 4%, transparent 60%);
}

.detail-back {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 3vw;
  padding: 7px 15px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.detail-back:hover {
  border-color: #fff;
}

.detail-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  padding: 44px 3vw 36px;
  max-width: 980px;
}

.detail-poster {
  width: 180px;
  flex: 0 0 180px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #0a0a0a;
  border: 1px solid var(--border);
}

.detail-info {
  min-width: 0;
}

.detail-info h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #a8a8a8;
  font-size: 13.5px;
  margin: 0 0 14px;
}

.rate {
  background: #111;
  border: 1px solid var(--border);
  color: #fff;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.detail-synopsis {
  color: #bfbfbf;
  font-size: 14px;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 0 18px;
}

.detail-cast {
  color: var(--muted);
  font-size: 12.5px;
  margin: 14px 0 0;
}

.detail-episodes {
  padding: 28px 0 0;
}

.detail-episodes h2 {
  font-size: 17px;
  margin: 0 0 12px;
}

.season-tabs {
  margin: 0 0 16px;
  padding-bottom: 4px;
  flex-wrap: wrap;
}

.ep-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 720px;
}

.ep-item {
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: #e5e5e5;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ep-item:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: #111111;
  color: #ffffff;
}

.ep-item.active {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ep-item.active .ep-num {
  color: #ffffff;
}

.ep-num {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.ep-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 500;
}

.ep-item svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---- Player Modal (Tela Cheia / VOD) ---- */
.player {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000;
}

.player[hidden] {
  display: none;
}

.player-cover, .player-shade, #video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-cover {
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.player-cover.playing {
  opacity: 0;
}

.player-shade {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 24%, transparent 74%, rgba(0, 0, 0, 0.65));
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#video {
  z-index: 1;
  object-fit: contain;
  background: transparent;
}

.player-topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 24px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 75%, transparent 100%);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.player.player-idle {
  cursor: none;
}

.player.player-idle .player-topbar,
.player.player-idle .player-shade,
.player.player-idle .plyr__controls,
.player.player-idle .plyr__control--overlaid,
.player .plyr--playing .plyr__control--overlaid {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.player.player-idle .player-topbar {
  transform: translateY(-16px);
}

.player-topbar-info {
  min-width: 0;
  flex: 1 1 180px;
}

.player-topbar-actions-wrap {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.player-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  padding: 2px 2px 4px;
}

.player-topbar-actions::-webkit-scrollbar {
  display: none;
}

.player-topbar-actions > * {
  flex: 0 0 auto;
}

.player-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.88);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.player-action-btn:hover,
.player-action-btn:focus,
.player-action-btn:focus-visible {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.player-topbar h2 {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 18px;
  font-weight: 600;
}

.player-topbar p {
  margin: 3px 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  .player-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  }
  .player-topbar-info {
    flex: 0 0 auto;
    width: 100%;
  }
  .player-topbar h2 {
    font-size: 15.5px;
  }
  .player-topbar p {
    font-size: 11.5px;
  }
  .player-topbar-actions-wrap {
    width: 100%;
  }
  .player-topbar-actions {
    width: 100%;
    gap: 7px;
  }
  .player-action-btn {
    padding: 7px 13px;
    font-size: 12.5px;
  }
  .player-topbar select {
    max-width: 165px;
    padding: 7px 11px;
    font-size: 12px;
  }
  .player-topbar .icon-button {
    width: 36px;
    height: 36px;
  }
}

.player-topbar select {
  max-width: 150px;
  padding: 7px 12px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.9);
  color: #fff;
  font-size: 12.5px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.icon-button:hover {
  border-color: #ffffff;
  background: #141414;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

#player-fav.active {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

#player-fav.active svg {
  fill: #000000;
}

.player-message {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.88);
  color: #e5e5e5;
  font-size: 13px;
}

.player-message[hidden] {
  display: none;
}

.loader {
  width: 17px;
  height: 17px;
  border: 1.8px solid #333;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

/* ---- Tema Plyr Minimalista ---- */
.player .plyr {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  --plyr-color-main: #ffffff;
  --plyr-video-background: transparent;
  --plyr-menu-background: rgba(10, 10, 10, 0.98);
  --plyr-menu-color: #eeeeee;
  --plyr-control-radius: 6px;
  --plyr-range-thumb-background: #ffffff;
  --plyr-video-control-color: #ffffff;
  --plyr-video-control-color-hover: #000000;
}

.player .plyr, .player .plyr__video-wrapper, .player .plyr video {
  height: 100%;
  width: 100%;
}

.player .plyr video {
  object-fit: contain;
}

.player .plyr__controls {
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent);
}

/* ---- Painel de Legendas ---- */
.cc-panel {
  position: absolute;
  z-index: 6;
  top: 74px;
  right: 26px;
  width: min(320px, calc(100vw - 32px));
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hover);
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(16px);
  color: #fff;
}

.cc-panel[hidden] {
  display: none;
}

.cc-panel h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.cc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cc-btn-small {
  padding: 5px 12px;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: #141414;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.cc-btn-small:hover,
.cc-btn-small:focus {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.cc-tv-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cc-row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: #0d0d0d;
  color: #e5e5e5;
  font-size: 13px;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cc-row-btn strong {
  color: #ffffff;
  font-weight: 600;
}

.cc-row-btn:hover,
.cc-row-btn:focus,
.cc-row-btn:focus-visible {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.cc-row-btn:hover strong,
.cc-row-btn:focus strong,
.cc-row-btn:focus-visible strong {
  color: #000000;
}

.cc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cc-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.cc-fields select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: #000;
  color: #fff;
  font-size: 12.5px;
}

.cc-background {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 10px 0;
  color: #d4d4d4;
  font-size: 13px;
}

.cc-background input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #ffffff;
}

.cc-sync {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.cc-sync button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: #0d0d0d;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}

.cc-sync button:hover {
  border-color: #ffffff;
}

.cc-sync output {
  min-width: 58px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
}

.cc-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

/* ---- Cards de Status & Painel Servidor Local ---- */
.perfil-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
}

.perfil-card {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.perfil-card strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.perfil-card span {
  color: var(--muted);
  font-size: 12px;
}

.admin-section {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.admin-box {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-box h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.admin-box p.admin-sub {
  margin: -6px 0 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #a3a3a3;
  font-weight: 500;
}

.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #000000;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  border-color: #ffffff;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #030303;
}

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

.admin-item-info strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-info small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.danger-btn {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: transparent;
  color: #d4d4d4;
  font-size: 11.5px;
  font-weight: 500;
}

.danger-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.badge-redirect {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  border: 1px solid var(--border-hover);
  font-size: 11px;
  font-weight: 500;
}

/* ---- Barra Inferior Mobile ---- */
body {
  padding-bottom: 70px;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}

.bottom-nav button {
  flex: 1;
  max-width: 150px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 5px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.18s ease;
}

.bottom-nav button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav button:hover,
.bottom-nav button.active {
  color: #ffffff;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 28px 0;
}

.catalog-empty {
  color: var(--muted);
  padding: 24px 0;
  font-size: 13.5px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---- Responsividade (Celulares em Retrato vs TVs/Desktop em Paisagem) ---- */
@media (max-width: 820px) and (orientation: portrait), (max-width: 640px) {
  html:not(.tv) .header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 14px)) 10px max(14px, env(safe-area-inset-left, 14px));
  }
  html:not(.tv) .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    overflow-x: auto;
    scrollbar-width: none;
  }
  html:not(.tv) .header-right {
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
  }
  html:not(.tv) .header-search {
    display: none !important;
  }
  html:not(.tv) .live-search input,
  html:not(.tv) .catalog-search input {
    font-size: 16px; /* Impede auto-zoom do iOS Safari/PWA ao digitar */
  }
  html:not(.tv) .catalog-section-heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px 0 12px;
    margin-bottom: 14px;
  }
  html:not(.tv) .catalog-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 4px 0 0;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #060606;
    transition: border-color 0.18s ease;
  }
  html:not(.tv) .catalog-search:focus-within {
    border-color: rgba(255, 255, 255, 0.45);
  }
  html:not(.tv) .catalog-search svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.8;
    flex-shrink: 0;
  }
  html:not(.tv) .catalog-search input {
    width: 100%;
    height: 38px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
  }
  html:not(.tv) .catalog-search input::placeholder {
    color: #555;
  }
  html:not(.tv) .user-pill-label {
    display: none;
  }
  html:not(.tv) .user-pill-btn {
    padding: 0 5px;
    width: 36px;
    justify-content: center;
  }
  html:not(.tv) .hero {
    min-height: 320px;
  }
  html:not(.tv) .poster-grid, html:not(.tv) .row-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 10px;
  }
  html:not(.tv) #live-view {
    height: auto;
    overflow: visible;
  }
  html:not(.tv) .live-split {
    flex-direction: column;
    flex: none;
  }
  html:not(.tv) .live-stage {
    width: 100%;
    order: 1;
  }
  html:not(.tv) .live-screen {
    flex: none;
    aspect-ratio: 16 / 9;
  }
  html:not(.tv) .live-list {
    flex-basis: auto;
    max-width: none;
    width: 100%;
    order: 2;
    border-right: 0;
    padding-right: 0;
    border-top: 1px solid var(--border);
    padding-top: 14px;
  }
  html:not(.tv) .channel-list {
    flex: none;
    max-height: none;
  }
  html:not(.tv) .detail-main {
    flex-direction: column;
    gap: 16px;
    padding: 22px 16px;
  }
  html:not(.tv) .detail-poster {
    width: 120px;
    flex-basis: 120px;
  }
  html:not(.tv) .apk-steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 821px), (orientation: landscape) and (min-width: 641px) {
  .bottom-nav {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
}

html.tv .bottom-nav {
  display: none !important;
}

html.tv body {
  padding-bottom: 0 !important;
}

/* ---- Redimensionamento para Televisão e Telas Widescreen Compactas (720p / 1080p / TV Box) ---- */
@media (max-height: 800px) and (orientation: landscape) {
  .header {
    gap: 16px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(2.2vw, env(safe-area-inset-right, 12px)) 8px max(2.2vw, env(safe-area-inset-left, 12px));
  }
  .brand-text {
    font-size: 14.5px;
  }
  .main-nav button {
    padding: 6px 12px;
    font-size: 12.5px;
  }
  .header-search {
    width: clamp(140px, 18vw, 210px);
  }
  .header-search input {
    height: 32px;
    font-size: 12px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
  }
  .view {
    padding: 0 2.2vw 24px;
  }
  #live-view {
    height: calc(100dvh - 52px);
    padding: 2px 2.2vw 8px;
  }
  #live-view > #live-cats {
    margin: 4px 0 6px;
  }
  .cat-chip {
    padding: 5px 12px;
    font-size: 12px;
  }
  .live-split {
    gap: 12px;
  }
  .live-list {
    flex: 0 0 clamp(190px, 23vw, 260px);
    max-width: clamp(190px, 23vw, 260px);
    padding-right: 10px;
  }
  .live-search {
    margin: 0 0 6px;
  }
  .live-search input {
    height: 30px;
    font-size: 12px;
  }
  .live-count {
    margin: 0 0 6px;
    font-size: 10.5px;
  }
  .channel-card {
    grid-template-columns: 34px minmax(0, 1fr) 26px;
    gap: 8px;
    min-height: 46px;
    padding: 6px 9px;
  }
  .channel-card img {
    width: 34px;
    height: 34px;
    padding: 3px;
  }
  .channel-card strong {
    font-size: 12.5px;
  }
  .channel-card small {
    font-size: 10.5px;
    margin-top: 1px;
  }
  .live-meta {
    margin-top: 6px;
    padding: 2px 0;
  }
  .live-meta h2 {
    font-size: 14px;
  }
  .live-meta p {
    font-size: 11px;
  }
  .live-fs-btn, .live-meta select {
    padding: 5px 12px;
    font-size: 11.5px;
  }
  .hero {
    min-height: clamp(240px, 46dvh, 360px);
    margin: 0 -2.2vw;
  }
  .hero-content {
    padding: 24px 2.2vw 22px;
  }
  .hero h1 {
    font-size: clamp(22px, 3.4vw, 38px);
    margin: 8px 0 6px;
  }
  .poster-grid, .row-grid {
    grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
    gap: 16px 12px;
  }
}

/* ---- Modo Smart TV / Controle Remoto (10-foot UI & Alta Performance GPU/Android TV) ---- */
html.tv {
  font-size: 16px;
}

/* Desativa backdrop-filter, sombras difusas pesadas e transições de escala em Smart TVs / TV Box
   para eliminar travamentos de GPU (Mali/Adreno) e garantir 60fps na navegação pelo controle */
html.tv *,
html.tv *::before,
html.tv *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition-duration: 0s !important;
  animation-duration: 0.6s !important;
}

html.tv .header {
  background: #000000 !important;
}

html.tv .poster-card,
html.tv .channel-card {
  contain: layout style paint;
}

html.tv .poster-card img,
html.tv .channel-card img {
  decoding: async;
}

html.tv :focus,
html.tv :focus-visible {
  outline: 3.5px solid #fde047 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

html.tv .auth-tab:focus,
html.tv .auth-tab:focus-visible,
html.tv .auth-field input:focus,
html.tv .auth-field input:focus-visible,
html.tv .auth-submit-btn:focus,
html.tv .auth-submit-btn:focus-visible,
html.tv .auth-forgot-link:focus,
html.tv .auth-forgot-link:focus-visible {
  outline: 3.5px solid #fde047 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
  border-color: #fde047 !important;
}

html.tv .poster-card:focus,
html.tv .poster-card:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

html.tv .poster-card:focus .poster-img,
html.tv .poster-card:focus-visible .poster-img {
  transform: none !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 0 3.5px #fde047 !important;
}

html.tv .poster-card:focus .poster-title,
html.tv .poster-card:focus-visible .poster-title {
  color: #fde047 !important;
  font-weight: 700;
}

html.tv .channel-card:focus,
html.tv .channel-card:focus-visible {
  background: #1f1f1f !important;
  border-color: #fde047 !important;
  color: #ffffff !important;
  outline: 3px solid #fde047 !important;
  outline-offset: 0px !important;
  box-shadow: none !important;
}

html.tv .cat-chip:focus,
html.tv .cat-chip:focus-visible,
html.tv .main-nav button:focus,
html.tv .main-nav button:focus-visible,
html.tv .live-fs-btn:focus,
html.tv .live-fs-btn:focus-visible {
  border-color: #fde047 !important;
  transform: none !important;
  outline: 3px solid #fde047 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* Dimensionamento da Tela de Login na TV (10-foot UI exclusivo para telas >= 821px) */
@media (min-width: 821px) {
  html.tv .auth-screen {
    padding: 40px 5vw;
  }

  html.tv .auth-split {
    max-width: 1200px;
    width: 94%;
    gap: 68px;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  html.tv .auth-brand-side {
    gap: 22px;
  }

  html.tv .auth-brand-hero {
    gap: 16px;
  }

  html.tv .auth-brand-icon {
    width: 58px;
    height: 46px;
  }

  html.tv .auth-brand-title {
    font-size: clamp(34px, 4vw, 48px);
    letter-spacing: 0.12em;
  }

  html.tv .auth-brand-tagline {
    font-size: 19px;
    line-height: 1.6;
    max-width: 480px;
    color: #c4c4c4;
  }

  html.tv .auth-brand-pills {
    gap: 10px;
    margin-top: 8px;
  }

  html.tv .auth-brand-pills span {
    font-size: 13.5px;
    padding: 7px 16px;
    border-color: rgba(255, 255, 255, 0.22);
    color: #e5e5e5;
  }

  html.tv .auth-card {
    max-width: 480px;
    width: 100%;
    padding: 34px 32px;
    border-radius: 16px;
    background: #0d0d0d;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9);
  }

  html.tv .auth-tabs {
    gap: 12px;
    margin-bottom: 24px;
  }

  html.tv .auth-tab {
    padding: 12px 22px;
    font-size: 16.5px;
    font-weight: 700;
    border-radius: 10px;
  }

  html.tv .auth-field {
    margin-bottom: 18px;
    gap: 8px;
  }

  html.tv .auth-field span {
    font-size: 14.5px;
    font-weight: 600;
    color: #d4d4d4;
  }

  html.tv .auth-field input {
    height: 52px;
    font-size: 16.5px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: #000000;
    color: #ffffff;
  }

  html.tv .auth-pw-toggle {
    right: 10px;
    padding: 8px 12px;
    font-size: 13px;
  }

  html.tv .auth-submit-btn {
    height: 54px;
    font-size: 17.5px;
    font-weight: 800;
    border-radius: 10px;
    margin-top: 10px;
  }

  html.tv .auth-minimal-note {
    font-size: 13.5px;
    margin-top: 14px;
    color: #888888;
  }

  html.tv .auth-forgot-link {
    font-size: 13.5px;
    color: #bbbbbb;
    padding: 4px 8px;
  }
}


/* ---- Seção de Download do APK (#apk-view) ---- */
.apk-hero {
  padding: 32px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0d0d0d 0%, #030303 100%);
  margin-bottom: 24px;
}

.apk-hero h2 {
  margin: 12px 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.apk-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 560px;
  line-height: 1.5;
}

.apk-dl-btn {
  text-decoration: none;
  margin-top: 20px;
  padding: 13px 28px;
  font-size: 14px;
}

.apk-dl-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}

.apk-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.apk-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.apk-card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.apk-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: #cccccc;
  font-size: 13.5px;
  line-height: 1.55;
}

.apk-steps strong {
  color: #ffffff;
}

.apk-url-code {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: #000000;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  user-select: all;
}

/* ============================================================
   TELA INICIAL MINIMALISTA PRETO E BRANCO (#auth-screen)
   ============================================================ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 25% 50%, rgba(255, 255, 255, 0.04), transparent 55%),
    #000000;
  color: #ffffff;
}

.auth-screen[hidden] {
  display: none !important;
}

.auth-split {
  width: 100%;
  max-width: 960px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 64px;
}

.auth-brand-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-right: 16px;
}

.auth-brand-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-icon {
  width: 48px;
  height: 38px;
  flex-shrink: 0;
}

.auth-brand-title {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1;
}

.auth-brand-title strong {
  font-weight: 800;
  color: #ffffff;
}

.auth-brand-title em {
  font-style: normal;
  font-weight: 200;
  color: #a3a3a3;
  margin-left: 4px;
}

.auth-brand-tagline {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: #a3a3a3;
  max-width: 380px;
}

.auth-trial-callout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #0a0a0a;
  color: #e5e5e5;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.auth-trial-callout strong {
  color: #ffffff;
  font-weight: 800;
}

.auth-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.auth-brand-pills span {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #070707;
  color: #a3a3a3;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.auth-panel-side {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border-radius: 14px;
  background: #070707;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 10px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-tabs[hidden] {
  display: none !important;
}

.auth-tab {
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #888888;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.auth-tab:hover {
  color: #ffffff;
}

.auth-tab.active {
  background: #ffffff;
  color: #000000;
}

.auth-alert {
  padding: 11px 14px;
  margin-bottom: 18px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e5e5e5;
}

.auth-alert.success {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.auth-alert.error {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form[hidden] {
  display: none !important;
}

.auth-subview-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.auth-subview-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #999999;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-field > span,
.auth-field-head > span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a3a3a3;
}

.auth-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-forgot-link {
  padding: 0;
  border: 0;
  background: none;
  color: #a3a3a3;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-field input::placeholder {
  color: #525252;
}

.auth-field input:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-pw-wrap input {
  padding-right: 72px;
}

.auth-pw-toggle {
  position: absolute;
  right: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #737373;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.auth-pw-toggle:hover {
  color: #ffffff;
}

.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 11px 18px;
  border: 1px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
  color: #000000;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.auth-submit-btn:hover {
  background: #e5e5e5;
}

.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.auth-secondary-btn {
  width: 100%;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #d4d4d4;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.auth-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.auth-minimal-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #737373;
  text-align: center;
}

.auth-minimal-note strong {
  color: #d4d4d4;
}

.verify-direct-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 820px) {
  .auth-screen,
  html.tv .auth-screen {
    align-items: flex-start;
    justify-content: center;
    padding:
      calc(18px + env(safe-area-inset-top, 0px))
      max(16px, env(safe-area-inset-right, 16px))
      calc(24px + env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-left, 16px));
  }
  .auth-split,
  html.tv .auth-split {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: auto;
  }
  .auth-brand-side,
  html.tv .auth-brand-side {
    align-items: center;
    text-align: center;
    padding-right: 0;
    gap: 8px;
    width: 100%;
  }
  .auth-brand-hero,
  html.tv .auth-brand-hero {
    justify-content: center;
    gap: 10px;
  }
  .auth-brand-icon,
  html.tv .auth-brand-icon {
    width: 36px;
    height: 28px;
  }
  .auth-brand-title,
  html.tv .auth-brand-title {
    font-size: clamp(22px, 6.2vw, 30px);
    letter-spacing: 0.1em;
  }
  .auth-brand-tagline,
  html.tv .auth-brand-tagline {
    font-size: 13.5px;
    line-height: 1.45;
    max-width: 320px;
  }
  .auth-brand-pills,
  html.tv .auth-brand-pills {
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
  }
  .auth-brand-pills span,
  html.tv .auth-brand-pills span {
    font-size: 11px;
    padding: 4px 10px;
  }
  .auth-panel-side {
    width: 100%;
    min-width: 0;
  }
  .auth-card,
  html.tv .auth-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 22px 18px !important;
    border-radius: 14px;
  }
  .auth-tabs,
  html.tv .auth-tabs {
    gap: 6px;
    margin-bottom: 18px;
  }
  .auth-tab,
  html.tv .auth-tab {
    height: 40px;
    padding: 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  .auth-field input,
  html.tv .auth-field input {
    height: 46px;
    font-size: 16px !important; /* Impede zoom automático do iOS Safari/PWA ao tocar no campo */
    padding: 0 14px;
  }
  .auth-pw-wrap input,
  html.tv .auth-pw-wrap input {
    padding-right: 68px;
  }
  .auth-submit-btn,
  html.tv .auth-submit-btn {
    min-height: 46px;
    height: 46px;
    font-size: 15px;
  }
}

/* ============================================================
   BOTÕES DE CONTA / ADMIN NO TOPO E PAINEL DE PERFIL
   ============================================================ */
.nav-admin-btn {
  color: #fde047 !important;
  font-weight: 700 !important;
}

.admin-icon-btn {
  color: #fde047;
  border-color: rgba(253, 224, 71, 0.35);
}

.user-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0d0d0d;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.user-pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: #171717;
}

.user-avatar-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-pill-label {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-icon-btn:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
}

.perfil-account-card {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #111113 0%, #09090b 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.perfil-acc-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}

.perfil-acc-info p {
  margin: 4px 0;
  color: #b3b3b3;
  font-size: 13.5px;
}

.perfil-acc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   PAINEL DO ADMINISTRADOR (#admin-view)
   ============================================================ */
.admin-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-top-btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.admin-stat-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #0b0b0d;
}

.admin-stat-card span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a1a1aa;
  margin-bottom: 6px;
}

.admin-stat-card strong {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
}

.admin-stat-card.active strong { color: #4ade80; }
.admin-stat-card.unverified strong { color: #facc15; }
.admin-stat-card.expired strong { color: #f87171; }

.admin-panel-box {
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0d0d10;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-panel-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-grid label > span {
  font-size: 12px;
  font-weight: 600;
  color: #d4d4d8;
}

.admin-form-grid input,
.admin-form-grid select {
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #050505;
  color: #ffffff;
  font-size: 13.5px;
}

.admin-form-submit {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-search-box {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #08080a;
}

.admin-search-box svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #888;
  stroke-width: 2;
}

.admin-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13.5px;
}

.admin-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-filter-chips button {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0b0b0d;
  color: #cccccc;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.admin-filter-chips button.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-user-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #0b0b0e;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.16s ease;
}

.admin-user-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.admin-user-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-user-identity h3 {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #a1a1aa;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-badge.active { background: rgba(34, 197, 94, 0.18); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.admin-badge.unverified { background: rgba(250, 204, 21, 0.16); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.4); }
.admin-badge.expired { background: rgba(248, 113, 113, 0.16); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.4); }
.admin-badge.blocked { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.55); }
.admin-badge.role-admin { background: rgba(234, 179, 8, 0.2); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.5); }

.admin-sub-box {
  text-align: right;
  font-size: 13px;
  color: #d4d4d8;
}

.admin-sub-box strong {
  display: block;
  font-size: 15px;
  color: #ffffff;
}

.admin-period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-period-label {
  font-size: 12px;
  font-weight: 700;
  color: #a1a1aa;
  margin-right: 4px;
}

.adm-chip-btn {
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #141418;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.adm-chip-btn:hover {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.38);
}

.adm-chip-btn.green {
  background: rgba(22, 163, 74, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.adm-chip-btn.green:hover {
  background: rgba(22, 163, 74, 0.35);
}

.adm-chip-btn.gold {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.45);
  color: #fde047;
}

.adm-chip-btn.danger {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.adm-date-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.adm-date-inline input[type="date"] {
  height: 30px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #050505;
  color: #ffffff;
  font-size: 12px;
  color-scheme: dark;
}

.admin-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .auth-topbar {
    padding: 16px 18px;
  }
  .auth-card {
    padding: 26px 20px;
  }
  .user-pill-label {
    display: none;
  }
  .user-pill-btn {
    padding: 0 6px;
  }
  .adm-date-inline {
    margin-left: 0;
    width: 100%;
  }
}

/* ---- Mini-Player Flutuante no Canto da Tela (VOD & Ao Vivo) + Picture-in-Picture ---- */
.live-meta {
  flex-wrap: wrap;
}

.live-meta-actions {
  flex-wrap: wrap;
}

.mini-player-bar {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  user-select: none;
}

.mini-player-bar[hidden] {
  display: none !important;
}

.player.player-mini:hover .mini-player-bar,
.player.player-mini.mini-controls-awake .mini-player-bar,
body.live-mini .live-screen:hover .mini-player-bar,
body.live-mini .live-screen.mini-controls-awake .mini-player-bar {
  opacity: 1;
}

.mini-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  pointer-events: auto;
}

.mini-player-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.mini-player-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.mini-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 10, 12, 0.85);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.mini-btn svg {
  width: 14px;
  height: 14px;
}

.mini-btn:hover,
.mini-btn:focus-visible {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: scale(1.07);
}

.mini-btn-close:hover,
.mini-btn-close:focus-visible {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.mini-center-play {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 15px;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.mini-center-play:hover,
.mini-center-play:focus-visible {
  background: #ffffff;
  color: #000000;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Estado Minimizado do Player VOD (#player.player-mini) */
.player.player-mini {
  position: fixed !important;
  inset: auto !important;
  right: 18px;
  bottom: 22px;
  width: 350px !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  z-index: 9500 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(0, 0, 0, 0.65) !important;
  overflow: hidden !important;
  background: #000000 !important;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.player.player-mini.mini-dragging,
body.live-mini .live-screen.mini-dragging {
  cursor: grabbing !important;
  transition: none !important;
}

.player.player-mini .player-topbar,
.player.player-mini .player-shade,
.player.player-mini .cc-panel,
.player.player-mini .plyr__controls,
.player.player-mini .plyr__control--overlaid {
  display: none !important;
}

.player.player-mini .plyr,
.player.player-mini #video {
  pointer-events: none !important;
}

.player.player-mini .plyr__caption,
.player.player-mini #video::cue {
  font-size: 11px !important;
}

.player.player-mini .player-message {
  padding: 6px 12px;
  font-size: 11px;
  gap: 8px;
}

/* Estado Minimizado da TV Ao Vivo (body.live-mini) */
#live-view.live-minimized-host {
  display: block !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  pointer-events: none !important;
}

#live-view.live-minimized-host > .cat-chips-wrap,
#live-view.live-minimized-host > #live-cats,
#live-view.live-minimized-host .live-list,
#live-view.live-minimized-host .live-meta {
  display: none !important;
}

body.live-mini .live-screen {
  position: fixed !important;
  inset: auto !important;
  right: 18px;
  bottom: 22px;
  width: 350px !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  flex: none !important;
  z-index: 9500 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(0, 0, 0, 0.65) !important;
  overflow: hidden !important;
  background: #000000 !important;
  pointer-events: auto !important;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

body.live-mini .live-screen #live-video {
  pointer-events: none !important;
}

body.live-mini .live-screen .live-osd {
  display: none !important;
}

@media (max-width: 760px) {
  .player.player-mini,
  body.live-mini .live-screen {
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: min(248px, 66vw) !important;
    border-radius: 12px !important;
  }
  .mini-player-bar {
    padding: 6px 8px;
  }
  .mini-player-title {
    font-size: 11px;
  }
  .mini-btn {
    width: 26px;
    height: 26px;
  }
  .mini-btn svg {
    width: 13px;
    height: 13px;
  }
  .mini-center-play {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  .live-meta-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
  .live-fs-btn {
    padding: 6px 11px;
    font-size: 11.5px;
  }
}
