:root {
  --bg: #0b0d12;
  --panel: #151922;
  --panel-2: #1d222d;
  --line: #262c39;
  --text: #eef0f4;
  --muted: #98a1b3;
  --accent: #5b8cff;
  --accent-ink: #06122e;
  --danger: #ff6b6b;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- topo ---------- */
#top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: rgba(11, 13, 18, .88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 300; font-size: 18px; letter-spacing: .2px; white-space: nowrap; }
.brand b { font-weight: 700; color: var(--accent); }
.brand.big { font-size: 26px; text-align: center; margin-bottom: 8px; }
#top nav { display: flex; gap: 4px; }
#top nav a { padding: 7px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; }
#top nav a.on { background: var(--panel-2); color: var(--text); }
.top-actions { margin-left: auto; display: flex; gap: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
  border: 0; border-radius: var(--radius); padding: 11px 20px;
}
.btn.small { padding: 7px 12px; font-size: 13px; cursor: pointer; }
.btn:disabled { opacity: .6; }
.ghost { background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: var(--radius); padding: 7px 10px; }
.ghost:hover { color: var(--text); background: var(--panel-2); }
.ghost.outline { border-color: var(--line); color: var(--text); padding: 11px 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 520px) {
  #top { gap: 8px; }
  .brand span { display: none; } /* no celular fica so "Media" */
  #top nav a { padding: 7px 11px; }
  .top-actions .ghost { padding: 7px 6px; font-size: 13px; }
  #add-btn span { display: none; }
  #add-btn { font-size: 20px; line-height: 1; }
}

/* ---------- catalogo ---------- */
main { max-width: 1400px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.list-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.list-head h1 { margin: 0; font-size: 22px; }
.list-head .count { color: var(--muted); font-size: 13px; }
.search {
  margin-left: auto; flex: 1 1 220px; max-width: 360px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
}
.search::placeholder { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 16px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
.card { display: block; min-width: 0; }
.poster {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line);
  transition: transform .15s ease, border-color .15s ease;
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster.noimg { display: grid; place-items: center; padding: 12px; text-align: center; color: var(--muted); font-weight: 600; }
.card:hover .poster { transform: translateY(-3px); border-color: var(--accent); }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.bar i { display: block; height: 100%; background: var(--accent); }
.card .title { margin-top: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; line-height: 1.8; }
.empty code { background: var(--panel); padding: 2px 6px; border-radius: 4px; color: var(--text); }

/* ---------- continuar assistindo ---------- */
.continue { margin-bottom: 28px; }
.continue h2 { font-size: 16px; margin: 0 0 12px; color: var(--muted); font-weight: 600; }
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 8px; scroll-snap-type: x proximity; }
.strip .card { flex: 0 0 130px; scroll-snap-align: start; }
@media (min-width: 700px) { .strip .card { flex-basis: 150px; } }
.strip .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dismiss {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.dismiss:hover { background: var(--danger); }
.seen {
  position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; display: grid; place-items: center;
}

/* ---------- filtro por genero ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: -4px 0 20px; padding-bottom: 4px; }
.chips button { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; color: var(--muted); font-size: 13px; font-weight: 600; }
.chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- detalhe ---------- */
.detail { display: grid; grid-template-columns: minmax(140px, 260px) 1fr; grid-template-rows: auto auto 1fr; column-gap: 28px; align-items: start; }
.detail > .poster { width: 100%; grid-row: 1 / span 3; }
.detail > :not(.poster) { grid-column: 2; }
.detail .desc:empty { display: none; }
.detail h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; }
.detail .meta { color: var(--muted); margin-bottom: 14px; }
.detail .desc { color: #cfd4de; max-width: 70ch; white-space: pre-line; margin: 0 0 20px; }
.detail .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .detail { grid-template-columns: 110px 1fr; column-gap: 16px; }
  .detail > .poster { grid-row: 1; }
  .detail h1 { font-size: 21px; }
  .detail .desc, .detail .actions { grid-column: 1 / -1; margin-top: 16px; }
}
.back { display: inline-block; color: var(--muted); margin-bottom: 16px; }
.back:hover { color: var(--text); }

.seasons { display: flex; gap: 8px; margin: 30px 0 14px; overflow-x: auto; padding-bottom: 4px; }
.seasons button { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; color: var(--muted); font-weight: 600; }
.seasons button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.episodes { display: grid; gap: 8px; }
.ep { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; align-items: center; padding: 8px; border-radius: var(--radius); border: 1px solid transparent; }
.ep:hover { background: var(--panel); border-color: var(--line); }
.ep .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.ep .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep .num { color: var(--muted); font-size: 13px; }
.ep .name { font-weight: 600; }
.ep .about { color: var(--muted); font-size: 13px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) { .ep { grid-template-columns: 110px 1fr auto; } }
.mark { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 800; }
.mark:hover { border-color: var(--accent); color: var(--text); }
.mark.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- login ---------- */
.login-page { display: grid; place-items: center; padding: 20px; }
.login-card { width: min(360px, 100%); display: grid; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
label input, label textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 16px; width: 100%;
}
label textarea { resize: vertical; font-size: 15px; }
.error { color: var(--danger); margin: 0; font-size: 14px; }

/* ---------- painel de edicao ---------- */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(640px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog h2 { margin: 0 0 16px; font-size: 18px; }
.edit-grid { display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.edit-poster { display: grid; gap: 10px; align-content: start; justify-items: center; }
.edit-poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.edit-fields { display: grid; gap: 12px; }
.edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-lookup { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.edit-lookup .ghost.outline { padding: 8px 14px; }
#edit-results { display: grid; gap: 6px; margin-top: 10px; }
#edit-results:empty { display: none; }
#edit-results button { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
#edit-results button:hover { border-color: var(--accent); }
#edit-results small { color: var(--muted); }
dialog { max-height: calc(100dvh - 24px); overflow-y: auto; }

/* ---------- ficha: nota, genero, duracao, pais, diretor ---------- */
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.facts b { color: var(--text); font-weight: 600; }
.facts .score { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.facts .badge { background: #f5c518; color: #000; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: .3px; }

/* ---------- elenco ---------- */
.cast-box { margin-top: 30px; }
.cast-box h2 { font-size: 17px; margin: 0 0 14px; }
.cast { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.person { flex: 0 0 84px; text-align: center; min-width: 0; background: transparent; border: 0; padding: 0; }
.person:hover .face { border-color: var(--accent); }
.person .face {
  width: 72px; height: 72px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 20px;
}
.person .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .role { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@media (max-width: 520px) { .edit-grid { grid-template-columns: 1fr; } .edit-poster img { width: 120px; } }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100;
  background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; max-width: calc(100vw - 32px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}

/* ---------- player ---------- */
/* O player fica dentro da pagina (coluna esquerda). So ocupa a tela toda em tela cheia ou com o celular deitado. */
#player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100dvh - 150px); background: #000; border-radius: var(--radius); overflow: hidden;
  container-type: inline-size; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
#player { --sat: 0px; --sar: 0px; --sab: 0px; --sal: 0px; }
#player:fullscreen { aspect-ratio: auto; height: 100%; max-height: none; border-radius: 0; --sat: env(safe-area-inset-top); --sar: env(safe-area-inset-right); --sab: env(safe-area-inset-bottom); --sal: env(safe-area-inset-left); }
#player:not(:fullscreen) .p-top { display: none; }
@media (orientation: landscape) and (max-height: 520px) {
  #player:not([hidden]) { --sat: env(safe-area-inset-top); --sar: env(safe-area-inset-right); --sab: env(safe-area-inset-bottom); --sal: env(safe-area-inset-left); position: fixed; inset: 0; z-index: 50; aspect-ratio: auto; width: 100% !important; height: 100%; max-height: none; margin: 0 !important; border-radius: 0; }
  #player:not(:fullscreen) .p-top { display: flex; }
  body:has(#player:not([hidden])) { overflow: hidden; }
}
/* Player estreito (celular em pe): menos botoes na barra, para nao cobrir o video. */
@container (max-width: 560px) {
  #p-next, #p-rew, #p-fwd { display: none; }
  .p-text { padding: 0 7px; font-size: 13px; }
  .p-bottom { padding-top: 20px; }
  #player:not(.idle) #p-subs { bottom: 76px; }
  #p-menu { bottom: calc(76px + var(--sab)); max-height: calc(100% - 84px); }
}
#player.idle { cursor: none; }
#pv { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
#p-subs {
  position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; pointer-events: none;
  font-size: clamp(13px, 3cqw, 34px); line-height: 1.3; font-weight: 600; color: #fff; white-space: pre-line;
  text-shadow: 0 0 4px #000, 0 0 4px #000, 0 2px 6px #000; transition: bottom .2s ease;
}
#player:not(.idle) #p-subs { bottom: 96px; }
#p-spinner {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px;
  border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
#p-bigplay {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; z-index: 3;
}
#p-bigplay svg { width: 44px; height: 44px; fill: #000; }

#p-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; transition: opacity .25s ease; }
#player.idle #p-ui { opacity: 0; }
#player.idle #p-ui * { pointer-events: none !important; }
.p-top, .p-bottom { pointer-events: auto; }
.p-top {
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + var(--sat)) max(14px, var(--sar)) 40px max(14px, var(--sal));
  background: linear-gradient(rgba(0, 0, 0, .75), transparent);
}
.p-titles { min-width: 0; }
#p-title { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#p-subtitle { color: #c9cedb; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-bottom {
  margin-top: auto; /* fica embaixo mesmo quando a barra de cima esta escondida */
  padding: 32px max(12px, var(--sar)) calc(6px + var(--sab)) max(12px, var(--sal));
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.p-seek { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; font-size: 13px; }
#p-bar { flex: 1; min-width: 0; height: 24px; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; background: transparent; --pct: 0%; }
#p-bar::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--pct), rgba(255, 255, 255, .3) var(--pct)); }
#p-bar::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; border: 0; }
#p-bar::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
#p-bar::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
#p-bar::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.p-btns { display: flex; align-items: center; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.p-btns .spacer { flex: 1; }
.p-icon, .p-text { background: transparent; border: 0; color: #fff; border-radius: 8px; min-height: 40px; }
.p-icon { width: 44px; display: grid; place-items: center; }
.p-icon svg { width: 26px; height: 26px; fill: currentColor; }
.p-text { padding: 0 10px; font-weight: 600; font-size: 14px; }
.p-icon:hover, .p-text:hover { background: rgba(255, 255, 255, .14); }
#p-menu {
  position: absolute; right: max(14px, var(--sar)); bottom: calc(88px + var(--sab)); pointer-events: auto;
  background: rgba(21, 25, 34, .97); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  min-width: 220px; max-width: min(440px, calc(100vw - 28px)); max-height: calc(100% - 110px); overflow-y: auto; display: grid;
}
/* Painel dos tempos de abertura e creditos, abaixo do video. */
.skip-panel { display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; max-width: 560px; }
.skip-panel[hidden] { display: none; }
.skip-panel .hint { color: var(--muted); font-size: 13px; margin: 0; }
.skip-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: end; }
.skip-row .hint { grid-column: 1 / -1; }
.skip-row .ghost.outline { padding: 10px 14px; white-space: nowrap; }
.skip-scope select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 16px; }
.skip-actions { display: flex; gap: 10px; }
.skip-actions .btn, .skip-actions .ghost.outline { padding: 9px 16px; }

/* "Pular abertura" / "Proximo episodio": fica visivel mesmo com os controles escondidos. */
#p-skip {
  position: absolute; right: max(14px, var(--sar)); bottom: calc(92px + var(--sab)); z-index: 2;
  background: rgba(238, 240, 244, .94); color: #0b0d12; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .55); transition: bottom .2s ease;
}
#p-skip:hover { background: #fff; }
#player.idle #p-skip { bottom: calc(20px + var(--sab)); }
@container (max-width: 560px) {
  #p-skip { bottom: calc(72px + var(--sab)); padding: 8px 13px; font-size: 13px; }
  #player.idle #p-skip { bottom: calc(12px + var(--sab)); }
}
#p-menu .head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; padding: 6px 12px 4px; }
#p-menu button { background: transparent; border: 0; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text); overflow-wrap: anywhere; }
#p-menu button:hover { background: var(--panel-2); }
#p-menu button.on { color: var(--accent); font-weight: 700; }
#p-menu button.on::before { content: "✓ "; }

.top-actions .ghost { white-space: nowrap; }
@media (max-width: 700px) { #add-btn span { display: none; } #add-btn { font-size: 20px; line-height: 1; } }

/* ---------- remover, duplicados e lixeira ---------- */
.ghost.outline.danger { color: var(--danger); }
.ghost.outline.danger:hover { border-color: var(--danger); background: transparent; }
.ep-tools { display: flex; gap: 6px; }
.mark.del { font-size: 18px; line-height: 1; }
.mark.del:hover { border-color: var(--danger); color: var(--danger); }
.lib-footer { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: grid; gap: 6px; }
.lib-footer:empty { display: none; }
.lib-footer .warn-line { color: var(--text); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; }
#dups-body { display: grid; gap: 16px; }
.dup-group { display: grid; gap: 6px; }
.dup-title { font-weight: 600; }
.dup-title small, .dup-info small { color: var(--muted); font-weight: 400; }
.dup-row { display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.dup-row.best { border-color: var(--accent); }
.dup-info { flex: 1; min-width: 0; }
.dup-name { font-size: 13px; overflow-wrap: anywhere; }
.dup-row .ghost.outline { padding: 7px 12px; }
#add-results small.warn { color: var(--danger); }

/* ---------- adicionar filme/serie ---------- */
.add-fields { display: grid; gap: 14px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; width: max-content; }
.seg label { display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: 0; }
.seg span { display: block; padding: 7px 18px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg input:checked + span { background: var(--text); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.add-title-row { display: grid; grid-template-columns: 1fr 96px auto; gap: 10px; align-items: end; }
.add-title-row .ghost.outline { padding: 10px 14px; }
label select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 16px; width: 100%; }
label input[type="file"] { padding: 8px; font-size: 14px; }
#add-results { display: grid; gap: 6px; margin-top: 10px; }
#add-results:empty, #add-list:empty { display: none; }
#add-results button { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
#add-results button:hover { border-color: var(--accent); }
#add-results small { color: var(--muted); }
#add-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.add-file { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.add-file .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-file .size, .add-file .ep-label { color: var(--muted); }
.add-file input { width: 64px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; color: var(--text); font-size: 14px; }
#add-upload[hidden], #add-download[hidden], #add-source[hidden] { display: none; }
#add-download small { color: var(--muted); }
#add-download label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
#add-download label.check input { width: auto; }
#add-download small.warn { color: var(--danger); }
#add-download select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 16px; width: 100%; }
#add-status { white-space: pre-line; }
#add-question { display: grid; gap: 6px; margin-top: 10px; }
#add-question[hidden] { display: none; }
#add-question small { color: var(--muted); }
#add-question button { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }
#add-question button:hover:not(:disabled) { border-color: var(--accent); }
#add-question button:disabled { opacity: .5; }
#add-question button.none { color: var(--muted); }
#add-bar { width: 100%; height: 8px; accent-color: var(--accent); }
#add-status { color: var(--muted); font-size: 13px; margin-top: 6px; }
@media (max-width: 520px) { .add-title-row { grid-template-columns: 1fr 84px; } .add-title-row .ghost.outline { grid-column: 1 / -1; } }

/* ---------- pagina de assistir: video a esquerda, lista ao lado ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.watch-main { min-width: 0; }
.watch-main h1 { margin: 16px 0 2px; font-size: 22px; line-height: 1.25; }
.watch-main .meta { color: var(--muted); margin-bottom: 12px; }
.watch-main .desc { color: #cfd4de; max-width: 75ch; white-space: pre-line; margin: 14px 0 0; }
.watch-main .desc:empty { display: none; }
.watch-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.watch-main .facts { margin-bottom: 0; }
.watch-actions .btn, .watch-actions .ghost.outline { padding: 9px 16px; }
.watch-side { min-width: 0; position: sticky; top: 76px; max-height: calc(100dvh - 96px); overflow-y: auto; padding-right: 4px; }
.watch-side h2 { font-size: 15px; margin: 0 0 10px; }
.watch-side .seasons { margin: 0 0 10px; }
.side-ep { display: grid; grid-template-columns: 104px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; border: 1px solid transparent; }
.side-ep:hover { background: var(--panel); }
.side-ep.now { background: var(--panel-2); border-color: var(--line); }
.side-ep .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.side-ep .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-ep .num { color: var(--muted); font-size: 12px; }
.side-ep .name { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-ep.now .num { color: var(--accent); }
.side-person { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border-radius: 8px; background: transparent; border: 0; text-align: left; }
.side-person:hover { background: var(--panel); }
.side-person .face { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 14px; }
.side-person .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-person .name { font-weight: 600; font-size: 14px; }
.side-person .role { color: var(--muted); font-size: 12px; }
.watch.solo { grid-template-columns: minmax(0, 1100px); justify-content: center; }
@media (max-width: 900px) {
  .watch { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .watch-side { position: static; max-height: none; overflow: visible; padding-right: 0; }
  #player { border-radius: 0; margin: -20px calc(-1 * max(16px, env(safe-area-inset-left))) 0; width: auto; }
}

/* mapa de episodios no site de video e fila de downloads */
.skip-panel label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.skip-panel label.check input { width: auto; }
.map { display: grid; gap: 12px; }
.map details { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.map summary { cursor: pointer; font-weight: 600; }
.map summary small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.map-ep { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.map-ep input { width: auto; flex: none; }
.map-ep .st { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.map-ep.off { color: var(--muted); }
.map .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-list { display: grid; gap: 8px; }
.dl-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.dl-row .name { font-weight: 600; }
.dl-row .st { color: var(--muted); font-size: 13px; grid-column: 1; }
.dl-row .tools { display: flex; gap: 8px; grid-row: 1 / span 2; grid-column: 2; }
.dl-row progress { grid-column: 1 / -1; width: 100%; }
.dl-group { color: var(--muted); font-size: 14px; font-weight: 600; margin: 18px 0 2px; }
.catalog-head { font-size: 16px; margin: 28px 0 12px; color: var(--muted); font-weight: 600; }

/* aba Anime */
.anime-results { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.anime-results a { text-decoration: none; }
.anime-form { display: grid; grid-template-columns: 1fr 140px; gap: 12px; }
@media (max-width: 560px) { .anime-form { grid-template-columns: 1fr; } }

/* modo TV: foco bem visivel para o controle remoto e player ocupando a tela */
@media (max-width: 700px) { html:not(.tv) #tv-btn { display: none; } }
html.tv :focus { outline: 4px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
html.tv .card:focus { outline: none; }
html.tv .card:focus .poster { outline: 5px solid var(--accent); outline-offset: -5px; }
html.tv .card:focus .title { color: var(--accent); }
html.tv a.ep:focus, html.tv .map-ep:focus-within, html.tv .dl-row:focus-within { background: var(--panel); }
html.tv input[data-tv-lock] { caret-color: transparent; }
html.tv #player:not([hidden]) { position: fixed; inset: 0; width: auto; height: auto; aspect-ratio: auto; max-height: none; z-index: 60; border-radius: 0; }
html.tv #player:not(:fullscreen) .p-top { display: flex; }
html.tv body:has(#player:not([hidden])) { overflow: hidden; }
html.tv #player :focus { outline: 4px solid #fff; background: rgba(255, 255, 255, .22); }
html.tv #p-menu button:focus { background: rgba(255, 255, 255, .3); }
html.tv .strip { scroll-snap-type: none; }
html.tv .seg label:focus { outline: none; }
html.tv .seg label:focus span { outline: 4px solid var(--accent); outline-offset: 2px; }

/* ---------- reorganizacao: menu, Adicionar, etapas, grade de episodios ---------- */
#nav-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; text-align: center; vertical-align: 1px; }
#nav-badge[hidden] { display: none; }
#nav-badge.warn { background: var(--danger); color: #2a0606; }
.top-actions { position: relative; align-items: center; }
#search-btn { display: inline-flex; align-items: center; }
#more-btn { font-size: 20px; line-height: 1; padding: 5px 10px; }
#more-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; display: grid; gap: 2px; min-width: 200px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
#more-menu[hidden] { display: none; }
#more-menu .ghost { text-align: left; color: var(--text); padding: 10px 12px; font-size: 14px; }
#top nav { overflow-x: auto; scrollbar-width: none; }
#top nav::-webkit-scrollbar { display: none; }
#top nav a { white-space: nowrap; }
@media (max-width: 620px) {
  #top { flex-wrap: wrap; row-gap: 6px; }
  #top nav { order: 3; width: 100%; }
  .top-actions { margin-left: auto; }
}

.list-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: -6px 0 16px; }
.list-tools select { width: auto; padding: 7px 10px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.list-tools .check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.list-tools .check input { width: auto; }
.continue h2 .more { margin-left: 12px; font-size: 13px; font-weight: 600; color: var(--accent); }
a.link { color: var(--accent); }

.find-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 8px; }
.find-row { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.find-row:hover, .find-row:focus-visible { border-color: var(--accent); }
.find-row .poster { flex: 0 0 52px; width: 52px; aspect-ratio: 2 / 3; font-size: 9px; }
.find-row .title { font-weight: 600; }
.find-row .sub { color: var(--muted); font-size: 13px; }
.find-row.have .sub:first-of-type { color: #7ddc9a; }

.activity { margin-top: 28px; }
.activity .list-head h2 { margin: 0; font-size: 18px; }
.activity .list-head .ghost.outline { padding: 7px 12px; font-size: 13px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.bad { background: rgba(255, 107, 107, .16); color: var(--danger); }
.pill.run { background: rgba(91, 140, 255, .18); color: var(--accent); }
.pill.wait { background: var(--panel-2); color: var(--muted); }
.pill.ok { background: rgba(125, 220, 154, .16); color: #7ddc9a; }
.dl-row .tools { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.dl-row .tools .ghost.outline { padding: 7px 12px; font-size: 13px; }
.dl-fold { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; }
.dl-fold summary { padding: 9px 2px; font-weight: 600; cursor: pointer; }
.dl-fold .dl-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 2px; background: none; }
.hint.warn { color: var(--danger); }

.steps { display: flex; gap: 0; list-style: none; margin: 4px 0 18px; padding: 0; max-width: 760px; overflow-x: auto; }
.steps li { flex: 1 1 0; min-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0 4px 9px; border-bottom: 3px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.steps li b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 12px; }
.steps li small { font-size: 12px; }
.steps li.on { border-color: var(--accent); color: var(--text); }
.steps li.on b { background: var(--accent); color: var(--accent-ink); }
.steps li.done { border-color: #3f9a61; color: var(--text); }
.steps li.done b { background: #3f9a61; color: #04170b; }

.skip-panel:has(.ep-grid), .skip-panel:has(.map) { max-width: 760px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; padding: 8px 0 12px; }
.epb { height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 13px; font-weight: 600; padding: 0; }
.epb.on { border: 2px solid var(--accent); background: rgba(91, 140, 255, .18); }
.epb.have { background: rgba(63, 154, 97, .28); border-color: #3f9a61; color: #b9f0cb; }
.epb.queue { background: rgba(91, 140, 255, .32); border-color: var(--accent); }
.epb.failed { border-color: var(--danger); color: var(--danger); }
.epb.off { opacity: .45; }
.ep-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; color: var(--muted); font-size: 12px; }
.ep-legend .epb { display: inline-grid; place-items: center; width: 26px; height: 24px; font-size: 11px; }
.upload-box summary { cursor: pointer; font-weight: 600; }
.upload-box .add-file { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.upload-box .add-file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-box .add-file .size { color: var(--muted); }
.upload-box .add-file input { width: 64px; }
html.tv .find-row:focus, html.tv .epb:focus { outline: 3px solid var(--accent); outline-offset: 2px; }

.map > a.btn { justify-self: start; }

/* colar o endereco da pagina do filme */
.paste-url { margin-top: 12px; }
.paste-url summary { cursor: pointer; color: var(--muted, #9aa3b2); font-size: 14px; }
.paste-url .actions { display: flex; margin-top: 8px; flex-wrap: wrap; width: 100%; }
.paste-url input { flex: 1 1 260px; min-width: 0; width: 100%; }

/* sites de video (validacao) */
.site-send { display: flex; flex-wrap: wrap; width: 100%; }
.site-send input { flex: 1 1 260px; min-width: 0; width: 100%; }
.site-group { display: flex; align-items: center; gap: 8px; margin: 22px 0 6px; font-size: 16px; }
.site-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; padding: 12px 14px; margin: 8px 0; border: 1px solid var(--line, #262b36); border-radius: 12px; background: var(--card, #151922); }
.site-row.bad { border-color: rgba(255, 107, 107, .35); }
.site-main { flex: 1 1 280px; min-width: 0; }
.site-main .name { font-weight: 600; overflow-wrap: anywhere; }
.site-main .st, .site-run-head { color: var(--muted, #9aa3b2); font-size: 13px; margin-top: 3px; }
.site-main .why, .site-stages .why { color: #ff9c9c; font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.site-row .actions { flex-wrap: wrap; }
.site-detail { flex: 1 1 100%; border-top: 1px solid var(--line, #262b36); padding-top: 10px; }
.site-stages { margin: 8px 0 12px; padding-left: 22px; }
.site-stages li { margin: 5px 0; font-size: 14px; }
.site-stages li.st-not_reached { opacity: .5; }

/* escolha de audio */
.audio-chips { align-items: center; margin-top: 8px; }
.audio-chips .chips-label { color: var(--muted, #9aa3b2); font-size: 14px; margin-right: 2px; }

/* ===== redesign A · cinema escuro ===== */
:root {
  --bg: #0b0c10; --panel: #13151b; --panel-2: #1c1f27; --line: #23262f;
  --text: #e8eaf0; --muted: #a4a9b6; --accent: #4f7dff; --accent-ink: #ffffff;
  --warn: #ff8a3d; --ok: #2bb673; --radius: 12px;
}
body { font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
h1, h2, .brand, .central-title { letter-spacing: -0.02em; }
#top { gap: 24px; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 14px; background: rgba(11, 12, 16, .9); border-bottom-color: transparent; }
.brand { font-weight: 700; font-size: 20px; }
.brand span { font-weight: 700; }
#top nav a { font-weight: 500; font-size: 15px; padding: 8px 14px; }
#top nav a.on { background: var(--panel-2); }
.top-actions { align-items: center; gap: 10px; }
.pill-search { display: flex; align-items: center; gap: 8px; background: #16181f; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; color: #8c92a0; font-size: 14px; min-width: 220px; }
.pill-search:hover { color: var(--text); border-color: #343846; }
.add-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.add-pill:hover { filter: brightness(1.08); }
.add-pill.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
#nav-badge { position: absolute; top: -6px; right: -6px; margin: 0; min-width: 20px; height: 20px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; background: var(--warn); color: #0b0c10; font-size: 12px; }
#nav-badge.warn { background: #ff5d5d; color: #fff; }
@media (max-width: 900px) { .pill-search span { display: none; } .pill-search { min-width: 0; padding: 9px 11px; } }
@media (max-width: 520px) { .add-pill .lbl { display: none; } .add-pill { padding: 9px 11px; } #top { gap: 10px; } #top nav a { padding: 7px 9px; font-size: 14px; } }
.btn { border-radius: 12px; font-weight: 600; }
.btn.light { background: #fff; color: #0b0c10; }
.ghost.outline { border-radius: 12px; }
.poster { border-radius: 12px; }
.continue h2 { color: var(--text); font-size: 18px; }

/* destaque do Inicio */
.hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 32px; min-height: 320px; margin: 0 0 32px; padding: 36px; border-radius: 20px; background: #1a2233; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg .hero-blur { position: absolute; inset: -40px; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(36px) saturate(1.1); opacity: .45; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 12, 16, .92) 0%, rgba(11, 12, 16, .55) 60%, rgba(11, 12, 16, .25) 100%); }
.hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #9fb4d9; }
.hero h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); line-height: 1; letter-spacing: -0.035em; }
.hero-sub { color: var(--muted); }
.hero-bar { height: 4px; max-width: 360px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.hero-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.play-ico { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; }
.hero-art { flex: 0 0 auto; width: 190px; }
.hero-art .poster { box-shadow: 0 20px 40px rgba(0, 0, 0, .45); }
@media (max-width: 640px) { .hero { padding: 24px; min-height: 0; } .hero-art { display: none; } }

/* Central (parte tecnica) */
.central-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.back-watch { color: var(--muted); font-size: 14px; }
.back-watch:hover { color: var(--text); }
.central-title { font-weight: 700; font-size: 20px; }
.central-tabs { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; }
.central-tabs a { white-space: nowrap; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; }
.central-tabs a:hover { color: var(--text); }
.central-tabs a.on { background: var(--panel-2); color: var(--text); }
.tab-badge { margin-left: 6px; color: var(--warn); font-weight: 700; }
.tab-badge.warn { color: #ff6b6b; }
.central-body { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.central-body.one { display: block; }
.central-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.central-aside { flex: 1 1 300px; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.central-h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.big-search { flex: 0 0 auto; margin: 0; max-width: none; width: 100%; font-size: 16px; padding: 14px 18px; border-radius: 14px; background: #16181f; border-color: #2a2e39; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.filter-row .chips { margin: 0; }
.central-main .find-list { grid-template-columns: 1fr; }
.mini-card { background: var(--panel); border: 1px solid #1f222b; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mini-head { display: flex; justify-content: space-between; align-items: baseline; }
.mini-head h2 { margin: 0; font-size: 15px; }
.mini-head a { color: var(--muted); font-size: 13px; }
.mini-stats { display: flex; gap: 8px; }
.mini-stat { flex: 1; background: #1a1d25; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.mini-stat b { font-size: 22px; }
.mini-stat span { font-size: 12px; color: var(--muted); }
.mini-stat.warn { background: #2a1c12; }
.mini-stat.warn b { color: var(--warn); }
.mini-list { display: flex; flex-direction: column; gap: 12px; }
.mini-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.mini-line span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-line small { color: var(--muted); white-space: nowrap; }
.mini-bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; }
.mini-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.mini-site { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mini-site span { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.mini-site small { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 99px; flex: 0 0 auto; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.bad { background: #ff6b6b; }
h2.sec { font-size: 16px; margin: 26px 0 12px; }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.news-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid #1f222b; border-radius: 14px; padding: 10px; }
.news-row:hover { border-color: #343846; }
.news-art { width: 44px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--panel-2); flex: 0 0 auto; }
.news-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-row .title { font-weight: 600; }
.news-row .sub { color: var(--muted); font-size: 13px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { text-align: left; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid #1f222b; border-radius: 16px; padding: 18px; color: var(--text); }
.tile:hover { border-color: var(--accent); }
.tile span { color: var(--muted); font-size: 13px; }
html.tv .tile:focus, html.tv .central-tabs a:focus, html.tv .add-pill:focus, html.tv .pill-search:focus { outline: 4px solid var(--accent); outline-offset: 2px; }

/* marca Pipoca */
.brand { display: inline-flex; align-items: center; gap: 0; }
.brand b { color: #ffc23d; }
.brand-ico { width: 28px; height: 28px; border-radius: 8px; display: block; margin-right: 9px; }
.brand.big { justify-content: center; }
.brand.big .brand-ico { width: 44px; height: 44px; border-radius: 12px; margin-right: 12px; }
@media (max-width: 520px) { .brand span { display: inline; } .brand { font-size: 18px; } }

/* ===== TV reativa: foco animado no lugar da caixa azul ===== */
.card .poster { transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s ease, filter .24s ease; }
.card .title, .card .sub { transition: color .2s ease, opacity .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .poster { transform: scale(1.05); border-color: transparent; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
}

html.tv :focus { outline: none; }
html.tv a, html.tv button, html.tv summary, html.tv label, html.tv input { transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .2s ease, color .2s ease, box-shadow .2s ease, filter .2s ease; }

/* capas: a que esta em foco cresce e ganha brilho; as outras da mesma fileira escurecem */
html.tv .strip { padding: 18px 14px 26px; margin: -18px -14px -14px; scroll-padding-inline: 40px; }
html.tv .grid { padding: 10px; margin: -10px; }
html.tv .card:focus .poster { outline: none; transform: scale(1.12); border-color: transparent; box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 22px 48px rgba(0, 0, 0, .7); z-index: 2; }
html.tv .card:focus { position: relative; z-index: 3; }
html.tv .card:focus .title { color: #fff; }
html.tv .strip:focus-within .card:not(:focus) .poster,
html.tv .grid:focus-within .card:not(:focus) .poster { filter: brightness(.5) saturate(.85); }
html.tv .strip:focus-within .card:not(:focus) .title,
html.tv .strip:focus-within .card:not(:focus) .sub { opacity: .55; }

/* botoes: o botao em foco fica claro e cresce um pouco */
html.tv .btn:focus { transform: scale(1.07); box-shadow: 0 0 0 3px #fff, 0 10px 26px rgba(0, 0, 0, .5); }
html.tv .btn.light:focus { box-shadow: 0 0 0 3px var(--accent), 0 10px 26px rgba(0, 0, 0, .5); }
html.tv .ghost:focus, html.tv .ghost.outline:focus, html.tv .chips button:focus, html.tv .tile:focus, html.tv .link:focus { background: #fff; color: #0b0c10; border-color: #fff; transform: scale(1.05); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); outline: none; }
html.tv .tile:focus span { color: #3a3f4b; }
html.tv #top nav a:focus, html.tv .central-tabs a:focus { background: #fff; color: #0b0c10; transform: scale(1.06); }
html.tv .add-pill:focus { transform: scale(1.07); box-shadow: 0 0 0 3px #fff, 0 10px 26px rgba(79, 125, 255, .45); outline: none; }
html.tv .pill-search:focus { background: #fff; color: #0b0c10; border-color: #fff; transform: scale(1.04); outline: none; }
html.tv .continue h2 .more:focus { background: #fff; color: #0b0c10; border-radius: 999px; padding: 2px 10px; }
html.tv .hero-art:focus .poster { transform: scale(1.05); box-shadow: 0 0 0 3px #fff, 0 24px 50px rgba(0, 0, 0, .6); }
html.tv input:focus, html.tv select:focus, html.tv textarea:focus { box-shadow: 0 0 0 3px #fff; }

/* listas (episodios, atividade, busca): a linha em foco se destaca e anda um pouco */
html.tv a.ep:focus, html.tv .find-row:focus, html.tv .epb:focus, html.tv .news-row:focus, html.tv .mini-site:focus { outline: none; background: #fff; color: #0b0c10; transform: translateX(6px); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
html.tv a.ep:focus *, html.tv .find-row:focus *, html.tv .news-row:focus * { color: inherit; }

/* player: botoes redondos que acendem */
html.tv #player :focus { outline: none; background: rgba(255, 255, 255, .92); color: #0b0c10; transform: scale(1.12); border-radius: 999px; }

/* destaque do Inicio: troca suave quando a capa em foco muda */
.hero-text, .hero-art, .hero-bg img { transition: opacity .16s ease, transform .3s ease; }
.hero.swap .hero-text, .hero.swap .hero-art { opacity: 0; transform: translateY(6px); }
.hero.swap .hero-bg img { opacity: .15; }

/* telas entram suavemente */
@keyframes pm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#view > * { animation: pm-in .32s cubic-bezier(.2, .8, .2, 1) backwards; }
/* a tela do player so aparece (sem deslizar): um "transform" ali prenderia o player fora da tela cheia */
#view > .watch { animation-name: pm-fade; }
@keyframes pm-fade { from { opacity: 0; } to { opacity: 1; } }
#view > *:nth-child(2) { animation-delay: .04s; }
#view > *:nth-child(3) { animation-delay: .08s; }
#view > *:nth-child(n+4) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  #view > *, .card .poster, html.tv a, html.tv button { animation: none !important; transition: none !important; }
  html.tv .card:focus .poster { transform: none; }
}

/* Inicio na TV: o destaque fica preso no alto e as fileiras correm por baixo dele (o destaque mostra a capa em foco) */
html.tv:has(#view > .hero) { scroll-padding-top: 300px; }
html.tv #view > .hero { position: sticky; top: 70px; z-index: 5; height: 214px; min-height: 0; padding: 18px 28px; margin: 0 0 6px; align-items: center; border-radius: 16px; box-shadow: 0 14px 30px rgba(11, 12, 16, .9); }
html.tv #view > .hero h1 { font-size: 40px; }
html.tv #view > .hero .hero-text { gap: 8px; }
html.tv #view > .hero .hero-art { width: 122px; }
html.tv #view:has(> .hero) .strip .card { flex-basis: 116px; }
html.tv #view:has(> .hero) .strip .card .title, html.tv #view:has(> .hero) .strip .card .sub { display: none; }
html.tv #view:has(> .hero) .continue { margin-bottom: 4px; }
html.tv #view:has(> .hero) .continue h2 { font-size: 16px; margin-bottom: 4px; }

/* previa no destaque */
.hero-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.hero-vid.on { opacity: .75; }
.hero-bg:has(.hero-vid.on) img { opacity: 0; transition: opacity .8s ease; }

/* abertura do player: capa desfocada, nome e indicador ate o video comecar */
#p-intro { position: absolute; inset: 0; z-index: 4; display: flex; align-items: flex-end; overflow: hidden; background: #0b0c10; animation: pm-fade .35s ease both; transition: opacity .45s ease; }
#p-intro.out { opacity: 0; pointer-events: none; }
#p-intro .p-intro-bg { position: absolute; inset: -40px; }
#p-intro .p-intro-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(30px) brightness(.45); transform: scale(1.08); animation: pm-zoom 6s ease-out both; }
@keyframes pm-zoom { from { transform: scale(1.2); } to { transform: scale(1.06); } }
#p-intro .p-intro-text { position: relative; padding: 0 6% 9%; display: flex; flex-direction: column; gap: 10px; }
#p-intro .p-intro-title { font-size: clamp(28px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; color: #fff; }
#p-intro .p-intro-sub { color: #c9cdd6; font-size: clamp(14px, 1.6vw, 18px); }
#p-intro .p-intro-spin { width: 34px; height: 34px; margin-top: 12px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: pm-spin .9s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }
#player:has(#p-intro:not([hidden]):not(.out)) #p-spinner, #player:has(#p-intro:not([hidden]):not(.out)) #p-ui { opacity: 0; }

/* aviso de avanco/volta pelo controle */
#p-seek { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); z-index: 5; padding: 12px 22px; border-radius: 999px; background: rgba(11, 12, 16, .78); color: #fff; font-size: clamp(16px, 2vw, 24px); font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); transition: opacity .5s ease; }
#p-seek.out { opacity: 0; }

/* ===== celular ===== */
/* player "deitado" no celular em pe: ocupa a tela toda, girado 90 graus */
@media (orientation: portrait) {
  #player.turned:not([hidden]) {
    position: fixed; top: 0; left: 100vw; z-index: 70; width: 100dvh !important; height: 100vw; max-height: none; aspect-ratio: auto;
    margin: 0 !important; border-radius: 0; transform-origin: top left; transform: rotate(90deg);
    --sat: env(safe-area-inset-right); --sar: env(safe-area-inset-bottom); --sab: env(safe-area-inset-left); --sal: env(safe-area-inset-top);
  }
  #player.turned .p-top { display: flex; }
  html.player-turned, html.player-turned body { overflow: hidden; }
}
/* dois toques: aviso do lado */
.p-tap { position: absolute; top: 50%; z-index: 6; transform: translateY(-50%); padding: 14px 18px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 700; font-size: 18px; opacity: 0; pointer-events: none; }
.p-tap.l { left: 12%; } .p-tap.r { right: 12%; }
.p-tap.go { animation: pm-tap .7s ease-out both; }
@keyframes pm-tap { 0% { opacity: 0; transform: translateY(-50%) scale(.8); } 20% { opacity: 1; transform: translateY(-50%) scale(1); } 100% { opacity: 0; transform: translateY(-50%) scale(1.05); } }

/* abas do site embaixo, como num app (so no celular estreito, fora do player) */
@media (max-width: 600px) {
  /* sem o desfoque no topo: ele prenderia as abas (position: fixed) dentro do topo */
  #top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(11, 12, 16, .97); }
  #top nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; gap: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(11, 12, 16, .94);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  #top nav a { flex: 1; text-align: center; font-size: 13px; padding: 8px 4px; border-radius: 12px; }
  main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:has(#player:not([hidden])) #top nav { display: none; }
  .hero { padding: 22px; min-height: 260px; }
  .hero h1 { font-size: 34px; }
}

/* ===== previa leve ===== */
.hero-vid { transition: opacity .5s ease; will-change: opacity; }
.hero-vid.cut { transition: none; }
/* TV: nada de desfoque recalculado (o fundo do destaque e o topo), e capas escurecidas por opacidade, nao por filtro */
html.tv #top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(11, 12, 16, .97); }
html.tv .hero-bg img { filter: none; opacity: .3; }
html.tv .hero-bg .hero-blur { inset: 0; }
html.tv .strip:focus-within .card:not(:focus) .poster,
html.tv .grid:focus-within .card:not(:focus) .poster { filter: none; opacity: .5; }
html.tv .card .poster { transition: transform .2s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
html.tv a, html.tv button, html.tv summary, html.tv label, html.tv input { transition: transform .18s cubic-bezier(.2, .8, .2, 1), background-color .18s ease, color .18s ease; }
html.tv #p-seek { backdrop-filter: none; }
#pv-btn { white-space: nowrap; }
/* "Ver todos" como ultima capa da fileira (so na TV) */
.more-card { display: none; }
html.tv .more-card { display: block; }
html.tv .more-card .poster { display: flex; align-items: center; justify-content: center; background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 15px; text-align: center; }
html.tv .continue h2 .more { display: none; }
/* TV: abertura do player sem desfoque grande nem zoom (o video ja esta comecando por baixo) */
html.tv #p-intro .p-intro-bg { inset: 0; }
html.tv #p-intro .p-intro-bg img { filter: brightness(.35); transform: none; animation: none; }
/* celular: o aviso nao cobre as abas de baixo */
@media (max-width: 600px) { #toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }
/* modo TV numa tela estreita: sem a barra de abas do celular */
@media (max-width: 600px) {
  html.tv #top nav { position: static; background: none; border: 0; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html.tv main { padding-bottom: 0; }
}

/* ---------- portao: tela de entrar e espera ---------- */
.login-card .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.login-card[hidden] { display: none; }
.wait-spin { width: 38px; height: 38px; margin: 6px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent, #e50914); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-msg { text-align: center; font-size: 1.05rem; margin: 0; }
.wait-dev { text-align: center; color: var(--muted, #9aa0aa); margin: 0; font-size: .9rem; }

/* convidados so assistem */
html.guest .own, html.guest #add-link, html.guest #rescan, html.guest #sites-btn { display: none !important; }

/* ---------- pagina Acessos ---------- */
.access { display: grid; gap: 22px; max-width: 980px; }
.acc-sec { display: grid; gap: 10px; }
.acc-sec h2 { margin: 0 0 2px; font-size: 1.1rem; }
.acc-wait { border: 1px solid #c9a227; border-radius: 14px; padding: 14px; background: rgba(201, 162, 39, .08); }
.acc-user { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--panel); }
.acc-user.paused { opacity: .7; }
.acc-user-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-user-head .spacer { flex: 1; }
.acc-dev { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); border-left: 3px solid var(--line); }
.acc-dev.st-ok, .acc-dev.st-once { border-left-color: #2e9d5b; }
.acc-dev.st-pending { border-left-color: #c9a227; }
.acc-dev.st-denied { border-left-color: #c0392b; }
.acc-dev-info { display: grid; gap: 2px; min-width: 0; }
.acc-dev-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.acc-dev small { color: var(--muted, #9aa0aa); overflow-wrap: anywhere; }
.acc-dev .actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.acc-tag { font-size: .72rem; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--muted, #9aa0aa); }
.acc-tag.st { background: rgba(201, 162, 39, .15); color: #e2c25a; }
.acc-ips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .85rem; }
.acc-ip { background: rgba(255, 255, 255, .06); border-radius: 8px; padding: 2px 4px 2px 8px; }
.acc-log { display: grid; gap: 2px; font-size: .85rem; max-height: 420px; overflow: auto; }
.acc-log-row { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.acc-log-row.k-ban, .acc-log-row.k-login-fail { color: #e88; }
.acc-when { color: var(--muted, #9aa0aa); flex: none; width: 92px; }
.acc-tag.s-ok, .acc-tag.s-once { background: rgba(46, 157, 91, .16); color: #5fd38f; }
.acc-tag.s-denied { background: rgba(192, 57, 43, .18); color: #ff8a80; }
.acc-user-head .check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }

/* ---------- Minha conta ---------- */
.acct { display: grid; grid-template-columns: 260px 1fr; gap: 16px; max-width: 1000px; align-items: start; }
.acct-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.acct-card h2 { margin: 0; font-size: 1.1rem; }
.acct-card label { display: grid; gap: 6px; }
.acct-me { grid-row: span 3; justify-items: center; text-align: center; position: sticky; top: 80px; }
.acct-preview svg { display: block; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45)); }
.acct-nick-show { font-weight: 700; font-size: 1.2rem; }
.acct-label { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.acct-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-opt { padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 2px solid transparent; display: grid; place-items: center; cursor: pointer; }
.acct-opt.on { border-color: var(--accent); background: rgba(91, 140, 255, .14); }
.acct-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.acct-swatch { width: 26px; height: 26px; border-radius: 50%; display: block; }
.acct-warn { border: 1px solid #c9a227; background: rgba(201, 162, 39, .1); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; max-width: 1000px; }
.acct-devs { display: grid; gap: 8px; }
#account-btn { display: flex; align-items: center; gap: 8px; }
#account-btn .avatar { border-radius: 50%; background: rgba(255, 255, 255, .06); }
@media (max-width: 760px) { .acct { grid-template-columns: 1fr; } .acct-me { grid-row: auto; position: static; } }

/* ---------- sala "Assistir junto" ---------- */
.room { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.room-stage { position: relative; border-radius: 18px; overflow: hidden; min-height: 460px; background: radial-gradient(ellipse at 50% 0%, #2a1d3a 0%, #120d18 55%, #07060a 100%); border: 1px solid var(--line); }
.room-panel { display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.room-panel h1 { margin: 0; font-size: 1.35rem; }
.room-panel h2 { margin: 6px 0 0; font-size: 1rem; }
.room-panel .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.room-code { display: flex; align-items: baseline; gap: 8px; }
.room-code b { font-size: 2rem; letter-spacing: .18em; font-family: ui-monospace, Consolas, monospace; color: #ffd43b; }
.room-people { display: grid; gap: 6px; }
.room-person { display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; align-items: center; }
.room-person small { grid-column: 2; color: var(--muted); font-size: .78rem; margin-top: -4px; }
.room-person svg { grid-row: span 2; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.room-person.off { opacity: .5; }
@media (max-width: 860px) { .room { grid-template-columns: 1fr; } .room-stage { min-height: 340px; } }

/* sala em 2D: telao, cortinas e poltronas */
.rf-room { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; justify-items: center; padding: 26px 18px 18px; }
.rf-screen { width: min(78%, 620px); aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; box-shadow: 0 0 60px rgba(160, 120, 255, .25), 0 0 0 3px #2b2433; transition: transform 1.2s cubic-bezier(.6, 0, .3, 1), filter 1.2s; transform-origin: 50% 40%; }
.rf-screen img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.rf-curtain { position: absolute; top: 0; bottom: 30%; width: 13%; background: repeating-linear-gradient(90deg, #6d1020 0 14px, #8a1528 14px 28px); box-shadow: inset 0 -30px 40px rgba(0, 0, 0, .5); }
.rf-curtain.l { left: 0; border-bottom-right-radius: 60% 20%; }
.rf-curtain.r { right: 0; border-bottom-left-radius: 60% 20%; }
.rf-seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin-top: 22px; padding: 14px 10px 6px; width: 100%; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.rf-seat { position: relative; display: grid; justify-items: center; gap: 2px; width: 84px; transition: opacity .3s; }
.rf-seat::after { content: ''; position: absolute; bottom: 18px; left: 6px; right: 6px; height: 26px; border-radius: 10px 10px 4px 4px; background: #5a1424; z-index: -1; box-shadow: 0 -10px 0 -2px #6d1a2c; }
.rf-seat.off { opacity: .45; }
.rf-nick { font-size: .78rem; font-weight: 600; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-puff { position: absolute; inset: 0; pointer-events: none; }
.rf-puff i { position: absolute; left: 50%; top: 40%; width: 26px; height: 26px; margin: -13px; border-radius: 50%; background: rgba(240, 240, 255, .85); opacity: 0; }
.rf-seat.puff-in .rf-av { animation: pop-in .6s cubic-bezier(.3, 1.6, .5, 1) both .12s; }
.rf-seat.puff-in .rf-puff i, .rf-seat.puff-out .rf-puff i { animation: puff .75s ease-out both; }
.rf-puff i:nth-child(1) { --dx: -34px; --dy: -18px; }
.rf-puff i:nth-child(2) { --dx: 32px; --dy: -22px; animation-delay: .04s; }
.rf-puff i:nth-child(3) { --dx: -26px; --dy: 22px; animation-delay: .08s; }
.rf-puff i:nth-child(4) { --dx: 30px; --dy: 20px; animation-delay: .02s; }
.rf-puff i:nth-child(5) { --dx: 0px; --dy: -36px; animation-delay: .06s; }
.rf-seat.puff-out .rf-av, .rf-seat.puff-out .rf-nick { animation: pop-out .45s ease-in both; }
@keyframes puff { 0% { opacity: .95; transform: translate(0, 0) scale(.3); } 60% { opacity: .7; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.6); } }
@keyframes pop-in { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes pop-out { 0% { transform: scale(1); } 100% { transform: scale(0); opacity: 0; } }
.rf-bubble { position: absolute; top: -18px; font-size: 1.7rem; animation: bubble 2.4s ease-out both; }
@keyframes bubble { 0% { transform: translateY(10px) scale(.4); opacity: 0; } 15% { transform: translateY(0) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }
.room-stage.zooming .rf-screen { transform: scale(3.2); filter: brightness(1.4); }
.room-stage.zooming .rf-seats, .room-stage.zooming .rf-curtain { opacity: 0; transition: opacity .6s; }
.room-stage::after { content: ''; position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s .8s; }
.room-stage.zooming::after { opacity: 1; }

/* barra da sala no player */
#room-bar { position: absolute; top: calc(12px + var(--sat, 0px)); right: calc(12px + var(--sar, 0px)); display: flex; align-items: center; gap: 10px; z-index: 6; padding: 6px 10px; border-radius: 99px; background: rgba(10, 10, 14, .62); transition: opacity .3s; }
#player.idle #room-bar { opacity: .35; }
.rb-people { display: flex; }
.rb-av { position: relative; margin-left: -6px; border-radius: 50%; background: #1a1d24; border: 2px solid #1a1d24; display: grid; }
.rb-av:first-child { margin-left: 0; }
.rb-av::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #2bb673; border: 2px solid #1a1d24; }
.rb-av.st-buffering::after, .rb-av.st-loading::after { background: #ffb020; }
.rb-av.st-lobby::after { background: #8a90a0; }
.rb-av.off { opacity: .45; }
.rb-wait { font-size: .82rem; color: #ffd43b; white-space: nowrap; }
.rb-react { display: flex; gap: 2px; }
.rb-emoji { background: none; border: 0; font-size: 1.15rem; padding: 2px 3px; cursor: pointer; border-radius: 8px; }
.rb-emoji:hover, .rb-emoji:focus-visible { background: rgba(255, 255, 255, .12); }
.rb-code { font-size: .8rem; font-weight: 700; color: #ffd43b; text-decoration: none; letter-spacing: .06em; }
.react-float { position: absolute; bottom: 90px; z-index: 7; display: grid; justify-items: center; pointer-events: none; animation: float-up 3.1s ease-out both; }
.rf-emoji { font-size: 2.6rem; }
.rfl-nick { font-size: .75rem; background: rgba(0, 0, 0, .55); padding: 1px 6px; border-radius: 6px; }
@keyframes float-up { 0% { transform: translateY(20px) scale(.5); opacity: 0; } 12% { transform: translateY(0) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-220px) scale(.9); opacity: 0; } }
#room-pill { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; background: #ffd43b; color: #1a1400; font-weight: 700; padding: 10px 18px; border-radius: 99px; text-decoration: none; box-shadow: 0 8px 26px rgba(0, 0, 0, .5); }
@media (max-width: 600px) { #room-pill { bottom: calc(76px + env(safe-area-inset-bottom)); } .rb-react { display: none; } }
.room-card .poster { position: relative; }
.room-card-av { position: absolute; left: 6px; bottom: 6px; display: flex; }
.room-card-av svg { margin-right: -6px; border-radius: 50%; background: #1a1d24; border: 2px solid #1a1d24; }
.room-panel .check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: .9rem; }

/* ---------- cinema 3D ---------- */
.c3-view { position: absolute; inset: 0; perspective: 640px; perspective-origin: 50% 42%; overflow: hidden; background: #050407; }
.c3-world, .c3-world div { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.c3-world { left: 50%; top: 58%; width: 0; height: 0; will-change: transform; }
.c3-plane { backface-visibility: hidden; }
.c3-floor { background: radial-gradient(ellipse at 50% 18%, #3a1a2a 0%, #1b0f17 45%, #0b070a 100%); }
.c3-floor::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 158px, rgba(0, 0, 0, .35) 158px 162px); }
.c3-ceil { background: #07060a; }
.c3-wall { background: linear-gradient(180deg, #120c18 0%, #1d1226 60%, #120a14 100%); }
.c3-wall.l, .c3-wall.r { background: repeating-linear-gradient(90deg, #1a1020 0 118px, #150c1a 118px 130px); }
.c3-wall.back { background: radial-gradient(ellipse at 50% 46%, #2c2140 0%, #120c18 60%); }
.c3-wall.rear { background: #0d0910; }
.c3-sconce { width: 34px; height: 54px; margin: -27px 0 0 -17px; border-radius: 50% 50% 8px 8px; background: radial-gradient(ellipse at 50% 70%, #ffd9a0 0%, #ff9c4a 30%, rgba(255, 140, 60, 0) 70%); box-shadow: 0 0 40px 18px rgba(255, 150, 70, .22); }
.c3-aisle { width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #ffcf7a; box-shadow: 0 0 14px 5px rgba(255, 190, 90, .5); }
.c3-screen { width: 640px; height: 360px; margin: -180px 0 0 -320px; background: #000; border: 6px solid #0c0a10; box-shadow: 0 0 120px 20px rgba(150, 120, 255, .28); overflow: hidden; }
.c3-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.c3-glare { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .08), transparent 40%); }
.c3-curtain { width: 140px; height: 430px; margin: -215px 0 0 -70px; background: repeating-linear-gradient(90deg, #5e0d1b 0 16px, #861427 16px 32px, #6d1020 32px 40px); box-shadow: inset 0 -40px 50px rgba(0, 0, 0, .55); border-radius: 0 0 30% 30% / 0 0 8% 8%; }
.c3-glow { width: 760px; height: 520px; margin: -260px 0 0 -380px; background: radial-gradient(ellipse at 50% 0%, rgba(150, 120, 255, .22), transparent 70%); pointer-events: none; }
.c3-seat-back { width: 124px; height: 112px; margin: -56px 0 0 -62px; border-radius: 26px 26px 8px 8px; background: linear-gradient(180deg, #a2203a 0%, #7a1428 60%, #5c0f1e 100%); box-shadow: inset 0 6px 0 rgba(255, 255, 255, .08); }
.c3-seat-cushion { width: 124px; height: 52px; margin: -26px 0 0 -62px; border-radius: 10px; background: #6d1426; }
.c3-seat-front { width: 124px; height: 44px; margin: -22px 0 0 -62px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #8a1a30, #4d0c19); }
.c3-arm { width: 52px; height: 26px; margin: -13px 0 0 -26px; border-radius: 8px; background: #2a1219; }
.c3-riser { width: 150px; height: 160px; display: none; margin: -80px 0 0 -75px; background: #160d13; }
.c3-face { backface-visibility: hidden; }
.c3-front { transform: rotateY(180deg); }
.c3-person .c3-face { width: 120px; height: 120px; margin: -60px 0 0 -60px; }
.c3-person svg { display: block; filter: drop-shadow(0 0 10px rgba(255, 230, 200, .18)); }
.c3-name .c3-face { width: 160px; margin: -12px 0 0 -80px; text-align: center; font: 700 17px/24px system-ui, sans-serif; color: #fff; text-shadow: 0 2px 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c3-bubble .c3-face { width: 80px; margin: -30px 0 0 -40px; text-align: center; font-size: 46px; line-height: 60px; animation: bubble 2.5s ease-out both; }
.c3-avatar { transition: opacity .35s; }
.c3-avatar.off { opacity: .4; }
.c3-avatar.arriving .c3-person, .c3-avatar.arriving .c3-name { animation: c3-pop .65s cubic-bezier(.3, 1.6, .5, 1) both .14s; }
.c3-avatar.leaving .c3-person, .c3-avatar.leaving .c3-name { animation: c3-unpop .4s ease-in both; }
@keyframes c3-pop { 0% { scale: 0; } 100% { scale: 1; } }
@keyframes c3-unpop { 0% { scale: 1; } 100% { scale: 0; opacity: 0; } }
.c3-puff-b { width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #dcdcec 55%, rgba(220, 220, 236, 0) 72%); animation: c3-puff .9s ease-out both; }
.c3-puff.out .c3-puff-b { background: radial-gradient(circle at 40% 35%, #e9e2f6, #b9b0c9 55%, rgba(185, 176, 201, 0) 72%); }
@keyframes c3-puff { 0% { transform: translate3d(0, 0, 0) scale(.3); opacity: 1; } 55% { opacity: .85; } 100% { transform: translate3d(var(--dx), var(--dy), var(--dz)) scale(1.7); opacity: 0; } }
.c3-fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .45s; }
.c3-view.fade .c3-fade { opacity: 1; }
.c3-view.starting .c3-sconce { opacity: .25; transition: opacity 1.2s; }
.c3-view.lite .c3-sconce { box-shadow: none; }
.c3-view.lite .c3-screen { box-shadow: 0 0 60px 10px rgba(150, 120, 255, .25); }
.room-panel .check input { width: auto; flex: none; }
