/* Inter (OFL) é a alternativa livre mais próxima da Netflix Sans. */
@font-face { font-family: Inter; src: url('/tutoriais/assets/fonts/Inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --fundo: #000;
  --superficie: #181818;
  --superficie-2: #2f2f2f;
  --borda: #34383d;
  --texto: #f4f5f6;
  --suave: #a5adb5;
  --laranja: #ff6a00;
  --laranja-escuro: #e85d00;
  --margem: clamp(16px, 4vw, 60px);
  --gap: 8px;
  --por-linha: 6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--fundo); color: var(--texto); font: 16px/1.4 Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body:has(dialog[open]), body.sem-rolagem { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button, input, label { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 3px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg .cheio { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Abertura com a marca, como a vinheta da Netflix. */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; animation: splash-sai .45s ease 1.15s forwards; }
.splash img { width: 120px; border-radius: 26px; animation: splash-z 1.4s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes splash-z { 0% { transform: scale(.6); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 70% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 30px #ff6a0099); } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes splash-sai { to { opacity: 0; visibility: hidden; } }

/* Cabeçalho transparente que escurece ao rolar. */
.topo { position: fixed; z-index: 30; inset: 0 0 auto; height: 68px; display: flex; align-items: center; gap: 36px; padding: 0 var(--margem); background: linear-gradient(#000b, #0000); transition: background .4s; }
.topo.solido { background: #000; }
.marca img { display: block; width: 116px; height: auto; }
.topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.busca { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; border: 1px solid transparent; transition: border-color .2s, background .2s; cursor: pointer; }
.busca input { width: 0; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--texto); font: inherit; font-size: 16px; outline: none; transition: width .3s; }
.busca:focus-within, .busca.aberta { border-color: #ffffffcc; background: #000c; }
.busca:focus-within input, .busca.aberta input { width: 200px; }
.idiomas { display: flex; border: 1px solid #ffffff40; border-radius: 4px; overflow: hidden; }
.idiomas button { border: 0; background: transparent; color: #ddd; padding: 5px 9px; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.idiomas button[aria-pressed='true'] { background: var(--laranja); color: #120a03; }

/* Destaque com preview passando, em rotação. */
.hero { position: relative; height: min(56.25vw, 92vh); min-height: 520px; overflow: hidden; background: #000; }
.hero-midia, .hero-midia img, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-midia img { object-fit: cover; transition: opacity .8s; }
.hero-video { opacity: 0; transition: opacity 1.2s ease; overflow: hidden; pointer-events: none; }
.hero-video.tocando { opacity: 1; }
.hero-video iframe { position: absolute; top: 50%; left: 50%; width: max(100%, calc(100vh * 16 / 9 * 1.1)); height: max(100%, calc(100vw * 9 / 16)); aspect-ratio: 16 / 9; transform: translate(-50%, -50%) scale(1.18); border: 0; }
.hero-vinheta { position: absolute; inset: 0; background: linear-gradient(77deg, #000e 0%, #000a 32%, #0000 64%), linear-gradient(0deg, #000 0%, #0000 26%); }
.hero-conteudo { position: absolute; left: var(--margem); bottom: 30%; width: min(40%, 620px); }
.selo { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: #ddd; }
.selo img { width: 24px; height: 24px; border-radius: 6px; }
.hero h1 { font-size: clamp(30px, 3.3vw, 56px); font-weight: 900; line-height: 1.04; letter-spacing: -.035em; text-shadow: 2px 2px 8px #0009; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { margin-top: 14px; display: flex; gap: 10px; align-items: center; font-size: 14px; color: #ddd; }
.hero-meta .novo { color: #46d369; font-weight: 700; }
.hero-meta .tag { padding: 0 6px; border: 1px solid #ffffff80; font-size: 11px; border-radius: 3px; }
.hero-descricao { margin-top: 12px; font-size: clamp(14px, 1.2vw, 18px); text-shadow: 1px 1px 3px #000a; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: opacity .6s; }
.hero.tocando .hero-descricao { opacity: 0; }
.hero-botoes { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.botao { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 4px; padding: 10px 26px 10px 20px; font-size: clamp(15px, 1.25vw, 19px); font-weight: 600; transition: background .2s, transform .1s; }
.botao:active { transform: scale(.97); }
.botao svg { width: 26px; height: 26px; }
.botao-assistir { background: #fff; color: #000; }
.botao-assistir:hover { background: #ffffffbf; }
.botao-info { background: #6d6d6eb3; color: #fff; }
.botao-info:hover { background: #6d6d6e66; }
.hero-lateral { position: absolute; right: 0; bottom: 30%; display: flex; align-items: center; gap: 14px; }
.botao-redondo { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #ffffffb3; border-radius: 50%; background: #0000; transition: background .2s; }
.botao-redondo:hover { background: #ffffff1a; border-color: #fff; }
.botao-redondo svg { width: 20px; height: 20px; }
#hero-som .som-on, #hero-som[aria-pressed='true'] .som-off { display: none; }
#hero-som[aria-pressed='true'] .som-on { display: inline; }
.hero-pontos { display: flex; align-items: center; gap: 0; height: 34px; padding: 0 var(--margem) 0 14px; border-left: 3px solid var(--laranja); background: #3336; }
.hero-pontos button { width: 22px; height: 22px; border: 0; background: transparent; display: grid; place-items: center; padding: 0; }
.hero-pontos button::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ffffff70; transition: .3s; }
.hero-pontos button[aria-current='true']::before { width: 18px; border-radius: 4px; background: var(--laranja); }

/* Linhas horizontais de aulas. */
.linhas { position: relative; z-index: 2; margin-top: -9vw; padding-bottom: 40px; }
.hero[hidden] + .linhas { margin-top: 110px; min-height: 45vh; }
.linha { margin-bottom: 3vw; }
.linha h2 { margin: 0 var(--margem) 10px; font-size: clamp(16px, 1.4vw, 22px); font-weight: 600; color: #e5e5e5; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 10px; }
.linha h2 .ver-tudo { font-size: 12px; font-weight: 700; color: var(--laranja); opacity: 0; transform: translateX(-6px); transition: .3s; }
.linha:hover h2 .ver-tudo { opacity: 1; transform: none; }
.trilho-area { position: relative; }
.trilho { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--margem) - (var(--por-linha) - 1) * var(--gap)) / var(--por-linha)); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--margem); padding: 6px var(--margem) 10px; scrollbar-width: none; overscroll-behavior-x: contain; }
.trilho::-webkit-scrollbar { display: none; }
.trilho::after { content: ''; width: 1px; }
.seta { position: absolute; z-index: 3; top: 6px; bottom: 10px; width: calc(var(--margem) - 4px); min-width: 16px; padding: 0; border: 0; overflow: hidden; background: #00000099; color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .2s, background .2s; }
.seta svg { width: 34px; max-width: 100%; height: 34px; transition: transform .2s; }
.seta:hover { background: #000000d0; }
.seta:hover svg { transform: scale(1.25); }
.seta-esq { left: 0; border-radius: 0 4px 4px 0; }
.seta-dir { right: 0; border-radius: 4px 0 0 4px; }
.trilho-area:hover .seta:not([disabled]) { opacity: 1; }
.seta[disabled] { pointer-events: none; }

.cartao { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--superficie); scroll-snap-align: start; aspect-ratio: 16 / 9; transition: transform .25s, box-shadow .25s; }
.cartao img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cartao .duracao { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 3px; background: #000c; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cartao .marca-z { position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 2px; }
.cartao:focus-visible { outline-offset: -2px; }
@media (hover: none) { .cartao:active { transform: scale(.97); } .seta { display: none; } }

/* Cartão expandido ao passar o mouse. */
.preview { position: absolute; z-index: 40; border-radius: 6px; overflow: hidden; background: var(--superficie); box-shadow: 0 10px 40px #000c; transform-origin: center; animation: preview-entra .25s ease forwards; }
@keyframes preview-entra { from { transform: scale(.67); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.preview-midia { position: relative; aspect-ratio: 16 / 9; background: #000; cursor: pointer; overflow: hidden; }
.preview-midia img, .preview-midia iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.preview-midia iframe { opacity: 0; transition: opacity .6s; pointer-events: none; transform: scale(1.35); }
.preview-midia iframe.tocando { opacity: 1; }
.preview-corpo { padding: 14px 16px 18px; }
.preview-botoes { display: flex; gap: 8px; margin-bottom: 12px; }
.preview-botoes .botao-redondo { width: 38px; height: 38px; border-width: 2px; border-color: #ffffff80; background: #2a2a2acc; }
.preview-botoes .botao-redondo:hover { border-color: #fff; }
.preview-botoes .play { background: #fff; color: #000; border-color: #fff; }
.preview-botoes .play:hover { background: #ffffffd0; }
.preview-botoes .mais { margin-left: auto; }
.preview-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: #bcbcbc; }
.preview-meta .novo { color: #46d369; font-weight: 700; }
.preview-meta .tag { padding: 0 5px; border: 1px solid #ffffff66; border-radius: 3px; font-size: 10px; }
.preview h3 { margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.preview .categoria-nome { margin-top: 6px; font-size: 12px; color: var(--laranja); font-weight: 600; }

/* Modal de detalhes. */
.info { width: min(880px, calc(100% - 24px)); max-height: calc(100dvh - 48px); margin: 32px auto auto; padding: 0; border: 0; border-radius: 8px; background: var(--superficie); color: var(--texto); box-shadow: 0 30px 120px #000; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.info[open] { animation: info-entra .3s ease; }
@keyframes info-entra { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.info::backdrop { background: #000b; }
.info-destaque { position: relative; }
.info-topo { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.info-topo img, .info-topo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.info-topo iframe { opacity: 0; transition: opacity .8s; pointer-events: none; transform: scale(1.3); }
.info-topo iframe.tocando { opacity: 1; }
.info-topo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--superficie) 2%, #18181800 50%); }
.info-fechar { position: absolute; z-index: 3; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ffffff60; border-radius: 50%; background: #181818; }
.info-fechar:hover { background: #2e2e2e; }
.info-cabeca { position: absolute; z-index: 2; left: 44px; right: 44px; bottom: 36px; }
.info-cabeca h2 { font-size: clamp(24px, 3.4vw, 42px); font-weight: 900; line-height: 1.05; letter-spacing: -.035em; text-shadow: 2px 2px 8px #0009; max-width: 80%; }
.info-cabeca .hero-botoes { margin-top: 18px; align-items: center; }
.info-corpo { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; padding: 6px 44px 26px; }
.info-corpo p { color: #ddd; }
.info-lado { font-size: 14px; color: #777; }
.info-lado span { color: #ddd; }
.info-mais { padding: 0 44px 40px; }
.info-mais h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.info-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.semelhante { display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--superficie-2); text-align: left; transition: background .2s; }
.semelhante:hover { background: #2f3337; }
.semelhante-texto { min-width: 0; }
.semelhante .capa { position: relative; aspect-ratio: 16 / 9; }
.semelhante .capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.semelhante .capa .duracao { position: absolute; right: 6px; top: 6px; padding: 1px 6px; border-radius: 3px; background: #000c; font-size: 11px; font-weight: 700; }
.semelhante h4 { margin: 12px 14px 6px; font-size: 14px; line-height: 1.3; }
.semelhante p { margin: 0 14px 16px; font-size: 12.5px; color: var(--suave); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Player em tela cheia. */
.cinema { position: fixed; inset: 0; z-index: 90; background: #000; }
.cinema iframe { width: 100%; height: 100%; border: 0; }
.cinema-voltar { position: absolute; z-index: 2; top: 18px; left: 18px; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 36px); padding: 8px 14px 8px 8px; border: 0; border-radius: 6px; background: #000a; font-size: 15px; font-weight: 600; opacity: 1; transition: opacity .4s; }
.cinema-voltar svg { width: 30px; height: 30px; }
.cinema-voltar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cinema.ocioso .cinema-voltar { opacity: 0; }

/* Busca. */
.resultados { min-height: 70vh; padding: 110px var(--margem) 40px; }
.resultados h2 { font-size: 18px; font-weight: 500; color: var(--suave); margin-bottom: 20px; }
.resultados h2 strong { color: var(--texto); }
.resultados-grade { display: grid; grid-template-columns: repeat(var(--por-linha), 1fr); gap: 32px var(--gap); }
.resultados-grade .cartao-titulo { margin-top: 8px; font-size: 13px; color: #ddd; }

.vazio { margin: 0 var(--margem); color: var(--suave); }
.rodape { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 30px var(--margem) 50px; color: var(--suave); font-size: 13px; }
.rodape-marca { display: flex; align-items: center; gap: 12px; }
.rodape-privacidade { max-width: 760px; }
.rodape-controles { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.rodape-controles label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; }
.rodape-controles input { width: 17px; height: 17px; accent-color: var(--laranja); }
.rodape-controles button { min-height: 40px; padding: 8px 12px; border: 1px solid #666; border-radius: 4px; background: transparent; color: var(--suave); }
.rodape-controles button:hover { color: var(--texto); border-color: var(--texto); }
.rodape img { border-radius: 7px; }

@media (max-width: 1400px) { :root { --por-linha: 5; } }
@media (max-width: 1100px) { :root { --por-linha: 4; } .hero-conteudo { width: 55%; } }
@media (max-width: 800px) {
  :root { --por-linha: 3; }
  .topo { gap: 16px; background: #000; }
  .topo-acoes { min-width: 0; gap: 8px; }
  .busca { min-width: 44px; height: 44px; gap: 4px; }
  .busca input { transition: none; }
  .idiomas { flex-shrink: 0; }
  .idiomas button { min-width: 38px; min-height: 42px; padding-inline: 8px; }
  .topo:has(.busca:focus-within, .busca.aberta) .marca { display: none; }
  .topo:has(.busca:focus-within, .busca.aberta) .topo-acoes { width: 100%; }
  .busca:focus-within, .busca.aberta { flex: 1; min-width: 0; }
  .busca:focus-within input, .busca.aberta input { width: 100%; }
  .hero { height: auto; min-height: 0; padding-top: 68px; }
  .hero-midia { position: relative; height: auto; aspect-ratio: 16 / 9; max-height: 360px; }
  .hero-midia::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #000, #0000 45%); pointer-events: none; }
  .hero-video iframe { width: 100%; height: 100%; }
  .hero-vinheta { display: none; }
  .hero-conteudo { position: relative; inset: auto; width: auto; padding: 8px var(--margem) 0; background: #000; }
  .selo { margin-bottom: 10px; font-size: 11px; }
  .selo img { width: 20px; height: 20px; }
  .hero h1 { display: block; font-size: clamp(26px, 6.8vw, 36px); line-height: 1.14; text-shadow: none; overflow-wrap: anywhere; }
  .hero-meta { flex-wrap: wrap; gap: 8px; font-size: 13px; }
  .hero-botoes { margin-top: 18px; gap: 8px; }
  .hero-conteudo .botao { flex: 1 1 auto; justify-content: center; min-height: 48px; padding: 12px; font-size: 15px; }
  .hero-conteudo .botao-info { background: #252525; }
  .hero-descricao { display: none; }
  .hero-lateral { position: relative; inset: auto; justify-content: center; padding: 10px 0 14px; }
  .hero-pontos { height: auto; padding: 0; border-left: 0; background: transparent; }
  .hero-pontos button { width: 40px; height: 44px; }
  #hero-som { display: none; }
  .linhas { margin-top: 0; }
  .linha { margin-bottom: 24px; }
  .info { margin: 0 auto; width: 100%; max-width: 100%; max-height: 100dvh; border-radius: 0; }
  .info[open] { animation: none; }
  .info-cabeca { position: relative; inset: auto; padding: 0 20px 24px; background: var(--superficie); }
  .info-cabeca h2 { max-width: 100%; font-size: clamp(26px, 6.8vw, 34px); line-height: 1.15; text-shadow: none; overflow-wrap: anywhere; }
  .info-cabeca .botao-assistir { width: 100%; min-height: 52px; justify-content: center; background: var(--laranja); color: #120a03; font-size: 18px; font-weight: 750; border-radius: 8px; }
  .info-cabeca .botao-assistir:hover { background: #ff8229; }
  .info-corpo { grid-template-columns: 1fr; gap: 16px; padding: 0 20px 24px; font-size: 14px; line-height: 1.55; }
  .info-corpo .hero-meta { margin-top: 0; }
  .info-lado { font-size: 12px; }
  .info-mais { padding: 20px 20px max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--borda); }
  .info-mais h3 { font-size: 19px; }
  .info-grade { grid-template-columns: 1fr; gap: 16px; }
  .semelhante { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 12px; align-items: start; background: transparent; border-radius: 4px; }
  .semelhante .capa { overflow: hidden; border-radius: 6px; }
  .semelhante .capa .duracao { inset: auto 4px 4px auto; font-size: 10px; padding-inline: 4px; }
  .semelhante h4 { margin: 0; font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .semelhante p { margin: 6px 0 0; font-size: 11px; -webkit-line-clamp: 2; }
}
@media (max-width: 560px) {
  :root { --por-linha: 2.3; }
  .marca img { width: 92px; }
  .resultados-grade { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; scroll-behavior: auto !important; }
  .splash { display: none; }
}
