/* ===== ZENITH4K Player — UI para TV (1920x1080) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 1920px; height: 1080px; overflow: hidden;
  background: #0a0a0f; color: #fff;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  user-select: none;
}
.brand, .brand-sm { font-weight: 800; letter-spacing: 1px; }
.brand span, .brand-sm span { color: #19c37d; }
.brand { font-size: 64px; }
.brand-sm { font-size: 34px; }
.logo-big { height: 150px; margin: 0 auto 6px; display: block; }
.logo-sm { height: 64px; display: block; }

/* Telas */
.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: block; }

/* ---- Login ---- */
#screen-login { display: none; align-items: center; justify-content: center; }
#screen-login.active { display: flex; }
.login-box {
  width: 560px; padding: 56px; border-radius: 24px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.login-sub { margin: 12px 0 28px; opacity: .7; font-size: 24px; }
.field {
  display: block; width: 100%; margin: 0 0 18px;
  padding: 20px 22px; font-size: 26px; color: #fff;
  background: #15151d; border: 2px solid #26263a; border-radius: 14px; outline: none;
}
.field:focus { border-color: #19c37d; }
.btn {
  width: 100%; padding: 20px; margin-top: 10px;
  font-size: 26px; font-weight: 700; color: #04130c;
  background: #19c37d; border: none; border-radius: 14px; cursor: pointer;
}
.msg { margin-top: 18px; min-height: 28px; font-size: 22px; color: #ff6b6b; }

/* ---- Escolha de avatar ---- */
#screen-avatar { display: none; align-items: center; justify-content: center; background: #0a0a0f; }
#screen-avatar.active { display: flex; }
.avatar-box { width: 1100px; max-width: 92%; text-align: center; }
.avatar-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 30px; margin-top: 36px; justify-items: center;
}
.avatar-pick {
  width: 150px; height: 150px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 84px; line-height: 1; cursor: pointer;
  border: 5px solid transparent; box-sizing: border-box;
}
.avatar-pick.focused { border-color: #19c37d; box-shadow: 0 0 0 4px rgba(25,195,125,.25); }
/* avatar escolhido, mostrado no topo do login (clicável p/ trocar) */
.login-avatar {
  width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 84px; line-height: 1; cursor: pointer;
  border: 4px solid transparent;
}
.login-avatar.focused { border-color: #19c37d; box-shadow: 0 0 0 4px rgba(25,195,125,.25); }

/* ---- Guia de programação (EPG) ---- */
.guide-wrap { display: flex; height: calc(1080px - 110px); }
.guide-chans { width: 620px; overflow-y: auto; padding: 16px; border-right: 1px solid rgba(255,255,255,.08); }
.guide-chan {
  padding: 16px 20px; margin-bottom: 8px; border-radius: 12px;
  background: #14141d; border: 3px solid transparent; cursor: pointer;
}
.guide-chan.focused { border-color: #19c37d; background: #16201b; }
.gc-name { font-size: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-now { font-size: 19px; opacity: .6; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-progs { flex: 1; overflow-y: auto; padding: 24px 32px; }
.guide-head { font-size: 30px; font-weight: 700; margin-bottom: 14px; color: #19c37d; }
.guide-desc { position: sticky; top: 0; z-index: 1; background: #14141d; border-radius: 12px; padding: 18px 22px; margin-bottom: 16px; min-height: 96px; }
.gd-title { font-size: 25px; font-weight: 700; }
.gd-time { font-size: 20px; opacity: .55; font-weight: 400; margin-left: 8px; }
.gd-desc { font-size: 20px; opacity: .78; margin-top: 8px; line-height: 1.45; }
.guide-prog { display: flex; align-items: center; gap: 22px; padding: 16px 18px; border-radius: 10px; border: 3px solid transparent; cursor: pointer; }
.guide-prog.now { background: rgba(25,195,125,.12); }
.guide-prog.focused { border-color: #19c37d; background: rgba(25,195,125,.18); }
.gp-time { font-size: 23px; font-weight: 700; opacity: .85; min-width: 70px; }
.gp-title { font-size: 23px; flex: 1; }
.gp-live { font-size: 18px; color: #19c37d; font-weight: 700; white-space: nowrap; }
.guide-loading { padding: 40px; font-size: 24px; opacity: .6; }

/* ---- Minhas Listas ---- */
.lists-wrap { padding: 36px 56px; height: calc(1080px - 110px); overflow-y: auto; }
.list-card {
  display: flex; align-items: center; gap: 20px;
  background: #14141d; border: 3px solid transparent; border-radius: 16px;
  padding: 22px 28px; margin: 0 auto 18px; max-width: 1180px;
}
.list-card.active-list { border-color: rgba(25,195,125,.45); background: #16201b; }
.list-info { flex: 1; min-width: 0; }
.list-name { font-size: 30px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 20px; opacity: .55; margin-top: 4px; }
.list-tag { font-size: 18px; color: #19c37d; margin-left: 12px; }
.list-actions { display: flex; gap: 12px; flex-shrink: 0; }
.list-btn {
  font-size: 23px; padding: 13px 22px; border-radius: 12px; cursor: pointer; color: #fff;
  background: #1c1c28; border: 3px solid transparent;
}
.list-btn.enter { background: #19c37d; color: #04130c; font-weight: 700; }
.list-btn.del { background: #3a1c20; }
.lists-empty { text-align: center; opacity: .6; font-size: 26px; margin-top: 90px; line-height: 1.6; }

/* ---- Topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  height: 110px; padding: 0 56px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.topbar h2 { font-size: 34px; font-weight: 600; }
.user-chip { margin-left: auto; font-size: 22px; opacity: .7; }
.list-total { font-size: 22px; opacity: .6; margin-left: 18px; white-space: nowrap; }
.back { font-size: 26px; color: #fff; background: #1c1c28; border: 2px solid transparent; border-radius: 12px; padding: 12px 24px; cursor: pointer; }

/* ---- Home menu ---- */
#screen-home { background: #000312; }   /* fundo original da arte */
.home-menu {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; padding: 40px 56px;
}
.tile {
  height: 300px; width: fit-content; margin: 0 auto; box-sizing: border-box;
  border-radius: 18px; cursor: pointer;
  background: transparent; border: 4px solid transparent; color: #fff;
  display: flex; align-items: center; justify-content: center; padding: 0; overflow: visible;
}
.tile-img { height: 100%; width: auto; object-fit: contain; display: block; border-radius: 14px; }
/* UM ÚNICO cursor: só o anel no botão (que agora é do tamanho do ícone) */
.tile.focused { border-color: transparent !important; box-shadow: 0 0 0 4px #19c37d, 0 0 22px rgba(25,195,125,.5) !important; }
/* "Continuar" (sem imagem própria) — linha própria, CENTRALIZADO no meio */
.tile.cont {
  grid-column: 1 / -1; width: 230px; height: 210px; margin: 8px auto 0;
  background: linear-gradient(180deg, #0b1d3d 0%, #03081a 100%);
  flex-direction: column; gap: 14px;
}
.tile.cont i { font-size: 84px; font-style: normal; }
.tile.cont span { font-size: 28px; font-weight: 600; }

/* ---- Listagem ---- */
.list-wrap { display: flex; height: calc(1080px - 110px); }
.cats { width: 460px; overflow-y: auto; padding: 20px; border-right: 1px solid rgba(255,255,255,.07); }
.cat {
  padding: 20px 24px; margin-bottom: 10px; font-size: 25px; border-radius: 12px;
  background: #14141d; border: 3px solid transparent; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat.selected { background: #1d2b24; }
.items { flex: 1; overflow-y: auto; padding: 28px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; align-content: start; }
.card {
  background: #14141d; border: 4px solid transparent; border-radius: 16px;
  overflow: hidden; cursor: pointer; height: 360px; display: flex; flex-direction: column;
}
.card .poster { flex: 1; background: #0e0e16 center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 46px; }
.card .cap { padding: 14px; font-size: 21px; line-height: 1.25; height: 92px; overflow: hidden; }

/* Foco do controle remoto */
.focusable.focused, [data-focus].focused { border-color: #19c37d !important; box-shadow: 0 0 0 4px rgba(25,195,125,.25); }
.field.focused { border-color: #19c37d; }
.cat.focused { border-color: #19c37d; }

/* ---- Player ---- */
.player-screen { background: #000; }
/* modo player NATIVO (Android/ExoPlayer): deixa transparente p/ o vídeo de hardware aparecer atrás */
html.native-player, body.native-player { background: transparent !important; }
body.native-player #screen-player { background: transparent !important; }
body.native-player #html-player, body.native-player #av-player { display: none !important; }
/* moldura fina ao redor da imagem reproduzida */
.player-screen::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  pointer-events: none; z-index: 5;
}
#av-player { position: absolute; inset: 0; }
#html-player {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;            /* mantém a proporção e centraliza a imagem */
  object-position: center center;
  background: #000; display: none;
}
.player-screen.html #html-player { display: block; }
.player-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px; z-index: 10;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); transition: opacity .3s;
}
.player-overlay.hidden { opacity: 0; }
.po-title { font-size: 40px; font-weight: 700; margin-bottom: 8px; }
.po-epg { font-size: 24px; color: #19c37d; margin-bottom: 16px; min-height: 28px; }
.po-controls { display: flex; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.pbtn {
  min-width: 120px; padding: 16px 18px; border-radius: 14px; cursor: pointer;
  background: rgba(28,28,40,.9); color: #fff; border: 3px solid transparent;
  font-size: 34px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pbtn span { font-size: 18px; opacity: .85; }
.pbtn.focused { border-color: #19c37d; background: #1d2b24; }
.pbtn.active-fav { color: #ffd166; }
.po-hint { font-size: 22px; opacity: .7; }
/* estrela de favorito nos cards */
.card .fav-star { position: absolute; top: 10px; right: 12px; font-size: 30px; color: #ffd166; text-shadow: 0 1px 4px #000; }
.card { position: relative; }
/* tela de carregamento do canal (fundo preto + logo) */
.player-poster { position: absolute; inset: 0; z-index: 8; background: #000; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.player-poster.show { display: flex; }
.player-poster img { max-width: 520px; max-height: 300px; object-fit: contain; }
.player-poster img[src=""], .player-poster img:not([src]) { display: none; }
.player-poster .ppn { font-size: 34px; font-weight: 600; opacity: .9; }
.loader { position: absolute; inset: 0; z-index: 9; display: none; align-items: center; justify-content: center; font-size: 30px; }
.loader.show { display: flex; }

/* ---- Busca (teclado na tela) ---- */
.search-q { margin-left: auto; min-width: 480px; max-width: 900px; padding: 12px 22px; font-size: 28px;
  background: #15151d; border: 2px solid #26263a; border-radius: 12px; min-height: 56px; overflow: hidden; white-space: nowrap; }
.search-wrap { display: flex; height: calc(1080px - 110px); }
.kb { width: 760px; padding: 24px; display: flex; flex-wrap: wrap; gap: 14px; align-content: start; border-right: 1px solid rgba(255,255,255,.07); }
.key { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; font-size: 32px;
  background: #14141d; border: 3px solid transparent; border-radius: 12px; cursor: pointer; }
.key.wide { width: 182px; font-size: 24px; }
.key.focused { border-color: #19c37d; background: #1d2b24; }
.search-results { flex: 1; overflow-y: auto; padding: 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-content: start; }

/* ---- Configurações ---- */
.settings-wrap { padding: 40px 56px; max-width: 1100px; }
.set-row {
  display: flex; align-items: center; gap: 24px;
  padding: 28px 32px; margin-bottom: 18px; border-radius: 16px;
  background: #14141d; border: 4px solid transparent; cursor: pointer;
}
.set-row.focused { border-color: #19c37d; }
.set-label { font-size: 28px; }
.set-desc { font-size: 19px; opacity: .55; margin-top: 6px; }
.set-value { margin-left: auto; font-size: 26px; font-weight: 700; color: #19c37d; }
.set-value .off { color: #ff6b6b; }

/* ---- Modal de senha ---- */
.modal { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.7); z-index: 50; }
.modal.show { display: flex; }
.modal-box { width: 480px; padding: 48px; border-radius: 20px; background: #15151d; border: 1px solid #2c2c40; text-align: center; }
.modal-title { font-size: 30px; margin-bottom: 24px; }
.pin-field { text-align: center; letter-spacing: 16px; font-size: 40px; }
.modal-actions { display: flex; gap: 16px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.btn.ghost { background: #1c1c28; color: #fff; }

/* Toast */
.toast {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
  background: #1c1c28; padding: 18px 32px; border-radius: 14px; font-size: 24px;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.toast.show { opacity: 1; }
