/* =========================================================
   Synapps-TV — estilos do app
   Linguagem visual: billboard + fileiras com zoom no hover,
   modal de detalhes e player em tela cheia.
   ========================================================= */
:root {
  --marca: #e50914;
  --marca-escura: #b20710;
  --fundo: #0a0a0c;
  --superficie: #16161a;
  --texto-fraco: #a3a3a3;
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background: var(--fundo); color: #fff; overflow-x: hidden; }
body.travado { overflow: hidden; }

.font-display { font-family: 'Instrument Serif', serif; }
::-webkit-scrollbar { width: 0; height: 0; }
.no-bar { scrollbar-width: none; -ms-overflow-style: none; }
.no-bar::-webkit-scrollbar { display: none; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- botões ---------- */
.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 24px; border-radius: 6px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; transition: background .2s ease, opacity .2s ease, transform .2s ease;
}
.bt-branco { background: #fff; color: #000; }
.bt-branco:hover { background: rgba(255,255,255,.78); }
.bt-cinza { background: rgba(109,109,110,.7); color: #fff; }
.bt-cinza:hover { background: rgba(109,109,110,.45); }
.bt-marca { background: var(--marca); color: #fff; }
.bt-marca:hover { background: var(--marca-escura); }
.bt-circulo {
  height: 42px; width: 42px; padding: 0; border-radius: 999px; display: inline-grid; place-items: center;
  background: rgba(42,42,42,.65); border: 2px solid rgba(255,255,255,.45); color: #fff; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.bt-circulo:hover { border-color: #fff; background: rgba(255,255,255,.18); }
.bt-circulo.ativo { background: #fff; color: #000; border-color: #fff; }

/* ---------- topo ---------- */
#topo { transition: background-color .35s ease, backdrop-filter .35s ease; }
#topo.solido { background: rgba(8,8,10,.94); backdrop-filter: blur(10px); }
.aba-link { position: relative; font-size: 14px; color: #e5e5e5; transition: color .2s ease; }
.aba-link:hover { color: #b3b3b3; }
.aba-link.ativa { color: #fff; font-weight: 600; }
.aba-link.ativa::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--marca);
}

/* ---------- billboard ---------- */
.billboard { height: min(88vh, 860px); min-height: 520px; }
.billboard-img { animation: zoomLento 22s ease-out both; }
@keyframes zoomLento { from { transform: scale(1.06); } to { transform: scale(1); } }
.fade-troca { animation: fadeTexto .7s ease both; }
@keyframes fadeTexto { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- fileiras ---------- */
.fileira { position: relative; }
.fileira-trilho { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; padding: 0 clamp(16px, 4vw, 60px) 0; }
.fileira-seta {
  position: absolute; top: 0; bottom: 34px; width: clamp(28px, 4vw, 56px); z-index: 20;
  display: grid; place-items: center; background: rgba(8,8,10,.55); border: none; color: #fff;
  cursor: pointer; opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.fileira:hover .fileira-seta { opacity: 1; }
.fileira-seta:hover { background: rgba(8,8,10,.82); }
.fileira-seta.esq { left: 0; } .fileira-seta.dir { right: 0; }

/* cartão com zoom, no estilo das fileiras de streaming */
.cartao { position: relative; flex: 0 0 auto; width: clamp(140px, 15vw, 205px); cursor: pointer; }
.cartao-capa {
  position: relative; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; background: #1c1c20;
  transition: transform .34s cubic-bezier(.2,.8,.2,1), box-shadow .34s ease;
}
.cartao-capa img { width: 100%; height: 100%; object-fit: cover; }
.cartao:hover { z-index: 30; }
.cartao:hover .cartao-capa { transform: scale(1.14); box-shadow: 0 26px 60px -18px rgba(0,0,0,.95); }
.cartao-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 55%, transparent 100%);
  opacity: 0; transform: translateY(6px); transition: opacity .28s ease, transform .28s ease;
}
.cartao:hover .cartao-info { opacity: 1; transform: none; }
.cartao-legenda { margin-top: 8px; font-size: 12.5px; color: var(--texto-fraco); }
.selo {
  position: absolute; top: 7px; left: 7px; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 5px; border-radius: 3px; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.35);
}
.selo-tipo { left: auto; right: 7px; border-color: transparent; background: var(--marca); }
.barra-progresso { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.3); }
.barra-progresso span { display: block; height: 100%; background: var(--marca); }

/* Top 10 com o numeral gigante */
.cartao-top { width: clamp(220px, 23vw, 320px); display: flex; align-items: flex-end; gap: 2px; }
.numeral {
  font-family: 'Instrument Serif', serif; font-size: clamp(88px, 11vw, 150px); line-height: .78;
  color: #0a0a0c; -webkit-text-stroke: 3px #5b5b60; padding-bottom: 6px; user-select: none; flex: 0 0 auto;
}
.cartao-top .cartao-capa { width: clamp(118px, 12vw, 165px); }

/* grade (abas Filmes/Séries/Minha lista/busca) */
.grade { display: grid; gap: 14px 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* ---------- ao vivo / EPG ---------- */
.epg-linha { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
@media (max-width: 720px) { .epg-linha { grid-template-columns: 120px 1fr; gap: 10px; } }
.epg-canal { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.epg-logo { width: 54px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.epg-agora { display: flex; gap: 12px; align-items: center; min-width: 0; }

/* ---------- modal ---------- */
#modal { transition: opacity .28s ease; }
#modal .caixa { animation: subir .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes subir { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }
.episodio { display: grid; grid-template-columns: 26px 150px 1fr; gap: 14px; align-items: center; padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.08); cursor: pointer; transition: background .2s ease; }
.episodio:hover { background: rgba(255,255,255,.06); }
@media (max-width: 640px) { .episodio { grid-template-columns: 20px 110px 1fr; gap: 10px; } }

/* ---------- player ---------- */
#player { background: #000; transition: opacity .3s ease; }
#player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
#player.sem-controles .controles { opacity: 0; pointer-events: none; }
#player.sem-controles { cursor: none; }
.controles { transition: opacity .25s ease; }
.trilha-tempo { position: relative; height: 4px; background: rgba(255,255,255,.3); border-radius: 999px; cursor: pointer; }
.trilha-tempo:hover { height: 7px; }
.trilha-tempo .preenchido { position: absolute; inset: 0 auto 0 0; background: var(--marca); border-radius: 999px; }
.trilha-tempo .bolinha { position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; border-radius: 999px; background: var(--marca); transform: translateY(-50%); opacity: 0; transition: opacity .2s ease; }
.trilha-tempo:hover .bolinha { opacity: 1; }
.menu-player { position: absolute; bottom: 58px; right: 0; min-width: 190px; background: rgba(18,18,20,.97); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 6px; }
.menu-player button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: #d4d4d4; background: none; border: none; cursor: pointer; text-align: left; }
.menu-player button:hover { background: rgba(255,255,255,.1); color: #fff; }
.menu-player button.marcado { color: #fff; font-weight: 600; }

/* ---------- perfis ---------- */
.perfil { cursor: pointer; text-align: center; }
.perfil-avatar { width: clamp(88px, 11vw, 132px); aspect-ratio: 1; border-radius: 8px; overflow: hidden; display: grid; place-items: center; border: 3px solid transparent; transition: border-color .2s ease, transform .2s ease; }
.perfil:hover .perfil-avatar { border-color: #fff; transform: scale(1.04); }
.perfil:hover .perfil-nome { color: #fff; }
.perfil-nome { margin-top: 12px; font-size: 14px; color: #808080; transition: color .2s ease; }

/* ---------- diversos ---------- */
@keyframes brilho { 0% { background-position: -460px 0; } 100% { background-position: 460px 0; } }
.esqueleto { background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.10) 37%, rgba(255,255,255,.04) 63%); background-size: 920px 100%; animation: brilho 1.6s infinite linear; border-radius: 6px; }
.ponto-vivo { width: 7px; height: 7px; border-radius: 999px; background: var(--marca); box-shadow: 0 0 0 0 rgba(229,9,20,.7); animation: pulsar 1.8s infinite; }
@keyframes pulsar { 0% { box-shadow: 0 0 0 0 rgba(229,9,20,.7); } 70% { box-shadow: 0 0 0 7px rgba(229,9,20,0); } 100% { box-shadow: 0 0 0 0 rgba(229,9,20,0); } }
.recorte-1, .recorte-2, .recorte-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.recorte-1 { -webkit-line-clamp: 1; } .recorte-2 { -webkit-line-clamp: 2; } .recorte-3 { -webkit-line-clamp: 3; }
.aparecer { animation: fadeTexto .6s ease both; }
.sumindo { opacity: 0 !important; }
