/* ══════════════════════════════════════════════════════════════════
   REACTBITS UI SUITE (Adapted for EPTV - Golden Amber / Dark Glass)
   1. Pulse Heart (Favorite Button Micro-interaction)
   2. Glide Select (Smooth Pop-out & Gliding Highlight Dropdowns)
   3. Pill Nav (Capsule Glass Navigation with Gold Logo Accent)
   4. Animated List (Frosted Glass Episode List with Staggered Pop)
   5. Specular Button (Interactive Glass Action Buttons with Specular Edge Glint)
   6. Glare Hover (Dynamic Diagonal Sheen on Posters & Covers)
   ══════════════════════════════════════════════════════════════════ */

:root {
  --rb-gold-1: #f5c563;
  --rb-gold-2: #df9f4f;
  --rb-gold-3: #c5813e;
  --rb-gold-dark: #1a1208;
  --rb-gold-glow: rgba(197, 129, 62, 0.45);
  --rb-surface: rgba(20, 18, 28, 0.82);
  --rb-surface-border: rgba(255, 255, 255, 0.09);
  --rb-surface-highlight: rgba(255, 255, 255, 0.14);
}

/* ──────────────────────────────────────────────────────────────────
   1. PULSE HEART (reactbits.dev/micro/pulse-heart)
   ────────────────────────────────────────────────────────────────── */
button.pulse-heart:not(.fav-remove-btn),
.pulse-heart.js-favorite-toggle:not(.fav-remove-btn),
.pulse-heart.is-active:not(.fav-remove-btn),
.pulse-heart.on:not(.fav-remove-btn),
.pulse-heart[data-liked="true"]:not(.fav-remove-btn),
.actions button.pulse-heart,
.actions .pulse-heart,
.pulse-heart:not(.fav-remove-btn) {
  --ph-size: 46px;
  --ph-corner: 999px;
  --ph-pill: rgba(22, 19, 30, 0.88);
  --ph-idle: rgba(255, 255, 255, 0.72);
  --ph-liked: #ff4d6d;
  --ph-liked-glow: rgba(255, 77, 109, 0.45);
  --ph-border: rgba(255, 255, 255, 0.14);
  --ph-stroke: 2.3px;

  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  width: var(--ph-size, 46px) !important;
  height: var(--ph-size, 46px) !important;
  min-width: var(--ph-size, 46px) !important;
  min-height: var(--ph-size, 46px) !important;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  vertical-align: middle;
  overflow: visible !important;
}

.pulse-heart:hover {
  transform: scale(1.08);
}
.pulse-heart:active {
  transform: scale(0.92);
}

.pulse-heart__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ph-size);
  height: var(--ph-size);
  border-radius: var(--ph-corner);
  background: var(--ph-pill);
  border: 1px solid var(--ph-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform-origin: center;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.pulse-heart:hover .pulse-heart__pill {
  border-color: rgba(255, 77, 109, 0.55) !important;
  background: rgba(255, 77, 109, 0.14) !important;
  box-shadow: 0 4px 18px rgba(255, 77, 109, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.pulse-heart:hover .pulse-heart__heart {
  color: #ff4d6d !important;
}

.pulse-heart:hover .pulse-heart__heart svg {
  stroke: #ff4d6d !important;
  fill: #ff4d6d !important;
  filter: drop-shadow(0 0 6px rgba(255, 77, 109, 0.65)) !important;
}

.pulse-heart[data-liked="true"] .pulse-heart__pill,
.pulse-heart.is-active .pulse-heart__pill,
.pulse-heart.on .pulse-heart__pill {
  border-color: rgba(255, 77, 109, 0.6) !important;
  box-shadow: 0 6px 22px var(--ph-liked-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  background: rgba(36, 18, 25, 0.95) !important;
}

.pulse-heart__heart {
  display: block;
  width: calc(var(--ph-size) * 0.52);
  height: calc(var(--ph-size) * 0.52);
  color: var(--ph-idle);
  transform-origin: center;
  transition: color 180ms ease;
}

.pulse-heart__heart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--ph-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease;
}

.pulse-heart[data-liked="true"] .pulse-heart__heart,
.pulse-heart.is-active .pulse-heart__heart,
.pulse-heart.on .pulse-heart__heart {
  color: var(--ph-liked) !important;
}

.pulse-heart[data-liked="true"] .pulse-heart__heart svg,
.pulse-heart.is-active .pulse-heart__heart svg,
.pulse-heart.on .pulse-heart__heart svg {
  fill: currentColor !important;
  stroke: currentColor !important;
  filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.6)) !important;
}

.pulse-heart[data-liked="true"]:hover .pulse-heart__pill,
.pulse-heart.is-active:hover .pulse-heart__pill,
.pulse-heart.on:hover .pulse-heart__pill {
  border-color: rgba(255, 77, 109, 0.85) !important;
  box-shadow: 0 6px 26px rgba(255, 51, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  background: rgba(45, 18, 28, 0.98) !important;
}

/* Variação compacta para cards / posters */
.pulse-heart--sm {
  --ph-size: 32px;
}
.pulse-heart--lg {
  --ph-size: 46px;
}

/* ──────────────────────────────────────────────────────────────────
   2. GLIDE SELECT (reactbits.dev/micro/glide-select)
   Dropdown em cápsula com menu frosted glass e pílula deslizante dourada
   ────────────────────────────────────────────────────────────────── */
.glide-select {
  --gs-surface: rgba(22, 19, 30, 0.92);
  --gs-border: rgba(255, 255, 255, 0.14);
  --gs-highlight: rgba(255, 255, 255, 0.08);
  --gs-pill-bg: linear-gradient(90deg, rgba(245, 197, 99, 0.22) 0%, rgba(197, 129, 62, 0.14) 100%);
  --gs-pill-border: rgba(245, 197, 99, 0.5);
  --gs-text: #f5f5f5;
  --gs-text-muted: rgba(255, 255, 255, 0.55);
  --gs-radius: 12px;
  --gs-inner-radius: 8px;
  --gs-chip: 34px;
  --gs-row: 34px;
  --gs-font: 13px;
  --gs-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  position: relative !important;
  display: inline-block !important;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
}

.glide-select select,
select.glide-select-target {
  display: none !important;
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

.glide-select__trigger {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  height: var(--gs-chip) !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: var(--gs-surface) !important;
  border: 1px solid var(--gs-border) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  color: var(--gs-text) !important;
  font-family: inherit !important;
  font-size: var(--gs-font) !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  transition: background-color 140ms ease, border-color 140ms ease, transform 160ms var(--gs-ease-out), box-shadow 160ms ease !important;
}

.glide-select__trigger:hover {
  background: rgba(38, 34, 48, 0.95) !important;
  border-color: rgba(245, 197, 99, 0.45) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 12px rgba(245, 197, 99, 0.2) !important;
}

.glide-select[data-open="true"] .glide-select__trigger {
  border-color: rgba(245, 197, 99, 0.8) !important;
  box-shadow: 0 0 0 2px rgba(245, 197, 99, 0.25), 0 8px 22px rgba(0, 0, 0, 0.5) !important;
}

.glide-select__chevron {
  display: inline-flex !important;
  align-items: center !important;
  color: var(--gs-text-muted) !important;
  transition: transform 220ms var(--gs-ease-out), color 160ms ease !important;
}

.glide-select[data-open="true"] .glide-select__chevron {
  transform: rotate(180deg) !important;
  color: var(--rb-gold-1) !important;
}

.glide-select__label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 260px !important;
}

.glide-select[data-swap] .glide-select__label {
  animation: gs-swap 180ms ease !important;
}

@keyframes gs-swap {
  0% { opacity: 0.4; transform: translateY(-2px); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.glide-select__menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  z-index: 99999 !important;
  min-width: 100% !important;
  width: max-content !important;
  min-width: 180px !important;
  max-width: 320px !important;
  max-height: 280px !important;
  padding: 5px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: var(--gs-radius) !important;
  background: #141120 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(0.96) translateY(-4px) !important;
  transform-origin: top left !important;
  transition: opacity 180ms var(--gs-ease-out), transform 180ms var(--gs-ease-out), visibility 180ms !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
}

.glide-select[data-open="true"] .glide-select__menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) translateY(0) !important;
}

.glide-select__track {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

/* O Highlight Deslizante / Gliding Pill */
.glide-select__pill {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  height: var(--gs-row) !important;
  border-radius: var(--gs-inner-radius) !important;
  background: var(--gs-pill-bg) !important;
  border: 1px solid var(--gs-pill-border) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px rgba(197, 129, 62, 0.25) !important;
  pointer-events: none !important;
  transition: transform 220ms var(--gs-ease-out), opacity 150ms ease !important;
  z-index: 1 !important;
}

.glide-select__option {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  height: var(--gs-row) !important;
  padding: 0 12px !important;
  border-radius: var(--gs-inner-radius) !important;
  color: var(--gs-text) !important;
  font-size: var(--gs-font) !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  background: transparent !important;
  transition: color 120ms ease !important;
}

.glide-select__option:hover {
  color: #ffffff !important;
}

.glide-select__option[data-selected="true"] {
  color: var(--rb-gold-1) !important;
  font-weight: 800 !important;
}

.glide-select__check {
  display: inline-flex !important;
  align-items: center !important;
  color: var(--rb-gold-1) !important;
  opacity: 0 !important;
  transform: scale(0.7) !important;
  transition: opacity 160ms ease, transform 160ms var(--gs-ease-out) !important;
}

.glide-select__option[data-selected="true"] .glide-select__check {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* Modificador Cat Sort Select */
.cat-sort-wrap .glide-select__trigger,
.glide-select--cat-sort .glide-select__trigger {
  height: 31px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

/* Alinhamento do menu à direita (ex: seletor de fontes no topo direito do player) */
.glide-select--right .glide-select__menu {
  left: auto !important;
  right: 0 !important;
  transform-origin: top right !important;
}

.glide-select--player-source .glide-select__trigger {
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.glide-select.is-loading .glide-select__trigger {
  opacity: 0.65 !important;
  pointer-events: none !important;
}

.glide-select__option.is-failed {
  opacity: 0.55 !important;
  color: #fca5a5 !important;
}

/* Glide Select com Logo/Ícone e Filtros de Catálogo */
.glide-select__opt-logo {
  width: 22px !important;
  height: 15px !important;
  object-fit: contain !important;
  margin-right: 7px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.glide-select__label {
  display: inline-flex !important;
  align-items: center !important;
}

.glide-select__option-text {
  display: inline-flex !important;
  align-items: center !important;
}

.cat-filter-selects {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.cat-select-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.cat-select-wrap label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

.cat-select-wrap .glide-select__trigger {
  height: 31px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

/* Cat Filter Buttons Row (3 botões com ícones lado a lado: Áudio, Streaming, Ordenar) */
.cat-filter-row--buttons {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  margin-top: 4px !important;
}

.cat-filter-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}

.cat-filter-btn-wrap {
  position: relative !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
}

.cat-filter-btn--sort {
  margin-left: auto !important;
}

.cat-filter-btn-wrap .glide-select {
  position: relative !important;
  display: inline-flex !important;
  z-index: 70 !important;
}

.cat-filter-btn-wrap .glide-select__trigger {
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: rgba(20, 18, 28, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  transition: all 0.18s cubic-bezier(0.23, 1, 0.32, 1) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  min-width: 0 !important;
}

.cat-filter-btn-wrap .glide-select__trigger:hover {
  background: rgba(36, 32, 46, 0.98) !important;
  border-color: rgba(245, 197, 99, 0.45) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 12px rgba(245, 197, 99, 0.2) !important;
}

.cat-filter-btn-wrap .glide-select[data-open="true"] .glide-select__trigger {
  background: rgba(36, 30, 44, 0.98) !important;
  border-color: rgba(245, 197, 99, 0.8) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(245, 197, 99, 0.25), 0 8px 22px rgba(0, 0, 0, 0.5) !important;
}

.cat-filter-btn-wrap .glide-select__trigger.is-filtered {
  border-color: rgba(245, 197, 99, 0.55) !important;
  color: #ffffff !important;
  background: rgba(32, 26, 38, 0.95) !important;
}

.cat-filter-btn-wrap .glide-select__trigger-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  transition: color 0.18s ease !important;
}

.cat-filter-btn-wrap .glide-select__trigger:hover .glide-select__trigger-icon,
.cat-filter-btn-wrap .glide-select[data-open="true"] .glide-select__trigger-icon,
.cat-filter-btn-wrap .glide-select__trigger.is-filtered .glide-select__trigger-icon {
  color: var(--rb-gold-1, #f5c563) !important;
}

.cat-filter-btn-wrap .glide-select__trigger-icon svg {
  width: 13px !important;
  height: 13px !important;
  display: block !important;
}

.cat-filter-btn-wrap .glide-select__trigger-icon img {
  width: 17px !important;
  height: 12px !important;
  object-fit: contain !important;
  display: block !important;
}

.cat-filter-btn-wrap .glide-select__label {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  flex: 0 1 auto !important;
}

.cat-filter-btn-wrap .glide-select__label-full {
  display: inline !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.cat-filter-btn-wrap .glide-select__label-short {
  display: none !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.cat-filter-btn-wrap .glide-select__chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: rgba(255, 255, 255, 0.45) !important;
  transition: transform 0.2s ease, color 0.18s ease !important;
}

.cat-filter-btn-wrap .glide-select__chevron svg {
  width: 10px !important;
  height: 10px !important;
}

.cat-filter-btn-wrap .glide-select[data-open="true"] .glide-select__chevron {
  transform: rotate(180deg) !important;
  color: var(--rb-gold-1, #f5c563) !important;
}

/* Posicionamento dos Menus Dropdown dos 3 Botões */
.cat-filter-btn-wrap .glide-select__menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  z-index: 999999 !important;
  min-width: 170px !important;
  max-width: 300px !important;
  box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.16) !important;
}

/* Áudio: Alinhado à Esquerda */
.cat-filter-btn--audio .glide-select__menu {
  left: 0 !important;
  right: auto !important;
  transform: scale(0.96) translateY(-4px) !important;
  transform-origin: top left !important;
}
.cat-filter-btn--audio .glide-select[data-open="true"] .glide-select__menu {
  transform: scale(1) translateY(0) !important;
}

/* Streaming: Alinhado ao Centro */
.cat-filter-btn--stream .glide-select__menu {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) scale(0.96) translateY(-4px) !important;
  transform-origin: top center !important;
}
.cat-filter-btn--stream .glide-select[data-open="true"] .glide-select__menu {
  transform: translateX(-50%) scale(1) translateY(0) !important;
}

/* Ordenar: Alinhado à Direita */
.cat-filter-btn--sort .glide-select__menu,
.cat-filter-btn--sort .glide-select--cat-sort .glide-select__menu {
  right: 0 !important;
  left: auto !important;
  transform: scale(0.96) translateY(-4px) !important;
  transform-origin: top right !important;
}
.cat-filter-btn--sort .glide-select[data-open="true"] .glide-select__menu,
.cat-filter-btn--sort .glide-select--cat-sort[data-open="true"] .glide-select__menu {
  transform: scale(1) translateY(0) !important;
}

/* Mobile: Exatamente os 3 Botões Lado a Lado em Linha Única */
@media (max-width: 768px) {
  .cat-filter-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .cat-filter-btn-wrap {
    width: 100% !important;
    min-width: 0 !important;
  }
  .cat-filter-btn--sort {
    margin-left: 0 !important;
  }
  .cat-filter-btn-wrap .glide-select {
    width: 100% !important;
    display: flex !important;
  }
  .cat-filter-btn-wrap .glide-select__trigger {
    width: 100% !important;
    height: 33px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .cat-filter-btn-wrap .glide-select__label-full {
    display: none !important;
  }
  .cat-filter-btn-wrap .glide-select__label-short {
    display: inline !important;
  }
  .cat-filter-btn-wrap .glide-select__trigger-icon svg {
    width: 12px !important;
    height: 12px !important;
  }
  .cat-filter-btn-wrap .glide-select__trigger-icon img {
    width: 14px !important;
    height: 10px !important;
  }
  .cat-filter-btn--audio .glide-select__menu {
    left: 0 !important;
    right: auto !important;
    max-width: calc(100vw - 24px) !important;
  }
  .cat-filter-btn--stream .glide-select__menu {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) scale(0.96) translateY(-4px) !important;
    max-width: calc(100vw - 24px) !important;
  }
  .cat-filter-btn--stream .glide-select[data-open="true"] .glide-select__menu {
    transform: translateX(-50%) scale(1) translateY(0) !important;
  }
  .cat-filter-btn--sort .glide-select__menu,
  .cat-filter-btn--sort .glide-select--cat-sort .glide-select__menu {
    right: 0 !important;
    left: auto !important;
    transform: scale(0.96) translateY(-4px) !important;
    transform-origin: top right !important;
    max-width: calc(100vw - 24px) !important;
  }
  .cat-filter-btn--sort .glide-select[data-open="true"] .glide-select__menu,
  .cat-filter-btn--sort .glide-select--cat-sort[data-open="true"] .glide-select__menu {
    transform: scale(1) translateY(0) !important;
  }
}

/* ──────────────────────────────────────────────────────────────────
   3. PILL NAV (reactbits.dev/components/pill-nav)
   Adaptado com o dourado elegante da logo EPTV
   ────────────────────────────────────────────────────────────────── */
.pill-nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header .hd-nav,
.pill-nav {
  --pn-surface: rgba(18, 16, 26, 0.78);
  --pn-edge: rgba(255, 255, 255, 0.09);
  --pn-rim: rgba(255, 255, 255, 0.14);
  --pn-shadow: 0 20px 48px -18px rgba(0, 0, 0, 0.85), 0 6px 18px -6px rgba(0, 0, 0, 0.6);
  --pn-text: rgba(244, 244, 245, 0.7);
  --pn-strong: #ffffff;
  --pn-pill: linear-gradient(180deg, #f5c563 0%, #c5813e 100%);
  --pn-pill-ink: #120e07;
  --pn-pill-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 20px -6px rgba(197, 129, 62, 0.75);
  --pn-dot: #f5c563;
  --pn-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: var(--pn-surface);
  border: 1px solid var(--pn-edge);
  box-shadow: var(--pn-shadow), inset 0 1px 0 var(--pn-rim);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  isolation: isolate;
}

.site-header .hd-nav a,
.pill-nav__link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--pn-text);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  outline: none;
  cursor: pointer;
  transition: color 180ms ease, transform 160ms var(--pn-ease-out);
}

.site-header .hd-nav a:hover,
.pill-nav__link:hover {
  color: #fff;
}

.site-header .hd-nav a:active,
.pill-nav__link:active {
  transform: scale(0.96);
}

.site-header .hd-nav a svg,
.pill-nav__link svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  transition: transform 180ms var(--pn-ease-out);
}

.site-header .hd-nav a:hover svg,
.pill-nav__link:hover svg {
  transform: translateY(-1px);
}

/* Item Ativo com o Dourado da Logo */
.site-header .hd-nav a.on,
.pill-nav__link[data-active="true"] {
  color: var(--pn-pill-ink) !important;
  background: var(--pn-pill);
  box-shadow: var(--pn-pill-shadow);
  font-weight: 800;
}

.site-header .hd-nav a.on svg,
.pill-nav__link[data-active="true"] svg {
  stroke: var(--pn-pill-ink);
  color: var(--pn-pill-ink);
}

/* Rolling Label / Hover Sheen */
.pill-nav__glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
  transition: all 260ms var(--pn-ease-out);
  opacity: 0;
}

/* ──────────────────────────────────────────────────────────────────
   4. ANIMATED LIST (reactbits.dev/components/animated-list)
   Para listas de episódios e seções de mídia
   ────────────────────────────────────────────────────────────────── */
.animated-list-wrap {
  position: relative;
  width: 100%;
}

.animated-list--framed,
.episode-list--animated {
  --al-frame: rgba(20, 18, 28, 0.72);
  --al-frame-edge: rgba(255, 255, 255, 0.08);
  --al-frame-highlight: rgba(255, 255, 255, 0.12);
  --al-frame-shadow: 0 22px 48px -20px rgba(0, 0, 0, 0.85), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --al-tile: linear-gradient(180deg, #2b2738 0%, #1a1724 100%);
  --al-tile-hover: linear-gradient(180deg, #373247 0%, #221f2e 100%);
  --al-tile-edge: rgba(255, 255, 255, 0.07);
  --al-tile-highlight: rgba(255, 255, 255, 0.12);
  --al-tile-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  --al-ink: #f4f4f5;
  --al-muted: #94a3b8;
  --al-accent: var(--rb-gold-2);
  --al-radius: 14px;

  position: relative;
  padding: 8px;
  border-radius: calc(var(--al-radius) + 8px);
  background: var(--al-frame);
  border: 1px solid var(--al-frame-edge);
  box-shadow: var(--al-frame-shadow), inset 0 1px 0 var(--al-frame-highlight);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}

.animated-list__viewport {
  position: relative;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;
  border-radius: var(--al-radius);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  mask-image: linear-gradient(to bottom, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 14px, black calc(100% - 14px), transparent 100%);
}

.animated-list__track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0;
}

/* Card do Episódio no Estilo Animated List */
.animated-list__item,
.episode-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--al-radius);
  background: var(--al-tile);
  border: 1px solid var(--al-tile-edge);
  box-shadow: var(--al-tile-shadow), inset 0 1px 0 var(--al-tile-highlight);
  color: var(--al-ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1), background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  will-change: transform;
}

/* Staggered Pop Entry Animation */
.animated-list--animated .animated-list__item,
.animated-list--animated .episode-row {
  animation: al-pop 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}

@keyframes al-pop {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animated-list__item:hover,
.episode-row:hover {
  background: var(--al-tile-hover);
  border-color: rgba(197, 129, 62, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: #fff;
}

.animated-list__item:active,
.episode-row:active {
  transform: scale(0.98);
}

/* Episódio Ativo / Assistindo / Atual */
.animated-list__item.is-active,
.episode-row.ep-watching,
.episode-row.is-current {
  border-color: rgba(197, 129, 62, 0.85);
  box-shadow: 0 8px 26px rgba(197, 129, 62, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ──────────────────────────────────────────────────────────────────
   5. SPECULAR BUTTON (reactbits.dev/components/specular-button)
   Botões de ação com reflexo especular na borda (WebGL + CSS Fallback)
   ────────────────────────────────────────────────────────────────── */
.specular-button,
.btn-specular,
.btn-primary,
.play-btn,
.btn-action,
.profile-renew-btn,
.profile-btn-save,
.renew-cta,
.start-cta-btn--primary,
.profile-btn-submit,
.renew-plan-btn,
.btn-quick-watch {
  --sb-radius: 999px;
  --sb-tint: #ffffff;
  --sb-tint-opacity: 0.05;
  --sb-text-color: #ffffff;
  --sb-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  position: relative !important;
  isolation: isolate !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.6em !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 999px !important;
  font: inherit;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.01em;
  color: #ffffff !important;
  background: rgba(18, 16, 26, 0.88) !important;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  cursor: pointer;
  outline: none;
  text-decoration: none !important;
  overflow: visible !important;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--sb-ease), box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.specular-button:hover,
.btn-specular:hover,
.btn-primary:hover,
.play-btn:hover,
.btn-action:hover,
.profile-renew-btn:hover,
.profile-btn-save:hover,
.renew-cta:hover,
.start-cta-btn--primary:hover,
.profile-btn-submit:hover,
.renew-plan-btn:hover,
.btn-quick-watch:hover {
  transform: translateY(-2px) scale(1.015) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85), 0 0 24px rgba(245, 197, 99, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

.specular-button:active,
.btn-specular:active,
.btn-primary:active,
.play-btn:active,
.btn-action:active,
.profile-renew-btn:active,
.profile-btn-save:active,
.renew-cta:active,
.start-cta-btn--primary:active,
.profile-btn-submit:active,
.renew-plan-btn:active,
.btn-quick-watch:active {
  transform: scale(0.97) !important;
}

/* Canvas WebGL do Feixe Especular (ReactBits SpecularButton) */
.specular-button__light {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}

/* Conteúdo sobre o Canvas */
.specular-button__label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: inherit;
  color: inherit;
  width: 100%;
  pointer-events: none;
}

/* Fallback CSS do Feixe Especular */
.specular-button::before,
.btn-specular::before,
.btn-primary::before,
.play-btn::before,
.btn-action::before,
.hd-exit::before,
.hd-unified-plan-card::before,
.profile-renew-btn::before,
.profile-btn-save::before,
.renew-cta::before,
.start-cta-btn--primary::before,
.profile-btn-submit::before,
.renew-plan-btn::before,
.btn-quick-watch::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    110px circle at var(--sb-x, 50%) var(--sb-y, 50%),
    rgba(255, 255, 255, 0.95) 0%,
    rgba(245, 197, 99, 0.75) 30%,
    rgba(197, 129, 62, 0.35) 55%,
    transparent 75%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.hd-unified-plan-card:not(.warn):not(.bad)::before {
  background: radial-gradient(
    100px circle at var(--sb-x, 50%) var(--sb-y, 50%),
    rgba(255, 255, 255, 0.88) 0%,
    rgba(34, 197, 94, 0.80) 25%,
    rgba(16, 185, 129, 0.40) 55%,
    transparent 75%
  ) !important;
  opacity: 0.70 !important;
}

/* Quando WebGL estiver ativo, desativa fallback CSS para evitar borda duplicada */
.specular-button[data-webgl="active"]::before,
.hd-unified-plan-card[data-webgl="active"]::before {
  opacity: 0 !important;
  display: none !important;
}

/* ──────────────────────────────────────────────────────────────────
   6. GLARE HOVER (reactbits.dev/animations/glare-hover)
   Efeito dinâmico de feixe de brilho angular sobre capas e pôsteres
   ────────────────────────────────────────────────────────────────── */
.poster-card--premium,
.catalog-card,
.poster-card {
  isolation: isolate;
}

.glare-hover-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.glare-hover-band {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250%;
  height: 250%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.01) 30%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.01) 70%,
    transparent 100%
  );
  transform: translate(calc(var(--gh-x, 50%) - 50%), calc(var(--gh-y, 50%) - 50%)) rotate(-45deg);
  will-change: transform;
  pointer-events: none;
  transform-origin: center;
}

.poster-card--premium:hover .glare-hover-layer,
.catalog-card:hover .glare-hover-layer,
.poster-card:hover .glare-hover-layer {
  opacity: 1;
}

.glare-hover-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  background: radial-gradient(
    circle 120px at var(--gh-raw-x, 50%) var(--gh-raw-y, 50%),
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 80%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.poster-card--premium:hover .glare-hover-rim,
.catalog-card:hover .glare-hover-rim,
.poster-card:hover .glare-hover-rim {
  opacity: 1;
}

/* Fix Stacking Context & Posicionamento do Glide Select em Catálogos */
.cat-sort-wrap .glide-select,
.glide-select--cat-sort {
  position: relative !important;
  z-index: 70 !important;
}
.cat-sort-wrap .glide-select__menu,
.glide-select--cat-sort .glide-select__menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  left: auto !important;
  transform-origin: top right !important;
  z-index: 999999 !important;
  box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.16) !important;
}
@media (max-width: 1024px) {
  .cat-sort-wrap {
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin: 4px auto 0 !important;
  }
  .cat-sort-wrap .glide-select,
  .glide-select--cat-sort {
    display: inline-flex !important;
    justify-content: center !important;
  }
  .cat-sort-wrap .glide-select__trigger,
  .glide-select--cat-sort .glide-select__trigger {
    justify-content: center !important;
  }
  .cat-sort-wrap .glide-select__menu,
  .glide-select--cat-sort .glide-select__menu {
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) scale(0.96) translateY(-4px) !important;
    transform-origin: top center !important;
    max-width: calc(100vw - 32px) !important;
    box-sizing: border-box !important;
  }
  .cat-sort-wrap .glide-select[data-open="true"] .glide-select__menu,
  .glide-select--cat-sort[data-open="true"] .glide-select__menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) scale(1) translateY(0) !important;
  }
}

/* ──────────────────────────────────────────────────────────────────
   7. CARD FULL-TITLE TOOLTIP (Nome completo ao passar o mouse nos cards)
   ────────────────────────────────────────────────────────────────── */
.eptv-card-tooltip {
  position: fixed !important;
  top: -9999px;
  left: -9999px;
  z-index: 2147483647 !important;
  max-width: 290px !important;
  padding: 8px 13px !important;
  border-radius: 11px !important;
  background: rgba(16, 14, 24, 0.97) !important;
  border: 1px solid rgba(245, 197, 99, 0.5) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85), 0 0 18px rgba(245, 197, 99, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  pointer-events: none !important;
  user-select: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translate3d(0, 4px, 0) scale(0.97);
  transition: opacity 120ms cubic-bezier(0.23, 1, 0.32, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1), visibility 120ms !important;
}

.eptv-card-tooltip.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate3d(0, 0, 0) scale(1);
}

.eptv-card-tooltip::before {
  content: "";
  position: absolute;
  left: var(--tt-arrow-x, 50%);
  width: 9px;
  height: 9px;
  background: rgba(16, 14, 24, 0.97);
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
}

.eptv-card-tooltip[data-pos="bottom"]::before {
  top: -5px;
  border-top: 1px solid rgba(245, 197, 99, 0.5);
  border-left: 1px solid rgba(245, 197, 99, 0.5);
}

.eptv-card-tooltip[data-pos="top"]::before {
  bottom: -5px;
  border-right: 1px solid rgba(245, 197, 99, 0.5);
  border-bottom: 1px solid rgba(245, 197, 99, 0.5);
}

/* ──────────────────────────────────────────────────────────────────
   8. CATALOG LOADING STATE (Feedback visual suave em filtros/busca AJAX)
   ────────────────────────────────────────────────────────────────── */
.cat-scroller {
  position: relative;
}
.cat-scroller.is-loading {
  pointer-events: none;
}
.cat-scroller.is-loading::before {
  content: "";
  position: sticky;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 3px;
  margin-bottom: -3px;
  z-index: 40;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 197, 99, 0.95) 45%, #e50914 70%, transparent 100%);
  background-size: 45% 100%;
  background-repeat: no-repeat;
  animation: eptvCatLoadBar 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.cat-scroller.is-loading .cat-grid,
.cat-scroller.is-loading .poster-grid {
  opacity: 0.45 !important;
  filter: saturate(0.7);
  transition: opacity 160ms ease, filter 160ms ease;
}
@keyframes eptvCatLoadBar {
  0%   { background-position: -45% 0; }
  100% { background-position: 145% 0; }
}
