:root {
  --bg-main: #07090e;
  --bg-surface: #0e121d;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 38, 60, 0.9);
  --bg-glass: rgba(14, 18, 29, 0.85);

  --primary: #00e5ff;
  --primary-glow: rgba(0, 229, 255, 0.4);
  --secondary: #7928ca;
  --accent: #ff007a;
  --gold: #f59e0b;
  --green: #10b981;
  --red: #ef4444;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 229, 255, 0.5);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Scrollbar estilizada */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* HEADER */
.app-header {
  height: 70px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 10px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}

/* NAVEGAÇÃO */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2) 0%, rgba(121, 40, 202, 0.2) 100%);
  border: 1px solid var(--border-focus);
  box-shadow: 0 0 16px var(--primary-glow);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 220px;
  transition: var(--transition);
}

.search-box:focus-within {
  width: 280px;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 8px 14px 8px 36px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px var(--primary-glow);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
  pointer-events: none;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #000;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* CONTEÚDO PRINCIPAL (LAYOUT COM SIDEBAR) */
.main-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 70px);
}

/* SIDEBAR DE CATEGORIAS */
.categories-sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  height: 100%;
}

.sidebar-header-box {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 0;
}

.cat-filter-wrap {
  position: relative;
  width: 100%;
}

.cat-filter-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px 7px 30px;
  font-size: 12px;
  color: #fff;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.cat-filter-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.cat-filter-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  opacity: 0.6;
  pointer-events: none;
}

.category-list {
  list-style: none;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.category-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.category-item.active {
  color: var(--primary);
  background: rgba(0, 229, 255, 0.08);
  border-left: 3px solid var(--primary);
}

.cat-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--text-dim);
}

/* ÁREA DE GRADE DE CONTEÚDO */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  padding: 24px;
  position: relative;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

/* Filmes e Séries - Proporção de Pôster */
.poster-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* CARD DE CANAL */
.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.channel-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.2);
}

.channel-card.active-playing {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.channel-logo-wrap {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}

.channel-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.channel-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel-number {
  font-size: 10px;
  color: var(--primary);
  background: rgba(0, 229, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
}

.fav-btn:hover, .fav-btn.active {
  color: var(--gold);
  transform: scale(1.2);
}

/* CARD DE PÔSTER (VOD E SÉRIES) */
.poster-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.poster-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0, 229, 255, 0.25);
}

.poster-img-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #090c14;
  position: relative;
  overflow: hidden;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.poster-info {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.poster-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* OVERLAY DO VIDEO PLAYER */
#player-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#player-modal.active {
  display: flex;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* CONTROLES DO PLAYER */
.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.92) 100%);
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.player-overlay.hidden {
  opacity: 0;
}

.player-overlay * {
  pointer-events: auto;
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-player-back {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: var(--transition);
}

.btn-player-back:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 16px var(--primary-glow);
}

.player-stream-info h2 {
  font-size: 20px;
  font-weight: 800;
}

.player-stream-info span {
  font-size: 13px;
  color: var(--text-muted);
}

.player-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: height 0.2s;
}

.progress-bar-wrap:hover {
  height: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  width: 0%;
  position: relative;
}

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

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-ctrl {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ctrl:hover {
  color: var(--primary);
  transform: scale(1.15);
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  width: 80px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* SPINNER DE CARREGAMENTO */
.player-loading {
  position: absolute;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--primary);
  pointer-events: none;
}

.player-loading.active {
  display: flex;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(0, 229, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ALERTA / ERRO NO PLAYER */
.player-error-wrap {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(15, 18, 28, 0.94);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 24px 32px;
  border-radius: 16px;
  backdrop-filter: blur(12px);
  z-index: 10;
  max-width: 90%;
  width: 420px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.player-error-icon {
  font-size: 38px;
}

.player-error-text {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
}

.btn-retry-player {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: #000;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
}

.btn-retry-player:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* BOTÃO FLUTUANTE DE DESMUTAR */
.player-unmute-pill {
  position: absolute;
  top: 80px;
  right: 24px;
  background: rgba(15, 18, 28, 0.9);
  border: 1px solid var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px var(--primary-glow);
  animation: pulse-mute 1.5s infinite alternate;
  transition: var(--transition);
}

.player-unmute-pill:hover {
  transform: scale(1.05);
  background: var(--primary);
  color: #000;
}

@keyframes pulse-mute {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }
  100% { transform: scale(1.04); box-shadow: 0 0 22px rgba(0, 229, 255, 0.7); }
}

/* NOTIFICAÇÃO DE CONTINUAR DE ONDE PAROU */
.player-resume-toast {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 24, 0.94);
  border: 1px solid var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.25);
  backdrop-filter: blur(12px);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.btn-restart-stream {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-restart-stream:hover {
  background: var(--primary);
  color: #000;
}

/* MODAL DE LOGIN */
#login-modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #111827 0%, #05070a 100%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px var(--primary-glow);
  backdrop-filter: blur(24px);
  position: relative;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header img {
  height: 56px;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 12px var(--primary-glow));
}

.login-header h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 14px var(--primary-glow);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px var(--primary-glow);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.advanced-toggle {
  display: inline-block;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  margin-top: 14px;
  text-decoration: underline;
  transition: var(--transition);
}

.advanced-toggle:hover {
  color: var(--primary);
}

#advanced-fields {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.login-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* MODAL DE SÉRIES / DETALHES */
#series-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.series-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.series-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.series-seasons-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.season-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.season-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.episodes-list {
  padding: 16px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.episode-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.episode-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

/* RESPONSIVIDADE */
@media (max-width: 900px) {
  .app-header {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .main-wrapper {
    flex-direction: column;
    height: auto;
  }
  .categories-sidebar {
    width: 100%;
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .content-area {
    padding: 16px;
  }
}

.settings-opt-card:hover {
  border-color: rgba(0, 229, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* =========================================================================
   TELA INÍCIO (HOME) - ESTILO MODERNO TITAN WEB TV
   ========================================================================= */
.main-wrapper.is-home .categories-sidebar {
  display: none !important;
}

.main-wrapper.is-home .content-area {
  padding: 0 !important;
  overflow-y: auto;
  flex: 1;
  width: 100%;
}

.home-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 50px;
}

/* HERO BANNER */
.hero-banner {
  position: relative;
  min-height: 480px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 40px 60px;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  box-shadow: inset 0 -40px 50px var(--bg-main);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,9,14,0.98) 0%, rgba(7,9,14,0.85) 35%, rgba(7,9,14,0.4) 65%, rgba(7,9,14,0.15) 100%),
              linear-gradient(0deg, var(--bg-main) 0%, rgba(7,9,14,0.5) 20%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.4s ease;
}

.hero-title {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.hero-badge.rating {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.hero-synopsis {
  font-size: 14px;
  line-height: 1.6;
  color: #d1d5db;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.btn-hero-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #07090e;
  font-size: 15px;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(255,255,255,0.25);
}

.btn-hero-play:hover {
  background: var(--primary);
  color: #07090e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

/* SEÇÃO ESCOLHA SEU STREAMING */
.streaming-section {
  padding: 30px 40px 10px;
  overflow: visible;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.section-title span.icon {
  color: var(--primary);
}

.streaming-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 14px 6px 22px; /* Margem superior e inferior para nunca cortar no hover ou dpad */
  scrollbar-width: none;
}
.streaming-carousel::-webkit-scrollbar {
  display: none;
}

/* CARDS DE LOGOS OFICIAIS DE STREAMING (ESTILO TITAN WEB TV) */
.streaming-logo-card {
  flex: 0 0 160px;
  width: 160px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #090e17;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease;
  user-select: none;
  box-sizing: border-box;
}

.streaming-logo-card:hover, 
.streaming-logo-card:focus,
.streaming-logo-card.dpad-focused {
  transform: translateY(-6px) scale(1.05);
  border-color: var(--primary, #00e5ff) !important;
  box-shadow: 0 12px 28px rgba(0, 229, 255, 0.4) !important;
  outline: none;
  z-index: 10;
}

.streaming-logo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Brandings idênticos ao titanwebtv.com */
.brand-netflix {
  background: #ffffff;
  color: #e50914;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
}

.brand-prime {
  background: #00a8e1;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.brand-apple {
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  font-size: 19px;
}

.brand-crunchyroll {
  background: #ff6400;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
}

.brand-disney {
  background: #0c1840;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.brand-globoplay {
  background: linear-gradient(135deg, #ff1744 0%, #ff5252 50%, #ff9100 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.brand-hbo {
  background: #5822b4;
  color: #ffffff;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.5px;
}

.brand-paramount {
  background: #0064ff;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
}

/* ACTION BUTTONS NO HEADER (MINIMALISTAS - ESTILO TITAN WEB TV) */
.action-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.1);
}

.logout-action-btn:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

/* HOME SECTION & PROPORÇÃO PERFEITA DE CAPAS DOS FILMES (148px x 222px) */
.home-section {
  padding: 16px 40px;
}

.home-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.home-row {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 14px;
  gap: 14px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.home-row::-webkit-scrollbar {
  display: none;
}

.home-row .vod-item {
  flex: 0 0 148px;
  width: 148px;
  height: 222px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  user-select: none;
}

.home-row .vod-item:hover {
  transform: scale(1.05);
  border-color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
  z-index: 10;
}

.vod-item-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: #0b0e14;
}

.vod-item-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 8px 8px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.vod-item-score {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  color: #fcd34d;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* TELA DEDICADA DE STREAMING (PROVIDER SCREEN) */
.provider-screen {
  display: flex;
  width: 100%;
  height: 100%;
  background-color: #05070a;
  box-sizing: border-box;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
  z-index: 10;
}

.provider-sidebar {
  flex: 0 0 64px;
  background-color: #080b12;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 20px;
  z-index: 20;
}

.provider-sidebar-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  margin-bottom: 6px;
  display: block;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px;
  padding: 12px 24px 24px;
}

.provider-grid .vod-item {
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  min-height: 200px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.provider-grid .vod-item:hover, .provider-grid .vod-item:focus {
  transform: scale(1.05);
  border-color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
  z-index: 10;
  outline: none;
}

.provider-nav-tabs {
  display: flex;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.provider-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim, #94a3b8);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.provider-tab-btn:hover, .provider-tab-btn:focus {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.provider-tab-btn.active {
  background: var(--primary, #00e5ff);
  color: #07090e;
  border-color: var(--primary, #00e5ff);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  font-weight: 700;
}

.poster-card.active-highlight,
.vod-item.active-highlight {
  border-color: var(--primary, #00e5ff) !important;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.6), inset 0 0 10px rgba(0, 229, 255, 0.2) !important;
  transform: scale(1.05) !important;
  transition: all 0.3s ease !important;
  z-index: 20 !important;
}

.provider-sidebar-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.provider-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.1);
  border-color: #ffffff;
}

.provider-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 60px;
}

.provider-hero {
  position: relative;
  width: 100%;
  min-height: 380px;
  max-height: 440px;
  display: flex;
  align-items: flex-end;
  padding: 40px 50px;
  box-sizing: border-box;
  overflow: hidden;
}

.provider-hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  transition: background-image 0.4s ease-in-out;
}

.provider-hero-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #05070a 25%, rgba(5,7,10,0.85) 50%, rgba(5,7,10,0.3) 80%, transparent 100%),
              linear-gradient(0deg, #05070a 0%, rgba(5,7,10,0.6) 30%, transparent 70%);
}

.provider-hero-info {
  position: relative;
  z-index: 2;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provider-hero-title {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
}

.provider-hero-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: #d1d5db;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.provider-hero-meta {
  font-size: 13px;
  font-weight: 700;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* TOP 10 HOJE COM NÚMEROS ESTILIZADOS VAZADOS */
.provider-top-item {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
}

.provider-top-rank {
  font-size: 96px;
  font-weight: 900;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 2.5px rgba(255, 255, 255, 0.6);
  margin-right: -20px;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  font-family: var(--font-sans);
}

.provider-top-poster {
  width: 140px;
  height: 210px;
  border-radius: 8px;
  object-fit: cover;
  background-color: var(--bg-card);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease;
  z-index: 2;
}

.provider-top-poster:hover {
  transform: scale(1.06);
  border-color: #ffffff;
}

/* =========================================================================
   TELA DE TV AO VIVO (3 COLUNAS - ESTILO TITAN WEB TV FOTO 02)
   ========================================================================= */
.live-screen {
  display: flex;
  width: 100%;
  height: 100%;
  background-color: var(--bg-main);
  overflow: hidden;
  box-sizing: border-box;
}

/* COLUNA 1: CATEGORIAS / GRUPOS */
.live-col-categories {
  width: 290px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.live-back-bar {
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.live-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  width: fit-content;
}

.live-back-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  transform: translateX(-2px);
}

.live-back-hint {
  font-size: 11px;
  color: var(--text-dim);
}

.live-search-box {
  position: relative;
  margin: 12px 14px 8px;
}

.live-search-box input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 32px;
  font-size: 12px;
  color: #fff;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.live-search-box input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.live-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.6;
  pointer-events: none;
}

.live-cat-list {
  list-style: none;
  padding: 8px 10px;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  user-select: none;
}

.live-cat-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.live-cat-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.live-cat-icon {
  font-size: 14px;
  opacity: 0.8;
  flex-shrink: 0;
}

.live-cat-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* COLUNA 2: LISTA DE CANAIS DO GRUPO (SUBMENU) */
.live-col-channels {
  width: 340px;
  background: rgba(10, 14, 22, 0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.live-channels-header {
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.live-channels-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

.live-channels-list {
  padding: 8px 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live-channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.live-channel-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.live-channel-card.active {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.live-channel-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  padding: 2px;
}

.live-channel-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-channel-card.active .live-channel-name {
  color: #fff;
  font-weight: 700;
}

.live-channel-fav {
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.live-channel-fav.is-fav,
.live-channel-fav:hover {
  color: var(--gold);
}

/* COLUNA 3: MINI PLAYER & PROGRAMAÇÃO (EPG) */
.live-col-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden; /* Mantém o mini player fixo no topo, sem sumir ou rolar para fora */
  padding: 20px 28px;
  gap: 18px;
  box-sizing: border-box;
}

.live-mini-player-card {
  width: 100%;
  max-width: 680px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  flex-shrink: 0; /* IMPEDE TOTALMENTE que o player suma ou encolha */
}

.live-mini-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.live-mini-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.live-player-overlay-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5;
}

.live-badge-rec {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}

.live-fs-btn {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.live-fs-btn:hover {
  background: var(--primary);
  color: #000;
}

.live-mini-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}

.live-mini-channel-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.live-mini-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 2px;
}

.live-mini-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.live-mini-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.live-mini-group {
  font-size: 12px;
  color: var(--text-dim);
}

/* PROGRAMAÇÃO (EPG) */
.live-epg-section {
  width: 100%;
  max-width: 680px;
  flex: 1;
  min-height: 0; /* Permite scroll no elemento filho */
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.live-epg-header {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.live-epg-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 8px;
  scrollbar-width: thin;
}

.live-epg-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.live-epg-item:last-child {
  border-bottom: none;
}

.live-epg-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.live-epg-item.is-current .live-epg-time {
  color: var(--primary);
}

.live-epg-prog-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

.live-epg-progress-line {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.live-epg-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.live-epg-empty {
  font-size: 13px;
  color: var(--text-dim);
  padding: 12px 0;
}

/* =========================================================================
   AVISO FLUTUANTE DE ÁUDIO NO MINI PLAYER
   ========================================================================= */
.live-unmute-overlay {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 15, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  z-index: 25;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.live-unmute-overlay:hover {
  background: rgba(0, 229, 255, 0.25);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-50%) scale(1.05);
}

/* =========================================================================
   TELA DE DETALHES DO FILME (ESTILO TITAN WEB TV FOTO 02)
   ========================================================================= */
.movie-details-screen {
  position: fixed;
  inset: 0;
  z-index: 850;
  background-color: #0c0f17;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
}

.movie-details-top-bar {
  position: absolute;
  top: 24px;
  left: 36px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
}

.movie-details-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}

.movie-details-backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0c0f17 0%, #0c0f17 38%, rgba(12, 15, 23, 0.82) 58%, rgba(12, 15, 23, 0.25) 100%),
              linear-gradient(0deg, #0c0f17 0%, #0c0f17 12%, transparent 50%);
}

.movie-details-content {
  position: relative;
  z-index: 15;
  max-width: 720px;
  padding: 105px 44px 50px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.movie-details-title {
  font-size: 38px;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffeb3b;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.movie-details-sub {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-top: -6px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.movie-details-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

.movie-details-badges .badge-rel {
  color: #10b981;
  font-weight: 800;
}

.movie-details-badges .badge-year {
  color: #e2e8f0;
}

.movie-details-badges .badge-dur {
  color: #cbd5e1;
}

.movie-details-badges .badge-qual {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.movie-details-plot {
  font-size: 15px;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 650px;
  margin: 6px 0 12px 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

.movie-details-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 16px 0;
}

.btn-play-movie {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #000000;
  font-size: 16px;
  font-weight: 800;
  padding: 13px 34px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

.btn-play-movie:hover {
  transform: scale(1.05);
  background: #f1f5f9;
  box-shadow: 0 6px 26px rgba(255, 255, 255, 0.4);
}

.btn-fav-movie {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-fav-movie:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-fav-movie.is-fav {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.movie-details-meta-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #94a3b8;
  margin-top: 4px;
}

.movie-meta-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.5;
}

.movie-meta-row .meta-label {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.movie-meta-row .meta-val {
  color: #e2e8f0;
}

.movie-cast-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 0 24px 0;
  margin-top: 10px;
  scrollbar-width: thin;
}

.movie-actor-card {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.movie-actor-photo {
  width: 80px;
  height: 95px;
  object-fit: cover;
  border-radius: 8px;
  background: #1e2433;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.movie-actor-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.25;
  max-width: 90px;
}

/* =========================================================================
   NAVEGAÇÃO POR CONTROLE REMOTO & D-PAD (SMART TV & PC)
   ========================================================================= */
:focus-visible,
.dpad-focused {
  outline: none !important;
  border-color: var(--primary, #00e5ff) !important;
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.75), inset 0 0 8px rgba(0, 229, 255, 0.2) !important;
  transform: scale(1.04) !important;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease !important;
  z-index: 30 !important;
}

.live-mini-player-wrap:focus-visible,
.live-mini-player-wrap.dpad-focused {
  border-color: var(--primary, #00e5ff) !important;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.8) !important;
}

.live-cat-item.dpad-focused,
.live-channel-card.dpad-focused,
.category-item.dpad-focused,
.nav-tab.dpad-focused,
.provider-tab-btn.dpad-focused,
.provider-sidebar-btn.dpad-focused,
.btn-play-movie.dpad-focused,
.live-back-btn.dpad-focused {
  border-color: var(--primary, #00e5ff) !important;
  background: rgba(0, 229, 255, 0.2) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.6) !important;
}
