:root {
  --bg: #070b14;
  --bg-2: #10182a;
  --primary: #000c66;
  --accent: #ffe14a;
  --secondary: #3dd68c;
  --text: #f4f7fb;
  --muted: #9aa6bd;
  --danger: #ff6b7a;
  --card: #162033;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-size: 1.15vw;
  font-size: clamp(16px, 1.15vw, 22px);
}

body { overflow: hidden; }

button, input { font: inherit; color: inherit; }

button {
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
}

button:focus, input:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.tv-mode, .tv-mode * { cursor: none; }

#app { height: 100%; }

.wordmark {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.6rem;
}

.wordmark span { color: var(--accent); }
.wordmark.small { font-size: 1.15rem; margin: 0.2rem 0 1rem; }

.splash, .login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 4vh 6vw;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(0, 12, 102, 0.72), transparent 70%),
    var(--bg);
}

.splash { text-align: center; gap: 1rem; }
.splash p, .login-copy p { color: var(--muted); }

.spinner {
  width: 42px;
  height: 42px;
  margin: 1rem auto 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login {
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.1fr);
  gap: 4vw;
  align-items: center;
}

.provider { color: var(--accent); font-weight: 700; }
.login h1, .page-head h1, .hero h1, .detail h1 { margin: 0.2rem 0; font-size: 2rem; }
.error, .toast, .login-copy .error { color: var(--danger); }

.login-board { width: 100%; max-width: 920px; }
.field {
  width: 100%;
  text-align: left;
  margin-bottom: 0.6rem;
  padding: 0.7rem 1rem;
  background: #0c1322;
}
.field span { display: block; color: var(--muted); font-size: 0.8rem; }
.field strong { display: block; min-height: 1.4rem; font-size: 1.2rem; }
.field.on { border-color: var(--accent); }
.provider-toggle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
  padding: 0.55rem 1rem;
  background: #0c1322;
  font-weight: 600;
}
.provider-toggle .switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: none;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
}
.provider-toggle .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}
.provider-toggle.on .switch { background: var(--accent); }
.provider-toggle.on .switch::after { left: 23px; background: #070b14; }

.keyboard { margin-top: 0.8rem; }
.key-row { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; }
.key { flex: 1; min-width: 0; min-height: 52px; padding: 0.4rem; }
.login-actions { display: flex; gap: 0.8rem; margin-top: 0.8rem; }
.login-actions button, .account button, .search-bar button, .cta {
  background: var(--primary);
  min-height: 56px;
  padding: 0.6rem 1.2rem;
  font-weight: 700;
}
.ghost { background: transparent; border-color: rgba(255,255,255,0.25); }

.activate {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 4vh 8vw;
  text-align: center;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(0, 12, 102, 0.72), transparent 70%),
    var(--bg);
}
.activate h1 { margin: 0.6rem 0 0; font-size: 2.2rem; }
.activate > p, .activate-main > p { max-width: 780px; color: var(--muted); margin: 0; }
.activate .error { color: var(--danger); }
.activate .hint { font-size: 0.85rem; margin-top: 0.4rem; }
.device-code {
  margin: 1.2rem 0 0.4rem;
  padding: 1.2rem 2.6rem;
  border-radius: 18px;
  background: #0c1322;
  border: 2px solid var(--accent);
}
.device-code span, .device-code em { display: block; color: var(--muted); font-size: 0.9rem; font-style: normal; }
.device-code strong {
  display: block;
  margin: 0.4rem 0;
  font-size: 3rem;
  letter-spacing: 0.08em;
  font-family: Consolas, "Courier New", monospace;
  color: var(--accent);
}
.login-device { display: inline-block; padding: 0.9rem 1.4rem; }
.login-device strong { font-size: 1.9rem; }
.login-device em { font-size: 0.8rem; }
.license-note { color: var(--accent) !important; font-weight: 600; margin: 0.3rem 0 0; }

.shell { display: grid; grid-template-columns: 250px 1fr; height: 100%; }
aside {
  padding: 1.4rem 1rem;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.nav-btn { text-align: left; padding: 0.75rem 0.9rem; background: transparent; }
.nav-btn.active { background: rgba(255,255,255,0.08); }
.side-meta { margin-top: auto; color: var(--muted); font-size: 0.8rem; }
main { overflow: auto; padding: 1.4rem 1.6rem 3rem; }

.hero, .page-head, .detail-hero, .home-top { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-end; }
.home-top { align-items: center; margin-bottom: 0.4rem; }
.home-top p { margin: 0.15rem 0; color: var(--muted); }
.section-title {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.35rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.05rem;
}
.rail.posters { align-items: flex-start; }
.rail.posters .card { width: 168px; flex: none; }
.rail.posters .card:focus { transform: scale(1.06); z-index: 2; }
.game {
  width: 188px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.65rem 0.85rem;
  background: #1a2233;
  text-align: center;
}
.game:focus { transform: scale(1.05); }
.game .badge { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; }
.game .badge.on-air { color: #69f0ae; }
.game .badge.time { color: #90caf9; }
.crests { display: flex; align-items: center; gap: 0.35rem; min-height: 52px; }
.crests img, .crest-fallback {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: grid;
  place-items: center;
}
.crests i { color: var(--muted); font-style: normal; }
.game strong { font-size: 0.82rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game em { color: var(--muted); font-size: 0.72rem; font-style: normal; }
.game .channel { font-size: 0.78rem; font-weight: 700; }
.game .channel.ok { color: #a5d6a7; }
.game .channel.hint { color: #ffb74d; }
.game .channel.muted { color: #9e9e9e; font-weight: 600; }
.skeleton {
  flex: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #162033, #243044, #162033);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.skeleton.game { width: 188px; height: 210px; }
.skeleton.poster { width: 168px; height: 250px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.kicker { color: var(--accent); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.hero p, .page-head p { color: var(--muted); }

.row { margin-top: 1.4rem; }
.row h2 { margin: 0 0 0.6rem; font-size: 1.15rem; }
.rail, .cat-rail { display: flex; gap: 0.7rem; overflow-x: auto; padding: 0.4rem 0.2rem 0.8rem; }
.cat-rail { scroll-behavior: auto; overflow-anchor: none; }
.cat-rail .chip { scroll-margin-inline: 28px; }
.chip { white-space: nowrap; padding: 0.7rem 1rem; background: #121a2b; }
.chip.on { background: var(--primary); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.9rem; }
.card { padding: 0; text-align: left; background: transparent; overflow: hidden; }
.thumb, .poster {
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, #000c66, #10131c);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.card.vod .thumb, .card.series .thumb, .poster { aspect-ratio: 2 / 3; }
.thumb img, .poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.noimg::after, .poster.noimg::after {
  content: attr(data-letter);
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
}
.cap { display: block; padding: 0.45rem 0.15rem 0; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); }

.search-bar { display: flex; gap: 0.7rem; margin-bottom: 0.8rem; }
.search-bar input {
  flex: 1;
  background: #0c1322;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0.8rem 1rem;
}
.search-layout { display: flex; gap: 2rem; align-items: flex-start; height: 100%; }
.search-side { flex: 0 0 34rem; max-width: 46%; }
.search-side .page-head { margin-bottom: 0.6rem; }
.search-scopes { margin-bottom: 0.6rem; }
.search-query { padding: 0.7rem 1rem; border-radius: 14px; background: #0c1322; border: 2px solid var(--accent); }
.search-query span { display: block; color: var(--muted); font-size: 0.8rem; }
.search-query strong { display: block; min-height: 1.5rem; font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results { flex: 1; min-width: 0; max-height: 100%; overflow-y: auto; padding: 0.3rem 0.3rem 2rem; }
.search-status { color: var(--muted); margin: 0.4rem 0 0.8rem; }
.lang-pick h1 { font-size: 1.8rem; margin: 1.2rem 0 1.6rem; }
.lang-options { display: flex; gap: 1.2rem; justify-content: center; }
.lang-option { min-width: 15rem; min-height: 72px; font-size: 1.4rem; font-weight: 700; background: var(--primary); }
.account .login-actions { flex-wrap: wrap; }
.account { max-width: 720px; display: grid; gap: 0.8rem; }
.account p { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: 0.8rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.account span { color: var(--muted); }

.detail { padding: 1.4rem 1.6rem 3rem; overflow: auto; height: 100%; }
.detail-hero { align-items: flex-start; justify-content: flex-start; gap: 2.5rem; margin-top: 1rem; }
.detail-hero > div:last-child { flex: 1; min-width: 0; padding-top: 0.6rem; }
.detail-hero h1 { font-size: 2.6rem; }
.detail .back { padding: 0.55rem 1.1rem; }
.poster { width: 30vw; max-width: 340px; flex: none; }
.plot { color: var(--muted); max-width: 70ch; line-height: 1.45; }
.episodes { display: grid; gap: 0.5rem; }
.episode { display: flex; gap: 1rem; text-align: left; padding: 0.8rem 1rem; }
.episode strong { min-width: 5rem; color: var(--accent); }
.back { margin-bottom: 1rem; }

.blocker {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(5, 8, 16, 0.55);
  display: grid;
  place-items: center;
  z-index: 5;
}
.toast {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  background: #2a1218;
  padding: 0.8rem 1rem;
  border-radius: 12px;
}

#player-layer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #000;
  z-index: 8;
}
#player-layer[hidden] { display: none; }
/* Com o vídeo em tela cheia, a tela de fundo não é desenhada nem animada (alivia GPU/CPU da TV). */
body.player-full #app { visibility: hidden; }
body.player-full #app * { animation: none !important; transition: none !important; }
#video { width: 100%; height: 100%; background: #000; }
#player-ui {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4vh 4vw;
  background: linear-gradient(to top, rgba(0,0,0,0.78), transparent 40%, rgba(0,0,0,0.45));
  opacity: 0;
  pointer-events: none;
}
#player-layer.show-ui #player-ui { opacity: 1; pointer-events: auto; }
.player-kicker { color: var(--danger); font-weight: 800; letter-spacing: 0.12em; }
.player-bottom .hint, #player-status, #player-clock { color: #d5dbea; }
.track { height: 8px; background: rgba(255,255,255,0.25); border-radius: 99px; overflow: hidden; }
#player-progress { display: block; height: 100%; width: 0; background: var(--accent); }
.player-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.player-actions button { padding: 0.7rem 1rem; background: rgba(0,0,0,0.45); }

/* TV ao vivo — layout da versão Android */
main.live-main { padding: 1rem 1.1rem; overflow: hidden; background: #07080a; }
.live {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr 2fr;
  gap: 0.8rem;
  height: 100%;
  min-height: 0;
}
.live-col, .gpanel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem;
  border-radius: 14px;
}
.live-col { background: rgba(12, 14, 18, 0.94); border: 1px solid rgba(255,255,255,0.06); }
.live-label { margin: 0 0 0.6rem; color: #8b949e; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; }
.live-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.live-head h2 { margin: 0; font-size: 1.1rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.live-head span { color: #8b949e; font-size: 0.82rem; white-space: nowrap; }
.live-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 4px;
  scrollbar-width: none;
}
.live-list::-webkit-scrollbar { display: none; }
.live-list .muted, .epg .muted { color: #8b949e; margin: 0.4rem 0.2rem; }
.lcat, .lchan {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-align: left;
  background: transparent;
  border-radius: 10px;
  border: 2px solid transparent;
}
.lcat { flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.55rem 0.7rem; }
.lcat strong { font-size: 0.86rem; letter-spacing: 0.03em; }
.lcat span { color: #8b949e; font-size: 0.76rem; }
.lcat.on { background: rgba(225, 29, 72, 0.16); border-left: 4px solid #e11d48; }
.lcat:focus, .lchan:focus { outline: none; background: rgba(255,255,255,0.12); border-color: var(--accent); }
.lchan { gap: 0.6rem; padding: 0.45rem 0.6rem; }
.lchan .num { width: 2.6rem; color: #8b949e; font-weight: 700; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.logo-box {
  flex: 0 0 auto;
  width: 3.4rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.logo-box img { max-width: 90%; max-height: 90%; object-fit: contain; }
.lchan-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.lchan-text strong, .lchan-text em { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lchan-text strong { font-size: 0.95rem; }
.lchan-text em { font-style: normal; color: #c9d1d9; font-size: 0.78rem; }
.lchan-text em:empty { display: none; }
.lchan-dot { width: 4px; align-self: stretch; border-radius: 4px; background: transparent; }
.lchan.playing { background: rgba(225, 29, 72, 0.14); }
.lchan.playing .lchan-dot { background: #e11d48; }
.lchan.playing .num { color: #e11d48; }
.live-side { display: flex; flex-direction: column; gap: 0.8rem; min-height: 0; }
.preview {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  max-height: 55%;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.preview-empty {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  padding: 1rem;
  color: #8b949e;
}
.epg {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(14, 16, 20, 0.94);
  border: 1px solid rgba(255,255,255,0.06);
  scrollbar-width: none;
}
.gpanel .epg { padding: 0; background: transparent; border: 0; }
.epg-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.epg-head strong { display: block; font-size: 1.05rem; }
.epg-head span:not(.logo-box) { color: #8b949e; font-size: 0.8rem; }
.epg-item { padding: 0.55rem 0; border-top: 1px solid rgba(255,255,255,0.07); }
.epg-item strong { display: block; font-size: 0.95rem; }
.epg-item.now strong { font-size: 1.08rem; }
.epg-time { margin: 0 0 0.2rem; color: #8b949e; font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.epg-desc { margin: 0.3rem 0 0; color: #c9d1d9; font-size: 0.84rem; line-height: 1.35; }
.live-badge, .next-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: #e11d48;
}
.next-badge { background: rgba(255,255,255,0.14); }
.fs-watch { margin: 0; color: #e11d48; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.16em; }

/* Player em modo pré-visualização dentro da grade */
#player-layer.mini {
  right: auto;
  bottom: auto;
  z-index: 3;
  border-radius: 14px;
  overflow: hidden;
}
#player-layer.mini #player-ui, #player-layer.mini #player-guide { display: none; }
#player-mini-info { display: none; }
#player-layer.mini #player-mini-info:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 0.9rem 0.6rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  pointer-events: none;
}
#player-mini-info strong { font-size: 1rem; color: #f5c542; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#player-mini-info span { color: #c9d1d9; font-size: 0.82rem; }
#player-mini-info .mini-status { color: #fff; font-style: normal; font-size: 0.8rem; }

/* Barra de informações do canal em tela cheia */
#player-ui.live-ui { padding: 0; background: none; }
.fs-top, .fs-bottom { display: flex; gap: 1.2rem; padding: 3.5vh 4vw; }
.fs-top { align-items: flex-start; justify-content: space-between; background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent); padding-bottom: 7vh; }
.fs-program { margin: 0.2rem 0 0; color: #f5c542; font-size: 1.6rem; }
.fs-bottom { align-items: center; background: linear-gradient(to top, rgba(0,0,0,0.88), rgba(0,0,0,0.55) 70%, transparent); padding-top: 8vh; }
.fs-logo {
  flex: 0 0 auto;
  width: 6.4rem;
  height: 4.6rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.fs-logo img { max-width: 88%; max-height: 88%; object-fit: contain; }
.fs-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.fs-line { display: flex; align-items: center; gap: 0.7rem; }
.fs-line .num { color: #c9d1d9; font-weight: 800; font-size: 1.2rem; }
.fs-line strong { font-size: 1.35rem; }
.fs-times { display: flex; justify-content: space-between; color: #c9d1d9; font-size: 0.86rem; }
.fs-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.22); overflow: hidden; }
#fs-bar { display: block; height: 100%; width: 0; background: #e11d48; }
.fs-info #player-status { margin: 0; }
.fs-info #player-status:empty { display: none; }
.fs-info .hint { margin: 0; color: #8b949e; font-size: 0.8rem; }

/* Grade transparente sobre o canal em tela cheia */
#player-guide {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2;
  display: flex;
  background: rgba(0, 0, 0, 0.3);
}
#player-guide[hidden] { display: none; }
.guide-scrim { flex: 0 0 5%; background: rgba(0, 0, 0, 0.05); }
.guide-panels {
  flex: 1;
  display: grid;
  grid-template-columns: 28fr 38fr 34fr;
  gap: 12px;
  padding: 3.5vh 2.5vw 3.5vh 0;
  min-height: 0;
}
.gpanel {
  background: rgba(11, 15, 20, 0.9);
  border: 1px solid rgba(255,255,255,0.13);
  padding: 12px;
}

/* Home: fundo do CMS e painel DESTAQUE (versão Android) */
main.home-main { background-size: cover; background-position: center top; background-repeat: no-repeat; }
.home-grid.with-featured { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; grid-gap: 1.4rem; align-items: start; }
.home-col { min-width: 0; }
.featured-wrap {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: calc(100vh - 2.8rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16,18,24,0.8), rgba(16,18,24,0.9));
  border: 1px solid rgba(255,255,255,0.2);
  transition: opacity 0.26s ease;
}
.featured.fade { opacity: 0; }
.featured-tag {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.featured-skel { display: block; height: 22rem; margin-top: 0.8rem; }
.featured-poster {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  height: 15.5rem;
  margin-top: 0.8rem;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, #000c66, #10131c);
}
.featured-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-poster.noimg::after {
  content: attr(data-letter);
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
}
.featured h3 {
  margin: 0.8rem 0 0;
  font-size: 1.15rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-meta { margin: 0.3rem 0 0; color: #90a4ae; font-size: 0.8rem; font-weight: 600; }
.featured-plot {
  margin: 0.45rem 0 0;
  color: #9fb0ba;
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-watch, .featured-info { width: 100%; min-height: 2.9rem; font-weight: 800; letter-spacing: 0.04em; border-radius: 12px; }
.featured-watch { margin-top: 0.9rem; background: linear-gradient(90deg, #6c3bff, #5096f2); }
.featured-watch:focus { background: linear-gradient(90deg, #7c4dff, #6b9dff); }
.featured-info { margin-top: 0.55rem; background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.33); font-size: 0.85rem; }

/* Ativação: QR code do revendedor */
.activate.with-qr { flex-direction: row; align-items: center; justify-content: center; text-align: left; }
.activate-main { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 52rem; }
.activate-main > * + * { margin-top: 0.6rem; }
.activate.with-qr .activate-main { margin-right: 3vw; }
.support-card {
  flex: none;
  width: 21rem;
  padding: 1.3rem 1.4rem;
  border-radius: 18px;
  background: rgba(12, 19, 34, 0.95);
  border: 1px solid rgba(255,255,255,0.14);
  text-align: center;
}
.support-card h2 { margin: 0.35rem 0 0.8rem; font-size: 1.3rem; }
.support-qr { width: 13rem; height: 13rem; margin: 0 auto; padding: 0.6rem; border-radius: 12px; background: #fff; }
.support-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.support-card p { margin: 0.8rem 0 0; color: #c9d1d9; font-size: 0.85rem; line-height: 1.35; }
.support-card .support-phone { color: #69f0ae; font-weight: 700; font-size: 1rem; }
.support-card .support-note { color: #8b949e; }
.account + .support-card { margin-top: 1.6rem; }

/* Controle parental */
.adult-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.35rem;
  border-radius: 5px;
  background: #e11d48;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  vertical-align: middle;
}
#pin-layer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
}
#pin-layer[hidden] { display: none; }
.pin-box {
  width: 30rem;
  max-width: 92vw;
  padding: 1.6rem 1.8rem;
  border-radius: 18px;
  background: rgba(11, 15, 20, 0.97);
  border: 1px solid rgba(255,255,255,0.13);
  text-align: center;
}
.pin-box h2 { margin: 0.35rem 0; font-size: 1.5rem; }
.pin-hint { margin: 0 0 0.6rem; color: #c9d1d9; }
.pin-box .error { margin: 0.2rem 0 0; }
.pin-dots { display: flex; justify-content: center; margin: 0.8rem 0; min-height: 1.2rem; }
.pin-dot { width: 1.1rem; height: 1.1rem; margin: 0 0.4rem; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); }
.pin-dot.on { background: var(--accent); border-color: var(--accent); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 0.6rem; margin: 0.8rem 0; }
.pin-pad button { min-height: 3.4rem; font-size: 1.4rem; font-weight: 700; background: #162033; }
.pin-pad .pin-small { font-size: 0.95rem; }
.pin-pad .pin-ok { background: var(--primary); }
.pin-cancel { width: 100%; min-height: 3rem; }
.pin-box .hint { margin: 0.8rem 0 0; color: #8b949e; font-size: 0.8rem; }

/* Samsung Apps TV: popup de confirmação ao sair (Return Key Policy) */
#exit-layer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
}
#exit-layer[hidden] { display: none; }
.exit-box {
  width: 28rem;
  max-width: 90vw;
  padding: 1.8rem 2rem;
  border-radius: 18px;
  background: rgba(11, 15, 20, 0.98);
  border: 1px solid rgba(255,255,255,0.14);
  text-align: center;
}
.exit-box h2 { margin: 0 0 0.6rem; font-size: 1.55rem; }
.exit-box p { margin: 0 0 1.2rem; color: #c9d1d9; }
.exit-actions { display: flex; justify-content: center; grid-gap: 0.8rem; gap: 0.8rem; }
.exit-actions button { min-width: 8rem; min-height: 3.2rem; font-weight: 700; }
.exit-actions .exit-yes { background: var(--primary); color: #fff; }
.exit-actions .exit-no { background: #162033; }

/* TVs 2020–2021 (webOS 5/6, Tizen 5.5/6): sem aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .thumb { height: 0; padding-top: 62.5%; }
  .card.vod .thumb, .card.series .thumb { padding-top: 150%; }
  .thumb img { position: absolute; top: 0; left: 0; }
  .poster { height: 420px; }
  .poster img { height: 100%; }
  .preview { height: 0; padding-top: 56.25%; max-height: none; }
}

/* TVs 2020–2021: sem gap em flexbox, espaçamento por margem */
.no-flexgap .key-row > * + *,
.no-flexgap .crests > * + * { margin-left: 0.4rem; }
.no-flexgap .login-actions > * + *,
.no-flexgap .provider-toggle > * + *,
.no-flexgap .search-bar > * + *,
.no-flexgap .rail > * + *,
.no-flexgap .cat-rail > * + *,
.no-flexgap .player-actions > * + *,
.no-flexgap .epg-head > * + *,
.no-flexgap .fs-line > * + * { margin-left: 0.7rem; }
.no-flexgap .lchan > * + *,
.no-flexgap .live-head > * + *,
.no-flexgap .epg-time > * + * { margin-left: 0.55rem; }
.no-flexgap .hero > * + *,
.no-flexgap .page-head > * + *,
.no-flexgap .detail-hero > * + *,
.no-flexgap .home-top > * + *,
.no-flexgap .episode > * + *,
.no-flexgap .account p > * + *,
.no-flexgap .fs-top > * + *,
.no-flexgap .fs-bottom > * + * { margin-left: 1.2rem; }
.no-flexgap aside > * + *,
.no-flexgap .live-list > * + * { margin-top: 0.4rem; }
.no-flexgap .activate > * + *,
.no-flexgap .live-side > * + * { margin-top: 0.7rem; }
.no-flexgap .game > * + *,
.no-flexgap .fs-info > * + *,
.no-flexgap .preview-empty > * + * { margin-top: 0.35rem; }
.no-flexgap .lcat > * + *,
.no-flexgap .lchan-text > * + *,
.no-flexgap #player-mini-info > * + * { margin-top: 0.1rem; }
.no-flexgap .search-layout > * + * { margin-left: 2rem; }
.no-flexgap .lang-options > * + * { margin-left: 1.2rem; }
.no-flexgap .player-actions > * { margin-bottom: 0.5rem; }
.no-flexgap aside > .side-meta { margin-top: auto; }

@media (max-width: 900px) {
  .login, .shell { grid-template-columns: 1fr; }
  aside { flex-direction: row; flex-wrap: wrap; }
  .side-meta { display: none; }
  body { overflow: auto; }
}
