@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-native: #0c0d12;
  --bg-surface: #13151d;
  --bg-card: #151822;
  --bg-card-hover: #1b1f2c;
  --accent: #e5a00d;
  --accent-bright: #ffb703;
  --accent-glow: rgba(229, 160, 13, 0.38);
  --accent-soft: rgba(229, 160, 13, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.07);
  --border-focus: #e5a00d;
  --text-white: #f8fafc;
  --text-silver: #94a3b8;
  --text-muted: #64748b;
  --green-live: #10b981;
  --red-live: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-native);
  color: var(--text-white);
  overflow: hidden;
}

/* TV Focus Outline for Remote Control (Hardware Broadcast Solid Focus) */
.tv-focusable {
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, transform 0.12s ease;
}

.tv-focusable:focus,
.tv-focusable.is-focused {
  outline: 3px solid rgba(245, 158, 11, 0.9) !important;
  outline-offset: 2px;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.52), 0 10px 26px rgba(0, 0, 0, 0.82) !important;
  transform: translateY(-1px) scale(1.015);
  z-index: 25;
}

/* Splash Screen & Sync Overlay */
#splash-screen,
#sync-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 18, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.sync-card {
  width: 500px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 38px 40px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85);
}

.brand-mark {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-mark span {
  color: var(--accent);
}

.sync-subtitle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-top: 8px;
}

.sync-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 24px 0 16px;
}

.sync-progress-bar {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 999px;
  transition: width 0.35s ease;
  animation: pulseBar 1.4s infinite ease-in-out;
}

@keyframes pulseBar {
  0% { opacity: 0.7; }
  50% { opacity: 1; filter: drop-shadow(0 0 6px var(--accent)); }
  100% { opacity: 0.7; }
}

.sync-status-text {
  font-size: 13.5px;
  color: var(--text-silver);
  line-height: 1.5;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.92);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
}

.btn-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-silver);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Disclaimer Modal */
.disclaimer-box {
  width: 680px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
}

.disclaimer-box h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.disclaimer-body {
  font-size: 14px;
  color: var(--text-silver);
  line-height: 1.65;
  white-space: pre-line;
  background: var(--bg-native);
  border: 1px solid var(--border-card);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  max-height: 360px;
  overflow-y: auto;
}

/* App Shell Layout */
#app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  background: var(--bg-native);
  position: relative;
  overflow: hidden;
}

#app-shell.in-subview .tv-header {
  display: none !important;
}

/* Top Header Bar Zuxo Replica (Compacto 52px anti-cortes) */
.tv-header {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 2.5vw, 36px);
  background: transparent;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.brand-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.brand-logo span {
  color: var(--accent);
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.server-title-pill {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
  text-transform: uppercase;
}

.header-date-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-silver);
  margin-top: 1px;
  text-transform: capitalize;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-pill-btn {
  height: 34px;
  padding: 0 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.top-icon-btn {
  width: 34px;
  height: 34px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-silver);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.top-pill-btn:hover,
.top-icon-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.spinning svg {
  animation: spinReload 0.8s linear infinite;
}

@keyframes spinReload {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Main View Dynamic Slot */
.tv-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Bottom 5-Segment Footer Bar Zuxo Replica */
.tv-footer {
  flex-shrink: 0;
  height: 38px;
  background: rgba(12, 13, 18, 0.98);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 3vw, 44px);
  font-size: 12px;
  z-index: 100;
}

.footer-segment {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-lbl {
  color: var(--text-silver);
  font-weight: 500;
}

.footer-val {
  color: #fff;
  font-weight: 700;
}

.footer-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 22px;
}

.footer-brand-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent);
}

/* ============================================================
   DASHBOARD LOBBY (1:1 ZUXO GEOMETRY - RESPONSIVE & AUTO-FIT)
============================================================ */
.dashboard-lobby {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 6px clamp(16px, 2.5vw, 36px) 6px clamp(16px, 2.5vw, 36px);
  overflow: hidden;
  box-sizing: border-box;
  gap: 8px;
  justify-content: space-between;
}

/* Hero 5-Cards Grid */
.hero-cards-grid {
  display: grid;
  grid-template-columns: 31% 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vh, 14px);
  flex: 1 1 0;
  min-height: 0;
}

/* Left Hero Tall Card */
.hero-card-tall {
  grid-row: 1 / span 2;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: clamp(14px, 1.8vw, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.hero-card-tall .card-icon-box {
  width: clamp(48px, 5vw, 70px);
  height: clamp(48px, 5vw, 70px);
  border-radius: clamp(12px, 1.3vw, 18px);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: clamp(6px, 1.2vh, 14px);
}

.hero-card-tall .card-title {
  font-size: clamp(17px, 1.6vw, 23px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.hero-card-tall .card-subtitle {
  font-size: clamp(11px, 0.9vw, 13px);
  color: var(--text-silver);
  margin-top: 4px;
}

/* Standard 2x2 Grid Cards */
.hero-card-std {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: clamp(12px, 1.3vw, 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 6px 10px;
}

.hero-card-std .card-icon-box {
  width: clamp(34px, 3.5vw, 46px);
  height: clamp(34px, 3.5vw, 46px);
  border-radius: clamp(9px, 1vw, 13px);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: clamp(3px, 0.8vh, 8px);
}

.hero-card-std .card-title {
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}

.hero-card-std .card-subtitle {
  font-size: clamp(10px, 0.8vw, 11.5px);
  color: var(--text-silver);
  margin-top: 2px;
}

/* Bottom Carousel - 100% Visível e Proporcional */
.dashboard-carousel-section {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 146px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.carousel-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.carousel-header-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-scroll-track {
  display: flex;
  gap: clamp(10px, 1.2vw, 16px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 4px 2px;
  scrollbar-width: none;
  flex: 1;
}

.carousel-scroll-track::-webkit-scrollbar {
  display: none;
}

/* Horizontal Item Card in Carousel */
.carousel-card-item {
  width: clamp(280px, 23vw, 340px);
  height: 112px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  display: flex;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.carousel-poster-thumb {
  width: 78px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  background: #181b26;
  border-radius: 12px 0 0 12px;
}

.carousel-body {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  gap: 3px;
}

.carousel-tag {
  font-size: clamp(10px, 0.8vw, 11px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.carousel-title {
  font-size: clamp(12.5px, 1vw, 14px);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-sub {
  font-size: clamp(10px, 0.8vw, 11.5px);
  color: var(--text-silver);
  margin-top: 2px;
}

.carousel-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}

.carousel-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

/* ============================================================
   SUB-VIEWS (TV AO VIVO, FILMES, SÉRIES)
============================================================ */
.subview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.subview-top-bar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 44px;
  gap: 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(12, 13, 18, 0.6);
  flex-shrink: 0;
}

.btn-back-pill {
  height: 36px;
  padding: 0 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-back-pill:hover {
  background: var(--bg-card-hover);
}

.subview-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subview-accent-pipe {
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.subview-title-text {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
}

/* ============================================================
   TV AO VIVO: 3-COLUNAS 1:1
============================================================ */
.live-layout-3col {
  display: grid;
  grid-template-columns: 280px 460px 1fr;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

/* Coluna 1: Categorias */
.live-col-cats {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  min-height: 0;
  overflow: hidden;
  background: rgba(19, 21, 29, 0.4);
}

.search-box-wrap {
  position: relative;
  margin-bottom: 14px;
}

.search-box-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-search-tv {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
}

.input-search-tv:focus {
  border-color: var(--accent);
  outline: none;
}

.quick-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-quick-filter {
  flex: 1;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-silver);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-quick-filter.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.cats-scroll-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.cat-row-item {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-silver);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.cat-row-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.cat-row-item.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
}

.cat-pill-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-silver);
  font-weight: 700;
}

.cat-row-item.active .cat-pill-count {
  background: var(--accent);
  color: #0c0d12;
}

/* Coluna 2: Canais */
.live-col-channels {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  gap: 8px;
}

.channel-row-item {
  width: 100%;
  min-height: 58px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  cursor: pointer;
  position: relative;
}

.channel-row-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  background: var(--bg-card-hover);
}

.channel-logo-square {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #181b26;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.channel-number-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.channel-info-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.channel-name-txt {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-toggle-fav {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}

.btn-toggle-fav.favorited {
  color: #ef4444;
}

/* Coluna 3: Player Preview & EPG */
.live-col-preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 28px;
  overflow-y: auto;
  gap: 20px;
}

.preview-player-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-video-el {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-hud-bar {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  padding: 12px 18px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signal-switch-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-signal-chip {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-signal-chip.active {
  background: var(--accent);
  color: #0c0d12;
  border-color: var(--accent);
}

/* EPG Box */
.epg-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 22px;
}

.epg-header-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.epg-now-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}

.epg-show-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.epg-desc-text {
  font-size: 13px;
  color: var(--text-silver);
  line-height: 1.5;
}

/* ============================================================
   VOD & SÉRIES CATALOG (4 TO 6 COLUNAS 1:1)
============================================================ */
.catalog-layout-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.catalog-sidebar {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  min-height: 0;
  overflow: hidden;
  background: rgba(19, 21, 29, 0.4);
}

.catalog-grid-area {
  padding: 20px 32px 120px 32px;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  grid-auto-rows: max-content;
  gap: 20px;
  align-content: start;
}

.catalog-item-card {
  display: block;
  cursor: pointer;
  position: relative;
}

.catalog-poster-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #181b26;
  border: 1.5px solid var(--border-card);
  position: relative;
  transition: all 0.18s ease;
}

.catalog-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-item-card:hover .catalog-poster-wrap {
  border-color: rgba(255, 255, 255, 0.3);
}

.catalog-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

/* Detalhes de Séries */
.series-detail-view {
  padding: 24px 44px 90px;
  overflow-y: auto;
  height: calc(100% - 56px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.series-header-info {
  display: flex;
  gap: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 24px;
  flex-shrink: 0;
}

.series-header-poster {
  width: 140px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.series-header-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.seasons-tab-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  flex-shrink: 0;
  align-items: center;
}

.btn-season-pill {
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-silver);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-season-pill.active {
  background: var(--accent);
  color: #0c0d12;
  border-color: var(--accent);
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.episode-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.episode-card:hover {
  border-color: var(--accent);
}

/* ============================================================
   SETTINGS MODAL (6 ABAS 1:1)
============================================================ */
.settings-dialog {
  width: 820px;
  height: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0,0,0,0.9);
}

.settings-modal-header {
  height: 60px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.settings-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-icon-mark {
  color: var(--accent);
  display: flex;
}

.settings-title-group h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.settings-modal-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
  overflow: hidden;
}

.settings-sidebar {
  border-right: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(12, 13, 18, 0.4);
}

.settings-nav-item {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-silver);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.settings-nav-item.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
}

.settings-content-panel {
  padding: 24px 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card-row {
  background: var(--bg-native);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-lbl {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

.settings-sub {
  font-size: 11.5px;
  color: var(--text-silver);
  margin-top: 2px;
}

.settings-val-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

/* Profile Modal */
.profile-dialog {
  width: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 32px;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.profile-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.profile-card {
  width: 140px;
  height: 160px;
  background: var(--bg-native);
  border: 1.5px solid var(--border-card);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-card.active {
  border-color: var(--accent);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.avatar-1 { background: linear-gradient(135deg, #e5a00d, #f59e0b); color: #0c0d12; }
.avatar-add { background: rgba(255, 255, 255, 0.06); color: var(--text-silver); }

.profile-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.profile-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  margin-top: 4px;
}

/* Server / Playlist Modal */
.server-dialog {
  width: 620px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.server-dialog-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.server-dialog-card {
  background: var(--bg-native);
  border: 1.5px solid var(--border-card);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.list-card-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-silver);
  margin-bottom: 14px;
}

.list-card-icon {
  color: var(--accent);
  margin-bottom: 14px;
}

.list-card-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.list-card-meta {
  font-size: 13.5px;
  color: var(--text-silver);
  margin-top: 6px;
}

.btn-action-pill {
  height: 44px;
  padding: 0 24px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: #0c0d12;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-action-pill.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-tv-pill {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.btn-accent {
  background: var(--accent);
  color: #0c0d12;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Fullscreen Video Player */
.full-player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9800;
}

.tv-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Demonstrativo Gráfico de Carregamento de Mídia (Fullscreen & Preview) */
.player-loading-overlay,
.preview-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: radial-gradient(circle at center, rgba(19, 21, 29, 0.86) 0%, rgba(8, 9, 13, 0.94) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 460px;
  padding: 28px 34px;
  border-radius: 20px;
  background: rgba(19, 21, 29, 0.78);
  border: 1px solid rgba(229, 160, 13, 0.28);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(229, 160, 13, 0.12);
}

.player-spinner-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.player-spinner-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-right-color: var(--accent-bright);
  animation: nazzaSpinCW 0.95s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.player-spinner-inner {
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.06);
  border-bottom-color: rgba(255, 255, 255, 0.65);
  border-left-color: var(--accent);
  animation: nazzaSpinCCW 1.35s linear infinite;
}

.player-spinner-core {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--accent);
  animation: pulseBar 1.4s infinite ease-in-out;
}

@keyframes nazzaSpinCW {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes nazzaSpinCCW {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.player-loading-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(229, 160, 13, 0.35);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.player-loading-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.player-loading-status {
  font-size: 12.5px;
  color: var(--text-silver);
  margin-bottom: 16px;
}

.player-loading-bar-track {
  width: 260px;
  height: 4px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.player-loading-bar-fill {
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 4px;
  animation: nazzaLoadSweep 1.25s ease-in-out infinite;
}

@keyframes nazzaLoadSweep {
  0% { transform: translateX(-95%); width: 40%; }
  50% { transform: translateX(60%); width: 65%; }
  100% { transform: translateX(220%); width: 40%; }
}

.player-hud {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 34px;
  background: linear-gradient(180deg, rgba(0,0,0,0.88) 0%, transparent 22%, transparent 74%, rgba(0,0,0,0.92) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-hud.hud-hidden {
  opacity: 0;
}

.player-hud > * {
  pointer-events: auto;
}

.player-hud-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.player-quality-tag {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent);
  color: #0c0d12;
  font-size: 11px;
  font-weight: 800;
}

.player-hud-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-variants-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.player-seek-range {
  flex: 1;
  accent-color: var(--accent);
  height: 6px;
  cursor: pointer;
}

.player-channel-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 320px;
  max-width: 82vw;
  background: rgba(12, 13, 18, 0.96);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border-subtle);
  z-index: 35;
  display: flex;
  flex-direction: column;
}

.player-tracks-popup {
  position: absolute;
  top: 76px;
  right: 34px;
  width: 300px;
  max-height: 60vh;
  overflow-y: auto;
  background: rgba(19, 21, 29, 0.98);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  z-index: 38;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.85);
}

.playlist-item-row {
  background: var(--bg-native);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.playlist-item-row.active {
  border-color: var(--accent);
  background: rgba(229, 160, 13, 0.08);
}

.subview-controls-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.epg-row-item {
  background: var(--bg-native);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.epg-row-item.is-now {
  border-color: var(--accent);
  background: rgba(229, 160, 13, 0.09);
}

.btn-signal-chip.active {
  background: var(--accent);
  color: #0c0d12;
  border-color: var(--accent);
  font-weight: 800;
}

/* Forms */
.change-list-panel {
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.form-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-silver);
  display: block;
  margin-bottom: 4px;
}

.input-tv {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-native);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-size: 12.5px;
}

.input-tv:focus {
  border-color: var(--accent);
  outline: none;
}

.server-qr-img {
  width: 120px;
  height: 120px;
  background: #ffffff;
  padding: 6px;
  border-radius: 10px;
  image-rendering: pixelated;
  display: block;
}
  width: 90px;
  height: 90px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  margin: 6px 0;
}

.server-mac-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

/* Movie Modal */
.movie-dialog {
  width: 760px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.movie-dialog-backdrop {
  height: 140px;
  background: linear-gradient(180deg, rgba(229, 160, 13, 0.15) 0%, var(--bg-surface) 100%);
}

.movie-dialog-content {
  padding: 0 32px 32px 32px;
  position: relative;
  margin-top: -60px;
}

.movie-info-wrap {
  display: flex;
  gap: 24px;
}

.movie-modal-poster {
  width: 150px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  border: 2px solid var(--border-card);
  object-fit: cover;
  flex-shrink: 0;
  background: #181b26;
}

.movie-details-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.movie-badges-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tag-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.tag-amber { background: var(--accent-soft); color: var(--accent); }
.tag-dark { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; }

.movie-modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.movie-modal-plot {
  font-size: 13.5px;
  color: var(--text-silver);
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
}

/* ============================================================
   RESPONSIVIDADE: DESKTOP COMPACTO, TABLET E MOBILE BROWSERS
============================================================ */
/* Smartphones / Tablets / TV Boxes em Landscape (inclui APK Android sensorLandscape - 1:1 Web) */
@media (max-width: 1060px) and (orientation: landscape), (max-height: 560px) and (orientation: landscape) {
  .tv-header {
    height: 42px;
    padding: 0 16px;
  }
  .brand-logo {
    font-size: 16px;
    padding: 2px 6px;
  }
  .server-title-pill {
    font-size: 15px;
  }
  .header-date-sub {
    font-size: 9.5px;
  }
  .header-right {
    gap: 6px;
  }
  .top-pill-btn {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }
  .top-icon-btn {
    width: 28px;
    height: 28px;
  }
  .tv-footer {
    height: 26px;
    padding: 0 14px;
    font-size: 10px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .footer-divider {
    margin: 0 8px;
    height: 11px;
    flex-shrink: 0;
  }
  .footer-segment {
    flex-shrink: 0;
  }
  .footer-brand-badge {
    font-size: 10px;
    flex-shrink: 0;
    padding-left: 10px;
  }

  /* Lobby 1:1 em Landscape Compacto (mesma grade 3 colunas Web!) */
  .dashboard-lobby {
    padding: 4px 16px;
    gap: 6px;
  }
  .hero-cards-grid {
    grid-template-columns: 31% 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .hero-card-tall .card-icon-box {
    width: 38px;
    height: 38px;
    margin-bottom: 5px;
  }
  .hero-card-tall .card-title {
    font-size: 15.5px;
  }
  .hero-card-std {
    padding: 4px 8px;
  }
  .hero-card-std .card-icon-box {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
  }
  .hero-card-std .card-title {
    font-size: 13px;
  }
  .hero-card-tall .card-subtitle, .hero-card-std .card-subtitle {
    font-size: 9.5px;
  }
  .dashboard-carousel-section {
    height: 94px;
    margin: 0;
  }
  .carousel-header-row {
    margin-bottom: 3px;
  }
  .carousel-header-title {
    font-size: 11px;
  }
  .carousel-card-item {
    width: 215px;
    height: 74px;
    border-radius: 10px;
  }
  .carousel-poster-thumb {
    width: 52px;
  }
  .carousel-body {
    padding: 5px 9px;
    gap: 2px;
  }
  .carousel-title {
    font-size: 11px;
  }
  .carousel-tag, .carousel-sub {
    font-size: 9px;
  }

  /* Barra Superior das Sub-views */
  .subview-top-bar {
    height: 40px;
    padding: 0 14px;
    gap: 10px;
  }
  .btn-back-pill {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    gap: 5px;
  }
  .subview-title-text {
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* TV AO VIVO: Mantém exatamente 3 Colunas (Categorias Esquerda | Canais Meio | Preview Direita) */
  .live-layout-3col {
    grid-template-columns: clamp(165px, 23vw, 225px) clamp(205px, 34vw, 300px) 1fr;
  }
  .live-col-cats, .live-col-channels, .catalog-sidebar {
    padding: 8px 10px;
    gap: 5px;
  }
  .search-box-wrap {
    margin-bottom: 6px;
  }
  .search-box-wrap svg {
    left: 10px;
    width: 14px;
    height: 14px;
  }
  .input-search-tv {
    height: 30px;
    font-size: 11.5px;
    padding: 0 10px 0 30px;
  }
  .quick-tabs-row {
    margin-bottom: 6px;
    gap: 6px;
  }
  .btn-quick-filter {
    height: 26px;
    font-size: 11px;
  }
  .cat-row-item {
    padding: 6px 9px;
    font-size: 11px;
    border-radius: 8px;
    gap: 5px;
  }
  .cat-pill-count {
    font-size: 9.5px;
    padding: 1px 6px;
    flex-shrink: 0;
  }
  .channel-row-item {
    min-height: 42px;
    padding: 0 9px;
    gap: 8px;
    border-radius: 9px;
  }
  .channel-logo-square {
    width: 26px;
    height: 26px;
  }
  .channel-name-txt {
    font-size: 11.5px;
  }
  .live-col-preview {
    padding: 8px 12px;
    gap: 8px;
  }
  .preview-player-box {
    max-height: 175px;
    border-radius: 10px;
  }
  .epg-info-card {
    padding: 9px 12px;
    border-radius: 10px;
  }

  /* FILMES & SÉRIES: Categorias SEMPRE à Esquerda e Capas à Direita! */
  .catalog-layout-split {
    grid-template-columns: clamp(170px, 25vw, 235px) 1fr;
  }
  .catalog-grid-area {
    padding: 10px 12px 44px 12px;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    grid-auto-rows: max-content;
    gap: 10px;
  }
  .catalog-poster-wrap {
    border-radius: 10px;
  }
  .catalog-item-title {
    font-size: 10.5px;
    margin-top: 4px;
  }

  /* Detalhes de Séries e Modais em Landscape Compacto */
  .series-detail-view {
    padding: 10px 16px 44px;
    gap: 10px;
  }
  .series-header-info {
    padding: 12px;
    gap: 12px;
  }
  .series-header-poster {
    width: 86px;
  }
  .episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
  }
  .episode-card {
    padding: 9px;
  }
  .settings-dialog, .server-dialog, .movie-dialog, .disclaimer-box {
    max-height: 92dvh;
    overflow-y: auto;
  }
}

/* Mobile Portrait Browser apenas (Web vertical estreito < 640px) */
@media (max-width: 639px) and (orientation: portrait) {
  .tv-header {
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
  }
  .header-center {
    order: 3;
    width: 100%;
    margin-top: 4px;
  }
  .dashboard-lobby {
    padding: 10px 14px;
    overflow-y: auto;
  }
  .hero-cards-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }
  .hero-card-tall {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 120px;
  }
  .hero-card-std {
    min-height: 92px;
  }
  .dashboard-carousel-section {
    height: auto;
    min-height: 110px;
  }
  .carousel-card-item {
    width: 240px;
    height: 90px;
  }
  .tv-footer {
    padding: 6px 14px;
    font-size: 10.5px;
    flex-wrap: wrap;
    height: auto;
    gap: 6px;
  }
  .footer-divider {
    margin: 0 6px;
  }
  /* Mesmo em celular vertical, Filmes & Séries mantém categorias à esquerda */
  .catalog-layout-split {
    grid-template-columns: 136px 1fr;
  }
  .catalog-sidebar {
    padding: 8px;
  }
  .catalog-grid-area {
    padding: 10px 10px 60px;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-rows: max-content;
    gap: 10px;
  }
  .live-layout-3col {
    grid-template-columns: 145px 1fr;
    grid-template-rows: 1fr auto;
  }
  .live-col-cats, .live-col-channels {
    padding: 8px;
  }
  .live-col-preview {
    grid-column: 1 / -1;
    max-height: 200px;
    padding: 8px;
  }
}

.store-mode-activation-banner {
  background: rgba(229, 160, 13, 0.12);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.store-mode-activation-banner:focus, .store-mode-activation-banner:hover {
  background: rgba(229, 160, 13, 0.22);
  outline: none;
}

/* ============================================================
   TELA OFICIAL DE ATIVAÇÃO NAZZA PLAY
============================================================ */
.activation-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 20% 30%, #161a29 0%, #0c0d12 70%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 999;
  padding: clamp(14px, 3vh, 36px);
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.activation-container {
  max-width: 1100px;
  width: 100%;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.5vh, 26px);
}

.activation-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activation-brand {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.activation-brand span {
  color: var(--accent);
}

.activation-badge-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  text-transform: uppercase;
}

.activation-desc {
  font-size: clamp(12.5px, 1.2vw, 14.5px);
  color: var(--text-silver);
  margin: 0;
  max-width: 780px;
  line-height: 1.5;
}

.activation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 28px);
  align-items: stretch;
}

.activation-qr-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--accent);
  box-shadow: 0 12px 36px rgba(229, 160, 13, 0.12);
  border-radius: 20px;
  padding: clamp(16px, 2.5vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.qr-box-wrap {
  width: clamp(170px, 22vw, 220px);
  height: clamp(170px, 22vw, 220px);
  background: #ffffff;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.activation-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}

.activation-keys {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
}

.key-label {
  color: var(--text-silver);
  font-weight: 600;
}

.key-val {
  color: #fff;
  font-weight: 800;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.activation-url-hint {
  font-size: 12px;
  color: var(--text-silver);
}

.activation-url-hint b {
  color: var(--accent);
}

.activation-radar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #10b981;
}

.radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-green 1.6s infinite ease-in-out;
}

@keyframes pulse-green {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.activation-actions-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.action-card-highlight, .action-card-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: clamp(16px, 2.5vw, 24px);
  display: flex;
  gap: 16px;
}

.action-card-highlight {
  border-color: rgba(229, 160, 13, 0.3);
  background: linear-gradient(145deg, #161924, #10121a);
}

.action-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-card-content h3 {
  margin: 0 0 6px;
  font-size: clamp(15px, 1.4vw, 18px);
  color: #fff;
  font-weight: 700;
}

.action-card-content p {
  margin: 0;
  font-size: clamp(12px, 1vw, 13px);
  color: var(--text-silver);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .activation-grid {
    grid-template-columns: 1fr;
  }
  .qr-box-wrap {
    width: clamp(176px, 46vw, 210px);
    height: clamp(176px, 46vw, 210px);
  }
  .activation-brand {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Modal Confirmacao de Saida do App */
.exit-confirm-box {
  width: min(460px, 92vw);
  background: #141720;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 18px;
  padding: 28px 26px;
  text-align: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.88);
}

.exit-confirm-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin: 0 auto 14px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exit-confirm-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.exit-confirm-box p {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.5;
  color: #9ca3af;
}

.exit-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.exit-confirm-actions .btn-tv-pill {
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.dpad-hint-bar {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.2px;
}

.dpad-hint-bar b {
  color: #f59e0b;
}

/* Preview nativo hardware standby (Android TV Live 3-Col sem decoder JS em segundo plano) */
.preview-native-standby {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: radial-gradient(circle at center, #1b1f2c 0%, #0d0f15 100%);
}

.preview-native-logo {
  max-width: 120px;
  max-height: 76px;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 10px;
}

.preview-native-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(229, 160, 13, 0.16);
  border: 1px solid rgba(229, 160, 13, 0.45);
  color: #f59e0b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

/* Otimizacoes de GPU e Compositing para Android TV / TV Box (60 FPS liso) */
body.platform-android #splash-screen,
body.platform-android #sync-overlay,
body.platform-android .modal-backdrop,
body.platform-android .player-loading-overlay,
body.platform-android .player-tracks-popup,
body.platform-android .player-channel-drawer {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.platform-android .modal-backdrop {
  background: rgba(8, 9, 14, 0.94);
}

body.platform-android .channel-row-item,
body.platform-android .catalog-item-card,
body.platform-android .carousel-card-item,
body.platform-android .episode-card {
  contain: layout style;
  transition: border-color 0.06s linear, background-color 0.06s linear;
}

body.platform-android .tv-focusable:focus,
body.platform-android .tv-focusable.is-focused {
  transform: none !important;
  box-shadow: 0 0 0 2px #f59e0b !important;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* ==========================================================================
   AUTO-AJUSTE HARDWARE 1GB RAM (Amlogic S905X / TV Box Low-RAM)
   Desativa blur pesado e sombras caras de GPU mantendo visual idêntico a 60fps
   ========================================================================== */
body.hardware-constrained *,
body.hardware-constrained *::before,
body.hardware-constrained *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition-duration: 0.06s !important;
}
body.hardware-constrained .modal-backdrop {
  background: rgba(8, 10, 15, 0.94) !important;
}
body.hardware-constrained .vod-card,
body.hardware-constrained .live-channel-item {
  box-shadow: none !important;
  will-change: auto !important;
}
