: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;
}

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: 14px 3vw;
  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 {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.secondary-button {
  padding: 10px 22px;
  border: 1px solid var(--border-hover);
  background: transparent;
  color: #fff;
}

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

.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 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;
}

.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 {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0 18px;
}

.cat-chip {
  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 - 82px);
  padding-top: 4px;
}

#live-view > #live-cats {
  flex: 0 0 auto;
  margin: 12px 0 14px;
}

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

.live-list {
  flex: 0 0 300px;
  max-width: 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  padding-right: 14px;
}

.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);
  align-items: center;
  gap: 12px;
  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;
}

.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;
}

.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: 12px;
  padding: 4px 2px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}

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

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

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

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

/* ---- 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;
}

.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-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;
}

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

.player-topbar {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
}

.player-topbar > div {
  min-width: 0;
  flex: 1;
}

.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;
  color: var(--muted);
  font-size: 12px;
}

.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 0 14px;
  font-size: 15px;
  font-weight: 600;
}

.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 ---- */
@media (max-width: 850px) {
  .header {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 12px 16px;
  }
  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .header-search {
    width: 100%;
  }
  .hero {
    min-height: 360px;
  }
  .poster-grid, .row-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
  }
  #live-view {
    height: auto;
  }
  .live-split {
    flex-direction: column;
    flex: none;
  }
  .live-stage {
    width: 100%;
    order: 1;
  }
  .live-screen {
    flex: none;
    aspect-ratio: 16 / 9;
  }
  .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;
  }
  .channel-list {
    flex: none;
    max-height: none;
  }
  .detail-main {
    flex-direction: column;
    gap: 16px;
    padding: 22px 16px;
  }
  .detail-poster {
    width: 120px;
    flex-basis: 120px;
  }
}

@media (min-width: 851px) {
  .bottom-nav {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
}

/* ---- Modo Smart TV (10-foot UI) ---- */
html.tv :focus-visible {
  outline: 2.5px solid #ffffff;
  outline-offset: 4px;
}

html.tv .poster-card:focus-visible .poster-img {
  transform: translateY(-4px) scale(1.03);
  border-color: #ffffff;
}

html.tv .channel-card:focus-visible {
  background: #141414;
  border-color: #ffffff;
}

html.tv body {
  zoom: 0.9;
}
