/* ==========================================================================
   THEUZINHOTV - ESTILOS DA PÁGINA INICIAL (STREAMING & IPTV HOME)
   ==========================================================================
   Design system dark mode para streaming IPTV de alta fidelidade:
   Header fixo translúcido, Hero Carrossel com degradês laterais perfeitos,
   Carrosséis horizontais RIGOROSAMENTE PADRONIZADOS (Cards com altura fixa,
   títulos com reticências em 1 linha e EPG com overflow protegido), Top 10
   numerado na base, Canais com badge Ao Vivo, Agenda esportiva, busca rápida
   modular global e Player Modal.
   ========================================================================== */

/* Reset & Configurações de Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  color-scheme: dark;
}

body.home-page {
  font-family: var(--font-ui, 'Plus Jakarta Sans', system-ui, sans-serif);
  background-color: var(--bg-main, #06090f);
  color: var(--text-primary, #ffffff);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* NOTA: A barra de navegação global (Header, Menu, Busca, Perfil e Drawer)
   está modularizada de forma global em 'css/header.css'. */

/* Utilitário de Acessibilidade (Leitores de Tela) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prevenção de Cumulative Layout Shift (CLS) em todas as imagens com lazy load:
   Mantém renderização em fluxo normal para que atributos width/height e aspect-ratio
   reservem espaço real antes do carregamento sem colapsar para 0x0 fora da viewport. */

/* ==========================================================================
   SEÇÃO 1: BANNER PRINCIPAL (HERO CARROSSEL)
   ========================================================================== */
.hero-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  height: 86vh;
  min-height: 580px;
  max-height: 860px;
  overflow: hidden;
  z-index: 5;
  contain: layout paint;
  transform: translateZ(0);
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
  transform: translateZ(0);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

/* Imagem de Fundo em Tela Cheia Widescreen (Topo Seguro Anti-Corte de Rostos/Cabeças) */
.hero-backdrop-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
  transform-origin: center bottom;
  transform: scale(1) translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-slide.active .hero-backdrop-img {
  transform: scale(1.035) translateZ(0);
}

/* Degradês Cinematográficos: Suave à Esquerda, Base E À DIREITA (Sem corte abrupto) */
.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to right, rgba(6, 9, 15, 0.98) 0%, rgba(6, 9, 15, 0.85) 15%, rgba(6, 9, 15, 0.4) 45%, rgba(6, 9, 15, 0.1) 70%, transparent 80%, rgba(6, 9, 15, 0.75) 92%, rgba(6, 9, 15, 1) 100%),
    linear-gradient(to top, rgba(6, 9, 15, 1) 0%, rgba(6, 9, 15, 0.85) 12%, rgba(6, 9, 15, 0.3) 45%, transparent 65%);
  pointer-events: none;
}

/* Conteúdo sobreposto na imagem */
.hero-content-wrapper {
  position: absolute;
  bottom: 95px;
  left: 4%;
  right: 4%;
  max-width: 680px;
  z-index: 25;
}

.hero-slide.active .hero-content-wrapper {
  animation: fadeInUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(var(--accent-rgb, 0, 132, 255), 0.18);
  color: var(--accent-cyan, #00d2ff);
  border: 1px solid rgba(var(--accent-rgb, 0, 132, 255), 0.35);
}

.hero-tag-quality {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-family: var(--font-brand);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24;
  font-weight: 700;
}

.hero-overview {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Botões de Ação do Hero */
.hero-buttons-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero-watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 28px;
  background: var(--accent-blue, #0084ff);
  color: var(--accent-on-primary, #ffffff);
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius-md, 12px);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb, 0, 132, 255), 0.45);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-hero-watch:hover {
  background: var(--accent-blue-hover, #0072de);
  box-shadow: 0 6px 28px rgba(var(--accent-rgb, 0, 132, 255), 0.65);
  transform: scale(1.03);
}

.btn-hero-watch svg {
  width: 20px;
  height: 20px;
}

.btn-hero-mylist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 600;
  border-radius: var(--radius-md, 12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-hero-mylist:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.03);
}

.btn-hero-mylist.in-list {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.btn-hero-mylist svg {
  width: 18px;
  height: 18px;
}

/* Controles Manuais do Hero */
.hero-controls {
  position: absolute;
  bottom: 95px;
  right: 4%;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-arrow-btn:hover {
  background: var(--accent-blue, #0084ff);
  border-color: var(--accent-blue, #0084ff);
  color: var(--accent-on-primary, #ffffff);
  transform: scale(1.08);
}

.hero-arrow-btn svg {
  width: 18px;
  height: 18px;
}

.hero-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.hero-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  padding: 0;
}

.hero-indicator-dot.active {
  width: 28px;
  border-radius: 9999px;
  background: var(--accent-blue, #0084ff);
  box-shadow: 0 0 10px rgba(var(--accent-rgb, 0, 132, 255), 0.5);
}

/* ==========================================================================
   SEÇÕES DE CONTEÚDO E CARROSSÉIS HORIZONTAIS
   ========================================================================== */
.content-sections-container {
  position: relative;
  z-index: 20;
  margin-top: -35px;
  padding-bottom: 65px; /* Espaço entre o fim da última seção e o início da linha divisória do rodapé. */
  display: flex;
  flex-direction: column;
  gap: 46px;
}

.content-section {
  position: relative;
  padding: 0 4%;
}

/* Cabeçalho de Seção com Ícone Consistente */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.section-title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue, #0084ff);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb, 0, 132, 255), 0.4));
}

.section-title-icon svg {
  width: 24px;
  height: 24px;
}

.section-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb, 0, 132, 255), 0.12);
  border: 1px solid rgba(var(--accent-rgb, 0, 132, 255), 0.3);
  color: var(--accent-cyan, #38bdf8);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.section-view-all-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.section-view-all-link:hover {
  background: rgba(var(--accent-rgb, 0, 132, 255), 0.22);
  border-color: rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.55);
  color: #ffffff;
}

.section-view-all-link:hover svg {
  transform: translateX(2px);
}

/* Container do Carrossel com Scroll Horizontal Suave */
.carousel-wrapper {
  position: relative;
  width: 100%;
}

.carousel-track {
  display: flex;
  align-items: flex-start; /* CRÍTICO: Impede que cards vizinhos se estiquem verticalmente */
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 16px 8px 22px; /* ESPAÇAMENTO FIXO PARA O RODAPÉ DAS CATEGORIAS */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Espaçamento dedicado e seguro para as faixas do Top 10 */
#track-top10,
#track-top10-series {
  padding-top: 20px;
  padding-bottom: 26px;
}

/* Botões de Avançar/Voltar do Carrossel */
.carousel-arrow {
  position: absolute;
  top: calc(50% - 24px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(9, 14, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85);
}

.carousel-wrapper:hover .carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.carousel-arrow:hover {
  background: var(--accent-blue, #0084ff);
  border-color: var(--accent-blue, #0084ff);
  color: var(--accent-on-primary, #ffffff);
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(var(--accent-rgb, 0, 132, 255), 0.6);
}

.carousel-arrow.arrow-prev {
  left: 6px;
}

.carousel-arrow.arrow-next {
  right: 6px;
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   CARDS DE FILMES E SÉRIES (PADRONIZADOS - SEM ESTICAR E SEM TAG DE TIPO)
   ========================================================================== */
.card-media {
  flex: 0 0 185px;
  width: 185px; /* LARGURA FIXA */
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), z-index 0.28s;
  flex-shrink: 0;
}

.card-poster-wrapper {
  position: relative;
  width: 185px;
  height: 275px; /* ALTURA FIXA PADRONIZADA (Proporção 2:3 perfeita do TMDB) */
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  background: #141c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.card-poster-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover; /* Nunca distorce nem altera a altura do card */
  transition: transform 0.35s ease, filter 0.35s ease;
}

/* Efeito de Hover Inteligente */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 9, 15, 0.9) 0%, rgba(6, 9, 15, 0.4) 60%, rgba(6, 9, 15, 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-play-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-blue, #0084ff);
  color: var(--accent-on-primary, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(var(--accent-rgb, 0, 132, 255), 0.75);
  transform: scale(0.75);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-play-icon svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

/* Badge com a Nota do TMDB no canto superior (Animada no Hover) */
.card-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(6, 9, 15, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-rating-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* Disparo do Hover Inteligente */
.card-media:hover {
  transform: scale(1.04);
  z-index: 30;
}

.card-media:hover .card-poster-wrapper {
  border-color: rgba(var(--accent-rgb, 0, 132, 255), 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.85), 0 0 25px rgba(var(--accent-rgb, 0, 132, 255), 0.25);
}

.card-media:hover .card-poster-img {
  filter: brightness(0.72);
}

.card-media:hover .card-hover-overlay {
  opacity: 1;
}

.card-media:hover .card-play-icon {
  transform: scale(1);
}

.card-media:hover .card-rating-badge {
  opacity: 1;
  transform: translateY(0);
}

/* Metadados abaixo do pôster: Título limitado a 1 linha com reticências (...) e apenas Ano */
.card-info {
  margin-top: 10px;
  width: 185px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* RETICÊNCIAS EM TÍTULOS LONGOS */
  line-height: 1.3;
  margin-bottom: 2px;
}

.card-meta-line {
  font-size: 0.7rem;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* RETICÊNCIAS SE OS GÊNEROS FOREM LONGOS */
  display: block;
  width: 100%;
  line-height: 1.3;
}

/* ==========================================================================
   SEÇÃO 4: TOP 10 FILMES COM NÚMERO GRANDE ESTILIZADO (1 a 10)
   ========================================================================== */
.card-top10 {
  flex: 0 0 230px;
  width: 230px;
  height: 232px; /* ALTURA FIXA: Evita qualquer glitch de redimensionamento e barra de rolagem */
  min-height: 232px;
  max-height: 232px;
  box-sizing: border-box;
  scroll-snap-align: start;
  display: flex;
  align-items: flex-end;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  padding-bottom: 6px;
  flex-shrink: 0;
}

.top10-number {
  font-family: var(--font-brand);
  font-size: 6.8rem;
  font-weight: 900;
  line-height: 0.85;
  color: #06090f;
  -webkit-text-stroke: 3px var(--accent-blue, #0084ff);
  text-shadow: 0 0 20px rgba(var(--accent-rgb, 0, 132, 255), 0.35);
  margin-right: -24px;
  z-index: 1;
  user-select: none;
  letter-spacing: -0.06em;
  filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.8));
  transition: color 0.25s ease, -webkit-text-stroke 0.25s ease, text-shadow 0.25s ease;
  pointer-events: none; /* Deixa eventos passarem para o card sem travar o cursor */
}

.card-top10:nth-child(1) .top10-number { -webkit-text-stroke: 3px var(--accent-cyan, #00d2ff); }
.card-top10:nth-child(2) .top10-number { -webkit-text-stroke: 3px var(--accent-cyan, #00a2ff); }
.card-top10:nth-child(3) .top10-number { -webkit-text-stroke: 3px var(--accent-blue, #3b82f6); }

.card-top10 .card-poster-wrapper {
  width: 145px;
  height: 218px; /* Proporção 2:3 fixa */
  aspect-ratio: 2 / 3;
  z-index: 2;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75);
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.card-top10:hover {
  z-index: 30;
}

.card-top10:hover .card-poster-wrapper {
  transform: translateY(-8px) scale(1.04);
  border-color: rgba(var(--accent-rgb, 0, 132, 255), 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.85), 0 0 25px rgba(var(--accent-rgb, 0, 132, 255), 0.25);
}

.card-top10:hover .top10-number {
  color: rgba(var(--accent-rgb, 0, 132, 255), 0.2);
  -webkit-text-stroke: 3px var(--accent-cyan, #00d2ff);
  text-shadow: 0 0 25px rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.6);
}

.card-top10:hover .card-rating-badge {
  opacity: 1;
  transform: translateY(0);
}

.card-top10:hover .card-hover-overlay {
  opacity: 1;
}

.card-top10:hover .card-play-icon {
  transform: scale(1);
}

/* ==========================================================================
   SEÇÃO 2: CANAIS EM DESTAQUE (AMBIENT GLASS & FLOATING BRAND)
   ========================================================================== */
.card-channel {
  flex: 0 0 210px;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  box-sizing: border-box;
  scroll-snap-align: start;
  background: linear-gradient(150deg, rgba(20, 28, 48, 0.85) 0%, rgba(10, 15, 29, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 14px);
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-channel:hover {
  transform: scale(1.035);
  border-color: rgba(var(--accent-rgb, 0, 132, 255), 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.85), 0 0 25px rgba(var(--accent-rgb, 0, 132, 255), 0.25);
  background: linear-gradient(150deg, rgba(24, 34, 58, 0.95) 0%, rgba(12, 18, 35, 0.98) 100%);
}

/* Linha superior: Badge AO VIVO e Tag de Qualidade/Categoria */
.channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  z-index: 3;
}

.badge-live {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.54rem;
  font-weight: 800;
  height: 18px;
  padding: 0 7px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.badge-live > span:last-child {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translateY(1px);
}

.live-dot {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  display: block;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  animation: pulse 1.4s infinite;
}

.badge-quality {
  font-size: 0.54rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
}

/* Área do Logo com Halo de Luz Ambiente e Botão de Play */
.channel-logo-container {
  width: 100%;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 2px 0 4px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 2;
}

.channel-ambient-glow {
  position: absolute;
  width: 110px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 72%);
  filter: blur(12px);
  pointer-events: none;
  transition: all 0.35s ease;
}

.card-channel:hover .channel-ambient-glow {
  transform: scale(1.15);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09) 0%, transparent 72%);
}

.channel-logo-img {
  width: 100%;
  height: 100%;
  max-width: 88%;
  max-height: 88%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}

.card-channel:hover .channel-logo-img {
  transform: scale(1.08);
}

/* Botão de Play que surge no Hover no centro do Logo */
.channel-play-overlay {
  position: absolute;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-blue, #0084ff);
  color: var(--accent-on-primary, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(var(--accent-rgb, 0, 132, 255), 0.75), 0 4px 12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: scale(0.65);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.channel-play-overlay svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
  fill: currentColor;
}

.card-channel:hover .channel-play-overlay {
  opacity: 1;
  transform: scale(1);
}

/* Informações e EPG */
.channel-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  min-width: 0;
  z-index: 2;
}

.channel-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  display: block;
  transition: color 0.2s ease;
}

.card-channel:hover .channel-name {
  color: var(--accent-cyan, #00d2ff);
}

/* Espaço reservado para programa atual do EPG */
.channel-epg-program {
  font-size: 0.76rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.channel-epg-program svg {
  width: 13px;
  height: 13px;
  color: var(--accent-cyan, #00d2ff);
  flex-shrink: 0;
}

.channel-epg-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
  flex: 1;
  font-weight: 500;
  transition: color 0.2s ease;
}

.card-channel:hover .channel-epg-text {
  color: #ffffff;
}

/* Barra de Transmissão ao Vivo (EPG Live Progress Bar) */
.channel-live-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 3px;
}

.channel-live-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan, #00d2ff), var(--accent-blue, #3b82f6));
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   SEÇÃO 3: AGENDA DE HOJE (JOGOS E EVENTOS ESPORTIVOS)
   ========================================================================== */
.card-schedule {
  flex: 0 0 280px;
  width: 280px;
  height: 140px; /* ALTURA FIXA PADRONIZADA */
  aspect-ratio: 280 / 140;
  scroll-snap-align: start;
  background: #0d1424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 12px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
}

/* Imagem de Fundo Discreta */
.schedule-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 280 / 140;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  filter: saturate(1.15) contrast(1.1);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.card-schedule:hover .schedule-bg-img {
  opacity: 0.28;
  transform: scale(1.06);
}

/* Película Escura para Contraste e Legibilidade Absoluta */
.schedule-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 20, 36, 0.94) 0%, rgba(13, 20, 36, 0.82) 50%, rgba(13, 20, 36, 0.92) 100%);
  pointer-events: none;
  z-index: 2;
  transition: background 0.3s ease;
}

.card-schedule.is-live .schedule-bg-overlay {
  background: linear-gradient(135deg, rgba(26, 18, 28, 0.94) 0%, rgba(20, 24, 38, 0.82) 50%, rgba(13, 20, 36, 0.92) 100%);
}

.schedule-body,
.schedule-footer {
  position: relative;
  z-index: 3;
}

.card-schedule::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-blue, #0084ff);
  z-index: 4;
  transition: width 0.25s ease, box-shadow 0.25s ease;
}

.card-schedule.is-live::before {
  background: var(--color-danger, #ef4444);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.card-schedule:hover {
  transform: translateY(-4px) scale(1.02);
  background: #141e32;
  border-color: rgba(var(--accent-rgb, 0, 132, 255), 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 20px rgba(var(--accent-rgb, 0, 132, 255), 0.2);
}

.card-schedule.is-live:hover {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 20px rgba(239, 68, 68, 0.25);
}

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

.schedule-time {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan, #00d2ff);
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 4px 7px 2px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
  flex-shrink: 0;
}

.schedule-day-pill.day-today {
  background: rgba(var(--accent-rgb, 0, 132, 255), 0.2);
  color: var(--accent-cyan, #38bdf8);
  border: 1px solid rgba(var(--accent-rgb, 0, 132, 255), 0.45);
  box-shadow: 0 0 8px rgba(var(--accent-rgb, 0, 132, 255), 0.25);
}

.schedule-day-pill.day-tomorrow {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25);
}

.schedule-day-pill.day-future {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.schedule-time svg {
  width: 13px;
  height: 13px;
}

.schedule-badge-status {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.schedule-badge-status.live {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.schedule-badge-status.live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-live 1.4s infinite ease-in-out;
}

@keyframes pulse-live {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    box-shadow: 0 0 10px #ef4444;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.schedule-badge-status.upcoming {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.schedule-badge-status.finished {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

.schedule-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.schedule-title {
  font-size: 0.89rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.schedule-channel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.btn-schedule-action {
  color: var(--accent-cyan);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   SEÇÃO 1: CONTINUAR ASSISTINDO (WIDESCREEN COM BARRA DE PROGRESSO)
   ========================================================================== */
.card-continue {
  flex: 0 0 210px;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  height: 180px; /* ALTURA RIGOROSAMENTE PADRONIZADA COM CANAIS EM DESTAQUE (180px) */
  min-height: 180px;
  max-height: 180px;
  box-sizing: border-box;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.continue-thumb-wrapper {
  position: relative;
  width: 210px;
  height: 132px; /* Altura aumentada para baixo, preenchendo o espaço até o título */
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  background: #0d1424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.continue-thumb-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 210 / 132;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

/* Quando for logotipo de canal ou imagem sem proporção widescreen */
.continue-thumb-wrapper.is-logo-wrapper {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.72) 0%, #090e1a 85%);
}

.continue-thumb-img.is-logo {
  object-fit: contain;
  max-width: 75%;
  max-height: 70%;
  padding: 8px 12px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.72) 0%, #090e1a 100%);
}

.continue-thumb-wrapper.is-logo-wrapper .continue-thumb-img.is-logo {
  background: transparent;
}

.continue-thumb-wrapper.is-portrait-poster {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.72) 0%, #090e1a 85%);
}

.continue-thumb-wrapper.is-portrait-poster .continue-thumb-img {
  object-fit: contain;
  object-position: center;
}

.favorite-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(6, 9, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.favorite-card-badge.is-channel {
  border-color: rgba(0, 210, 255, 0.45);
  color: #38bdf8;
}

.continue-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 15, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card-continue:hover {
  transform: scale(1.035);
}

.card-continue:hover .continue-thumb-wrapper {
  border-color: rgba(var(--accent-rgb, 0, 132, 255), 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.85), 0 0 25px rgba(var(--accent-rgb, 0, 132, 255), 0.25);
}

.card-continue:hover .continue-thumb-overlay {
  opacity: 1;
}

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

/* Barra de Progresso na Base */
.continue-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.continue-progress-fill {
  height: 100%;
  background: var(--accent-blue, #0084ff);
  box-shadow: 0 0 8px rgba(var(--accent-rgb, 0, 132, 255), 0.6);
}

.continue-info {
  margin-top: 6px;
  width: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.continue-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.continue-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: #0f1624;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.88rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.toast.toast-success { border-left: 4px solid var(--color-success, #10b981); }
.toast.toast-error { border-left: 4px solid var(--color-danger, #ef4444); }
.toast.toast-info { border-left: 4px solid var(--color-info, #38bdf8); }
.toast.toast-warning { border-left: 4px solid var(--color-warning, #f59e0b); }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-success .toast-icon { color: var(--color-success, #10b981); }
.toast-error .toast-icon { color: var(--color-danger, #ef4444); }
.toast-info .toast-icon { color: var(--color-info, #38bdf8); }
.toast-warning .toast-icon { color: var(--color-warning, #f59e0b); }

.toast-content { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.toast-message { color: var(--text-secondary, #94a3b8); font-size: 0.82rem; line-height: 1.4; }

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.toast-close:hover { color: #ffffff; }
.toast-close svg { width: 15px; height: 15px; }
.toast.toast-leaving { animation: toastOut 0.2s ease forwards; }

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-8px) scale(0.96); }
}

/* ==========================================================================
   SKELETON LOADERS (ANIMAÇÃO SHIMMER)
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, #101624 0%, #1c2638 50%, #101624 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md, 12px);
}

.skeleton-card { flex: 0 0 185px; width: 185px; height: 275px; flex-shrink: 0; }
.skeleton-channel { flex: 0 0 210px; width: 210px; height: 180px; flex-shrink: 0; }
.skeleton-schedule { flex: 0 0 280px; width: 280px; height: 140px; flex-shrink: 0; }
.skeleton-continue { flex: 0 0 210px; width: 210px; height: 180px; flex-shrink: 0; }
.hero-skeleton-fill { width: 100%; height: 100%; border-radius: 0; }

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

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* ==========================================================================
   RODAPÉ INFORMATIVO DO STREAMING
   ========================================================================== */
.home-footer {
  padding: 30px 4% 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #04060a;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.footer-brand { margin-bottom: 12px; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-link-btn {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer-link-btn:hover { color: var(--accent-cyan); }
.footer-copy { color: #475569; font-size: 0.78rem; }

/* ==========================================================================
   SEÇÃO: COLEÇÕES POR GÊNERO (WIDESCREEN GLASS TILES)
   ========================================================================== */
.card-genre {
  flex: 0 0 240px;
  width: 240px;
  height: 135px;
  aspect-ratio: 16 / 9;
  padding: 0;
  font-family: inherit;
  text-align: left;
  border-radius: var(--radius-md, 14px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  flex-shrink: 0;
  background: #0d1424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  user-select: none;
}

.card-genre:focus-visible {
  outline: 2px solid var(--accent-cyan, #00d2ff);
  outline-offset: 3px;
}

.card-genre:hover {
  transform: translateY(-6px) scale(1.025);
  z-index: 10;
}

.genre-thumb-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.card-genre:hover .genre-thumb-img {
  transform: scale(1.08);
  filter: brightness(0.85);
}

.genre-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 15, 0.1) 0%, rgba(6, 9, 15, 0.5) 50%, rgba(6, 9, 15, 0.95) 100%);
  transition: background 0.3s ease;
  z-index: 1;
}

.genre-info {
  position: absolute;
  inset: 0;
  padding: 12px 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.genre-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.genre-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.genre-action-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.genre-action-arrow svg {
  width: 12px;
  height: 12px;
}

.card-genre:hover .genre-action-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Identidades Visuais Específicas de cada Gênero */
.card-genre[class*="genre-"]:hover {
  border-color: rgba(var(--genre-rgb), 0.6);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7), 0 0 24px rgba(var(--genre-rgb), var(--genre-glow-alpha, 0.35));
}

.card-genre[class*="genre-"] .genre-action-arrow {
  color: var(--genre-accent);
}

.card-genre.genre-animacao { --genre-rgb: 168, 85, 247; --genre-accent: #c084fc; }
.card-genre.genre-comedia { --genre-rgb: 245, 158, 11; --genre-accent: #fbbf24; }
.card-genre.genre-documentario { --genre-rgb: 16, 185, 129; --genre-accent: #34d399; }
.card-genre.genre-ficcao { --genre-rgb: 0, 210, 255; --genre-accent: #00d2ff; }
.card-genre.genre-guerra { --genre-rgb: 249, 115, 22; --genre-accent: #fb923c; }
.card-genre.genre-terror { --genre-rgb: 239, 68, 68; --genre-accent: #f87171; --genre-glow-alpha: 0.38; }
.card-genre.genre-acao { --genre-rgb: 0, 132, 255; --genre-accent: #38bdf8; }
.card-genre.genre-suspense { --genre-rgb: 99, 102, 241; --genre-accent: #818cf8; }
.card-genre.genre-romance { --genre-rgb: 236, 72, 153; --genre-accent: #f472b6; }
.card-genre.genre-infantil { --genre-rgb: 6, 182, 212; --genre-accent: #22d3ee; }

/* ==========================================================================
   MODAL DE CATÁLOGO DE GÊNEROS (OPÇÃO 1)
   ========================================================================== */
.genre-catalog-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.genre-catalog-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.genre-catalog-modal-card {
  width: 100%;
  max-width: 1080px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, rgba(17, 24, 39, 0.96) 0%, rgba(9, 13, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.85), 0 0 32px rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.12);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.genre-catalog-modal-overlay.open .genre-catalog-modal-card {
  transform: translateY(0) scale(1);
}

.genre-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 19, 33, 0.8);
}

.genre-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.genre-modal-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb, 0, 132, 255), 0.2) 0%, rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.1) 100%);
  border: 1px solid rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan, #00d2ff);
  flex-shrink: 0;
}

.genre-modal-header-icon svg {
  width: 22px;
  height: 22px;
}

.genre-modal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan, #00d2ff);
  margin-bottom: 2px;
}

.genre-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
}

.btn-close-genre-modal {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-genre-modal:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: rotate(90deg);
}

.btn-close-genre-modal svg {
  width: 18px;
  height: 18px;
}

.genre-modal-body {
  padding: 20px 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.genre-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.genre-modal-count {
  font-weight: 600;
  color: #e2e8f0;
}

.genre-modal-week-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16) 0%, rgba(239, 68, 68, 0.12) 100%);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.35);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.15);
}

.genre-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 18px 14px;
}

/* Card individual do filme no modal */
.genre-movie-card {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  user-select: none;
}

.genre-movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 18px rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.22);
}

.genre-movie-poster-box {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #090d16;
}

.genre-movie-poster-box img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.25s ease;
}

.genre-movie-card:hover .genre-movie-poster-box img {
  transform: scale(1.06);
  filter: brightness(0.8);
}

.genre-movie-rating-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #facc15;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(250, 204, 21, 0.3);
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.genre-movie-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 9, 15, 0.4);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.genre-movie-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-gradient, linear-gradient(135deg, #0084ff 0%, #00d2ff 100%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-on-primary, #ffffff);
  box-shadow: 0 6px 18px rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.5);
  transform: scale(0.85);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.genre-movie-play-btn svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

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

.genre-movie-card:hover .genre-movie-play-btn {
  transform: scale(1);
}

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

.genre-movie-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.genre-movie-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.genre-movie-meta-year {
  color: #cbd5e1;
  font-weight: 600;
}

.genre-skeleton-card {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: linear-gradient(90deg, #111827 25%, #1f293d 50%, #111827 75%);
  background-size: 200% 100%;
  animation: genreSkeletonShimmer 1.5s infinite;
}

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

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLETS)
   ========================================================================== */
@media (max-width: 600px) {
  .hero-section { margin-top: 0; height: 75vh; min-height: 500px; }
  .hero-content-wrapper { bottom: 40px; left: 4%; right: 4%; }
  .hero-title { font-size: 1.85rem; }
  .hero-overview { -webkit-line-clamp: 2; line-clamp: 2; font-size: 0.88rem; }
  .hero-controls { display: none; }
  .card-media { flex: 0 0 140px; width: 140px; }
  .card-poster-wrapper { width: 140px; height: 210px; }
  .card-info { width: 140px; }
  .card-top10 { flex: 0 0 185px; width: 185px; height: 175px; min-height: 175px; max-height: 175px; }
  .card-top10 .card-poster-wrapper { width: 110px; height: 165px; }
  .top10-number { font-size: 5rem; margin-right: -16px; }
  .card-channel { flex: 0 0 175px; width: 175px; height: 162px; padding: 10px 12px 8px; }
  .channel-logo-container { height: 62px; min-height: 62px; max-height: 62px; }
  .channel-ambient-glow { width: 90px; height: 55px; }
  .card-schedule { flex: 0 0 240px; width: 240px; }
  .card-continue { flex: 0 0 170px; width: 170px; height: 165px; min-height: 165px; max-height: 165px; box-sizing: border-box; justify-content: space-between; }
  .continue-thumb-wrapper { width: 170px; height: 122px; }
  .continue-info { width: 170px; }
  .card-genre { flex: 0 0 180px; width: 180px; height: 101px; }
  .genre-title { font-size: 0.95rem; }
  .content-sections-container { margin-top: -15px; gap: 34px; }
  .section-title { font-size: 1.15rem; }
  .section-view-all-link { padding: 5px 10px; font-size: 0.74rem; }
  .carousel-arrow { display: none; }
  #toast-container { top: 72px; right: 12px; left: 12px; width: auto; }

  /* Ajustes do Modal de Gêneros no Mobile */
  .genre-catalog-modal-overlay {
    padding: 12px 8px;
  }
  .genre-catalog-modal-card {
    max-height: 94vh;
    border-radius: 14px;
  }
  .genre-modal-header {
    padding: 14px 16px;
  }
  .genre-modal-title {
    font-size: 1.15rem;
  }
  .genre-modal-body {
    padding: 14px 14px 20px;
  }
  .genre-modal-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .live-dot,
  .genre-skeleton-card {
    animation: none;
  }

  .hero-slide,
  .hero-slide.active .hero-content-wrapper,
  .btn-hero-watch,
  .btn-hero-mylist,
  .hero-arrow-btn,
  .carousel-arrow,
  .card-media,
  .card-channel,
  .card-schedule,
  .card-continue,
  .card-genre,
  .genre-action-arrow,
  .genre-catalog-modal-overlay,
  .genre-catalog-modal-card {
    transition: none;
    animation: none;
  }
}
