/* --- style.css --- */
:root {
/* Backgrounds */
--bg-main: #070a0f;
--bg-sidebar: #050607;
--bg-secondary: #11151d;
--bg-card: rgba(22, 25, 31, 0.78);
--bg-card-hover: rgba(32, 37, 45, 0.95);
--border-color: rgba(255, 255, 255, 0.075);
/* Text */
--text-primary: #f3f4f6;
--text-secondary: #9ca3af;
/* Colors */
--primary: #0097a7;
--primary-glow: rgba(0, 151, 167, 0.35);
--accent: #00c2c7;
--fav-color: #f59e0b;
--error-color: #ef4444;
--success-color: #10b981;
/* Typography */
--font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-size-xs: 11px;
--font-size-sm: 13px;
--font-size-md: 14px;
--font-size-lg: 15px;
--font-size-xl: 18px;
--font-size-2xl: 22px;
--font-size-3xl: 36px;
/* Spacing */
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 12px;
--spacing-lg: 16px;
--spacing-xl: 20px;
--spacing-2xl: 24px;
/* Layout */
--sidebar-width: max(200px, calc(260px * var(--scale, 1)));
--card-min-width: 120px;
--card-max-width: 180px;
--touch-target-min: 44px;
/* Effects */
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
--transition-fast: all 0.15s ease;
--border-radius-sm: 6px;
--border-radius-md: 8px;
--border-radius-lg: 8px;
--shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
--shadow-md: 0 4px 15px rgba(0,0,0,0.4);
--shadow-lg: 0 20px 40px rgba(0,0,0,0.5);
/* Scale */
--scale: 1;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { min-width:320px; }
html, body { height:100%; }
html {
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font-sans);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(135deg, #070a0f 0%, #101522 54%, #070a0f 100%);
  background-size: 88px 88px, 88px 88px, 100% 100%;
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  min-width:320px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  touch-action: pan-y;
}

::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.1); border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.2); }

.d-none { display:none !important; }
.text-secondary { color:var(--text-secondary); }
.hidden { opacity:0 !important; pointer-events:none !important; }

/* Acessibilidade - Foco visível */
*:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
}

button:focus-visible,
[role="button"]:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Tamanhos mínimos de toque para acessibilidade */
.btn-icon,
.btn-primary,
.btn-secondary,
.btn-ghost,
.menu-item {
min-height: var(--touch-target-min);
}

/* Reduzir movimento para quem preferir */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}

/* ── LOADING SCREEN ── */
.loading-screen {
  position:fixed; inset:0; background:var(--bg-main);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  z-index:9999; opacity:1; transition:opacity 0.5s ease;
}
.loading-screen.fade-out { opacity:0; pointer-events:none; }
.spinner {
  width:44px; height:44px;
  border:4px solid rgba(139,92,246,0.15);
  border-top-color:var(--primary);
  border-radius:50%;
  animation:spin 1s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ── HERO / TELA INICIAL ── */
.hero {
  height: 100vh; overflow-y: auto;
  display:flex; flex-direction:column;
  padding:24px;
  background:
  linear-gradient(135deg, rgba(21, 32, 47, 0.86), rgba(6, 7, 10, 0.98)),
  var(--bg-main);
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  box-sizing:border-box;
}
.hero-content {
  margin: auto; text-align:center; max-width:900px; width:100%;
  display:grid; grid-template-columns:1fr auto;
  align-items:center; justify-items:center;
  gap:40px;
  width:100%;
  padding:10vh 0;
}
.hero-logo {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  font-size:36px; font-weight:800; letter-spacing:0.5px; margin-bottom:8px;
  width:100%;
}
.hero-copy {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  width:100%;
}
.hero-icon { color:var(--primary); text-shadow:0 0 20px var(--primary-glow); }
.hero-logo span span { color:var(--accent); }
.hero h2 { 
  font-size:22px; font-weight:600; margin-bottom:4px; 
  text-align:center;
}
.hero-sub { 
  color:var(--text-secondary); font-size:14px; margin-bottom:24px;
  text-align:center;
}
.hero-card {
  background:rgba(12,15,21,0.88); backdrop-filter:blur(20px);
  border:1px solid var(--border-color); border-radius:8px;
  padding:24px; box-shadow:0 20px 40px rgba(0,0,0,0.4);
  width:100%; max-width:480px;
  box-sizing:border-box;
  max-height:min(600px, calc(100vh - 200px));
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--primary) rgba(0,0,0,0.3);
}
.hero-card::-webkit-scrollbar { width:6px; }
.hero-card::-webkit-scrollbar-track { background:rgba(0,0,0,0.3); border-radius:3px; }
.hero-card::-webkit-scrollbar-thumb { background:var(--primary); border-radius:3px; }
.hero-card::-webkit-scrollbar-thumb:hover { background:#7c3aed; }
.hero-card textarea, .hero-card input[type="text"] {
  width:100%; padding:14px 16px; border-radius:12px;
  background:rgba(0,0,0,0.3); border:1px solid var(--border-color);
  color:var(--text-primary); font-family:var(--font-sans); font-size:14px;
  outline:none; transition:var(--transition);
  box-sizing:border-box;
  max-width:100%;
}
.hero-card textarea {
  resize:vertical; min-height:90px; max-height:200px;
}
.hero-card input[type="text"] {
  margin-bottom:12px;
}
.hero-card textarea:focus, .hero-card input[type="text"]:focus { border-color:var(--primary); box-shadow:0 0 12px rgba(139,92,246,0.15); }
.hero-card textarea::placeholder, .hero-card input[type="text"]::placeholder { color:var(--text-secondary); }
.hero-actions { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; justify-content:center; }
.hero-actions button { flex:1; min-width:120px; justify-content:center; }
.hero-legal { display:block; margin-top:16px; color:var(--text-secondary); font-size:11px; line-height:1.5; }
#initialMsg { margin-top:12px; font-size:14px; }

/* ── BUTTONS ── */
.btn-primary {
  padding:12px 24px; border-radius:8px; font-family:var(--font-sans);
  font-size:14px; font-weight:600; cursor:pointer; border:none;
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg,#00a9a7,#0f766e);
  color:#fff; box-shadow:0 4px 15px rgba(0,151,167,0.24);
  transition:var(--transition);
}
.btn-primary:hover { box-shadow:0 6px 20px rgba(0,194,199,0.36); transform:translateY(-2px); }
.btn-primary:active { transform:translateY(0); }

.btn-secondary {
  padding:12px 24px; border-radius:8px; font-family:var(--font-sans);
  font-size:14px; font-weight:600; cursor:pointer;
  background:rgba(255,255,255,0.05); border:1px solid var(--border-color);
  color:var(--text-primary); display:inline-flex; align-items:center; gap:8px;
  transition:var(--transition);
}
.btn-secondary:hover { background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.2); }

.btn-ghost {
  padding:8px 16px; border-radius:8px; font-family:var(--font-sans);
  font-size:13px; font-weight:500; cursor:pointer;
  background:transparent; border:1px solid transparent;
  color:var(--text-secondary); display:inline-flex; align-items:center; gap:6px;
  transition:var(--transition);
}
.btn-ghost:hover { background:rgba(255,255,255,0.05); color:var(--text-primary); }
.btn-sm { padding:6px 12px; font-size:12px; }
.btn-icon {
  background:transparent; border:none; color:var(--text-secondary);
  cursor:pointer; font-size:16px; padding:8px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  transition:var(--transition);
}
.btn-icon:hover { color:var(--text-primary); background:rgba(255,255,255,0.05); }

/* ── APP SHELL ── */
.app-shell {
  display:flex; height:100vh; width:100vw;
}

/* ── SIDEBAR ── */
.sidebar {
  width:var(--sidebar-width); background:var(--bg-sidebar);
  border-right:1px solid var(--border-color);
  display:flex; flex-direction:column; flex-shrink:0; z-index:10;
  overflow:hidden;
}
.sidebar-header {
  padding:20px 20px 16px; border-bottom:1px solid rgba(255,255,255,0.06);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  position:relative;
}
.sidebar-logo {
  display:flex; align-items:center; gap:10px;
  font-size:20px; font-weight:800; letter-spacing:0.5px;
  flex-shrink:0;
}
.logo-icon { color:var(--primary); text-shadow:0 0 10px var(--primary-glow); }
.emoji-icon {
  pointer-events: none;
  user-select: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.emoji-icon svg {
  width: 1em;
  height: 1em;
  display: block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
}
.emoji-icon svg[fill="currentColor"],
.emoji-icon svg[fill="currentColor"] * { fill: currentColor; }
.legal-banner-icon svg,
.tv-ctrl-icon svg { fill: none; stroke: currentColor; }
.sidebar-logo span span { color:var(--accent); }

.sidebar-playlist-name {
  display:flex; align-items:center; gap:8px;
  padding:12px 20px; font-size:13px; font-weight:500;
  color:var(--text-secondary); border-bottom:1px solid var(--border-color);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.sidebar-playlist-name .emoji-icon { color:var(--primary); font-size:14px; }

.sidebar-menu { padding:12px; display:flex; flex-direction:column; gap:4px; }
.sidebar-menu .menu-item {
  display:flex; align-items:center; gap:10px;
  padding:12px 14px; border-radius:0; cursor:pointer;
  font-size:14px; font-weight:500; color:var(--text-secondary);
  border:1px solid transparent; transition:var(--transition);
}
.sidebar-menu .menu-item .emoji-icon { width:18px; text-align:center; font-size:15px; }
.sidebar-menu .menu-item:hover { background:rgba(255,255,255,0.045); color:var(--text-primary); }
.sidebar-menu .menu-item.active {
  background:#057985; border-color:rgba(0,194,199,0.46);
  color:var(--text-primary);
}
.sidebar-menu .menu-item.active .emoji-icon { color:var(--primary); }

.sidebar-footer {
padding:12px; border-top:1px solid var(--border-color);
display:flex; flex-direction:column; gap:8px;
}
.sidebar-banner-container {
padding:10px 14px; display:flex; justify-content:center; align-items:center; min-height:50px;
border-top:1px solid var(--border-color);
}

/* ── MAIN CONTENT ── */
.main-content {
  flex:1; display:flex; flex-direction:column; height:100vh; overflow:hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(130deg, rgba(14,20,31,0.94), rgba(6,8,12,0.98));
  background-size: 74px 74px, 74px 74px, 100% 100%;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.inline-banner-container {
display:flex; justify-content:center; align-items:center;
min-height:50px; padding:10px;
border-top:1px solid var(--border-color);
border-bottom:1px solid var(--border-color);
}

/* ── Banner sticky footer (mobile/TV) ── */
.banner-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  padding: 6px 0;
  text-align: center;
  animation: bannerStickyUp 0.3s ease-out;
}
@keyframes bannerStickyUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.banner-sticky .banner-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
}
.banner-sticky-close {
  position: absolute;
  top: 2px;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  z-index: 1;
  transition: color 0.2s;
}
.banner-sticky-close:hover {
  color: #fff;
}

/* Responsivo: ajusta altura mínima do slot inline por dispositivo */
@media (min-width: 1200px) {
  .inline-banner-container { min-height: 90px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .inline-banner-container { min-height: 250px; }
}
@media (max-width: 767px) {
  .inline-banner-container { min-height: 50px; }
}

.main-header {
  height:64px; padding:0 24px; display:flex; align-items:center;
  justify-content:space-between; border-bottom:1px solid rgba(255,255,255,0.055);
  background:rgba(5,7,10,0.66);
  flex-shrink:0; gap:16px;
}

.search-bar { position:relative; flex:1; max-width:420px; }
.search-icon {
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  color:var(--text-secondary); pointer-events:none; font-size:14px;
}
.search-bar input {
  width:100%; padding:11px 42px 11px 42px; border-radius:0;
  border:1px solid rgba(255,255,255,0.08); background:rgba(0,0,0,0.32);
  color:var(--text-primary); font-family:var(--font-sans); font-size:14px; font-weight:500;
  outline:none; transition:var(--transition);
}
.search-bar input:focus {
  border-color:var(--accent); background:rgba(0,0,0,0.42);
  box-shadow:0 0 15px rgba(0,194,199,0.13);
}
.search-bar input::placeholder { color:var(--text-secondary); }
.search-clear-btn {
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  width:28px; height:28px; border:none; border-radius:8px;
  background:transparent; color:var(--text-secondary);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; opacity:0; pointer-events:none; transition:var(--transition);
  font-size:12px;
}
.search-clear-btn.visible {
  opacity:1; pointer-events:auto;
}
.search-clear-btn:hover,
.search-clear-btn:focus-visible {
  background:rgba(255,255,255,0.08);
  color:var(--text-primary);
}

.header-actions { display:flex; gap:4px; align-items:center; }

/* ── CONTENT AREA ── */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.grid-title {
  font-size:clamp(14px, 1.3vw, 18px); font-weight:800; margin-bottom:16px;
  padding-left:4px; text-transform:uppercase; letter-spacing:0.4px;
}

/* ── RECENT ROW (últimos assistidos) ── */
.recent-section { margin-bottom:8px; }
.recent-row {
  display:flex; gap:12px; overflow-x:auto; padding:8px 0;
  align-items: flex-start;
}
.recent-row::-webkit-scrollbar { height:6px; }
.recent-row::-webkit-scrollbar-track { background:rgba(255,255,255,0.03); border-radius:4px; }
.recent-row::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.1); border-radius:4px; }

.recent-card {
  flex-shrink:0;
  width: max(120px, calc(150px * var(--scale, 1)));
  height: max(160px, calc(200px * var(--scale, 1)));
  /* O restante das propriedades de estilo será herdado do .card-item */
}

/* Regras antigas de .recent-card img removidas para não conflitar com channel-logo-container */

.recent-card .card-title {
  padding: 6px 8px 3px 8px; font-size:11px; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  text-align: center;
}
.recent-card .muted {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  padding: 0 10px 8px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── CATEGORIES GRID ── */
.categories-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(max(120px, calc(150px * var(--scale, 1))), 1fr));
  gap:16px; margin-bottom:24px;
  content-visibility:auto;
  contain-intrinsic-block-size:400px;
}
.category-card {
  /* Estilos visuais herdados de .card-item */
}

/* ── CHANNELS GRID ── */
.channels-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(max(120px, calc(150px * var(--scale, 1))), 1fr));
  gap:16px;
  content-visibility:auto;
  contain-intrinsic-block-size:600px;
}
.card-item {
  position:relative;
  background:var(--bg-card); border:1px solid var(--border-color);
  border-radius:8px; overflow:hidden;
  display:flex; flex-direction:column; align-items:stretch;
  cursor:pointer; backdrop-filter:blur(10px);
  transition:var(--transition);
  content-visibility:auto;
  contain-intrinsic-size:auto 220px;
}
.card-item:hover {
  transform:translateY(-3px) scale(1.015);
  background:var(--bg-card-hover);
  border-color:rgba(0,194,199,0.28);
  box-shadow:0 10px 25px rgba(0,0,0,0.32), 0 0 15px rgba(0,194,199,0.08);
}
.card-item .fav-toggle {
  position:absolute; top:8px; right:8px; z-index:2;
  background:rgba(0,0,0,0.5); border:none; border-radius:50%;
  width:32px; height:32px; cursor:pointer; font-size:15px;
  display:flex; align-items:center; justify-content:center;
  transition:transform 0.2s; opacity:0.6;
}
.card-item:hover .fav-toggle { opacity:1; }
.card-item .fav-toggle:hover { transform:scale(1.2) !important; filter:brightness(1.3); }

.channel-logo-container {
  width:100%;
  background:rgba(0,0,0,0.25); display:flex; align-items:center;
  justify-content:center; overflow:hidden;
  border-bottom:1px solid var(--border-color);
}
.card-item.live-card .channel-logo-container {
  aspect-ratio: 16/10;
  background: rgba(0, 0, 0, 0.35);
}
.card-item.vod-card .channel-logo-container {
  aspect-ratio: 3/4;
}
.category-card.card-item.vod-card .channel-logo-container {
  aspect-ratio: 16/10;
  min-height: 92px;
  padding: 8px;
}
.channel-logo { width:100%; height:100%; display:block; min-width:0; min-height:0; object-position:center center; }
.channel-logo.live { object-fit:contain; padding:12px; }
.channel-logo.vod { object-fit:contain; padding:0; }
.channel-logo.series-logo { object-fit:cover; padding:0; }
.channel-logo.category-logo { object-fit:contain; padding:0; }
.channel-logo-placeholder { font-size:28px; color:var(--text-secondary); }
.broken-logo {
  display: flex !important;
  align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 120px;
  background: rgba(0, 0, 0, 0.5); color: #555; font-size: 32px; font-weight: bold;
  border-radius: 8px;
}

.channel-name {
  font-size:clamp(10px, 1vw, 13px); font-weight:600; line-height:1.3; width:100%;
  padding:8px 10px 10px; text-align:center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  white-space: normal; overflow: hidden; text-overflow: ellipsis;
  min-height: calc(1.3em * 2 + 18px); /* Garante altura uniforme mesmo com 1 linha */
}
.channel-name.title-uppercase {
  font-size: clamp(9px, 0.9vw, 11px);
  line-height: 1.2;
}
.channel-group {
  font-size:10px; font-weight:700; color:var(--accent);
  text-transform:uppercase; letter-spacing:0.8px; margin-top:4px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%;
}

/* ── PLAYER MODAL ── */
/* Modo fullscreen */
.player-modal-container.fullscreen-mode {
  width:100% !important; max-width:100% !important;
  border-radius:0 !important;
}
.player-modal-overlay {
  position:fixed; top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,0.85); backdrop-filter:blur(10px);
  display:flex; align-items:center; justify-content:center;
  z-index:1000000; transition:all 0.3s ease;
}
.player-modal-overlay.d-none { opacity:0; pointer-events:none; }
.player-modal-container {
  width:98%; max-width:900px; position:relative;
  background:var(--bg-secondary); border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  transition:all 0.3s ease;
}
/* Modo preview: janela menor */
.player-modal-container.preview-mode {
  width:60%; max-width:720px;
  box-shadow:0 0 40px rgba(0,0,0,0.5);
}
.player-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:0 4px;
}
.player-info { display:flex; flex-direction:column; gap:2px; }
.player-info strong { font-size:18px; font-weight:700; }
.player-controls-top { display:flex; gap:6px; }
.video-wrapper {
  position:relative; width:100%; aspect-ratio:16/9;
  background:#000; border-radius:16px; overflow:hidden;
  border:1px solid var(--border-color);
  box-shadow:0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(139,92,246,0.08);
}
.video-wrapper video { width:100%; height:100%; object-fit:contain; display:block; }

.player-loader {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.68));
  z-index:8;
  pointer-events:none;
  border-radius:inherit;
}

.player-loader > div {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:18px 20px;
  border-radius:20px;
  background:rgba(8,8,12,0.92);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 18px 42px rgba(0,0,0,0.55);
  text-align:center;
}

.player-loader .loader-label {
  color:#fff;
  font-size:14px;
  font-weight:600;
  letter-spacing:0.2px;
}

.player-error {
  position:absolute; inset:0; background:rgba(10,10,15,0.95);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:12px; padding:24px; text-align:center; z-index:10;
  font-size:14px; color:var(--error-color);
}

.manual-play-btn {
  position:absolute; inset:0; z-index:5;
  background:rgba(0,0,0,0.7); border:none; border-radius:16px;
  cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:12px; color:#fff; font-family:var(--font-sans); font-size:16px; font-weight:600;
  transition:background 0.2s;
}
.manual-play-btn:hover { background:rgba(0,0,0,0.5); }
.manual-play-btn .emoji-icon { font-size:64px; color:var(--primary); text-shadow:0 0 30px var(--primary-glow); }
.manual-play-btn span { opacity:0.8; }

/* ── CHAT MODAL ── */
.chat-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.85);
  display:flex; align-items:center; justify-content:center;
  z-index:300; backdrop-filter:blur(8px);
}
.chat-modal {
  background:var(--bg-sidebar); border:1px solid var(--border-color);
  border-radius:20px; padding:24px; width:90%; max-width:600px;
  position:relative;
}
.chat-modal h3 { margin-bottom:16px; font-size:18px; }
.chat-close {
  position:absolute; top:16px; right:16px;
  background:rgba(255,255,255,0.05); border:1px solid var(--border-color);
  color:var(--text-primary); width:36px; height:36px; border-radius:50%;
  cursor:pointer; font-size:18px; display:flex; align-items:center; justify-content:center;
  transition:var(--transition);
}
.chat-close:hover { background:rgba(255,255,255,0.1); }

/* ── TO TOP ── */
.to-top {
  position:fixed; right:20px; bottom:20px; z-index:100;
  width:44px; height:44px; border-radius:50%;
  background:rgba(16,16,24,0.8); backdrop-filter:blur(10px);
  border:1px solid var(--border-color); color:var(--text-secondary);
  cursor:pointer; font-size:16px;
  display:flex; align-items:center; justify-content:center;
  transition:var(--transition); opacity:0; pointer-events:none;
}
.to-top:not(.hidden) { opacity:1; pointer-events:all; }
.to-top:hover { color:var(--text-primary); border-color:var(--primary); transform:translateY(-3px); }

/* ── UTILITY ── */
.fade-in { animation:fadeIn 0.3s ease forwards; }
@keyframes fadeIn {
  from { opacity:0; transform:translateY(10px); }
  to { opacity:1; transform:translateY(0); }
}

/* ── 2 COLUNAS NO HERO: DESKTOP E LANDSCAPE ── */
@media (min-width: 900px) {
  .hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: start;
    width: min(85vw, 1200px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }
  .hero-logo { justify-content: flex-start; }
  .hero-sub { margin-bottom: 24px; }
  .hero-card { display: contents; }
  .hero-tabs { justify-content: flex-start; margin-bottom: 16px; }
  .hero-actions { justify-content: flex-start; }
  .hero-legal { text-align: left; }
  #tab-connect:not(.d-none) {
    grid-column: 2;
    grid-row: 1 / span 15;
    text-align: center;
    padding: 28px;
    background: rgba(16,16,24,0.6);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 300px;
  }
  #tab-connect > p {
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 280px;
  }
  #pairingQrContainer { width: 200px; height: 200px; }
  #pairingQrCode { width: 176px; height: 176px; }
  .pairing-code-box { min-width: 220px; }
  #pairingCodeDisplay { font-size: 36px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero { padding: 12px 16px !important; }
  .hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
    width: 98vw;
    max-width: none;
    margin: 0 auto;
    text-align: left;
  }
  .hero-logo { font-size: 22px !important; justify-content: flex-start; }
  .hero h2 { font-size: 14px !important; margin-bottom: 2px; }
  .hero-sub { font-size: 11px !important; margin-bottom: 8px; }
  .hero-card { display: contents; }
  .hero-tabs { justify-content: flex-start; margin-bottom: 6px; padding-bottom: 6px; font-size: 12px !important; }
  .hero-tabs .hero-tab-btn { font-size: 11px !important; padding: 4px 10px !important; }
  #tab-manual input[type="text"] { padding: 6px 10px; font-size: 11px; margin-bottom: 4px; }
  #tab-manual textarea { min-height: 40px; padding: 6px 10px; font-size: 11px; }
  .hero-actions { justify-content: flex-start; gap: 6px; margin-top: 6px; }
  .hero-actions button { padding: 6px 12px !important; font-size: 11px !important; }
  #initialMsg { font-size: 11px !important; margin-top: 6px !important; }
  .hero-legal { font-size: 9px !important; margin-top: 4px !important; text-align: left !important; }
  #tab-connect:not(.d-none) {
    grid-column: 2;
    grid-row: 1 / span 15;
    text-align: center;
    padding: 12px;
    background: rgba(16,16,24,0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
  }
  #tab-connect > p { display: none; }
  #pairingQrContainer { width: 100px !important; height: 100px !important; padding: 6px !important; }
  #pairingQrCode { width: 88px !important; height: 88px !important; }
  .pairing-code-box { min-width: 120px !important; padding: 8px 12px !important; }
  .pairing-code-box span { font-size: 8px !important; }
  #pairingCodeDisplay { font-size: 18px !important; }
}
@media (max-width:768px) {
body { min-width:320px; }
.app-shell { flex-direction:column; }
.sidebar {
width:100%; height:auto; border-right:none;
border-bottom:1px solid rgba(255,255,255,0.06);
flex-direction:row; flex-wrap:wrap; align-items:center;
padding:8px 12px; gap:6px;
position: relative;
background:rgba(5,7,10,0.96);
}
.sidebar-header { padding:0; border-bottom:none; position: static !important; }
.sidebar-playlist-name { padding:0; border-bottom:none; font-size:12px; }
.sidebar-menu { padding:0; flex-direction:row; gap:4px; overflow-x:auto; }
.sidebar-menu .menu-item { padding:8px 10px; font-size:12px; border-radius:0; white-space:nowrap; }
.sidebar-menu .menu-item .emoji-icon { display:none; }
  .lang-menu-trigger { display:flex !important; }
  #lang-flag-bar {
    display: none !important;
  }
  #lang-flag-bar.expanded {
    display: flex !important;
    background: rgba(5,7,10,0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 10px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  }
  #lang-flag-bar button {
    width: 24px;
    height: 16px;
  }
  .sidebar-footer { display:none; }
  .main-header { height:56px; padding:0 12px; }
  .search-bar { max-width:none; }
  .content-area { padding:12px; }
  .channels-grid, .categories-grid { grid-template-columns:repeat(auto-fill, minmax(95px, 1fr)); gap:10px; }
  .player-modal-container { width:98%; }
}

@media (min-width:1400px) {
  .hero-content { max-width:1100px; gap:60px; }
  .hero-card { max-width:540px; padding:28px; }
  .hero-logo { font-size:40px; }
  .hero h2 { font-size:24px; }
}

@media (min-width:1200px) {
  .hero-content { max-width:900px; }
  .hero-card { max-width:500px; }
}

@media (max-width:768px) and (min-width:481px) {
  .hero { padding:20px 16px; }
  .hero-content { 
    grid-template-columns:1fr; 
    gap:24px;
    max-width:500px;
  }
  .hero-copy { text-align:center; }
  .hero-card { max-width:420px; padding:20px; }
  .hero h2 { font-size:18px; }
  .hero-sub { font-size:13px; }
}

@media (max-width:480px) {
  .sidebar-menu .menu-item { padding:4px 8px; font-size:11px; }
  .main-header { height:48px; padding:0 8px; }
  .search-bar input { padding:8px 36px 8px 36px; font-size:13px; }
  .sidebar { padding:6px 8px; gap:4px; }
  .channels-grid, .categories-grid { grid-template-columns:repeat(auto-fill, minmax(80px, 1fr)); gap:8px; }
  .content-area { padding:8px; }
  .grid-title { font-size:13px; }
  .hero-logo { font-size:clamp(22px, 6vw, 36px); }
  .hero h2 { font-size:clamp(16px, 4vw, 22px); }
  .hero { padding:16px 12px; }
  .hero-content { 
    grid-template-columns:1fr; 
    gap:16px;
    max-width:100%;
  }
  .hero-card { padding:18px; max-width:100%; }
  .hero-card textarea, .hero-card input[type="text"] { padding:12px 14px; font-size:13px; }
  .hero-actions { gap:8px; }
  .hero-actions button { padding:10px 16px; font-size:13px; }
}

/* ========== GOOGLE TRANSLATE / LANG FLAG BAR ========== */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.skiptranslate > iframe,
#goog-gt-tt,
.goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
font, font span { font-size: inherit !important; font-family: inherit !important; line-height: inherit !important; vertical-align: baseline !important; }

.lang-menu-trigger {
  display: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.lang-menu-trigger img {
  display: block;
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
}
.lang-menu-trigger.active {
  border-color: var(--primary);
  opacity: 1;
}

#lang-flag-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0,0,0,0.15);
}
#lang-flag-bar button {
  background: none;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px;
  transition: all 0.2s ease;
  opacity: 0.6;
  width: 26px;
  height: 18px;
  flex-shrink: 0;
}
#lang-flag-bar button.active {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(0, 194, 199, 0.4);
  transform: scale(1.1);
}
#lang-flag-bar button:hover {
  opacity: 1;
  transform: scale(1.1);
}
#lang-flag-bar button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.recent-card.series-recent-card .channel-logo-container {
  aspect-ratio: unset;
  height: 100%;
}

.recent-card .channel-logo-container {
  aspect-ratio: unset !important;
  height: calc(100% - 40px);
}

.recent-card.series-recent-card .channel-logo {
  object-fit: cover;
  padding: 0;
}

.recent-card .channel-name.title-uppercase {
  font-size: clamp(8px, 0.78vw, 10px) !important;
  line-height: 1.12 !important;
}

/* Master-Detail Layout — coluna única global */
.master-detail-wrapper {
  display: flex;
  flex-direction: column;
}
.master-column {
  flex: none;
  width: 100%;
}
.detail-column {
  flex: none;
  width: 100%;
  margin-top: 16px;
  padding-left: 0;
  border-left: none;
}

/* LISTA TEXTUAL DE CATEGORIAS */
.category-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease;
  min-height: 44px;
  box-sizing: border-box;
}
.category-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
}
.category-item .cat-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-secondary);
  padding-left: 8px;
  white-space: nowrap;
}

/* LISTA TEXTUAL DE CONTEUDO */
.content-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease;
  min-height: 44px;
  box-sizing: border-box;
}
.content-item:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.15);
}
.subcategory-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin: 3px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.15s ease;
  min-height: 44px;
  box-sizing: border-box;
}
.subcategory-item:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateX(4px);
}
.subcategory-item .subcat-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  padding-left: 10px;
  white-space: nowrap;
  opacity: 0.8;
}
.content-item .content-idx {
  color: var(--text-secondary);
  font-size: 12px;
  min-width: 28px;
  text-align: right;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}
.detail-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.05);
}
.detail-list-wrap {
  padding-right: 12px;
}

/* MODO HOME: full-width sem colunas */
.layout-home .master-detail-wrapper {
  display: block !important;
}
.layout-home .detail-column {
  display: none !important;
}
.layout-home .master-column {
  width: 100% !important;
  border-right: none;
}
.layout-home #categoriesGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(120px, calc(150px * var(--scale, 1))), 1fr));
  gap: 16px;
  padding: 8px 0;
}
.layout-home #categoriesGrid .category-item {
  display: none;
}

@media (max-width: 768px) {
  .master-detail-wrapper {
    overflow: visible;
  }
  .master-detail-wrapper:not(.category-active):not(.search-active) .detail-column {
    display: none !important;
  }
}

.tv-device .master-detail-wrapper:not(.category-active):not(.search-active) .detail-column {
  display: none !important;
}


/* --- style-mobile.css --- */
/* ── MOBILE TOUCH OPTIMIZATIONS ── */
* {
  -webkit-tap-highlight-color: rgba(139,92,246,0.15);
  -webkit-touch-callout: none;
}

/* Touch feedback */
.menu-item:active,
.card-item:active,
.category-card:active,
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-icon:active {
  transform: scale(0.96) !important;
}

/* Larger touch targets & general mobile layout */
@media (max-width: 768px) {
.sidebar-menu .menu-item {
min-height: 40px;
padding: 8px 14px !important;
}
input, textarea, select { font-size: 16px !important; }
.card-item, .category-card { touch-action: manipulation; }

.desktop-only { display: none !important; }
.mobile-only { display: flex !important; }

/* LANDSCAPE: sidebar horizontal compacta */
@media (max-width: 768px) and (orientation: landscape) {
.sidebar {
flex-wrap: wrap !important;
max-height: none !important;
overflow: visible !important;
}
.sidebar-menu {
flex-wrap: nowrap !important;
overflow-x: auto !important;
overflow-y: hidden !important;
}
.sidebar-footer {
flex-direction: row !important;
flex-wrap: wrap !important;
justify-content: center;
}
.sidebar-footer .btn-ghost {
  font-size: 11px !important;
  padding: 4px 8px !important;
  height: 32px !important;
}
.sidebar::-webkit-scrollbar { display: none; }
}

  /* PORTRAIT ONLY PLAYER MODAL (Vertical Mobile) */
  @media (orientation: portrait) {
    .player-modal-overlay {
      padding: 12px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    .player-modal-container {
      width: min(92vw, 420px) !important;
      max-width: 420px !important;
      height: auto !important;
      max-height: 86vh !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 12px !important;
      padding: 12px !important;
      border-radius: 24px !important;
      background: rgba(12, 12, 17, 0.96) !important;
      border: 1px solid rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55) !important;
    }
    .player-header {
      padding: 4px 4px 0 !important;
      flex-shrink: 0 !important;
      gap: 10px !important;
    }
    .player-info {
      flex: 1 !important;
      min-width: 0 !important;
    }
    .player-info strong {
      font-size: 15px !important;
      line-height: 1.2 !important;
      display: block !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      max-width: none !important;
    }
    .player-info small {
      font-size: 11px !important;
    }
    /* Favorite button on portrait modal */
    .modal-fav-btn {
      width: 36px !important;
      height: 36px !important;
      font-size: 16px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      background: rgba(0,0,0,0.5) !important;
      border-radius: 50% !important;
      border: 1px solid rgba(255,255,255,0.1) !important;
      color: #fff !important;
      padding: 0 !important;
    }
    .player-controls-top .btn-icon {
      width: 36px !important;
      height: 36px !important;
      padding: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    .video-wrapper {
      width: 100% !important;
      min-height: 260px !important;
      aspect-ratio: 16/9 !important;
      max-height: 58vh !important;
      border-radius: 18px !important;
      overflow: hidden !important;
      box-shadow: 0 12px 32px rgba(0,0,0,0.7) !important;
      border: 1px solid rgba(255,255,255,0.06) !important;
    }
    #modalVideo {
      width: 100% !important;
      height: 100% !important;
      max-height: 100% !important;
      object-fit: contain !important;
      background: #000 !important;
    }
  }
}

/* LANDSCAPE ONLY PLAYER MODAL (Horizontal Mobile - Cinematic Experience) */
@media (max-width: 950px) and (orientation: landscape) {
body:not(.tv-device) .player-modal-overlay {
    background: #000 !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }
  body:not(.tv-device) .player-modal-container {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    gap: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  body:not(.tv-device) .video-wrapper {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    aspect-ratio: auto !important;
    background: #000 !important;
  }
  body:not(.tv-device) #modalVideo {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    background: #000 !important;
  }
  body:not(.tv-device) .player-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 2000000 !important; /* Ensure it is above the video */
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%) !important;
    padding: 12px 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    pointer-events: auto !important;
  }
  
  /* Autohide style for cinematic immersion */
  body:not(.tv-device) .player-header.autohide {
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    pointer-events: none !important;
  }

  body:not(.tv-device) .player-modal-overlay.preview-mode {
    padding: 12px !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.88) !important;
  }

  body:not(.tv-device) .player-modal-container.preview-mode {
    width: min(74vw, 380px) !important;
    max-width: 380px !important;
    height: auto !important;
    max-height: 68vh !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 22px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-shadow: 0 10px 32px rgba(0,0,0,0.72) !important;
    overflow: hidden !important;
    background: #18181c !important;
  }

  body:not(.tv-device) .player-modal-container.preview-mode .player-header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    background: #111 !important;
    padding: 10px 14px !important;
    z-index: auto !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    border-radius: 22px 22px 0 0 !important;
  }

  body:not(.tv-device) .player-modal-container.preview-mode .video-wrapper {
    width: 100% !important;
    min-height: 180px !important;
    aspect-ratio: 16 / 9 !important;
    max-height: 250px !important;
    border-radius: 0 0 22px 22px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: none !important;
    background: #000 !important;
    margin: 0 auto !important;
  }

  body:not(.tv-device) .player-modal-container.preview-mode .video-wrapper #modalVideo,
  body:not(.tv-device) .player-modal-container.preview-mode .video-wrapper video {
    width: 100% !important;
    height: 100% !important;
  }

  body:not(.tv-device) .player-info strong {
    font-size: 14px !important;
    max-width: 200px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  body:not(.tv-device) .player-info small {
    font-size: 10px !important;
  }
  body:not(.tv-device) .player-controls-top {
    gap: 12px !important;
  }
  body:not(.tv-device) .player-controls-top .btn-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 16px !important;
    background: rgba(0,0,0,0.5) !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
  }
  body:not(.tv-device) .player-controls-top .btn-icon:hover {
    background: rgba(139,92,246,0.6) !important;
    border-color: rgba(139,92,246,0.8) !important;
  }
  /* Manual Play button adjustment for full screen */
  body:not(.tv-device) .manual-play-btn {
    border-radius: 0 !important;
  }
  
  /* Favorite button on modal */
  body:not(.tv-device) .modal-fav-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.5) !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    padding: 0 !important;
  }
}

@media (min-width: 769px) {
.mobile-only { display: none !important; }
}

@media (hover: none) and (pointer: coarse) {
  .menu-item { background: rgba(255,255,255,0.03); }
  .menu-item.active { background: rgba(139,92,246,0.15) !important; }
  .card-item { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
  .category-card { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
  .fav-toggle { opacity: 1 !important; }
}

/* LANDSCAPE: Sidebar scroll fix for small height screens */
@media (max-height: 600px) {
  .sidebar {
    overflow-y: auto !important;
  }
}


/* --- style-tv.css --- */
/*  ESTILOS ESPECFICOS PARA SMART TVs  */
/* Compatvel com Samsung Tizen, LG webOS, Android TV */

/*  RESET PARA TVs  */
.tv-device * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  will-change: auto !important;
}

.tv-device .loading-screen,
.tv-device .hero,
.tv-device .app-shell {
  background: #0a0a0f !important;
}

/*  FOCO VISVEL PARA CONTROLE REMOTO  */
.tv-device .tv-focused {
  outline: 3px solid #8b5cf6 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5) !important;
  transition: all 0.15s ease !important;
}

.tv-device .card-item.tv-focused {
  transform: scale(1.05) !important;
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.tv-device .category-card.tv-focused {
  transform: scale(1.08) !important;
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.tv-device .recent-card.tv-focused {
  transform: scale(1.05) !important;
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.tv-device .sidebar-menu .menu-item.tv-focused {
  background: rgba(139, 92, 246, 0.2) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
}

.tv-device .btn-icon.tv-focused {
  background: rgba(139, 92, 246, 0.3) !important;
  color: #fff !important;
}

.tv-device .btn-primary.tv-focused {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6) !important;
  transform: scale(1.05) !important;
}

.tv-device .btn-ghost.tv-focused {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.tv-device .sidebar-footer button.tv-focused {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.tv-device #searchBox.tv-focused {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3) !important;
}

.tv-device .search-clear-btn.tv-focused,
.tv-device .ep-close.tv-focused,
.tv-device .series-auto-advance-close.tv-focused {
  background: rgba(139, 92, 246, 0.35) !important;
  color: #fff !important;
  outline: 3px solid #8b5cf6 !important;
  outline-offset: 2px !important;
}

.tv-device .ep-item.tv-focused {
  background: rgba(139, 92, 246, 0.18) !important;
  border-color: rgba(139, 92, 246, 0.45) !important;
  transform: translateX(6px) !important;
}

.tv-device .series-auto-advance-panel .btn.tv-focused {
  background: rgba(139, 92, 246, 0.35) !important;
  color: #fff !important;
  border-color: rgba(139, 92, 246, 0.7) !important;
}

.tv-device #m3uInput.tv-focused {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3) !important;
}

/*  LAYOUT PARA TV  */
.tv-device .app-shell:not(.d-none) {
  display: block !important;
}

.tv-device {
  --sidebar-w: clamp(165px, 16vw, 240px);
  /* Card menor para caber mais na tela — viewport TV tipico: 960-1280px */
  --card-w: clamp(90px, 10vw, 160px);
  --cat-card-w: clamp(90px, 10vw, 160px);
  --recent-card-w: clamp(90px, 10vw, 160px);
  /* Safe-zone: TVs têm overscan de ~4-5% nas bordas */
  --tv-safe-h: clamp(14px, 3.5vw, 40px);
  --tv-safe-v: clamp(10px, 2.5vh, 28px);
  /* Colunas do grid calculadas dinamicamente */
  --tv-cols: 6;
}

.tv-device .sidebar {
  width: var(--sidebar-w) !important;
  height: 100vh !important;
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  float: left !important;
}

.tv-device .main-content {
  margin-left: var(--sidebar-w) !important;
  height: 100vh !important;
  overflow: hidden !important;
  max-width: calc(100vw - var(--sidebar-w)) !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Safe-zone: padding lateral e vertical para compensar overscan da TV */
.tv-device .content-area {
  padding: var(--tv-safe-v) var(--tv-safe-h) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  flex: 1 !important;
  min-height: 0 !important;
}

/* Header com safe-zone no topo */
.tv-device .main-header {
  padding-left: var(--tv-safe-h) !important;
  padding-right: var(--tv-safe-h) !important;
}

/* Oculta banner sticky na TV — sobrepunha o conteúdo na parte inferior */
.tv-device .banner-sticky {
  display: none !important;
}

/* Sidebar: safe-zone no topo e bottom */
.tv-device .sidebar {
  padding-top: var(--tv-safe-v) !important;
  padding-bottom: var(--tv-safe-v) !important;
}

.tv-device .sidebar-header {
  padding: 8px 12px !important;
  gap: 6px !important;
}

.tv-device .sidebar-logo {
  font-size: 16px !important;
  gap: 6px !important;
}

.tv-device .sidebar-playlist-name {
  padding: 6px 12px !important;
  font-size: 11px !important;
}

.tv-device .sidebar-menu {
  display: block !important;
  padding: 4px !important;
}

.tv-device .sidebar-menu .menu-item {
  display: block !important;
  margin-bottom: 2px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
}

.tv-device .sidebar-footer {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px !important;
  padding: 8px !important;
  padding-bottom: 16px !important;
  border-top: 1px solid var(--border-color) !important;
  background: var(--bg-sidebar) !important;
}

.tv-device .sidebar-footer .btn-ghost {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex: 1 1 45%;
  min-width: 0;
  height: 40px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: var(--text-primary) !important;
  margin: 0 !important;
  transition: all 0.2s ease !important;
}

/* Boto Sair com estilo de destaque sutil em TVs */
.tv-device .sidebar-footer #btnLogout {
  color: var(--error-color) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  border-color: rgba(239, 68, 68, 0.1) !important;
}

/*  FOCO TV PARA LISTAS TEXTUAIS  */
.tv-device .category-item.tv-focused {
  background: rgba(139, 92, 246, 0.2) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  outline: 3px solid #8b5cf6 !important;
  outline-offset: -1px !important;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3) !important;
}
.tv-device .content-item.tv-focused {
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
  outline: 3px solid #8b5cf6 !important;
  outline-offset: -1px !important;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25) !important;
}
.tv-device .category-item.tv-focused,
.tv-device .content-item.tv-focused {
  transform: none !important;
}

/*  GRID PARA TV  */
.tv-device .channels-grid,
.tv-device .categories-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(clamp(80px, 11vw, var(--card-w)), 1fr)) !important;
  gap: clamp(6px, 0.8vw, 10px) !important;
  overflow: hidden !important;
  content-visibility: visible !important;
  contain: none !important;
}



/* Card padronizado — grid controla largura, card controla altura */
.tv-device .card-item {
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background: rgba(26, 26, 38, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.15s ease, border-color 0.15s !important;
}

/* Ajustes no container da logo na TV */
.tv-device .channel-logo-container {
  width: 100% !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

/* Aspect-ratios uniformes com o desktop (style.css) */
.tv-device .card-item.live-card .channel-logo-container {
  aspect-ratio: 16/10 !important;
}

.tv-device .card-item.vod-card .channel-logo-container {
  aspect-ratio: 3/4 !important;
}

.tv-device .category-card.card-item.vod-card .channel-logo-container {
  aspect-ratio: 16/10 !important;
  min-height: 92px !important;
  padding: 8px !important;
}

.tv-device .channel-logo {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: block !important;
  background: transparent !important;
  object-position: center center !important;
}

.tv-device .card-item.live-card .channel-logo {
  object-fit: cover !important;
  padding: 0 !important;
}

.tv-device .card-item.vod-card .channel-logo {
  object-fit: contain !important;
  padding: 0 !important;
}

.tv-device .channel-logo.series-logo {
  object-fit: cover !important;
  padding: 0 !important;
}

.tv-device .channel-logo.category-logo {
  object-fit: contain !important;
  padding: 0 !important;
}

/* Nome do canal/série na TV: truncamento de 2 linhas com altura fluida (como desktop) */
.tv-device .channel-name {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  font-size: clamp(11px, 1.4vw, 15px) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  width: 100% !important;
  min-height: calc(1.3em * 2 + 14px) !important;
  margin: 0 !important;
  padding: 8px 8px 10px !important;
  box-sizing: border-box !important;
  color: #f3f4f6 !important;
}

.tv-device .channel-name.title-uppercase {
  font-size: clamp(10px, 1.2vw, 13px) !important;
  line-height: 1.2 !important;
}

.tv-device .channel-group {
  display: none !important; /* Ocultar na TV para otimizar espao */
}

/* Grid de Categorias — herda grid do bloco acima (linhas 227-233) */

/* Removido blocos cat-logo e cat-name obsoletos que causavam conflitos */

/* Linha Recentes */
.tv-device .recent-section {
  /* Limita a largura para não vazar na borda direita */
  overflow: hidden !important;
}
.tv-device .recent-row {
  display: block !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
  /* Padding-right = safe-zone para o último card não ficar colado na borda */
  padding-right: var(--tv-safe-h) !important;
  padding-left: 0 !important;
  /* Esconde scrollbar mas mantém funcionalidade */
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.tv-device .recent-card {
  display: inline-block !important;
  width: var(--recent-card-w) !important;
  height: auto !important;
  margin-right: calc(12px * var(--scale, 1)) !important;
  vertical-align: top !important;
}

.tv-device .recent-card .channel-logo-container {
  aspect-ratio: 16/10 !important;
}

.tv-device .recent-card.series-recent-card .channel-logo-container {
  aspect-ratio: 3/4 !important;
}

.tv-device .recent-card.series-recent-card .channel-logo {
  object-fit: cover !important;
  padding: 0 !important;
}

.tv-device .recent-card .channel-name.title-uppercase {
  font-size: clamp(9px, 1.1vw, 12px) !important;
  line-height: 1.2 !important;
}

/*  PLAYER MODAL PARA TV  */
.tv-device .player-modal-overlay {
  background: #000 !important;
  transition: all 0.3s ease !important;
}

/* Modo preview: janela menor centralizada */
.tv-device .player-modal-container.preview-mode {
  width: 60% !important;
  max-width: 800px !important;
  margin: auto !important;
  box-shadow: 0 0 40px rgba(0,0,0,0.5) !important;
  border-radius: 12px !important;
}

/* Modo fullscreen */
.tv-device .player-modal-container.fullscreen-mode {
  width: 98% !important;
  max-width: 98vw !important;
  border-radius: 0 !important;
}

.tv-device .video-wrapper {
  border-radius: 0 !important;
}

.tv-device #modalVideo {
  outline: none !important;
}

.tv-device #modalVideo::-webkit-media-controls {
  display: none !important;
}

.tv-device #modalVideo::-webkit-media-controls-enclosure {
  display: none !important;
}

.tv-device .player-header {
  padding: 12px 8px !important;
}

.tv-device .player-info strong {
  font-size: calc(20px * var(--scale, 1)) !important;
}

.tv-device .player-controls-top .btn-icon {
  width: calc(48px * var(--scale, 1)) !important;
  height: calc(48px * var(--scale, 1)) !important;
  font-size: calc(20px * var(--scale, 1)) !important;
}

/*  BOTES MAIORES PARA TV  */
.tv-device .btn-icon {
  width: calc(44px * var(--scale, 1)) !important;
  height: calc(44px * var(--scale, 1)) !important;
  font-size: calc(18px * var(--scale, 1)) !important;
}

.tv-device .btn-primary,
.tv-device .btn-secondary {
  padding: calc(14px * var(--scale, 1)) calc(28px * var(--scale, 1)) !important;
  font-size: calc(16px * var(--scale, 1)) !important;
}

.tv-device .btn-ghost {
  padding: calc(10px * var(--scale, 1)) calc(18px * var(--scale, 1)) !important;
  font-size: calc(14px * var(--scale, 1)) !important;
}

/*  TELA INICIAL PARA TV  */
.tv-device .hero {
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: clamp(24px, 5vh, 56px) clamp(24px, 5vw, 72px) !important;
  align-items: center !important;
  justify-content: center !important;
}
/*  2 COLUNAS: grid  */
.tv-device .hero-content {
  display: grid !important;
  grid-template-columns: minmax(calc(260px * var(--scale, 1)), calc(380px * var(--scale, 1))) minmax(calc(420px * var(--scale, 1)), calc(720px * var(--scale, 1))) !important;
  gap: calc(40px * var(--scale, 1)) !important;
  align-items: center !important;
  width: min(92vw, calc(1220px * var(--scale, 1))) !important;
  max-width: calc(1220px * var(--scale, 1)) !important;
  margin: auto !important;
  text-align: left !important;
}
.tv-device .hero-copy {
  align-self: center !important;
}
.tv-device .hero-panel {
  width: 100% !important;
}
/*  COLUNA ESQUERDA  */
.tv-device .hero-logo {
  font-size: calc(48px * var(--scale, 1)) !important;
  gap: calc(16px * var(--scale, 1)) !important;
  justify-content: flex-start !important;
  margin-bottom: 0 !important;
}
.tv-device .hero h2 {
  font-size: calc(28px * var(--scale, 1)) !important;
  margin-bottom: calc(4px * var(--scale, 1)) !important;
  margin-top: calc(4px * var(--scale, 1)) !important;
}
.tv-device .hero-sub {
  font-size: calc(18px * var(--scale, 1)) !important;
  margin-bottom: calc(20px * var(--scale, 1)) !important;
}
/* hero-card vira container virtual  filhos viram grid items */
.tv-device .hero-card {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: calc(28px * var(--scale, 1)) !important;
  background: rgba(16,16,24,0.72) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: calc(24px * var(--scale, 1)) !important;
  box-shadow: 0 calc(18px * var(--scale, 1)) calc(52px * var(--scale, 1)) rgba(0,0,0,0.34) !important;
  backdrop-filter: blur(18px) !important;
}
.tv-device .lang-selector-initial {
  display: flex !important;
  justify-content: flex-start !important;
  margin-bottom: calc(18px * var(--scale, 1)) !important;
}
.tv-device .hero-tabs {
  justify-content: flex-start !important;
  margin-bottom: calc(16px * var(--scale, 1)) !important;
  padding-bottom: calc(12px * var(--scale, 1)) !important;
}
.tv-device #tab-manual {
  width: 100% !important;
}
.tv-device .hero-card textarea {
  font-size: calc(18px * var(--scale, 1)) !important;
  min-height: calc(120px * var(--scale, 1)) !important;
  padding: calc(16px * var(--scale, 1)) !important;
  border-radius: calc(14px * var(--scale, 1)) !important;
}
.tv-device .hero-card input[type="text"] {
  font-size: calc(18px * var(--scale, 1)) !important;
  padding: calc(16px * var(--scale, 1)) !important;
  border-radius: calc(14px * var(--scale, 1)) !important;
}
.tv-device .hero-actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: calc(12px * var(--scale, 1)) !important;
  justify-content: flex-start !important;
  margin-top: calc(16px * var(--scale, 1)) !important;
}
.tv-device .hero-actions button {
  display: inline-block !important;
  width: auto !important;
  margin-bottom: 0 !important;
  padding: calc(16px * var(--scale, 1)) calc(32px * var(--scale, 1)) !important;
  font-size: calc(16px * var(--scale, 1)) !important;
}
.tv-device #initialMsg {
  font-size: calc(16px * var(--scale, 1)) !important;
  margin-top: calc(12px * var(--scale, 1)) !important;
  text-align: left !important;
}
.tv-device .hero-legal {
  font-size: calc(14px * var(--scale, 1)) !important;
  margin-top: calc(16px * var(--scale, 1)) !important;
  text-align: left !important;
}
/*  COLUNA DIREITA: QR CODE  */
.tv-device #tab-connect:not(.d-none) {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  text-align: center !important;
  padding: calc(8px * var(--scale, 1)) 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
.tv-device #tab-connect > p {
  font-size: calc(15px * var(--scale, 1)) !important;
  margin-bottom: calc(20px * var(--scale, 1)) !important;
  max-width: calc(320px * var(--scale, 1)) !important;
}
.tv-device .pairing-container {
  max-width: none !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: calc(20px * var(--scale, 1)) !important;
}
.tv-device .pairing-container > .pairing-code-box {
  flex: 0 0 calc(260px * var(--scale, 1)) !important;
  align-self: center !important;
}
.tv-device .pairing-container > div:last-child {
  flex: 1 1 auto !important;
}
.tv-device #pairingQrContainer {
  width: calc(220px * var(--scale, 1)) !important;
  height: calc(220px * var(--scale, 1)) !important;
  padding: calc(14px * var(--scale, 1)) !important;
  border-radius: calc(16px * var(--scale, 1)) !important;
}
.tv-device #pairingQrCode {
  width: calc(190px * var(--scale, 1)) !important;
  height: calc(190px * var(--scale, 1)) !important;
}
.tv-device .pairing-code-box {
  min-width: calc(240px * var(--scale, 1)) !important;
  padding: calc(20px * var(--scale, 1)) calc(28px * var(--scale, 1)) !important;
  border-radius: calc(14px * var(--scale, 1)) !important;
}
.tv-device .pairing-code-box span {
  font-size: calc(12px * var(--scale, 1)) !important;
}
.tv-device #pairingCodeDisplay {
  font-size: calc(40px * var(--scale, 1)) !important;
}

/*  SCROLLBAR PARA TV  */
.tv-device ::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

.tv-device ::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3) !important;
  border-radius: 4px !important;
}

/*  TIZEN ESPECFICO  */
.tv-tizen .sidebar {
  background: #0d0d14 !important;
}

.tv-tizen .card-item {
  background: rgba(20, 20, 32, 0.8) !important;
}

/*  WEBOS ESPECFICO  */
.tv-webos .sidebar {
  background: #0f0f16 !important;
}

.tv-webos .card-item {
  background: rgba(22, 22, 34, 0.7) !important;
}

/*  ANDROID TV ESPECFICO  */
.tv-android .sidebar {
  background: #111118 !important;
}

.tv-device .broken-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: calc(32px * var(--scale, 1)) !important;
  color: #555 !important;
  background: #222 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 8px !important;
}

.tv-device .cat-logo.broken-logo {
  font-size: calc(24px * var(--scale, 1)) !important;
  border-radius: calc(12px * var(--scale, 1)) !important;
  aspect-ratio: 1 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Loading spinner persiste na TV at app carregar */
.tv-device .loading-screen {
  z-index: 99999 !important;
  background: #0a0a0f !important;
}

.tv-device .loading-screen.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/*  REDUZIR ANIMAES  */
.tv-device .card-item:hover,
.tv-device .category-card:hover,
.tv-device .recent-card:hover {
  transform: none !important;
}

.tv-device .card-item.tv-focused,
.tv-device .category-card.tv-focused,
.tv-device .recent-card.tv-focused {
  transform: scale(1.05) !important;
}

/*  TOPO PARA TV  */
.tv-device .to-top {
  display: none !important; /* No necessrio em TV */
}

/*  CHAT DESABILITADO EM TV  */
.tv-device #IFRAME {
  display: none !important;
}

.tv-device .chat-overlay {
  display: none !important;
}

/*  SELETOR DE IDIOMAS NA SIDEBAR DA TV  */
.tv-device #lang-flag-bar {
  display: flex !important;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-top: 1px solid rgba(255,255,255,0.06);
  width: auto !important;
}

.tv-device #lang-flag-bar button {
  width: 22px !important;
  height: 15px !important;
}

/*  FOCO NOS ELEMENTOS DA TELA INICIAL (HERO)  */
.tv-device .flag-btn.tv-focused {
  outline: 3px solid #8b5cf6 !important;
  outline-offset: 2px !important;
  opacity: 1 !important;
  transform: scale(1.2) !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5) !important;
}

.tv-device .hero-tab-btn.tv-focused {
  outline: 3px solid #8b5cf6 !important;
  outline-offset: 2px !important;
  color: #fff !important;
  background: rgba(139, 92, 246, 0.15) !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4) !important;
}

.tv-device #playlistNameInput.tv-focused,
.tv-device #m3uInput.tv-focused {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4) !important;
}

.tv-device #btnLoad.tv-focused {
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.6) !important;
  transform: scale(1.05) !important;
}

.tv-device #btnLoadUrl.tv-focused {
  background: rgba(139, 92, 246, 0.2) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3) !important;
}

.tv-device #btnClearLocal.tv-focused {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15) !important;
}

.tv-device #btnTabConnect.tv-focused {
  color: #fff !important;
  background: rgba(139, 92, 246, 0.15) !important;
}

/* Skin 2026: visual IPTV escuro, foco claro e cards grandes sem alterar a navegação */
.tv-device {
  --primary: #0097a7 !important;
  --accent: #00c2c7 !important;
  --bg-sidebar: #050607 !important;
  --bg-card: rgba(22, 25, 31, 0.82) !important;
  --bg-card-hover: rgba(34, 40, 48, 0.96) !important;
}

.tv-device .loading-screen,
.tv-device .hero,
.tv-device .app-shell {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(135deg, #070a0f 0%, #111827 58%, #070a0f 100%) !important;
  background-size: 96px 96px, 96px 96px, 100% 100% !important;
}

.tv-device .tv-focused,
.tv-device .flag-btn.tv-focused,
.tv-device .hero-tab-btn.tv-focused {
  outline-color: #00c2c7 !important;
  box-shadow: 0 0 18px rgba(0, 194, 199, 0.52) !important;
}

.tv-device .sidebar-menu .menu-item.active,
.tv-device .sidebar-menu .menu-item.tv-focused {
  background: #057985 !important;
  border-color: rgba(0, 194, 199, 0.52) !important;
}

.tv-device .card-item.tv-focused,
.tv-device .category-card.tv-focused,
.tv-device .recent-card.tv-focused {
  background: rgba(0, 151, 167, 0.22) !important;
  border-color: rgba(0, 194, 199, 0.58) !important;
}

.tv-device .card-item,
.tv-device .hero-card,
.tv-device .player-modal-container.preview-mode {
  border-radius: 8px !important;
}


