/* ==========================================================================
   PALCO TV — Design System & Folha de Estilos do Player Linear 24/7
   ========================================================================== */

:root {
  --bg-pure-black: #000000;
  --bg-surface: rgba(18, 18, 22, 0.75);
  --bg-surface-elevated: rgba(28, 28, 34, 0.88);
  --accent-red: #ff2a2a;
  --accent-red-glow: rgba(255, 42, 42, 0.5);
  --accent-gold: #ffb703;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(255, 255, 255, 0.25);
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-brand: 'Space Grotesk', sans-serif;
  --shadow-glass: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--bg-pure-black);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow: hidden !important;
  overflow-x: hidden !important;
  overscroll-behavior: none !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Regra universal de visibilidade: garante que qualquer elemento com .hidden permaneça oculto,
   mesmo que possua classes como .icon-button com display:flex definido */
.hidden,
#btn-toggle-vod.hidden,
.player-wrapper.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Estrutura Principal & Aspecto 16:9
   -------------------------------------------------------------------------- */
.tv-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  background: var(--bg-pure-black);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  container-type: size;
  container-name: tvviewport;
}

/* --------------------------------------------------------------------------
   Camada do Player YouTube (Fundo - Enquadramento 16:9 de TV)
   -------------------------------------------------------------------------- */
.player-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw; /* Proporção 16:9 baseada na largura */
  max-width: 177.78vh; /* Limite 16:9 baseado na altura */
  max-height: 100vh;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-pure-black);
  z-index: 1;
  pointer-events: none;
}

#yt-player {
  position: relative;
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none !important;
}

/* Máscara protetora de tela cheia contra cliques externos e para controle de toque */
.player-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
  background: transparent;
}

/* --------------------------------------------------------------------------
   Camada de Intervalos / Vinhetas Internas (Anti-Ads)
   -------------------------------------------------------------------------- */
.internal-media-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-pure-black);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity var(--transition-smooth);
}

.internal-media-layer.hidden {
  opacity: 0;
  pointer-events: none;
}

.bumper-content {
  text-align: center;
}

.bumper-logo-pulse {
  font-family: var(--font-brand);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  animation: logoBreath 3s infinite ease-in-out;
}

.logo-highlight {
  color: var(--accent-red);
}

.bumper-sub {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

@keyframes logoBreath {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Cortina de Transição (State Machine)
   -------------------------------------------------------------------------- */
.transition-curtain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
}

.transition-curtain.active {
  opacity: 1;
  pointer-events: auto;
}

/* Chiado Analógico e Scanlines de Sintonia de TV */
.tuning-noise-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.tuning-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.4) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.04),
    rgba(0, 255, 0, 0.02),
    rgba(0, 0, 255, 0.04)
  );
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}

/* Estado Ativo: Sintonia Analógica entre Canais */
.transition-curtain.is-channel-tuning .tuning-noise-canvas {
  opacity: 0.88;
}

.transition-curtain.is-channel-tuning .tuning-scanlines {
  opacity: 0.75;
}

.transition-curtain.is-channel-tuning .signal-status-box {
  background: rgba(10, 10, 16, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(255, 42, 42, 0.45);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 42, 42, 0.25);
}

/* Estado de Canal Fora do Ar (Privado / Manutenção Técnica) */
.transition-curtain.is-off-air .sonar-spinner {
  display: none !important;
}

.transition-curtain.is-off-air .signal-status-box {
  background: rgba(14, 14, 22, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(239, 68, 68, 0.2);
  padding: 16px 28px;
}

.curtain-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.curtain-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo-icon-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(255, 42, 42, 0.2);
}

.tv-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-red);
}

.curtain-logo {
  font-family: var(--font-brand);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.accent-red {
  color: var(--accent-red);
}

.signal-status-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 10px 24px;
  border-radius: var(--radius-pill);
}

.sonar-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 12px var(--accent-red);
  animation: pulseDot 1.4s infinite ease-in-out;
}

.status-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

@keyframes pulseDot {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 16px var(--accent-red); }
  100% { transform: scale(0.85); opacity: 0.6; }
}

/* --------------------------------------------------------------------------
   HUD Sobreposto (Interface em Camadas)
   -------------------------------------------------------------------------- */
.tv-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 40px;
  pointer-events: none; /* Deixa passar cliques para o shield */
}

.tv-hud > * {
  pointer-events: auto; /* Reativa cliques nos botões e cards */
}

/* Transições suaves para os elementos do HUD */
.hud-bottom,
#btn-settings,
#btn-install-pwa {
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.top-left-brand,
.digital-clock {
  transition: opacity var(--transition-smooth), background var(--transition-smooth), border-color var(--transition-smooth);
}

/* Quando o HUD fica ocioso (Idle / Sem interação do usuário):
   Controles e cards de programa recolhem suavemente */
.tv-hud.idle .hud-bottom,
.tv-hud.idle #btn-settings,
.tv-hud.idle #btn-install-pwa {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

/* O Relógio Digital e a Marca de Transmissão permanecem SEMPRE VISÍVEIS (Modo Broadcast TV) */
.tv-hud.idle .digital-clock {
  opacity: 0.82;
  background: rgba(14, 14, 18, 0.45);
  border-color: rgba(255, 255, 255, 0.08);
}

.tv-hud.idle .top-left-brand {
  opacity: 0.82;
}

.tv-hud.idle .brand-pill,
.tv-hud.idle .live-pill {
  background: rgba(14, 14, 18, 0.45);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Topo do HUD */
.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.top-left-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glass);
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 1.5px;
}

.brand-name strong {
  color: var(--accent-red);
}

.channel-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.channel-badge:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.channel-badge svg {
  transition: transform var(--transition-fast);
}

.channel-badge:hover svg {
  transform: translateY(1px);
}

/* Modo Canal Standalone / Não Listado (Sem Seletor de Outros Canais) */
.channel-badge.is-standalone {
  cursor: default;
  pointer-events: none;
}

.channel-badge.is-standalone svg {
  display: none !important;
}

.channel-badge.is-standalone:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.12);
  transform: none;
}

/* Guia de Canais (Menu Popover Flutuante) */
.channels-popover {
  position: absolute;
  top: 70px;
  left: 40px;
  width: 320px;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 120px);
  background: rgba(14, 18, 27, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 1060;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.channels-popover.hidden {
  display: none !important;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.channels-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
}

.close-popover-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.15s ease;
}

.close-popover-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Seletor de Abas (TV vs Web Rádio) no Guia de Canais */
.channels-popover-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 4px;
}

.channel-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.channel-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.channel-tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.channel-tab-btn[data-tab-type="radio"].active {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
}

.channel-tab-count {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 800;
}

.channel-tab-btn.active .channel-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.channel-tab-btn[data-tab-type="radio"].active .channel-tab-count {
  background: rgba(168, 85, 247, 0.4);
  color: #fff;
}

.channels-popover-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channels-popover-list::-webkit-scrollbar {
  width: 5px;
}

.channels-popover-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.channel-guide-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  width: 100%;
  color: inherit;
  font-family: inherit;
}

.channel-guide-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.channel-guide-item.active {
  background: rgba(229, 9, 20, 0.15);
  border-color: rgba(229, 9, 20, 0.4);
}

.channel-guide-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.channel-guide-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-guide-slug {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.channel-guide-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.channel-guide-item.active .channel-guide-badge {
  background: rgba(229, 9, 20, 0.25);
  color: #ff5252;
  border-color: rgba(229, 9, 20, 0.5);
}

.channel-guide-badge.badge-radio {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

.channel-guide-item.active .channel-guide-badge.badge-radio {
  background: rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.6);
}

/* Botão AO VIVO */
.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glass);
}

.live-pill:hover {
  transform: translateY(-1px);
  border-color: var(--border-highlight);
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #666;
  transition: background var(--transition-fast);
}

.live-pill.is-live .live-dot {
  background: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red-glow);
  animation: liveBlink 1.8s infinite;
}

.live-pill.is-delayed {
  background: rgba(40, 40, 45, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

.live-pill.is-delayed .live-dot {
  background: #888888;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* Top Right Tools */
.top-right-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Botão Instalar App (PWA) */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(30, 136, 76, 0.25) 0%, rgba(20, 66, 159, 0.35) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glass), 0 0 18px rgba(56, 189, 248, 0.15);
  white-space: nowrap;
}

.pwa-install-btn.hidden {
  display: none !important;
}

.pwa-install-btn:hover {
  background: linear-gradient(135deg, rgba(30, 136, 76, 0.45) 0%, rgba(20, 66, 159, 0.55) 100%);
  border-color: rgba(56, 189, 248, 0.65);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glass), 0 0 24px rgba(56, 189, 248, 0.35);
}

.pwa-install-btn:active {
  transform: translateY(0);
}

.pwa-install-btn svg {
  color: #38bdf8;
  flex-shrink: 0;
}

/* Modal Guia de Instalação PWA */
.pwa-install-card {
  max-width: 440px;
}

.pwa-install-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-platform-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pwa-platform-card.is-highlighted {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.12);
}

.pwa-platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pwa-platform-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.4px;
}

.pwa-step-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.pwa-step-list strong {
  color: #ffffff;
}

.pwa-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.78rem;
  font-weight: 700;
}

.digital-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow-glass);
}

.clock-svg {
  display: inline-block;
  vertical-align: middle;
  color: var(--text-secondary);
}

.clock-digits {
  color: #f1f1f5;
}

.unmute-icon-svg {
  display: inline-block;
  vertical-align: middle;
}

.ctrl-svg {
  display: block;
  width: 20px;
  height: 20px;
  color: #ffffff;
}

/* Botões de Ícone Genéricos */
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glass);
}

.icon-button:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.icon-button:active {
  transform: translateY(0);
}

/* Badge de Legendas (CC) */
.badge-cc {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.icon-button.active .badge-cc {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(255, 42, 42, 0.15);
  box-shadow: 0 0 8px rgba(255, 42, 42, 0.4);
}

/* --------------------------------------------------------------------------
   Banner de Desmutar Áudio (Autoplay Policy)
   -------------------------------------------------------------------------- */
.unmute-banner {
  align-self: center;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.unmute-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

.unmute-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 42, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 42, 42, 0.4);
  animation: bounceSoft 2s infinite ease-in-out;
}

.unmute-text-compact {
  display: none;
}

.unmute-pill:hover {
  background: #ff1111;
  transform: scale(1.03);
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   Rodapé do HUD (Card do Programa e Controles)
   -------------------------------------------------------------------------- */
.hud-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  gap: 16px;
}

.program-info-card {
  max-width: min(580px, calc(100vw - 380px));
  min-width: 0;
  flex-shrink: 1;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  padding: 16px 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  overflow: hidden;
  box-sizing: border-box;
}

.program-info-card:hover {
  background: rgba(22, 22, 30, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.program-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.on-air-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-red);
  letter-spacing: 1.5px;
}

.pulse-dot-red {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: pulseDotRed 1.6s infinite ease-in-out;
}

@keyframes pulseDotRed {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.card-epg-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.program-info-card:hover .card-epg-hint {
  color: #fff;
  background: rgba(255, 42, 42, 0.18);
  border-color: rgba(255, 42, 42, 0.4);
}

.program-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.program-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.meta-divider {
  color: var(--text-tertiary);
}

/* Trilho Horizontal dos Próximos Programas (No Ar & A Seguir) */
.next-programs-rail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  max-width: 100%;
}

.next-up-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.next-programs-items {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.next-program-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  color: var(--text-secondary);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.next-program-chip.chip-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.program-info-card:hover .next-program-chip {
  border-color: rgba(255, 255, 255, 0.2);
}

.next-programs-more-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-red);
  background: rgba(255, 42, 42, 0.12);
  border: 1px solid rgba(255, 42, 42, 0.3);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Responsivo para Celular / Telas Menores */
@media (max-width: 600px) {
  .program-info-card {
    padding: 12px 16px;
    max-width: calc(100vw - 32px);
  }

  .program-title {
    font-size: 1.05rem;
    -webkit-line-clamp: 1;
  }

  .program-meta {
    font-size: 0.76rem;
    gap: 6px;
  }

  .next-program-chip.chip-secondary {
    display: none !important;
  }

  .next-program-chip.chip-primary {
    max-width: 140px;
  }
}

.next-up {
  color: var(--text-tertiary);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.35s ease;
}

.teaser-pulse {
  animation: teaserHighlight 2s ease-in-out;
  color: #38bdf8 !important;
  font-weight: 600;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.7);
}

@keyframes teaserHighlight {
  0% { transform: scale(1); filter: brightness(1); }
  25% { transform: scale(1.05); filter: brightness(1.4); }
  60% { transform: scale(1.02); filter: brightness(1.2); }
  100% { transform: scale(1); filter: brightness(1); }
}

.hud-actions-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  flex-shrink: 0;
}


.hud-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

/* --------------------------------------------------------------------------
   Modal de Configurações (Engrenagem)
   -------------------------------------------------------------------------- */
.settings-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity var(--transition-fast);
}

.settings-modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.settings-card {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.settings-card::-webkit-scrollbar {
  width: 6px;
}

.settings-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.close-btn:hover {
  color: #fff;
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-desc strong {
  font-size: 0.95rem;
  color: #fff;
}

.setting-desc p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.radio-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-toggle-group.horizontal-group {
  flex-direction: row;
  gap: 10px;
}

.radio-toggle-group.horizontal-group .toggle-option {
  flex: 1;
}

.option-pill.compact {
  padding: 10px 14px;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.toggle-option {
  cursor: pointer;
}

.toggle-option input {
  display: none;
}

.option-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.option-pill strong {
  font-size: 0.9rem;
}

.option-pill small {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.toggle-option input:checked + .option-pill {
  background: rgba(255, 42, 42, 0.12);
  border-color: var(--accent-red);
}

.toggle-option input:checked + .option-pill strong {
  color: var(--accent-red);
}

.badge-tech {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.settings-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-primary:hover {
  background: #e01b1b;
}

/* --------------------------------------------------------------------------
   Responsividade para Celulares (Mobile Portrait & Landscape)
   -------------------------------------------------------------------------- */
@media (max-width: 768px), (orientation: portrait) {
  .player-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    aspect-ratio: auto;
  }

  .tv-hud {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .hud-top {
    gap: 4px;
    align-items: flex-start;
  }

  .top-left-brand {
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
  }


  .brand-name {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
  }

  /* Em retrato/mobile, o botão de canais fica abaixo do nome PALCO TV */
  .channel-badge {
    display: inline-flex;
    font-size: 0.68rem;
    padding: 3px 8px;
    letter-spacing: 0.8px;
  }

  .brand-pill {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 7px 12px;
  }

  /* Popover ocupa mais largura em telas estreitas */
  .channels-popover {
    top: 60px;
    left: 10px;
    width: min(92vw, 340px);
    max-height: calc(100vh - 100px);
  }

  .live-pill {
    padding: 5px 8px;
    font-size: 0.72rem;
    gap: 4px;
  }

  .live-dot {
    width: 6px;
    height: 6px;
  }


  .top-right-tools {
    gap: 4px;
    flex-shrink: 0;
  }

  .digital-clock {
    padding: 5px 9px;
    font-size: 0.78rem;
    gap: 4px;
    background: rgba(18, 18, 22, 0.6);
  }

  .clock-svg {
    width: 12px;
    height: 12px;
  }

  .clock-digits {
    font-size: 0.78rem;
  }

  .icon-button {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .icon-button svg {
    width: 16px;
    height: 16px;
  }

  .pwa-install-btn {
    padding: 6px 10px;
    font-size: 0.72rem;
    gap: 5px;
    height: 34px;
  }

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

  .program-info-card {
    padding: 10px 14px;
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  .on-air-tag {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }

  .program-title {
    font-size: 0.92rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .program-meta {
    font-size: 0.78rem;
  }

  .meta-item.next-up {
    display: none;
  }

  .hud-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hud-actions-wrapper {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }


  .hud-controls-group {
    gap: 5px;
    justify-content: flex-end;
  }

  .hud-controls-group .icon-button {
    width: 34px;
    height: 34px;
  }

  .ctrl-svg {
    width: 16px;
    height: 16px;
  }

  .badge-cc {
    font-size: 0.72rem;
    padding: 1px 3px;
  }

  /* Modal de Configurações no Celular */
  .settings-card {
    padding: 16px 14px;
    max-height: 82vh;
    max-height: 82dvh;
    border-radius: var(--radius-md);
  }

  .settings-header {
    margin-bottom: 14px;
    padding-bottom: 8px;
  }

  .settings-header h3 {
    font-size: 1.05rem;
  }

  .settings-body {
    gap: 12px;
    margin-bottom: 16px;
  }

  .setting-desc strong {
    font-size: 0.85rem;
  }

  .setting-desc p {
    font-size: 0.75rem;
  }

  .option-pill.compact {
    padding: 7px 8px;
    font-size: 0.78rem;
  }
}

/* Modal Central de Horário Fixo */
.btn-conflict-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-base);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-conflict-action:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary-accent);
}

.btn-conflict-action .icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.btn-conflict-action .conflict-action-text {
  font-size: 0.8rem;
  line-height: 1.4;
}

.btn-conflict-action strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 2px;
}

#fixed-time-analysis-box {
  transition: all 0.3s ease;
}
#fixed-time-analysis-box.status-free {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}
#fixed-time-analysis-box.status-conflict {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* ============================================================================
   CAMADA WEB RÁDIO VISUAL NO PLAYER DA TV (ITEM 3.4)
   ============================================================================ */

.radio-visual-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0f172a 0%, #030712 65%, #000 100%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.radio-visual-layer.hidden {
  opacity: 0;
  pointer-events: none;
}

.radio-visual-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.radio-center-stage {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  max-width: 90vw;
}

/* Disco de Vinil / Centro da Rádio */
.radio-vinyl-wrapper {
  position: relative;
  width: min(50vw, 50vh, 260px);
  height: min(50vw, 50vh, 260px);
  margin-bottom: 24px;
}

.radio-vinyl-disk {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #1e293b 20%, #0b0f17 50%, #020617 100%);
  border: 4px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.25), inset 0 0 30px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vinylRotate 20s linear infinite;
}

.radio-vinyl-disk.paused {
  animation-play-state: paused;
}

@keyframes vinylRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radio-vinyl-grooves {
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.3), 0 0 0 16px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.radio-logo-center {
  position: relative;
  z-index: 4;
  width: 48%;
  height: 48%;
  border-radius: 50%;
  background: #0f172a;
  border: 3px solid rgba(6, 182, 212, 0.7);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.radio-station-logo {
  width: 85%;
  height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.6));
}

.radio-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
}

.radio-logo-fallback svg {
  width: 52%;
  height: 52%;
  filter: drop-shadow(0 0 12px rgba(192, 132, 252, 0.8));
}

.svg-radio-icon {
  display: inline-block;
  vertical-align: -2px;
  color: #c084fc;
  filter: drop-shadow(0 0 4px rgba(192, 132, 252, 0.5));
}

.radio-meta-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.radio-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
}

.radio-station-name {
  font-family: var(--font-brand);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin: 0;
  text-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
}

.radio-station-slogan {
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: #94a3b8;
  margin: 0;
  max-width: 500px;
}

/* ==========================================================================
   ⚡ ITEM 4.3: GUIA DE PROGRAMAÇÃO (EPG) INTERATIVO NO PLAYER
   Estilo Drawer Glassmorphism deslizante lateral com indicador No Ar & A Seguir
   ========================================================================== */
.epg-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.85);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  overflow: hidden;
  user-select: none;
}

.epg-drawer.hidden {
  transform: translateX(105%);
  pointer-events: none;
  opacity: 0;
}

.epg-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.epg-pretitle {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-red);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.epg-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.3px;
}

.epg-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.epg-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: scale(1.08);
}

.epg-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.epg-drawer-body::-webkit-scrollbar {
  width: 5px;
}

.epg-drawer-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.epg-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.epg-section-indicator.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
  animation: liveBlink 1.4s infinite;
}

/* Card: No Ar Agora */
.epg-now-card {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.15) 0%, rgba(20, 26, 38, 0.7) 100%);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.epg-now-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.epg-thumb-wrapper {
  position: relative;
  width: 90px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.epg-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.epg-thumb-badge {
  position: absolute;
  bottom: 3px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.epg-now-details {
  flex: 1;
  min-width: 0;
}

.epg-now-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
}

.epg-now-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.epg-now-clock {
  color: #38bdf8;
  font-weight: 600;
}

/* Barra de Progresso no Card No Ar */
.epg-progress-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
}

.epg-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff2a2a, #ff7b72);
  width: 0%;
  border-radius: 10px;
  transition: width 0.5s ease-out;
  box-shadow: 0 0 8px rgba(255, 42, 42, 0.6);
}

/* Lista de Próximas Atrações (A Seguir) */
.epg-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.epg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.epg-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(-2px);
}

.epg-item-thumb {
  width: 68px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.epg-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.epg-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.epg-item-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.epg-item-duration {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.epg-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  font-style: italic;
}

/* ============================================================================
   🍿 MÓDULO VOD (ACERVO SOB DEMANDA) — PLAYER DA TV (FASE 3)
   ============================================================================ */

.vod-catalog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1080;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  user-select: none;
}

.vod-catalog-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vod-catalog-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 10, 16, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.vod-catalog-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(225, 29, 72, 0.08) 0%, transparent 60%);
}

/* Cabeçalho do Catálogo */
.vod-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.95) 0%, rgba(8, 10, 16, 0) 100%);
  gap: 16px;
  flex-shrink: 0;
}

.vod-brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vod-badge-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fb7185;
  text-transform: uppercase;
}

.vod-catalog-channel-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.3px;
}

.vod-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  width: min(320px, 40vw);
  transition: all var(--transition-fast);
}

.vod-search-box:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.2);
}

.vod-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  width: 100%;
}

.vod-search-box input::placeholder {
  color: var(--text-tertiary);
}

.vod-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vod-close-btn:hover {
  background: rgba(225, 29, 72, 0.25);
  border-color: rgba(225, 29, 72, 0.5);
  transform: rotate(90deg);
}

/* Corpo e Prateleiras */
.vod-catalog-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 36px 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  scrollbar-width: thin;
}

.vod-shelf-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vod-shelf-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.vod-shelf-title-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.2px;
}

.vod-shelf-count-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

/* Carrossel Horizontal Deslizante */
.vod-shelf-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 10px 18px 10px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.vod-shelf-row::-webkit-scrollbar {
  display: none;
}

.vod-card {
  flex: 0 0 240px;
  background: rgba(18, 22, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.vod-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(225, 29, 72, 0.2);
}

.vod-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.vod-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.vod-card:hover .vod-card-thumb {
  transform: scale(1.05);
}

.vod-card-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.vod-card-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.vod-card:hover .vod-card-play-overlay {
  opacity: 1;
}

.vod-play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.vod-card-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vod-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
  margin: 0;
}

.vod-card-meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Estado Vazio */
.vod-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.vod-empty-state h3 {
  color: #fff;
  margin-bottom: 6px;
}

/* Responsividade Mobile (Bottom Sheet) */
@media (max-width: 768px), (orientation: portrait) {
  .vod-catalog-header {
    padding: 16px 16px 12px 16px;
  }

  .vod-catalog-channel-name {
    font-size: 1.1rem;
  }

  .vod-search-box {
    width: 100%;
    order: 3;
    margin-top: 8px;
  }

  .vod-catalog-header {
    flex-wrap: wrap;
  }

  .vod-catalog-body {
    padding: 6px 16px 30px 16px;
    gap: 22px;
  }

  .vod-card {
    flex: 0 0 190px;
  }
}

/* ============================================================================
   PICTURE-IN-PICTURE (PIP) FLUTUANTE & ARRASTÁVEL DA TV AO VIVO
   ============================================================================ */

.vod-pip-header {
  display: none !important;
}

.player-wrapper.is-pip-mode {
  position: fixed !important;
  top: auto;
  left: auto;
  bottom: 24px;
  right: 24px;
  width: 280px !important;
  height: 180px !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  aspect-ratio: auto !important;
  z-index: 1090 !important;
  background: #000 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.25s ease, transform 0.2s ease;
}

.player-wrapper.is-pip-mode.is-dragging {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.95), 0 0 24px rgba(225, 29, 72, 0.35) !important;
  border-color: rgba(225, 29, 72, 0.6) !important;
  transition: none !important;
  cursor: grabbing !important;
}

.player-wrapper.is-pip-mode.is-pip-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.85) !important;
}

.player-wrapper.is-pip-mode .vod-pip-header {
  display: flex !important;
  height: 34px;
  width: 100%;
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(12px);
  padding: 0 10px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  cursor: grab;
  z-index: 10;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.vod-pip-drag-handle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  cursor: grab;
  padding: 0 4px;
}

.drag-grip-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 2px 9px;
  color: #e2e8f0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.drag-grip-icon {
  opacity: 0.85;
}

.drag-grip-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
}

.player-wrapper.is-pip-mode .vod-pip-header:hover .drag-grip-pill,
.player-wrapper.is-dragging .drag-grip-pill {
  background: rgba(225, 29, 72, 0.35);
  border-color: rgba(225, 29, 72, 0.8);
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.5);
  color: #fff;
}

.player-wrapper.is-pip-mode .vod-pip-header:hover .drag-grip-label,
.player-wrapper.is-dragging .drag-grip-label {
  color: #fff;
}

.player-wrapper.is-pip-mode.is-dragging .vod-pip-header {
  cursor: grabbing !important;
}

.player-wrapper.is-pip-mode #yt-player {
  position: relative !important;
  flex: 1;
  width: 100% !important;
  height: calc(100% - 34px) !important;
  pointer-events: none !important;
}

.vod-pip-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.8px;
}

.vod-pip-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pip-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 3px 6px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.pip-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================================================
   PLAYER CINEMA VOD (TELA CHEIA COM CONTROLES DEDICADOS)
   ============================================================================ */

.vod-cinema-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vod-cinema-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vod-cinema-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1;
}

.vod-cinema-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, transparent 100%);
  z-index: 10;
  transition: opacity 0.3s ease;
}

.vod-cinema-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vod-cinema-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fb7185;
}

.vod-cinema-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.vod-cinema-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vod-cinema-close-btn:hover {
  background: rgba(225, 29, 72, 0.4);
  border-color: rgba(225, 29, 72, 0.8);
  transform: translateY(-1px);
}

.vod-cinema-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#vod-cinema-player-target {
  width: 100%;
  height: 100%;
}

#vod-cinema-player-target iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Barra de Controles Inferior do Cinema */
.vod-cinema-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 36px 24px 36px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.3s ease;
}

.vod-cinema-progress-wrap {
  width: 100%;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.vod-cinema-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  position: relative;
  transition: height 0.15s ease;
}

.vod-cinema-progress-wrap:hover .vod-cinema-progress-track,
.vod-cinema-progress-wrap.is-scrubbing .vod-cinema-progress-track {
  height: 8px;
}

.vod-cinema-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e11d48, #ff4757);
  border-radius: 3px;
  position: relative;
}

.vod-cinema-progress-fill::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6), 0 0 4px #e11d48;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.vod-cinema-progress-wrap:hover .vod-cinema-progress-fill::after,
.vod-cinema-progress-wrap.is-scrubbing .vod-cinema-progress-fill::after {
  opacity: 1;
  transform: translateY(-50%) scale(1.25);
}

.vod-cinema-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vod-cinema-left-actions, .vod-cinema-right-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vod-ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.vod-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.08);
}

.vod-ctrl-btn.play-main {
  background: rgba(225, 29, 72, 0.85);
  width: 44px;
  height: 44px;
}

.vod-ctrl-btn.play-main:hover {
  background: rgba(225, 29, 72, 1);
  transform: scale(1.1);
}

.vod-cinema-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e2e8f0;
  display: flex;
  gap: 5px;
  font-weight: 600;
}

@media (max-width: 768px), (orientation: portrait) {
  .player-wrapper.is-pip-mode {
    width: 200px !important;
    height: 130px !important;
    bottom: 16px;
    right: 16px;
  }

  .vod-cinema-header {
    padding: 14px 16px;
  }

  .vod-cinema-title {
    font-size: 1rem;
  }

  .close-label {
    display: none;
  }

}

/* --------------------------------------------------------------------------
   ZinePalco • Estante & Leitor Nativo (📖 Fase 9)
   -------------------------------------------------------------------------- */
.zine-card-item {
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast) !important;
}

.zine-card-item:hover {
  border-color: rgba(0, 242, 254, 0.5) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.15);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.zine-nav-btn {
  position: absolute !important;
  z-index: 40 !important;
  pointer-events: auto !important;
}

.zine-nav-btn:hover {
  background: rgba(0, 0, 0, 0.95) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
  transform: translateY(-50%) scale(1.08) !important;
}

.zine-viewport-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#zine-reader-modal {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

/* Header & Barra Superior */
.zine-reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(18, 21, 28, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 12px;
  z-index: 20;
}

.zine-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.zine-back-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition-fast);
}

.zine-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
}

.zine-header-title-box {
  min-width: 0;
  overflow: hidden;
}

.zine-header-title-box h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zine-header-title-box span {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.zine-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.zine-page-badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: monospace;
  color: #e2e8f0;
  white-space: nowrap;
}

.zine-close-btn {
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

.zine-close-btn:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  color: #fff !important;
}

/* Spread wrapper de página dupla com relevo central */
#zine-canvas-wrapper.is-spread-mode {
  flex-direction: row !important;
  gap: 0 !important;
}

#zine-viewport {
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  text-align: center !important;
}

#zine-canvas-wrapper {
  display: inline-flex !important;
  vertical-align: middle;
  min-width: max-content;
}

#zine-canvas-wrapper canvas {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Responsividade Mobile para evitar corte e manter botões acessíveis */
@media (max-width: 640px) {
  .zine-reader-header {
    padding: max(6px, env(safe-area-inset-top, 6px)) max(8px, env(safe-area-inset-right, 8px)) 6px max(8px, env(safe-area-inset-left, 8px));
    gap: 4px;
    height: auto;
    min-height: 48px;
    box-sizing: border-box;
  }
  .zine-header-left {
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .zine-back-btn {
    padding: 6px 8px;
    font-size: 0.82rem;
    min-height: 34px;
  }
  .zine-back-label {
    display: none;
  }
  .zine-header-title-box {
    max-width: 140px;
  }
  .zine-header-title-box h3 {
    font-size: 0.78rem !important;
  }
  .zine-header-title-box span {
    font-size: 0.65rem !important;
  }
  .zine-zoom-btn {
    display: none !important;
  }
  .zine-spread-btn {
    display: none !important;
  }
  .zine-page-badge {
    padding: 3px 6px !important;
    font-size: 0.7rem !important;
    font-weight: 700;
  }
  .zine-header-right {
    gap: 4px;
    flex-shrink: 0;
  }
  .zine-header-right .icon-button {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   SMART TV: DESIGN SYSTEM DE FOCO & EXPERIÊNCIA DE SOFÁ (10-FOOT UI) - FASE 1
   ========================================================================== */

/* Anel de foco visual com Glow Neon de alta visibilidade para telas de TV */
.tv-focused,
:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px #00f2fe, 0 0 20px rgba(0, 242, 254, 0.75), 0 0 40px rgba(0, 242, 254, 0.4) !important;
  border-color: #00f2fe !important;
  transform: scale(1.05) !important;
  z-index: 100 !important;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.18s ease-out, border-color 0.18s ease !important;
}

/* Tratamento de foco específico para botões circulares e pílulas */
.channel-badge.tv-focused,
.live-pill.tv-focused,
.icon-button.tv-focused,
.pip-btn.tv-focused,
.close-popover-btn.tv-focused,
.epg-close-btn.tv-focused,
.vod-close-btn.tv-focused,
.vod-ctrl-btn.tv-focused {
  background: rgba(0, 242, 254, 0.22) !important;
  color: #ffffff !important;
}

/* Foco em cards de itens da grade de canais */
.channel-guide-item.tv-focused {
  background: rgba(0, 242, 254, 0.18) !important;
  border-color: #00f2fe !important;
  transform: translateX(6px) scale(1.02) !important;
}

/* Foco no card de programação do rodapé */
.program-info-card.tv-focused {
  border-color: #00f2fe !important;
  background: rgba(14, 18, 26, 0.95) !important;
  box-shadow: 0 0 0 3px #00f2fe, 0 0 25px rgba(0, 242, 254, 0.5) !important;
  transform: translateY(-4px) scale(1.02) !important;
}

/* Foco nos cards de fanzines e acervo VOD */
.zine-card.tv-focused,
.vod-card.tv-focused {
  border-color: #00f2fe !important;
  box-shadow: 0 0 0 3px #00f2fe, 0 8px 24px rgba(0, 242, 254, 0.45) !important;
  transform: scale(1.03) !important;
  z-index: 5;
}

/* Foco nos botões de controle do PiP flutuante (Controle Remoto TV) */
.pip-btn.tv-focused {
  border-color: #00f2fe !important;
  background: rgba(0, 242, 254, 0.3) !important;
  box-shadow: 0 0 0 2px #00f2fe, 0 0 12px rgba(0, 242, 254, 0.6) !important;
  color: #fff !important;
  transform: scale(1.15) !important;
}

/* Quando o usuário usa apenas mouse/toque, esconde o foco exagerado para não poluir */
body:not(.tv-input-active) .tv-focused {
  box-shadow: none !important;
  transform: none !important;
}

/* ==========================================================================
   SMART TV: DESIGN SYSTEM DEDICADO & ESCALA OTIMIZADA (10-foot UI)
   ========================================================================== */
html.is-smart-tv,
body.is-smart-tv {
  overflow: hidden !important;
  overflow-x: hidden !important;
  overscroll-behavior: none !important;
  user-select: none !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
}

/* Escala base equilibrada para TV (15px evita que botões e textos explodam de tamanho) */
html.is-smart-tv {
  font-size: 15px;
}

/* Margem de segurança de TV (Safe Area 10-foot UI) */
html.is-smart-tv .tv-hud {
  padding: 22px 32px;
  box-sizing: border-box;
  max-width: 100vw;
  overflow: hidden;
}

/* Card Inferior "No Ar Agora": dimensões compactas, elegantes e sem overflow */
html.is-smart-tv .program-info-card {
  max-width: min(440px, 44vw);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

html.is-smart-tv .program-info-top {
  margin-bottom: 4px;
}

html.is-smart-tv .on-air-tag {
  font-size: 0.68rem;
  letter-spacing: 1.2px;
}

html.is-smart-tv .card-epg-hint {
  font-size: 0.68rem;
  padding: 2px 7px;
}

html.is-smart-tv .program-title {
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 1;
}

html.is-smart-tv .program-meta {
  font-size: 0.78rem;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
}

html.is-smart-tv .next-programs-rail {
  max-width: 100%;
  overflow: hidden;
}

html.is-smart-tv .next-up-label {
  font-size: 0.72rem;
}

html.is-smart-tv .next-program-chip {
  font-size: 0.74rem;
  padding: 2px 8px;
  max-width: 140px;
}

/* Na TV, oculta os chips secundários do rodapé para garantir que o card nunca dispute espaço com os controles */
html.is-smart-tv .next-program-chip.chip-secondary {
  display: none !important;
}

/* Botões de Ação na TV: tamanho 40px com anel de foco proporcional */
html.is-smart-tv .icon-button {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

html.is-smart-tv .icon-button svg {
  width: 18px;
  height: 18px;
}

html.is-smart-tv .hud-controls-group {
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

/* Topo do HUD na TV */
html.is-smart-tv .brand-pill {
  padding: 6px 12px;
}

html.is-smart-tv .channel-badge {
  font-size: 0.82rem;
  padding: 6px 12px;
}

html.is-smart-tv .digital-clock {
  font-size: 0.82rem;
  padding: 5px 10px;
}

html.is-smart-tv .live-pill {
  font-size: 0.75rem;
  padding: 5px 10px;
}

/* Ajuste proporcional para telas 4K nativas (sem scaling de DPI) */
@media (min-width: 2500px) {
  html.is-smart-tv {
    font-size: 20px;
  }
  html.is-smart-tv .icon-button {
    width: 52px;
    height: 52px;
  }
  html.is-smart-tv .program-info-card {
    max-width: 600px;
    padding: 16px 24px;
  }
}

/* Otimização Smart TV para o Catálogo VOD e PiP */
html.is-smart-tv .vod-catalog-container {
  padding: 0 40px 30px 40px;
}

html.is-smart-tv .vod-catalog-header {
  padding: 24px 0 16px 0;
}

html.is-smart-tv .vod-catalog-body {
  padding: 10px 0 60px 0;
}

/* PiP na Smart TV: dock compacto no canto superior direito para não encobrir as prateleiras inferiores */
html.is-smart-tv .player-wrapper.is-pip-mode {
  width: 260px !important;
  height: 160px !important;
  bottom: auto !important;
  top: 24px !important;
  right: 32px !important;
  left: auto !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 16px rgba(0, 242, 254, 0.25) !important;
}

html.is-smart-tv .vod-pip-header {
  height: 30px !important;
}

html.is-smart-tv .drag-grip-pill {
  display: none !important; /* Esconde indicação de arrastar com mouse na TV */
}

/* ==========================================================================
   MODO EMBUTIDO (PORTAL / IFRAME ?embed=true) & RESPONSIVIDADE DE BAIXA ALTURA
   ========================================================================== */

/* 1. MODO EMBUTIDO EXPLICITO (.is-embed-mode no HTML ou BODY) */
.is-embed-mode .tv-hud {
  padding: 10px 14px !important;
}

.is-embed-mode .brand-pill {
  padding: 4px 10px !important;
  gap: 6px !important;
}

.is-embed-mode .brand-pill img {
  height: 18px !important;
}

.is-embed-mode .channel-badge {
  font-size: 0.65rem !important;
  padding: 2px 6px !important;
}

.is-embed-mode .digital-clock {
  font-size: 0.75rem !important;
  padding: 4px 8px !important;
}

.is-embed-mode .live-pill {
  font-size: 0.7rem !important;
  padding: 4px 8px !important;
}

.is-embed-mode .icon-button {
  width: 32px !important;
  height: 32px !important;
}

.is-embed-mode .icon-button svg {
  width: 15px !important;
  height: 15px !important;
}

.is-embed-mode .pwa-install-btn {
  display: none !important;
}

/* Botão Unmute em Modo Embutido: Compacto no topo direito ou canto inferior, nunca cobrindo o centro */
.is-embed-mode .unmute-banner {
  position: absolute !important;
  top: 60px !important;
  right: 14px !important;
  align-self: auto !important;
  transform: none !important;
  z-index: 15 !important;
}

.is-embed-mode .unmute-pill {
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
  gap: 6px !important;
  background: rgba(225, 29, 72, 0.92) !important;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.is-embed-mode .unmute-pill svg {
  width: 15px !important;
  height: 15px !important;
}

.is-embed-mode .unmute-text {
  display: none !important;
}

.is-embed-mode .unmute-text-compact {
  display: inline !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

/* Card inferior 'No Ar Agora' em Modo Embutido:
   Super compacto e recolhido por padrão para dar 100% de visão ao vídeo */
.is-embed-mode .program-info-card {
  max-width: min(320px, 60vw) !important;
  padding: 6px 10px !important;
  border-radius: var(--radius-sm) !important;
  background: rgba(14, 16, 22, 0.7) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.is-embed-mode .program-title {
  font-size: 0.82rem !important;
  line-height: 1.2 !important;
  margin-bottom: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  -webkit-line-clamp: 1 !important;
}

.is-embed-mode .program-meta {
  font-size: 0.7rem !important;
  gap: 4px !important;
}

.is-embed-mode .next-programs-rail,
.is-embed-mode .card-epg-hint {
  display: none !important;
}

.is-embed-mode .on-air-tag {
  font-size: 0.62rem !important;
  margin-bottom: 2px !important;
}

.is-embed-mode .hud-bottom {
  gap: 8px !important;
}

.is-embed-mode .hud-controls-group {
  gap: 6px !important;
}

/* Gaveta EPG (Grade) perfeitamente adaptada ao Modo Embutido */
.is-embed-mode .epg-drawer {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(8, 10, 16, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-left: none !important;
  box-shadow: none !important;
  z-index: 1050 !important;
}

.is-embed-mode .epg-drawer-header {
  padding: 6px 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.is-embed-mode .epg-pretitle {
  font-size: 0.55rem !important;
  letter-spacing: 1px !important;
  margin-bottom: 1px !important;
}

.is-embed-mode .epg-title {
  font-size: 0.82rem !important;
  line-height: 1.1 !important;
}

.is-embed-mode .epg-close-btn {
  width: 24px !important;
  height: 24px !important;
  font-size: 0.75rem !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.is-embed-mode .epg-drawer-body {
  padding: 6px 10px 14px 10px !important;
  gap: 6px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
}

.is-embed-mode .epg-section-header {
  font-size: 0.6rem !important;
  margin-bottom: 2px !important;
  gap: 5px !important;
}

.is-embed-mode .epg-section-indicator.live-pulse {
  width: 6px !important;
  height: 6px !important;
}

.is-embed-mode .epg-now-card {
  padding: 6px 8px !important;
  border-radius: 8px !important;
  overflow: visible !important;
  min-height: max-content !important;
  flex-shrink: 0 !important;
}

.is-embed-mode .epg-now-header {
  gap: 8px !important;
  display: flex !important;
  align-items: center !important;
}

.is-embed-mode .epg-thumb-wrapper {
  width: 54px !important;
  height: 32px !important;
  border-radius: 5px !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.is-embed-mode .epg-thumb-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.is-embed-mode .epg-thumb-badge {
  font-size: 0.55rem !important;
  padding: 1px 3px !important;
  bottom: 2px !important;
  right: 2px !important;
}

.is-embed-mode .epg-now-details {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.is-embed-mode .epg-now-title {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 0 2px 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
}

.is-embed-mode .epg-now-time-row {
  font-size: 0.64rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

.is-embed-mode .epg-progress-bar-bg {
  height: 3px !important;
  margin-top: 5px !important;
}

.is-embed-mode .epg-upcoming-list {
  gap: 4px !important;
}

.is-embed-mode .epg-item {
  padding: 5px 7px !important;
  gap: 8px !important;
  border-radius: 6px !important;
}

.is-embed-mode .epg-item-thumb {
  width: 48px !important;
  height: 28px !important;
  border-radius: 4px !important;
}

.is-embed-mode .epg-item-header {
  margin-bottom: 1px !important;
  gap: 4px !important;
}

.is-embed-mode .epg-item-time {
  font-size: 0.6rem !important;
  padding: 1px 4px !important;
}

.is-embed-mode .epg-item-duration {
  font-size: 0.58rem !important;
}

.is-embed-mode .epg-item-title {
  font-size: 0.72rem !important;
  line-height: 1.2 !important;
}

/* Guia / Seletor de Canais (Popover) no Modo Embutido e Telas Pequenas */
.is-embed-mode .channels-popover {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  z-index: 1060 !important;
  display: flex !important;
  flex-direction: column !important;
  background: rgba(8, 10, 16, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.is-embed-mode .channels-popover.hidden {
  display: none !important;
}

.is-embed-mode .channels-popover-header {
  padding: 6px 12px !important;
  font-size: 0.68rem !important;
  flex-shrink: 0 !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.is-embed-mode .channels-popover-tabs {
  padding: 3px 6px !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}

.is-embed-mode .channel-tab-btn {
  padding: 4px 6px !important;
  font-size: 0.65rem !important;
}

.is-embed-mode .channel-tab-count {
  font-size: 0.58rem !important;
  padding: 0 4px !important;
}

.is-embed-mode .channels-popover-list {
  flex: 1 1 auto !important;
  max-height: none !important;
  height: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 6px 10px 14px 10px !important;
  gap: 4px !important;
}

.is-embed-mode .channel-guide-item {
  padding: 6px 8px !important;
  border-radius: 6px !important;
}

.is-embed-mode .channel-guide-name {
  font-size: 0.74rem !important;
}

.is-embed-mode .channel-guide-slug {
  font-size: 0.6rem !important;
}

.is-embed-mode .channel-guide-badge {
  font-size: 0.58rem !important;
  padding: 2px 6px !important;
}

/* 2. MEDIA QUERIES & CONTAINER QUERIES PARA ALTURAS MENORES (Celular Deitado, Janelas Compactas, Embed) */
@media (max-height: 480px), (max-width: 480px) {
  .tv-hud {
    padding: clamp(6px, 2.5vh, 12px) clamp(8px, 3vw, 16px) !important;
  }

  .unmute-pill {
    padding: 8px 16px;
    font-size: 0.85rem;
    gap: 8px;
  }

  .unmute-pill svg {
    width: 16px;
    height: 16px;
  }

  .unmute-text {
    display: none;
  }

  .unmute-text-compact {
    display: inline;
  }

  .program-info-card {
    padding: 8px 12px;
    max-width: min(380px, 60vw);
  }

  .program-title {
    font-size: 0.88rem;
    margin-bottom: 3px;
    -webkit-line-clamp: 1;
  }

  .program-meta {
    font-size: 0.72rem;
  }

  .next-programs-rail {
    display: none !important;
  }

  .card-epg-hint {
    padding: 1px 6px;
    font-size: 0.62rem;
  }

  .icon-button {
    width: 32px;
    height: 32px;
  }

  .icon-button svg {
    width: 15px;
    height: 15px;
  }

  .digital-clock {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .clock-svg {
    width: 11px;
    height: 11px;
  }

  .live-pill {
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  .brand-pill {
    padding: 4px 10px;
  }

  .brand-pill img {
    height: 18px !important;
  }

  .channel-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .curtain-brand img {
    height: 40px !important;
  }

  .curtain-content {
    gap: 14px;
  }
}

/* 3. ULTRA COMPACTO PARA ALTURAS EXTREMAMENTE PEQUENAS (180px - 260px, altura comum de <iframe> em Home) */
@media (max-height: 300px) {
  .tv-hud {
    padding: 6px 10px !important;
  }

  /* O botão de som vai para o topo ou flutua discretamente sem cobrir o centro */
  .unmute-banner {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .unmute-pill {
    padding: 5px 12px !important;
    font-size: 0.75rem !important;
    gap: 6px !important;
  }

  .unmute-pill svg {
    width: 14px !important;
    height: 14px !important;
  }

  .digital-clock {
    display: none !important; /* Em 200px de altura, o relógio sai para não cobrir o topo */
  }

  .top-left-brand {
    transform: scale(0.9);
    transform-origin: top left;
  }

  .top-right-tools {
    transform: scale(0.9);
    transform-origin: top right;
  }

  .program-info-card {
    max-width: 50vw !important;
    padding: 4px 8px !important;
    background: rgba(10, 10, 14, 0.75) !important;
  }

  .program-info-top {
    margin-bottom: 2px !important;
  }

  .on-air-tag {
    font-size: 0.58rem !important;
    letter-spacing: 0.8px !important;
  }

  .program-title {
    font-size: 0.75rem !important;
    margin-bottom: 0 !important;
    line-height: 1.15 !important;
  }

  .program-meta {
    display: none !important;
  }

  .hud-controls-group {
    transform: scale(0.85);
    transform-origin: bottom right;
  }

  .epg-drawer {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    border-left: none !important;
  }

  .epg-drawer-header {
    padding: 4px 10px !important;
  }

  .epg-pretitle {
    font-size: 0.5rem !important;
  }

  .epg-title {
    font-size: 0.75rem !important;
  }

  .epg-close-btn {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.7rem !important;
  }

  .epg-drawer-body {
    padding: 4px 8px 10px 8px !important;
    gap: 4px !important;
  }

  .epg-section-header {
    font-size: 0.55rem !important;
    margin-bottom: 1px !important;
  }

  .epg-now-card {
    padding: 5px 6px !important;
    overflow: visible !important;
    min-height: max-content !important;
    flex-shrink: 0 !important;
  }

  .epg-now-header {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .epg-thumb-wrapper {
    width: 46px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }

  .epg-thumb-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .epg-now-details {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .epg-now-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.15 !important;
    margin: 0 0 2px 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
  }

  .epg-now-time-row {
    font-size: 0.6rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  .epg-progress-bar-bg {
    height: 2px !important;
    margin-top: 3px !important;
  }

  .epg-upcoming-list {
    gap: 3px !important;
  }

  .epg-item {
    padding: 3px 5px !important;
    gap: 6px !important;
  }

  .epg-item-thumb {
    width: 40px !important;
    height: 22px !important;
  }

  .epg-item-header {
    margin-bottom: 0 !important;
  }

  .epg-item-time {
    font-size: 0.55rem !important;
    padding: 0 3px !important;
  }

  .epg-item-duration {
    font-size: 0.52rem !important;
  }

  .epg-item-title {
    font-size: 0.68rem !important;
  }

  .channels-popover {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 1060 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .channels-popover.hidden {
    display: none !important;
  }

  .channels-popover-header {
    padding: 4px 10px !important;
    font-size: 0.62rem !important;
  }

  .channels-popover-tabs {
    padding: 2px 4px !important;
  }

  .channel-tab-btn {
    padding: 3px 5px !important;
    font-size: 0.6rem !important;
  }

  .channels-popover-list {
    flex: 1 1 auto !important;
    max-height: none !important;
    padding: 4px 8px 10px 8px !important;
    gap: 3px !important;
  }

  .channel-guide-item {
    padding: 4px 6px !important;
  }

  .channel-guide-name {
    font-size: 0.68rem !important;
  }

  .channel-guide-slug {
    font-size: 0.55rem !important;
  }

  .channel-guide-badge {
    font-size: 0.52rem !important;
    padding: 1px 4px !important;
  }
}

/* Suporte a Container Queries quando embutido em container de tamanho variável */
@container tvviewport (max-height: 480px) {
  .unmute-text {
    display: none !important;
  }
  .unmute-text-compact {
    display: inline !important;
  }
  .next-programs-rail {
    display: none !important;
  }
}

@container tvviewport (max-height: 300px) {
  .digital-clock {
    display: none !important;
  }
  .program-meta {
    display: none !important;
  }
}


