/* TV Saudável — pensado para navegador de TV fraco: sem grid, sem variáveis CSS, sem sombras pesadas.
   O tamanho de 1rem é calculado no JS a partir da largura da tela. */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0e1216;
  color: #e9edf1;
  font-family: "Segoe UI", Roboto, "LG Smart UI", "SamsungOne", Arial, Helvetica, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.oculto { display: none !important; }

svg { display: block; width: 100%; height: 100%; }

#app { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }

/* ---------- topo ---------- */

#topo {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4.4rem;
}

#marca {
  position: absolute;
  left: 1.5rem;
  top: 1.25rem;
  height: 1.9rem;
  line-height: 1.9rem;
  font-size: 1rem;
  font-weight: bold;
  white-space: nowrap;
}
#marca img { width: 1.9rem; height: 1.9rem; vertical-align: top; margin-right: 0.5rem; }

.bt-topo {
  position: absolute;
  top: 1.05rem;
  height: 2.3rem;
  line-height: 2.3rem;
  padding: 0 1.1rem 0 0.8rem;
  border-radius: 1.15rem;
  background: #1c232b;
  color: #cfd6dd;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
}
.bt-topo svg { display: inline-block; width: 1.2rem; height: 1.2rem; margin-right: 0.4rem; vertical-align: -0.2rem; }
.bt-topo.redondo { width: 2.3rem; padding: 0; }
.bt-topo.redondo svg { width: 1.3rem; height: 1.3rem; margin: 0.5rem; vertical-align: top; }
.bt-topo.foco { background: #ffd23f; color: #111; }

#bt-canais { left: 1.5rem; }
#bt-config { right: 1.5rem; }

#titulo-canal {
  position: absolute;
  left: 9.8rem;
  right: 10rem;
  top: 1.05rem;
  height: 2.3rem;
  line-height: 2.3rem;
  font-size: 1.1rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#titulo-canal img, #titulo-canal .letra {
  display: inline-block;
  width: 2.1rem;
  height: 2.1rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  vertical-align: middle;
  background: #2a333d;
}
.letra { text-align: center; color: #fff; font-weight: bold; }
#titulo-canal .letra { line-height: 2.1rem; font-size: 1rem; }

#relogio {
  position: absolute;
  right: 4.6rem;
  top: 1.05rem;
  line-height: 2.3rem;
  font-size: 1rem;
  color: #8b98a5;
}


/* ---------- grade ---------- */

#grade {
  position: absolute;
  top: 4.4rem;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}
#grade-trilho { position: absolute; top: 0; left: 0; right: 0; }

.card { position: absolute; cursor: pointer; }
.card .th {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 0.45rem;
  overflow: hidden;
  background: #1c232b;
}
.card .th img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.card .dur {
  position: absolute;
  right: 0.4rem;
  bottom: 0.45rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 0.7rem;
}
.card .visto {
  position: absolute;
  left: 0.4rem;
  top: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.75);
  color: #9fe0b8;
  font-size: 0.65rem;
}
.card .prog { position: absolute; left: 0; bottom: 0; height: 0.22rem; background: #e53935; }
.card .tt {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #d9dfe5;
}
.card .mt {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: #8b98a5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card.foco .th { box-shadow: 0 0 0 0.2rem #ffd23f; }
.card.foco .tt { color: #fff; }

.ccard {
  position: absolute;
  cursor: pointer;
  border-radius: 0.8rem;
  background: #161c22;
  text-align: center;
}
.ccard .cav {
  margin: 1.1rem auto 0.8rem;
  border-radius: 50%;
  overflow: hidden;
  background: #2a333d;
}
.ccard .cav img { display: block; width: 100%; height: 100%; }
.ccard .cav .letra { display: block; width: 100%; height: 100%; }
.ccard .cn {
  margin: 0 0.8rem;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ccard .cq { margin-top: 0.25rem; font-size: 0.75rem; color: #8b98a5; }
.ccard .novo {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.1rem 0.5rem;
  border-radius: 0.6rem;
  background: #ffd23f;
  color: #111;
  font-size: 0.7rem;
  font-weight: bold;
}
.ccard.foco { background: #232b33; box-shadow: 0 0 0 0.2rem #ffd23f; }

#aviso {
  position: absolute;
  top: 45%;
  left: 10%;
  right: 10%;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #b8c2cc;
}
#aviso b { color: #fff; }

/* ---------- player ---------- */

#player {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 10;
}
#yt-caixa, #yt { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

#tampa { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 2; }
#tampa-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  opacity: 0.3;
}
#tampa-meio {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 30%;
  text-align: center;
}
#tampa-icone { width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; color: #fff; }
#tampa-msg { font-size: 1.3rem; line-height: 1.4; }

.giro {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0.55rem;
  border-radius: 50%;
  border: 0.35rem solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  box-sizing: border-box;
  -webkit-animation: giro 0.9s linear infinite;
  animation: giro 0.9s linear infinite;
}
@-webkit-keyframes giro { to { -webkit-transform: rotate(360deg); } }
@keyframes giro { to { transform: rotate(360deg); } }

/* Por cima do vídeo: nenhum clique chega ao YouTube (logo, cards de fim, sugestões) */
#escudo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 3; background: rgba(0, 0, 0, 0); }

#sair {
  position: absolute;
  top: 1.2rem;
  left: 1.5rem;
  z-index: 5;
  padding: 0.45rem 1rem;
  border-radius: 1.2rem;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
  cursor: pointer;
}

#barra {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 3rem 2.5rem 1.3rem;
  background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.88));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.88));
}
#barra-titulo { font-size: 1.3rem; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#barra-canal { margin-top: 0.2rem; font-size: 0.85rem; color: #b8c2cc; }
#barra-linha { position: relative; height: 0.3rem; margin: 0.8rem 0 0.55rem; background: rgba(255, 255, 255, 0.25); border-radius: 0.15rem; overflow: hidden; }
#barra-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #e53935; }
#barra-rodape { font-size: 0.8rem; color: #b8c2cc; overflow: hidden; }
#barra-dica { float: right; }

#player.sem-barra #barra, #player.sem-barra #sair { display: none; }

#fim {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 60%;
  z-index: 6;
  text-align: center;
}
#fim .prox { margin-bottom: 1rem; font-size: 0.95rem; color: #b8c2cc; }
.bt {
  display: inline-block;
  margin: 0 0.4rem 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: 0.6rem;
  background: #1c232b;
  color: #e9edf1;
  font-size: 1rem;
  cursor: pointer;
}
.bt.foco { background: #ffd23f; color: #111; }
