:root {
  --bg: #0c0d10;
  --bg-2: #13151a;
  --surface: #1a1d24;
  --surface-2: #232731;
  --line: #2a2e38;
  --text: #ecebe7;
  --muted: #9097a3;
  --faint: #626977;
  --accent: #f0a63a;
  --accent-ink: #1b1204;
  --good: #57c58a;
  --danger: #ef5d5d;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- topo ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: 64px;
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: linear-gradient(180deg, rgba(12,13,16,.92), rgba(12,13,16,0));
  transition: background .25s;
}
.topbar.solid { background: rgba(12,13,16,.96); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 19px; letter-spacing: -.02em; color: var(--accent); }
.brand svg { width: 30px; height: 30px; stroke: none; }
.brand span { color: var(--text); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 550; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); background: rgba(255,255,255,.07); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.07); border: 1px solid transparent;
  border-radius: 999px; padding: 0 12px; height: 36px; transition: border-color .15s, background .15s; }
.search:focus-within { border-color: var(--accent); background: rgba(0,0,0,.4); }
.search svg { width: 17px; height: 17px; color: var(--muted); }
.search input { background: none; border: 0; outline: 0; width: 170px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.07); }
.scan-pill { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent); border-radius: 50%;
  display: inline-block; animation: spin .8s linear infinite; }
.spin.big { width: 44px; height: 44px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.view { min-height: 100vh; padding-bottom: 60px; }
.page { padding: 88px var(--gutter) 0; }
.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; line-height: 1.1; }
.page-head .count { color: var(--muted); font-size: 14px; padding-bottom: 4px; }
.filters { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.select, .input {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; height: 36px; padding: 0 10px; outline: 0;
}
.select:focus, .input:focus { border-color: var(--accent); }
textarea.input { height: auto; padding: 8px 10px; }

/* ---------- hero ---------- */
.hero { position: relative; height: min(78vh, 720px); min-height: 440px; overflow: hidden; margin-bottom: 8px; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.hero-slide.on { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(12,13,16,.95) 0%, rgba(12,13,16,.55) 45%, rgba(12,13,16,0) 75%),
              linear-gradient(0deg, var(--bg) 0%, rgba(12,13,16,0) 40%); }
.hero-info { position: absolute; z-index: 2; left: var(--gutter); bottom: 15%; max-width: min(560px, 86vw); }
.hero-info h2 { font-size: clamp(30px, 5vw, 56px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 12px; }
.hero-info p { color: #cfd0d4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 12px 0 20px; }
.hero-dots { position: absolute; z-index: 2; right: var(--gutter); bottom: 15%; display: flex; gap: 6px; }
.hero-dots button { width: 26px; height: 4px; border-radius: 2px; border: 0; background: rgba(255,255,255,.25); cursor: pointer; padding: 0; }
.hero-dots button.on { background: var(--accent); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 14px; }
.meta-line .chip { border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-size: 12px; color: var(--text); }
.star { color: var(--accent); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px; border: 0;
  cursor: pointer; font-weight: 650; background: rgba(255,255,255,.1); color: var(--text); transition: transform .12s, background .15s; }
.btn:hover { background: rgba(255,255,255,.16); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ffb954; }
.btn.small { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.round { width: 42px; padding: 0; justify-content: center; }
.btn.round.small { width: 34px; }
.btn.on { color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn svg { width: 19px; height: 19px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- linhas e cards ---------- */
.row { margin: 26px 0 8px; }
.row-head { display: flex; align-items: baseline; gap: 14px; padding: 0 var(--gutter); margin-bottom: 10px; }
.row-head h3 { margin: 0; font-size: 19px; letter-spacing: -.015em; }
.row-head a { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.row-head a:hover { color: var(--accent); }
.scroller { position: relative; }
.track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px var(--gutter) 14px; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.arrow { position: absolute; top: 0; bottom: 14px; width: var(--gutter); min-width: 34px; border: 0; z-index: 3; cursor: pointer; color: #fff;
  background: rgba(12,13,16,.7); opacity: 0; transition: opacity .2s; display: grid; place-items: center; }
.scroller:hover .arrow { opacity: 1; }
.arrow.l { left: 0; } .arrow.r { right: 0; }

.card { position: relative; flex: 0 0 auto; width: 158px; cursor: pointer; }
.grid .card { width: auto; }
.card .art { position: relative; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04); transition: transform .2s, box-shadow .2s; }
.card:hover .art { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent), 0 14px 30px rgba(0,0,0,.45); }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center; font-weight: 650;
  color: var(--muted); background: radial-gradient(120% 90% at 30% 0%, #2a2f3b, var(--surface)); font-size: 14px; }
.card .cap { padding: 8px 2px 0; }
.card .cap b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .cap span { color: var(--muted); font-size: 13px; }
.card.wide { width: 290px; }
.card.wide .art { aspect-ratio: 16/9; }
.card.wide .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 45%); }
.badge { position: absolute; top: 8px; right: 8px; z-index: 2; min-width: 24px; height: 24px; border-radius: 12px; padding: 0 7px;
  display: grid; place-items: center; font-size: 12px; font-weight: 750; background: var(--accent); color: var(--accent-ink); }
.badge.check { background: rgba(12,13,16,.8); color: var(--good); padding: 0; }
.badge.check svg { width: 15px; height: 15px; stroke-width: 3; }
.badge.anime { left: 8px; right: auto; background: rgba(12,13,16,.8); color: #c9a7ff; font-size: 10px; letter-spacing: .06em; }
.prog { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent); }
.play-hover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.card:hover .play-hover { opacity: 1; }
.play-hover span { width: 50px; height: 50px; border-radius: 50%; background: rgba(12,13,16,.7); display: grid; place-items: center; border: 2px solid #fff; }
.play-hover svg { width: 20px; height: 20px; fill: #fff; stroke: none; margin-left: 3px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); margin: 0 0 8px; letter-spacing: -.02em; }
.empty .btn { margin-top: 16px; }

/* ---------- detalhes ---------- */
.detail { position: relative; min-height: 100vh; }
.backdrop { position: fixed; inset: 0; z-index: -1; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: .38; filter: saturate(1.1); }
.backdrop::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 8%, rgba(12,13,16,.6) 60%, rgba(12,13,16,.3)), linear-gradient(0deg, var(--bg) 5%, transparent 60%); }
.detail-main { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: clamp(22px, 4vw, 52px); padding: 110px var(--gutter) 0; align-items: start; }
.detail-poster { border-radius: 12px; overflow: hidden; aspect-ratio: 2/3; background: var(--surface); box-shadow: 0 24px 60px rgba(0,0,0,.6); position: relative; }
.detail-poster.wide { aspect-ratio: 16/9; }
.detail-poster img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.ep .art img, .card .art img { position: relative; }
.detail h1 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 6px; }
.detail .crumb { color: var(--accent); font-weight: 650; margin-bottom: 6px; display: inline-block; }
.detail .crumb:hover { text-decoration: underline; }
.detail .orig { color: var(--muted); margin-bottom: 10px; }
.tagline { font-style: italic; color: #cfd0d4; margin: 16px 0 0; }
.overview { max-width: 75ch; color: #d6d7da; margin: 14px 0 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin-top: 20px; font-size: 14px; max-width: 760px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.detail .btn-row { margin-top: 22px; }
.section { padding: 0 var(--gutter); margin-top: 38px; }
.section h3 { font-size: 19px; margin: 0 0 14px; letter-spacing: -.015em; }

.seasons-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.seasons-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 15px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seasons-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.episodes { display: flex; flex-direction: column; gap: 6px; }
.ep { display: grid; grid-template-columns: 220px 1fr auto; gap: 18px; padding: 10px; border-radius: 12px; cursor: pointer; align-items: center; transition: background .15s; }
.ep:hover { background: rgba(255,255,255,.05); }
.ep .art { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--surface); }
.ep .art img { width: 100%; height: 100%; object-fit: cover; }
.ep h4 { margin: 0 0 4px; font-size: 16px; }
.ep h4 small { color: var(--muted); font-weight: 600; margin-right: 6px; }
.ep p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep .ep-side { color: var(--muted); font-size: 13px; text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ep:hover .play-hover { opacity: 1; }
.cast { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.person { flex: 0 0 110px; text-align: center; font-size: 13px; }
.person .face { width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: var(--surface); display: grid; place-items: center; color: var(--faint); font-size: 28px; font-weight: 700; }
.person .face img { width: 100%; height: 100%; object-fit: cover; }
.person b { display: block; font-weight: 600; }
.person span { color: var(--muted); }
.files { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.file { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.file code { color: var(--muted); word-break: break-all; font-size: 12px; }

/* ---------- configurações ---------- */
.settings { display: grid; gap: 18px; max-width: 920px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.01em; }
.panel > p.hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.hint a { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.form label.full { grid-column: 1 / -1; }
.form .input, .form .select { color: var(--text); font-weight: 400; font-size: 15px; height: 40px; }
.lib { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.lib:first-of-type { border-top: 0; }
.lib .lib-ico { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); flex: 0 0 auto; }
.lib .lib-txt { flex: 1; min-width: 0; }
.lib .lib-txt b { display: block; }
.lib .lib-txt code { color: var(--muted); font-size: 12px; word-break: break-all; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-left: 6px; text-transform: uppercase; letter-spacing: .05em; }
.status { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); }
.status .dot.bad { background: var(--danger); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.errors { font-size: 13px; color: #f3a1a1; margin: 8px 0 0; padding-left: 18px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(4px); }
.modal-card { width: min(640px, 100%); max-height: 86vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.modal-card h2 { margin: 0 0 14px; font-size: 20px; }
.browser-list { border: 1px solid var(--line); border-radius: 10px; max-height: 46vh; overflow: auto; margin: 12px 0; }
.browser-list button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 9px 12px; cursor: pointer; }
.browser-list button:hover { background: rgba(255,255,255,.05); }
.browser-list svg { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.results { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.result { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; text-align: left; background: none; }
.result:hover { border-color: var(--accent); background: rgba(255,255,255,.03); }
.result img, .result .noimg { width: 54px; height: 81px; border-radius: 6px; object-fit: cover; background: var(--surface); }
.result p { margin: 2px 0 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--surface-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 14px; animation: rise .25s ease; }
.toast.err { border-color: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; user-select: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player.idle { cursor: none; }
.player .p-top, .player .p-bottom { position: absolute; left: 0; right: 0; z-index: 3; transition: opacity .3s; }
.player.idle .p-top, .player.idle .p-bottom { opacity: 0; pointer-events: none; }
.p-top { top: 0; display: flex; align-items: center; gap: 14px; padding: 18px var(--gutter) 50px; background: linear-gradient(180deg, rgba(0,0,0,.75), transparent); }
.p-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.p-title strong { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-title span { color: rgba(255,255,255,.7); font-size: 14px; }
.p-mode { margin-left: 8px; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); white-space: nowrap; }
.p-bottom { bottom: 0; padding: 60px var(--gutter) max(18px, env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0,0,0,.85), transparent); }
.p-seek { display: flex; align-items: center; gap: 14px; font-size: 13px; font-variant-numeric: tabular-nums; }
.seekbar { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.seekbar::before, .seek-fill, .seek-buf { content: ""; position: absolute; left: 0; top: 9px; height: 4px; border-radius: 2px; }
.seekbar::before { right: 0; background: rgba(255,255,255,.22); }
.seek-buf { background: rgba(255,255,255,.35); width: 0; }
.seek-fill { background: var(--accent); width: 0; }
.seekbar:hover::before, .seekbar:hover .seek-fill, .seekbar:hover .seek-buf { top: 8px; height: 6px; }
.seek-knob { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; left: 0; transform: scale(0); transition: transform .15s; }
.seekbar:hover .seek-knob, .seekbar.drag .seek-knob { transform: scale(1); }
.seek-tip { position: absolute; bottom: 26px; transform: translateX(-50%); background: rgba(0,0,0,.85); padding: 3px 8px; border-radius: 6px; font-size: 12px; opacity: 0; pointer-events: none; }
.seekbar:hover .seek-tip, .seekbar.drag .seek-tip { opacity: 1; }
.p-controls { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.p-controls .grow { flex: 1; }
.p-btn { width: 44px; height: 44px; border: 0; background: none; color: #fff; display: grid; place-items: center; border-radius: 50%; cursor: pointer; }
.p-btn:hover { background: rgba(255,255,255,.12); }
.p-btn.on { color: var(--accent); }
.p-btn[disabled] { opacity: .3; pointer-events: none; }
.p-btn svg { width: 24px; height: 24px; }
.p-play { width: 52px; height: 52px; }
.p-play svg { width: 30px; height: 30px; stroke: none; }
.p-vol { display: flex; align-items: center; }
.p-vol input { width: 90px; accent-color: var(--accent); }
.p-center { position: absolute; inset: 0; z-index: 1; }
.p-spinner { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.subs { position: absolute; left: 6%; right: 6%; bottom: 9%; z-index: 2; text-align: center; pointer-events: none; transition: bottom .3s; }
.player:not(.idle) .subs { bottom: 150px; }
.subs span { display: inline; white-space: pre-line; font-size: clamp(18px, 2.6vw, 34px); line-height: 1.35; font-weight: 600; padding: .05em .35em;
  background: rgba(0,0,0,.55); box-decoration-break: clone; -webkit-box-decoration-break: clone; text-shadow: 0 1px 3px #000; border-radius: 4px; }
.p-menu { position: absolute; z-index: 5; right: var(--gutter); bottom: 110px; width: 290px; max-height: 60vh; overflow: auto; background: rgba(20,22,28,.97);
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.p-menu h5 { margin: 8px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); }
.p-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.p-menu button:hover { background: rgba(255,255,255,.08); }
.p-menu button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.p-menu button.on::before { background: var(--accent); }
.p-menu .info { padding: 6px 10px; font-size: 12px; color: rgba(255,255,255,.6); }
.p-next { position: absolute; z-index: 4; right: var(--gutter); bottom: 130px; width: 320px; background: rgba(20,22,28,.95); border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.p-next img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.p-next .nx { padding: 12px 14px; }
.p-next small { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.p-next b { display: block; margin: 2px 0 10px; }
.p-flash { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.55); border-radius: 50%; width: 84px; height: 84px; display: grid; place-items: center; z-index: 2; animation: flash .6s ease forwards; pointer-events: none; font-weight: 700; }
@keyframes flash { from { opacity: 1; transform: translate(-50%,-50%) scale(.8); } to { opacity: 0; transform: translate(-50%,-50%) scale(1.25); } }

/* ---------- responsivo ---------- */
@media (max-width: 860px) {
  .topbar { gap: 12px; height: 58px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; height: 58px; background: rgba(12,13,16,.97); border-top: 1px solid var(--line);
    justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom); z-index: 31; }
  .view { padding-bottom: 90px; }
  .search input { width: 110px; }
  .scan-pill span { display: none; }
  .detail-main { grid-template-columns: 1fr; padding-top: 80px; }
  .detail-poster { width: min(220px, 60vw); }
  .detail-poster.wide { width: 100%; }
  .ep { grid-template-columns: 130px 1fr; gap: 12px; }
  .ep .ep-side { display: none; }
  .form { grid-template-columns: 1fr; }
  .card { width: 128px; }
  .card.wide { width: 240px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 10px; }
  .p-vol input, #p-prev, #p-rew { display: none; }
  .p-menu { left: 16px; right: 16px; width: auto; }
  .p-next { left: 16px; right: 16px; width: auto; bottom: 120px; }
  .hero { height: 62vh; min-height: 380px; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  .search input { width: 90px; }
}

/* ---------- assistir juntos ---------- */
:root { --croc: #19a85b; --croc-dark: #0d2418; }
.btn.together { background: rgba(25,168,91,.16); color: #8ff0bb; }
.btn.together:hover { background: rgba(25,168,91,.28); }
.btn.together img { width: 26px; height: 26px; margin: 0 -2px 0 -6px; }
.room-banner { display: flex; align-items: center; gap: 14px; margin: 18px var(--gutter) 6px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(100deg, rgba(25,168,91,.22), rgba(25,168,91,.06)); border: 1px solid rgba(25,168,91,.45); animation: rise .35s ease; }
.room-banner img { width: 54px; height: 54px; flex: 0 0 auto; animation: wiggle 1.6s ease-in-out infinite; }
.room-banner .rb-txt { flex: 1; min-width: 0; }
.room-banner small { display: block; color: #8ff0bb; font-weight: 650; }
.room-banner b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-banner .btn.primary { background: var(--croc); color: #fff; }
@keyframes wiggle { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.05); } }

.p-room { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; font-size: 13px; }
.p-room + .p-croc + .p-mode, .p-room:not([hidden]) ~ .p-mode { margin-left: 0; }
.p-room .who { display: flex; gap: 10px; flex-wrap: wrap; }
.p-room .dot { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); padding: 3px 10px; border-radius: 99px; }
.p-room .dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.p-room .dot.load::before { background: var(--faint); }
.p-room .dot.busy::before { background: var(--accent); animation: blink .8s infinite; }
.p-room .muted { color: rgba(255,255,255,.65); }
.p-room .btn.small { height: 28px; padding: 0 12px; font-size: 13px; background: var(--croc); color: #fff; }
@keyframes blink { 50% { opacity: .3; } }
.p-croc { width: 46px; height: 46px; }
.p-croc img { width: 40px; height: 40px; transition: transform .2s; }
.p-croc:hover img { transform: rotate(-10deg) scale(1.1); }

.ritual { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; overflow: hidden; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 50%, rgba(25,168,91,.35), rgba(5,12,8,.88)); }
.ritual > * { grid-area: 1 / 1; }
.r-num, .r-eee, .r-play, .r-wait {
  font-family: "Arial Rounded MT Bold", "Nunito", "Segoe UI Black", "Arial Black", system-ui, sans-serif; font-weight: 900; color: #fff;
  -webkit-text-stroke: .045em var(--croc-dark); paint-order: stroke fill; text-shadow: 0 .06em 0 var(--croc-dark), 0 .2em .5em rgba(0,0,0,.45);
  letter-spacing: -.01em; line-height: 1; text-align: center; padding: 0 4vw; }
.r-num { font-size: min(52vh, 60vw); }
.r-eee { font-size: min(12vh, 9vw); max-width: 96vw; overflow-wrap: anywhere; animation: shake .12s linear infinite; }
.r-play { font-size: min(13vh, 11vw); max-width: 96vw; color: #fff; overflow-wrap: anywhere; }
.r-play span { color: #8ff0bb; }
.r-wait { font-size: min(7vh, 7vw); opacity: .85; }
.r-sticker { width: min(62vh, 82vw); height: auto; filter: drop-shadow(0 18px 40px rgba(0,0,0,.6)); animation: sticker 1.8s cubic-bezier(.2,1.6,.4,1) forwards; }
.pop { animation: pop .45s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes pop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes shake { 25% { transform: translate(2px,-2px) rotate(.6deg); } 75% { transform: translate(-2px,2px) rotate(-.6deg); } }
@keyframes sticker { 0% { transform: scale(.1) rotate(-30deg); opacity: 0; } 30% { transform: scale(1.12) rotate(6deg); opacity: 1; }
  45% { transform: scale(.96) rotate(-4deg); } 60%,100% { transform: scale(1) rotate(0); } }

.reacts { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.react { position: absolute; bottom: 120px; display: flex; flex-direction: column; align-items: center; animation: floatup 3.2s ease-out forwards; }
.react b { font-size: 54px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.react small { font-size: 12px; background: rgba(0,0,0,.6); padding: 1px 8px; border-radius: 99px; margin-top: 4px; }
@keyframes floatup { 0% { transform: translateY(0) scale(.4); opacity: 0; } 12% { transform: translateY(-20px) scale(1.15); opacity: 1; }
  80% { opacity: 1; } 100% { transform: translateY(-46vh) scale(1); opacity: 0; } }
.react-bar { display: flex; gap: 2px; background: rgba(20,22,28,.95); border: 1px solid rgba(255,255,255,.1); border-radius: 99px; padding: 3px 6px; }
.react-bar button { border: 0; background: none; font-size: 24px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.react-bar button:hover { transform: scale(1.25); background: rgba(255,255,255,.08); }
.tap-play { position: absolute; z-index: 7; left: 50%; top: 50%; transform: translate(-50%,-50%); display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 99px; padding: 14px 24px; background: var(--croc); color: #fff; font-weight: 750; font-size: 17px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.tap-play svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .p-room .dot { padding: 2px 8px; font-size: 12px; }
  .react-bar { position: absolute; bottom: 64px; right: 16px; }
  .room-banner .btn { padding: 0 14px; }
  .room-banner img { width: 44px; height: 44px; }
}

/* ---------- chat, sincronizar, espera do ritual ---------- */
.p-sync { width: auto; padding: 0 12px; border-radius: 99px; gap: 6px; display: inline-flex; font-size: 13px; font-weight: 650; background: rgba(25,168,91,.22); }
.p-sync:hover { background: rgba(25,168,91,.4); }
.p-sync svg { width: 18px; height: 18px; }
#p-chatbtn { position: relative; }
.badge-dot { position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--croc); box-shadow: 0 0 0 2px #000; }
.p-chat { position: absolute; z-index: 8; top: 76px; right: var(--gutter); width: 300px; height: 330px; min-width: 220px; min-height: 160px;
  display: flex; flex-direction: column; resize: both; overflow: hidden; font-size: calc(14px * var(--chat-font, 1));
  background: rgba(14,16,20,var(--chat-alpha, .55)); border: 1px solid rgba(255,255,255,calc(var(--chat-alpha, .55) * .18));
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,calc(var(--chat-alpha, .55) * .8)); backdrop-filter: blur(calc(var(--chat-alpha, .55) * 10px)); }
.p-chat.dragging { opacity: .85; user-select: none; }
.p-chat header { display: flex; align-items: center; gap: 2px; padding: 2px 2px 2px 8px; cursor: move; touch-action: none;
  background: rgba(0,0,0,calc(var(--chat-alpha, .55) * .35)); }
.p-chat header b { font-size: 13px; margin-right: auto; }
.p-chat .grip { color: rgba(255,255,255,.45); font-size: 14px; margin-right: 4px; }
.p-chat header .p-btn { width: 30px; height: 30px; font-size: 12px; font-weight: 700; }
.p-chat header svg { width: 16px; height: 16px; }
.chat-op { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.7); cursor: default; padding: 0 4px; }
.chat-op input { width: 58px; accent-color: var(--croc); }
.chat-list { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.msg { max-width: 88%; align-self: flex-start; background: rgba(40,44,52,calc(.45 + var(--chat-alpha, .55) * .5)); border-radius: 12px 12px 12px 4px; padding: 4px 9px 3px;
  text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.msg.mine { align-self: flex-end; background: rgba(20,108,62,calc(.55 + var(--chat-alpha, .55) * .45)); border-radius: 12px 12px 4px 12px; }
.msg b { display: block; font-size: .82em; color: #8ff0bb; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.msg time { display: block; text-align: right; font-size: .68em; color: rgba(255,255,255,.55); }
.chat-form { display: flex; gap: 6px; padding: 6px; }
.chat-form input { flex: 1; min-width: 0; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12); border-radius: 99px; padding: 0 12px; height: 32px; outline: 0; font-size: 1em; }
.chat-form input:focus { border-color: var(--croc); }
.chat-form .btn { background: var(--croc); color: #fff; height: 32px; padding: 0 12px; }
.chat-peek { position: absolute; z-index: 7; left: var(--gutter); bottom: 130px; display: flex; flex-direction: column; gap: 6px; max-width: min(420px, 80vw); }
.peek { background: rgba(16,18,23,.82); border-left: 3px solid var(--croc); padding: 7px 12px; border-radius: 10px; font-size: 15px; cursor: pointer;
  animation: rise .25s ease; transition: opacity 1s, transform 1s; text-shadow: 0 1px 2px #000; }
.peek:hover { background: rgba(16,18,23,.95); }
.peek.out { opacity: 0; transform: translateY(6px); }
.peek b { color: #8ff0bb; }
.r-waitbox { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.r-waitbox img { width: min(26vh, 40vw); animation: wiggle 1.4s ease-in-out infinite; }
.r-waitbox small { color: rgba(255,255,255,.75); font-size: 15px; }

/* ---------- lista, sorteio e histórico ---------- */
.nav-juntos { display: inline-flex; align-items: center; gap: 6px; }
.nav-juntos img { width: 22px; height: 22px; }
.want-line { margin-top: 14px; color: #8ff0bb; font-weight: 600; }
.want-tag { position: absolute; z-index: 2; left: 8px; bottom: 8px; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(12,13,16,.85); color: #e7e7e7; }
.want-tag.both { background: var(--croc); color: #fff; }
.draw-hero { display: flex; align-items: center; gap: 22px; padding: 20px 24px; border-radius: 18px; margin: 4px 0 30px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(25,168,91,.35), rgba(25,168,91,.06)); border: 1px solid rgba(25,168,91,.35); }
.draw-hero img { width: 110px; height: 110px; flex: 0 0 auto; animation: wiggle 2s ease-in-out infinite; }
.draw-hero h2 { margin: 0; letter-spacing: -.02em; }
.draw-hero p { margin: 4px 0 14px; color: var(--muted); }
.big-croc { background: var(--croc) !important; color: #fff !important; height: 46px; font-size: 16px; }
.j-sec { margin-bottom: 34px; }
.j-sec h3 { font-size: 20px; letter-spacing: -.015em; margin: 0 0 14px; }
.memories { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.memory { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.memory:hover { border-color: var(--croc); }
.mem-art { position: relative; width: 54px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; background: var(--surface); flex: 0 0 auto; }
.mem-art img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.memory b { display: block; }
.memory span { color: var(--muted); font-size: 13px; }
.draw { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.draw-croc { position: absolute; left: -6px; top: 10px; width: 92px; animation: wiggle 1s ease-in-out infinite; z-index: 2; }
.reel { width: 210px; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 3px var(--croc), 0 20px 40px rgba(0,0,0,.5); }
.reel img { width: 100%; height: 100%; object-fit: cover; }
.reel.landed { animation: pop .5s cubic-bezier(.2,1.8,.4,1); box-shadow: 0 0 0 4px #8ff0bb, 0 0 60px rgba(25,168,91,.7); }
.draw-title { min-height: 54px; text-align: center; font-weight: 700; font-size: 18px; display: flex; flex-direction: column; }
.draw-title small { color: #8ff0bb; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.draw-title b { font-size: 24px; letter-spacing: -.02em; }
.draw-title span { color: var(--muted); font-weight: 500; font-size: 14px; }
.together-cta { background: var(--croc) !important; color: #fff !important; }
.together-cta img { width: 24px; height: 24px; margin-left: -6px; }
@media (max-width: 860px) {
  .p-chat { left: 10px !important; right: 10px; width: auto !important; top: auto !important; bottom: 112px; height: 42vh !important; resize: none; }
  .p-chat header { cursor: default; }
  .p-chat .grip, .p-chat #chat-reset { display: none; }
  .p-sync span { display: none; }
  .p-sync { padding: 0; width: 44px; justify-content: center; }
  .nav-juntos img { display: none; }
  .draw-hero { flex-direction: column; text-align: center; }
}
