/* Olhar Digital TV — vitrine.
   Identidade OD: preto quase absoluto, verde de marca com parcimônia, títulos
   na condensada e números em monoespaçada. Fontes em fonts.css.

   Densidade no espírito de uma vitrine de streaming: cards pequenos, muitos
   por linha, tipografia miúda em caixa-alta e espaçamento apertado. */

:root {
  --bg:        #050505;
  --surface:   #0F0F0F;
  --surface-2: #171717;
  --line:      #1F1F1F;
  --line-soft: rgba(255, 255, 255, 0.07);
  --green:     #00C853;
  --green-dim: rgba(0, 200, 83, 0.14);
  --text:      #FFFFFF;
  --dim:       #B4B4B4;
  --muted:     #7A7A7A;
  --radius:    8px;

  --font-display: 'Big Shoulders Display', 'Arial Narrow', system-ui, sans-serif;
  --font-ui:      'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --header-h: 56px;
  --gutter: clamp(16px, 2.6vw, 44px);
  --card-gap: clamp(7px, 0.7vw, 12px);
  /* Largura do card: o que define a densidade da grade. */
  --card-w: clamp(132px, 12.2vw, 200px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--green);
  color: #04220F;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { left: 8px; }

/* ================================================================
   HEADER
   ================================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0));
  transition: background-color 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.logo-mark { height: 26px; width: auto; display: block; }

.logo-tv {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---------- navegação ---------- */

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 26px);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.16s, border-color 0.16s;
}

.site-nav a:hover { color: var(--text); }

.site-nav a.on {
  color: var(--text);
  border-bottom-color: var(--green);
}

/* ---------- busca ---------- */

.search { margin-left: auto; display: flex; flex-shrink: 0; }

.search input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: 7px 12px 7px 32px;
  font: inherit;
  font-size: 12.5px;
  width: clamp(150px, 16vw, 230px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A7A7A' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 14px;
  transition: background-color 0.2s, border-color 0.2s;
}

.search input::placeholder { color: var(--muted); }

.search input:focus {
  background-color: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  outline: none;
}

/* ================================================================
   BOTÕES
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  padding: 11px 26px;
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.14s ease, filter 0.14s ease, background-color 0.14s ease;
}

.btn:active { transform: scale(0.98); }

.btn-play { background: var(--green); color: #042713; }
.btn-play:hover { filter: brightness(1.1); }

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(255, 255, 255, 0.5); }

/* Ícones em CSS: sem dependência de fonte de ícone nem SVG externo. */
.ico-play {
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent currentColor;
}

.ico-tv {
  width: 11px; height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  position: relative;
}
.ico-tv::before {
  content: '';
  position: absolute;
  left: 50%; top: -5px;
  width: 7px; height: 5px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: translateX(-50%) skewX(-24deg);
}

/* ================================================================
   HERO
   ================================================================ */

.hero {
  position: relative;
  display: grid;
  align-content: end;
  min-height: min(80vh, 660px);
  padding: calc(var(--header-h) + 28px) var(--gutter) clamp(56px, 7vw, 96px);
  isolation: isolate;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  z-index: -2;
  animation: hero-drift 34s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.09); }
}

/* Véu pesado: no mockup a imagem é quase uma textura, o texto é o assunto. */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top,
      var(--bg) 0%,
      var(--bg) 8%,
      rgba(5, 5, 5, 0.82) 34%,
      rgba(5, 5, 5, 0.5) 62%,
      rgba(5, 5, 5, 0.86) 100%),
    linear-gradient(to right,
      rgba(5, 5, 5, 0.96) 0%,
      rgba(5, 5, 5, 0.88) 32%,
      rgba(5, 5, 5, 0.55) 62%,
      rgba(5, 5, 5, 0.32) 100%);
}

.hero-body { max-width: min(790px, 100%); }

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 56px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 14px;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-desc {
  color: var(--dim);
  margin: 0 0 16px;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
  max-width: 52ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 24px;
}

.hero-badge {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  padding: 1px 6px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.hero-count { color: var(--muted); }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ================================================================
   TRILHOS
   ================================================================ */

.rails {
  position: relative;
  z-index: 1;
  margin-top: clamp(-48px, -3vw, -20px);
  padding-bottom: 56px;
}

.rail { margin-bottom: clamp(22px, 2.4vw, 34px); }

.rail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--gutter);
  margin-bottom: 11px;
}

/* Miúdo, em caixa-alta e espaçado: a marca do mockup. */
.rail-head h2 {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
}

.rail-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.rail:hover .rail-more,
.rail-more:focus-visible { opacity: 1; color: var(--green); }

@media (hover: none) { .rail-more { opacity: 1; } }

.rail-viewport { position: relative; }

.rail-track {
  list-style: none;
  margin: 0;
  padding: 2px var(--gutter);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--card-w);
  gap: var(--card-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
}

.rail-track::-webkit-scrollbar { display: none; }
.rail-track > li { scroll-snap-align: start; }

.rail-nav {
  position: absolute;
  top: 0;
  bottom: 44px;
  z-index: 3;
  width: calc(var(--gutter) + 22px);
  border: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  background: linear-gradient(to right, rgba(5, 5, 5, 0.96) 35%, rgba(5, 5, 5, 0));
}

.rail-nav.next {
  right: 0;
  background: linear-gradient(to left, rgba(5, 5, 5, 0.96) 35%, rgba(5, 5, 5, 0));
}
.rail-nav.prev { left: 0; }

.rail-viewport:hover .rail-nav:not([hidden]),
.rail-nav:focus-visible { opacity: 1; }

@media (hover: none) { .rail-nav { display: none; } }

/* ================================================================
   CARD
   ================================================================ */

.card { min-width: 0; }

.card-btn {
  all: unset;
  display: block;
  cursor: pointer;
  width: 100%;
}

.card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease;
}

.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.card-btn:hover .card-thumb,
.card-btn:focus-visible .card-thumb {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(0, 200, 83, 0.55);
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.9);
}

.card-dur {
  position: absolute;
  right: 5px;
  bottom: 5px;
  background: rgba(0, 0, 0, 0.82);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  padding: 2px 5px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.18s;
}

.card-btn:hover .card-dur,
.card-btn:focus-visible .card-dur { opacity: 1; }

.card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1));
}

.card-play::after,
.card-play::before { grid-area: 1 / 1; }

.card-play::after {
  content: '';
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 200, 83, 0.95);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

.card-play::before {
  content: '';
  z-index: 2;
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #042713;
  align-self: center;
  justify-self: center;
  margin-left: 3px;
}

.card-btn:hover .card-play,
.card-btn:focus-visible .card-play { opacity: 1; }

/* Título em caixa-alta miúda, e a linha CATEGORIA · ANO embaixo. */
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1.32;
  margin: 9px 0 3px;
  color: #E8E8E8;
  transition: color 0.16s;
}

.card-btn:hover .card-title { color: var(--text); }

.card-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================
   PÁGINAS INTERNAS
   ================================================================ */

.page { padding: calc(var(--header-h) + 30px) var(--gutter) 70px; }

.crumbs {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
  line-height: 1;
}

.page-sub {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 30px;
}

.grid-videos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
  gap: 22px var(--card-gap);
}

.pager {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 42px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pager a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.18s, color 0.18s;
}
.pager a:hover { border-color: var(--green); color: var(--green); }
.pager-now { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }

.empty { color: var(--muted); padding: 40px 0; }

.empty-state {
  padding: 20vh var(--gutter);
  text-align: center;
  color: var(--muted);
}
.empty-state h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 60px);
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 10px;
}

/* ================================================================
   MOBILE
   ================================================================ */

@media (max-width: 860px) {
  /* A navegação por categoria não cabe junto da busca. */
  .site-nav { display: none; }
}

@media (max-width: 640px) {
  :root { --card-w: 138px; }

  .hero { min-height: 62vh; }
  .hero-bg { object-position: center center; }
  .hero h1 { -webkit-line-clamp: 4; line-clamp: 4; }
  .hero-desc { display: none; }
  .hero-actions .btn { flex: 1 1 auto; padding: 12px 16px; }
  .hero-count { display: none; }

  .logo-mark { height: 23px; }
  .logo-tv { font-size: 20px; padding-left: 7px; }

  .search input { width: clamp(120px, 42vw, 210px); }
}

/* ================================================================
   PLAYER DE PÁGINA INTEIRA
   Assistir toma a viewport inteira — não é modal. O mesmo bloco serve ao
   Modo TV, que apenas acende o chrome extra.
   ================================================================ */

.watch {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
  display: grid;
  animation: fade-in 0.22s ease;

  /* No iOS (e no Chrome Android com barra retrátil) um elemento fixo com
     `inset: 0` é dimensionado pela viewport GRANDE — a que existe com a barra
     do navegador recolhida. Resultado: o bloco fica mais alto que a área
     visível e o player vaza para fora da tela.
     `dvh` acompanha a barra aparecendo e sumindo; `vh` fica de reserva para
     navegadores sem suporte. */
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.watch[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* O palco é uma caixa 16:9 que CABE na viewport, em qualquer orientação.
   Isto não é estética: a biblioteca do Dailymotion impõe a proporção ao
   container, e com o palco esticado pela tela inteira ela calculava, em
   paisagem, um iframe de 844x475 dentro de uma viewport de 844x390 — vídeo
   maior que a tela. Limitando a largura pela altura disponível, o overflow
   deixa de ser possível. */
.watch-stage {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;

  width: min(100%, calc(100vh * 16 / 9));
  width: min(100%, calc(100dvh * 16 / 9));
  aspect-ratio: 16 / 9;

  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* Reforço: nem o host nem o iframe podem ultrapassar o palco, mesmo que o
   SDK escreva altura inline. */
#player-host,
#player-host iframe {
  max-width: 100%;
  max-height: 100%;
}

#player-host,
#player-host iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

/* Todo o chrome vive numa camada só, para sumir junto. */
.watch-chrome {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}

/* Sem interação, some — como um player de verdade. */
.watch.idle .watch-chrome { opacity: 0; }
.watch.idle { cursor: none; }

.watch-chrome > * { pointer-events: auto; }

.watch-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px clamp(16px, 3vw, 34px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
}

.watch-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px 9px 12px;
  border-radius: 99px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color 0.18s;
  flex-shrink: 0;
}
.watch-back:hover { background: rgba(0, 0, 0, 0.75); }
.watch-back span { font-size: 19px; line-height: 1; }

.watch-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ---------- bug de canal ---------- */

.channel-bug {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  flex-shrink: 0;
  /* Permanente e discreto: presente sem competir com o conteúdo. */
  opacity: 0.85;
}

.channel-bug[hidden] { display: none; }
.channel-bug b { color: var(--green); font-weight: 700; }

.bug-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: bug-pulse 2.4s ease-in-out infinite;
}

@keyframes bug-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.5); }
  50%      { opacity: 0.55; box-shadow: 0 0 0 5px rgba(0, 200, 83, 0); }
}

/* O bug não pode sumir com o resto do chrome: é assinatura de emissora. */
.watch.tv-on .channel-bug {
  position: fixed;
  top: 20px;
  right: clamp(16px, 3vw, 34px);
  z-index: 6;
  opacity: 0.85;
}

/* ---------- controles ---------- */

.watch-bottom {
  padding: 20px clamp(16px, 3vw, 34px) 26px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}

.tv-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tv-controls[hidden] { display: none; }

.tv-controls button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 99px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color 0.16s, border-color 0.16s;
  min-width: 46px;
}

.tv-controls button:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.3);
}

.tv-controls button[data-tv="stop"] {
  margin-left: auto;
  background: rgba(255, 82, 82, 0.16);
  border-color: rgba(255, 82, 82, 0.35);
}
.tv-controls button[data-tv="stop"]:hover { background: rgba(255, 82, 82, 0.3); }

/* ---------- overlay "A seguir" ---------- */

.up-next {
  position: absolute;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(90px, 12vh, 130px);
  z-index: 7;
  width: min(340px, calc(100vw - 32px));
  padding: 16px 18px;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.9);
  animation: up-next-in 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.up-next[hidden] { display: none; }

@keyframes up-next-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.up-next-label {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.up-next-count { color: var(--muted); }

.up-next-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.up-next-actions { display: flex; gap: 8px; }

.up-next-actions button {
  flex: 1;
  background: var(--text);
  color: #0A0A0A;
  border: 0;
  border-radius: 6px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.up-next-actions .ghost,
.resume-actions .ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-weight: 500;
}

/* ---------- guia de programação ---------- */

.guide {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: min(420px, 92vw);
  background: rgba(10, 10, 10, 0.97);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  animation: guide-in 0.26s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.guide[hidden] { display: none; }

@keyframes guide-in {
  from { transform: translateX(100%); }
  to   { transform: none; }
}

.guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.guide-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.guide-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
}
.guide-close:hover { color: var(--text); }

.guide-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 20px;
  overflow-y: auto;
  flex: 1;
  counter-reset: prog;
}

.guide-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background-color 0.15s;
}

.guide-item:hover { background: rgba(255, 255, 255, 0.06); }

.guide-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.guide-t {
  font-size: 13.5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
}

.guide-dur { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

/* Já passou: recuado visualmente, mas ainda clicável. */
.guide-item.past { opacity: 0.42; }

/* No ar. */
.guide-item.now {
  background: rgba(0, 200, 83, 0.1);
  border-left-color: var(--green);
}
.guide-item.now .guide-num { color: var(--green); }
.guide-item.now .guide-t { font-weight: 700; }

.guide-now-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--green);
  text-transform: uppercase;
}

/* ---------- ativar som / retomar ---------- */

.unmute {
  position: absolute;
  left: 50%;
  bottom: clamp(90px, 14vh, 140px);
  transform: translateX(-50%);
  z-index: 9;
  background: var(--green);
  color: #04220F;
  border: 0;
  border-radius: 99px;
  padding: 13px 26px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8);
}
.unmute[hidden] { display: none; }

.resume {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  padding: 24px;
  text-align: center;
}
.resume[hidden] { display: none; }

.resume-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
}

.resume-sub { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; max-width: 46ch; }

.resume-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.resume-actions button {
  background: var(--text);
  color: #0A0A0A;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 24px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  .watch-top { padding: 14px 16px; gap: 12px; }
  .watch-back { padding: 8px 13px 8px 10px; font-size: 13px; }
  .watch-title { font-size: 15px; }
  .channel-bug { font-size: 18px; }

  .tv-controls { gap: 6px; }
  .tv-controls button { padding: 9px 13px; font-size: 13px; min-width: 42px; }
  .tv-controls button[data-tv="guide"] { display: none; }

  .up-next { left: 16px; right: 16px; width: auto; bottom: 96px; }
}

body.watching { overflow: hidden; }

/* ================================================================
   RODAPÉ
   ================================================================ */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px var(--gutter) 34px;
  color: var(--muted);
}

/* Todas as categorias em uma faixa: serve de índice e fecha a página. */
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(14px, 2vw, 30px);
  margin-bottom: 18px;
}

.footer-cats a {
  color: var(--muted);
  text-decoration: none;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.16s;
}
.footer-cats a:hover { color: var(--text); }

.footer-sign {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #5A5A5A;
}
.footer-sign span { margin: 0 4px; }

/* ================================================================
   TELAS GRANDES (smart TV)
   ================================================================ */

@media (min-width: 2000px) {
  body { font-size: 19px; }
  :root { --header-h: 84px; }
  .rail-track { grid-auto-columns: 320px; }
  .card-title { font-size: 16px; }
  .card-meta { font-size: 13px; }
}

/* ================================================================
   MOBILE
   ================================================================ */

@media (max-width: 640px) {
  /* Viewport retrato com thumbnail 16:9: quanto mais alto o hero, mais a
     imagem é ampliada e cortada nas laterais. 62vh equilibra. */
  .hero { min-height: 62vh; }
  .hero-bg { object-position: center center; }
  .hero h1 { -webkit-line-clamp: 4; line-clamp: 4; }
  .hero-desc { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }

  .logo { gap: 7px; }
  .logo-mark { height: 26px; }
  .logo-tv { font-size: 23px; padding-left: 8px; }

  .btn-tv { padding: 10px 14px; font-size: 14px; }

  /* A busca não cabe ao lado do botão da TV em 390px: recolhe para um ícone
     e se expande sobre o header ao receber foco. */
  .search input {
    width: 42px;
    padding: 9px;
    color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A1A1' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    transition: none;
  }

  .search input::placeholder { color: transparent; }

  .search input:focus {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    z-index: 5;
    color: var(--text);
    background-image: none;
    padding: 10px 16px;
  }

  .search input:focus::placeholder { color: var(--muted); }
}

/* ================================================================
   MOVIMENTO REDUZIDO (spec §12)
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-bg { animation: none; transform: none; }
  .card-btn:hover .card-thumb { transform: none; }
  .card-btn:hover .card-thumb img { transform: none; }
}

/* ================================================================
   ABERTURA (vinheta de entrada)
   A marca enquanto a página monta. Some sozinha; ver partials/splash.php.
   ================================================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: var(--bg);
  /* Só a opacidade e a visibilidade animam: nada de layout, nada de jank. */
  transition: opacity 0.55s ease, visibility 0.55s;
}

/* Já vista nesta sessão: nem chega a pintar (classe posta no <head>). */
.no-splash .splash { display: none; }

.splash.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  /* Entrada curta: a marca "acende". */
  animation: splash-in 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.splash-mark img {
  height: clamp(38px, 7vw, 68px);
  width: auto;
}

.splash-tv {
  font-family: var(--font-display);
  font-size: clamp(34px, 6.2vw, 60px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  line-height: 1;
}

@keyframes splash-in {
  from { opacity: 0; transform: translateY(9px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* Varredura de luz verde passando uma vez sobre a marca. */
.splash-sweep {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-sweep::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg,
    transparent,
    rgba(0, 200, 83, 0.28) 45%,
    rgba(0, 200, 83, 0.5) 50%,
    rgba(0, 200, 83, 0.28) 55%,
    transparent);
  filter: blur(5px);
  animation: splash-sweep 1.5s ease-in-out 0.45s infinite;
}

@keyframes splash-sweep {
  to { left: 115%; }
}

/* Filete de progresso: indeterminado, porque não sabemos o tempo real. */
.splash-bar {
  width: clamp(140px, 20vw, 230px);
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.splash-bar i {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  animation: splash-bar 1.15s ease-in-out infinite;
}

@keyframes splash-bar {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(330%); }
}

/* Sem movimento: a marca aparece parada e a barra vira um traço fixo. */
@media (prefers-reduced-motion: reduce) {
  .splash-mark { animation: none; }
  .splash-sweep { display: none; }
  .splash-bar i { animation: none; width: 100%; opacity: 0.5; }
}
