/* ============================================================
   ViniIPTV Web — tema escuro premium (dourado + azul/violeta)
   ============================================================ */
:root {
  --bg: #06070b;
  --bg-2: #0b0d14;
  --surface: #11141d;
  --surface-2: #171b27;
  --surface-3: #1f2433;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #f5f6fa;
  --muted: #9ca2b6;
  --dim: #6a7087;
  --gold: #f7c948;
  --gold-2: #e9a21a;
  --gold-grad: linear-gradient(135deg, #ffe39a 0%, #f7c948 38%, #e59a12 100%);
  --royal: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --violet: #8b5cf6;
  --blue: #3b82f6;
  --ok: #22c55e;
  --danger: #ef4444;
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;
  --sidebar: 244px;
  --rail: 260px;
  --pad: 32px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Outfit', var(--font);
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a3042 transparent; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at -10% -20%, rgba(247, 201, 72, .09), transparent 60%),
    radial-gradient(800px 600px at 110% 0%, rgba(139, 92, 246, .10), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(59, 130, 246, .07), transparent 60%);
}
#root { position: relative; z-index: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.ic { width: 20px; height: 20px; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #242a3a; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* Foco (teclado / controle remoto) */
:focus { outline: none; }
body.kbd :focus-visible, body.kbd a:focus, body.kbd button:focus {
  outline: 2.5px solid var(--gold); outline-offset: 3px; border-radius: var(--r-sm);
}
body.kbd .card-art:focus, body.kbd .ccard-art:focus, body.kbd .chcard-art:focus { outline-offset: 2px; transform: scale(1.04); }

/* ── Boot ─────────────────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 28px; }
.boot img { width: 180px; filter: drop-shadow(0 10px 40px rgba(247, 201, 72, .3)); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); opacity: .85; } }

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--gold); animation: spin .8s linear infinite; }
.spinner.lg { width: 58px; height: 58px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Botões ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 22px;
  border-radius: 999px; font-weight: 650; font-size: 15px; white-space: nowrap; position: relative;
  transition: transform .18s var(--ease), box-shadow .18s, background .18s, opacity .18s;
}
.btn .ic { width: 19px; height: 19px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--gold-grad); color: #1d1405; box-shadow: 0 10px 30px rgba(233, 162, 26, .28), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary:hover { box-shadow: 0 14px 38px rgba(233, 162, 26, .42), inset 0 1px 0 rgba(255, 255, 255, .5); transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, .09); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); }
.btn-danger { background: rgba(239, 68, 68, .14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .35); }
.btn-danger:hover { background: rgba(239, 68, 68, .24); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading > * { opacity: 0; }
.btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(0, 0, 0, .25); border-top-color: #1d1405; animation: spin .7s linear infinite; }
.btn-glass.loading::after { border-color: rgba(255, 255, 255, .2); border-top-color: #fff; }
.fav-main.on { color: #ff5d7a; border-color: rgba(255, 93, 122, .4); background: rgba(255, 93, 122, .12); }
.fav-main.on .ic { fill: currentColor; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }

.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); font-size: 13px; color: #d8dbe6; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14px; transition: all .15s;
}
.chip-btn small { font-size: 12px; opacity: .7; }
.chip-btn:hover { color: var(--text); border-color: var(--line-2); }
.chip-btn.active { background: var(--gold-grad); color: #1d1405; border-color: transparent; }

/* ── Campos ───────────────────────────────────────────── */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 7px 2px; }
.input {
  display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; border-radius: var(--r);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .15s, background .15s;
}
.input .ic { color: var(--dim); }
.input:focus-within { border-color: rgba(247, 201, 72, .7); box-shadow: 0 0 0 4px rgba(247, 201, 72, .12); background: rgba(255, 255, 255, .06); }
.input:focus-within .ic { color: var(--gold); }
.input input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.input input::placeholder { color: var(--dim); }
.input-eye { color: var(--dim); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
.input-eye:hover { color: var(--text); }
.hint { display: block; margin: 6px 2px 0; color: var(--dim); font-size: 12.5px; }
.form-error { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); color: #fecaca; padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 14px; }

.search-mini { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.search-mini .ic { width: 17px; height: 17px; color: var(--dim); }
.search-mini:focus-within { border-color: rgba(247, 201, 72, .6); }
.search-mini input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 14px; }
.search-mini input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.select { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.select .ic { width: 17px; height: 17px; }
.select select { background: none; border: 0; outline: 0; color: var(--text); font-size: 14px; padding-right: 4px; cursor: pointer; }
.select select option { background: var(--surface-2); }
.select.sm { height: 38px; }

/* ── Login ────────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login-glow { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .35; pointer-events: none; }
.login-glow.g1 { background: radial-gradient(circle, rgba(247, 201, 72, .55), transparent 60%); top: -30vmax; left: -20vmax; animation: float 16s ease-in-out infinite; }
.login-glow.g2 { background: radial-gradient(circle, rgba(139, 92, 246, .55), transparent 60%); bottom: -30vmax; right: -20vmax; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(6vmax, 4vmax) scale(1.08); } }
.login-card {
  position: relative; width: min(1040px, 100%); display: grid; grid-template-columns: 1.05fr 1fr; border-radius: 28px; overflow: hidden;
  background: rgba(14, 16, 24, .72); border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 0 0 1px rgba(247, 201, 72, .05);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); animation: rise .6s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.login-brand { padding: 56px 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: linear-gradient(160deg, rgba(247, 201, 72, .07), rgba(139, 92, 246, .06)); border-right: 1px solid var(--line); }
.login-logo { width: min(300px, 70%); filter: drop-shadow(0 16px 50px rgba(247, 201, 72, .35)); }
.login-slogan { margin: 8px 0 28px; font-family: var(--display); font-size: 20px; color: #e8e2cf; }
.login-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; text-align: left; }
.login-feats li { display: flex; align-items: center; gap: 12px; color: #c9cdda; font-size: 14.5px; }
.login-feats .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(247, 201, 72, .12); color: var(--gold); }
.login-form { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-form h1 { font-size: 34px; }
.login-form > p.muted { margin: 4px 0 28px; }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--dim); }

/* ── Casca (menu lateral) ─────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 16px; z-index: 30;
  background: linear-gradient(180deg, rgba(12, 14, 21, .92), rgba(8, 9, 14, .96)); border-right: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.sb-logo { display: block; padding: 2px 10px 22px; }
.sb-logo img { width: 150px; margin: 0 auto; filter: drop-shadow(0 8px 26px rgba(247, 201, 72, .28)); transition: transform .3s var(--ease); }
.sb-logo:hover img { transform: scale(1.04); }
.sb-nav { display: flex; flex-direction: column; gap: 4px; }
.sb-nav a {
  display: flex; align-items: center; gap: 13px; height: 48px; padding: 0 14px; border-radius: 14px; color: var(--muted);
  font-weight: 600; font-size: 15px; position: relative; transition: background .18s, color .18s;
}
.sb-nav a .ic { width: 21px; height: 21px; }
.sb-nav a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.sb-nav a.active { color: #1d1405; background: var(--gold-grad); box-shadow: 0 10px 28px rgba(233, 162, 26, .25); }
.sb-nav a span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.sb-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: rgba(255, 93, 122, .16); color: #ff8aa0; }
.sb-badge.alt { background: rgba(59, 130, 246, .16); color: #93c5fd; }
.sb-nav a.active .sb-badge { background: rgba(0, 0, 0, .15); color: #1d1405; }
.sb-bottom { margin-top: auto; }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: background .15s; }
.sb-user:hover, .sb-user.active { background: rgba(255, 255, 255, .07); }
.sb-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--royal); flex: none; }
.sb-avatar .ic { width: 19px; height: 19px; }
.sb-user-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sb-user-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-txt small { font-size: 12px; color: var(--dim); }
.sb-user-txt small.warn { color: #fbbf24; }
.sb-gear { width: 18px; height: 18px; color: var(--dim); }
.m-top, .m-tabbar { display: none; }

.view { min-width: 0; position: relative; }
.view.view-in { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.page { padding: 32px var(--pad) 60px; max-width: 1800px; }
.page-pad { padding: 32px var(--pad); }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.page-head h1 { font-size: 30px; }
.list-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(247, 201, 72, .12); color: var(--gold); flex: none; }
.list-ic .ic { width: 23px; height: 23px; }
.tabs { display: flex; gap: 10px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* ── Seção (Filmes / Séries) ──────────────────────────── */
.sec { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.sec-rail { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: rgba(9, 10, 16, .55); z-index: 5; }
.rail-inner { height: 100%; display: flex; flex-direction: column; padding: 26px 14px 14px; }
.rail-head { padding: 0 10px 16px; }
.rail-head h1 { font-size: 26px; }
.rail-head span { font-size: 13px; color: var(--dim); }
.rail-quick { display: flex; flex-direction: column; gap: 2px; }
.rail-quick a, .rail-cat-list a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border-radius: 12px; color: var(--muted);
  font-size: 14px; font-weight: 550; transition: background .15s, color .15s;
}
.rail-quick a .ic { width: 18px; height: 18px; }
.rail-quick a span, .rail-cat-list a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-quick a:hover, .rail-cat-list a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.rail-quick a.active, .rail-cat-list a.active { background: rgba(247, 201, 72, .12); color: var(--gold); }
.rail-quick a small, .rail-cat-list a small { font-size: 12px; color: var(--dim); }
.rail-badge { font-size: 11.5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 93, 122, .16); color: #ff8aa0; display: grid; place-items: center; }
.rail-cats-btn { display: none; }
.rail-cats { display: flex; flex-direction: column; min-height: 0; flex: 1; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.rail-cats .sheet-backdrop, .rail-cats .sheet-close { display: none; }
.rail-cats .sheet-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.rail-cats-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.rail-cats-head small { font-weight: 600; margin-left: 4px; }
.rail-cats .search-mini { margin: 0 2px 10px; height: 38px; }
.rail-cat-list { overflow-y: auto; flex: 1; min-height: 0; margin: 0 -6px; padding: 0 6px 20px; scrollbar-width: thin; }

.sec-pane { min-width: 0; padding-bottom: 60px; }

/* Hero */
.hero { position: relative; height: clamp(380px, 62vh, 640px); margin: 0 0 8px; overflow: hidden; }
.hero.sk { margin: 24px var(--pad); height: clamp(340px, 52vh, 560px); border-radius: var(--r-lg); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hero-slide.on { opacity: 1; visibility: visible; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transform: scale(1.06); transition: transform 9s linear; }
.hero-slide.on .hero-bg img { transform: scale(1); }
.poster-mode .hero-bg img { filter: blur(34px) saturate(1.3) brightness(.55); transform: scale(1.3) !important; }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(6, 7, 11, .96) 0%, rgba(6, 7, 11, .75) 34%, rgba(6, 7, 11, .15) 70%, rgba(6, 7, 11, .35) 100%),
  linear-gradient(0deg, var(--bg) 0%, rgba(6, 7, 11, 0) 42%); }
.hero-poster { display: none; }
.poster-mode .hero-poster { display: block; position: absolute; right: 7%; top: 50%; transform: translateY(-50%); width: clamp(170px, 18vw, 270px); aspect-ratio: 2/3; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: absolute; left: var(--pad); bottom: 12%; width: min(640px, 58%); }
.hero-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.hero-tag .ic { width: 15px; height: 15px; }
.hero-title { font-size: clamp(30px, 4vw, 56px); line-height: 1.04; font-weight: 800; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 14px 0; color: #d4d7e2; font-weight: 550; font-size: 14.5px; }
.meta-rate { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-weight: 700; }
.meta-rate .ic { width: 15px; height: 15px; }
.meta-ok { display: inline-flex; align-items: center; gap: 5px; color: #86efac; }
.meta-ok .ic { width: 15px; height: 15px; }
.hero-plot { color: #c7cad6; font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-dots { position: absolute; right: var(--pad); bottom: 12%; display: flex; gap: 8px; z-index: 2; }
.hero-dots button { width: 9px; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .3); transition: all .3s var(--ease); }
.hero-dots button.on { width: 28px; background: var(--gold); }

/* Fileiras */
.rows { position: relative; margin-top: -40px; z-index: 2; }
.row { margin: 0 0 30px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--pad); margin-bottom: 12px; }
.row-head h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; min-width: 0; }
.row-head h2 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-head h2 .ic { color: var(--gold); width: 20px; height: 20px; }
.row-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .15s; }
.row-more .ic { width: 16px; height: 16px; }
.row-more:hover { color: var(--gold); }
.row-body { position: relative; }
.row-track {
  display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 8px var(--pad) 12px; scroll-padding: 0 var(--pad); overscroll-behavior-x: contain;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }
.row-nav {
  position: absolute; top: 8px; bottom: 52px; width: 54px; z-index: 3; display: grid; place-items: center; opacity: 0; transition: opacity .2s;
  color: #fff;
}
.row-nav .ic { width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: rgba(10, 12, 18, .85); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.row-nav.prev { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.row-nav.next { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.row-nav:hover .ic { background: var(--gold); color: #1d1405; }
@media (hover: hover) and (pointer: fine) { .row-body:hover .row-nav { opacity: 1; } }
.row-body.at-start .row-nav.prev, .row-body.at-end .row-nav.next { opacity: 0 !important; pointer-events: none; }

/* Cards (pôster) */
.card { position: relative; width: clamp(138px, 11.5vw, 190px); flex: none; }
.grid .card { width: auto; }
.card-art, .ccard-art, .chcard-art {
  position: relative; display: block; border-radius: var(--r); overflow: hidden; background: linear-gradient(150deg, #1b2030, #10131c);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35); transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.card-art { aspect-ratio: 2/3; }
.card-art img, .ccard-art img, .chcard-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card-art::after, .ccard-art::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); pointer-events: none; }
@media (hover: hover) {
  .card:hover .card-art, .ccard:hover .ccard-art, .chcard:hover .chcard-art { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 1.5px rgba(247, 201, 72, .55); }
  .card:hover .card-art img, .ccard:hover .ccard-art img { transform: scale(1.06); }
  .card:hover .card-hover, .chcard:hover .card-hover { opacity: 1; }
  .card:hover .card-fav, .chcard:hover .card-fav { opacity: 1; transform: none; }
}
.ph::before { content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center; font: 800 30px var(--display); color: rgba(255, 255, 255, .16); letter-spacing: .02em; }
.ph > img { position: relative; }
.ph img.broken { visibility: hidden; }
.card-hover { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(0deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .1)); opacity: 0; transition: opacity .25s; }
.card-hover .ic { width: 50px; height: 50px; padding: 14px 13px 14px 15px; border-radius: 50%; background: rgba(247, 201, 72, .95); color: #1d1405; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.badge-rate { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 700; background: rgba(8, 9, 14, .78); backdrop-filter: blur(8px); color: var(--gold); }
.badge-rate .ic { width: 12px; height: 12px; }
.badge-watched { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(34, 197, 94, .92); color: #04200e; }
.badge-watched .ic { width: 15px; height: 15px; stroke-width: 3; }
.card-progress { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.card-progress i { display: block; height: 100%; background: var(--gold-grad); border-radius: inherit; }
.card-fav {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  background: rgba(8, 9, 14, .7); backdrop-filter: blur(8px); color: #fff; opacity: 0; transform: scale(.8); transition: all .2s var(--ease);
}
.card-fav .ic { width: 17px; height: 17px; }
.card-fav:hover { background: rgba(8, 9, 14, .92); color: #ff5d7a; }
.is-fav > .card-fav { opacity: 1; transform: none; color: #ff5d7a; }
.is-fav > .card-fav .ic, .ch-row.is-fav .ch-fav .ic { fill: currentColor; }
.card-art .badge-watched ~ .card-fav { top: 40px; }
@media (hover: none) { .card-fav { opacity: .9; transform: none; } }
.card-meta { padding: 10px 2px 0; }
.card-title { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12.5px; color: var(--dim); margin-top: 2px; min-height: 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Card "continuar" (paisagem) */
.ccard { position: relative; width: clamp(240px, 21vw, 330px); flex: none; }
.grid .ccard { width: auto; }
.ccard-art { aspect-ratio: 16/9; }
.ccard-art img { object-position: center 22%; }
.ccard-art::before { z-index: 0; }
.ccard-play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(0deg, rgba(0, 0, 0, .65), rgba(0, 0, 0, .05) 60%); }
.ccard-play .ic { width: 46px; height: 46px; padding: 13px 12px 13px 14px; border-radius: 50%; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .3); transition: all .2s; }
.ccard:hover .ccard-play .ic { background: var(--gold); color: #1d1405; border-color: transparent; transform: scale(1.08); }
.ccard-time { position: absolute; left: 10px; bottom: 20px; font-size: 12px; font-weight: 600; color: #e5e7ee; text-shadow: 0 1px 4px #000; }
.ccard-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(8, 9, 14, .75); opacity: 0; transition: opacity .2s; }
.ccard-x .ic { width: 15px; height: 15px; }
.ccard:hover .ccard-x { opacity: 1; }
.ccard-x:hover { background: var(--danger); }
@media (hover: none) { .ccard-x { opacity: .9; } }

/* Card de canal */
.chcard { width: clamp(150px, 12vw, 190px); }
.chcard-art { aspect-ratio: 16/10; background: linear-gradient(150deg, #1a1f2e, #0e1119); }
.chcard-art img { object-fit: contain; padding: 18%; }
.row-ch .card-meta { text-align: center; }

/* Grade */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px var(--pad) 22px; }
.list-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.list-title h1 { font-size: 28px; }
.list-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.list-tools .search-mini { width: 240px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 18px; padding: 0 var(--pad); }
.page .grid { padding: 0; }
.grid-land { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-mixed { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid-mixed .chcard { grid-column: span 1; }
.grid-sentinel, .rows-sentinel { height: 60px; display: grid; place-items: center; }
.grid-sentinel::after, .rows-sentinel::after { content: ''; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .1); border-top-color: var(--gold); animation: spin .8s linear infinite; }

/* Estados */
.empty { grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 70px 20px; color: var(--muted); }
.empty-ic { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--gold); margin-bottom: 8px; }
.empty-ic .ic { width: 32px; height: 32px; }
.empty h3 { color: var(--text); font-size: 20px; }
.empty p { max-width: 420px; }
.empty .btn { margin-top: 14px; }
.empty.error .empty-ic { color: #fca5a5; }

.sk { background: linear-gradient(90deg, #121622 0%, #1b2030 50%, #121622 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-poster { aspect-ratio: 2/3; }
.sk-land { aspect-ratio: 16/9; }
.sk-line { height: 14px; margin-top: 10px; border-radius: 8px; }
.sk-title { width: 220px; height: 26px; border-radius: 8px; }
.sk-card { pointer-events: none; }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 14px; background: rgba(24, 28, 40, .96); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); font-size: 14px; font-weight: 550; pointer-events: auto; opacity: 0; transform: translateY(14px) scale(.96); transition: all .3s var(--ease); max-width: 90vw;
}
.toast.show { opacity: 1; transform: none; }
.toast-ok { border-color: rgba(247, 201, 72, .35); }
.toast button { color: var(--gold); font-weight: 700; }

/* Sheet (menu de categorias no celular) */
@keyframes sheetUp { from { transform: translateY(100%); } }

/* ── Detalhes ─────────────────────────────────────────── */
.detail-hero { position: relative; min-height: min(82vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.detail-bg { position: absolute; inset: 0; }
.detail-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.detail-bg.blur img { filter: blur(40px) saturate(1.4) brightness(.5); transform: scale(1.3); }
.detail-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(6, 7, 11, .97) 0%, rgba(6, 7, 11, .82) 40%, rgba(6, 7, 11, .35) 100%),
  linear-gradient(0deg, var(--bg) 0%, transparent 50%); }
.detail-back { position: absolute; top: 24px; left: var(--pad); z-index: 3; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 999px; background: rgba(10, 12, 18, .6); border: 1px solid var(--line-2); backdrop-filter: blur(10px); font-weight: 600; font-size: 14px; }
.detail-back:hover { background: rgba(255, 255, 255, .14); }
.detail-body { position: relative; z-index: 2; display: flex; gap: 40px; align-items: flex-end; padding: 110px var(--pad) 40px; width: 100%; max-width: 1400px; }
.detail-poster { position: relative; width: clamp(180px, 17vw, 270px); aspect-ratio: 2/3; border-radius: 18px; overflow: hidden; flex: none; box-shadow: 0 30px 70px rgba(0, 0, 0, .7); border: 1px solid var(--line-2); background: var(--surface-2); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; position: relative; }
.detail-info { min-width: 0; flex: 1; max-width: 780px; }
.detail-title { font-size: clamp(30px, 3.8vw, 54px); line-height: 1.05; font-weight: 800; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 12px; color: #d4d7e2; font-weight: 550; }
.detail-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.detail-plot { color: #cdd0db; font-size: 16px; line-height: 1.65; max-width: 720px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.detail-progress { display: flex; align-items: center; gap: 14px; margin-top: 18px; max-width: 420px; font-size: 13px; color: var(--muted); }
.detail-progress .bar { flex: 1; }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold-grad); border-radius: inherit; }
.detail-credits { margin: 22px 0 0; display: grid; gap: 6px; font-size: 14px; }
.detail-credits div { display: flex; gap: 12px; }
.detail-credits dt { color: var(--dim); min-width: 64px; }
.detail-credits dd { margin: 0; color: #c7cad6; }
.detail-rows { padding-top: 10px; }
.sk-hero { background: var(--bg-2); }
.sk-hero .detail-poster { border: 0; }

.episodes { padding: 10px var(--pad) 60px; max-width: 1400px; }
.episodes-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.episodes-head h2 { font-size: 24px; }
.season-tabs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.season-tabs::-webkit-scrollbar { display: none; }
.ep-list { display: grid; gap: 12px; }
.ep { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; padding: 12px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .025); border: 1px solid var(--line); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.ep:hover { background: rgba(255, 255, 255, .06); border-color: rgba(247, 201, 72, .35); }
.ep-thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; position: relative; }
.ep-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .25); opacity: 0; transition: opacity .2s; }
.ep-play .ic { width: 44px; height: 44px; padding: 12px 11px 12px 13px; border-radius: 50%; background: var(--gold); color: #1d1405; }
.ep:hover .ep-play, body.kbd .ep:focus .ep-play { opacity: 1; }
.ep-top { display: flex; align-items: baseline; gap: 12px; }
.ep-num { font: 800 15px var(--display); color: var(--gold); flex: none; }
.ep-info h3 { font-size: 17px; font-weight: 650; }
.ep-meta { font-size: 13px; color: var(--dim); margin: 3px 0 6px; }
.ep-info p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep.done .ep-info h3 { color: #c3c7d3; }

/* ── Ao Vivo ──────────────────────────────────────────── */
.live { display: grid; grid-template-columns: var(--rail) minmax(320px, 440px) minmax(0, 1fr); height: 100vh; }
.live-cats { border-right: 1px solid var(--line); background: rgba(9, 10, 16, .55); display: flex; flex-direction: column; padding: 26px 14px 14px; min-height: 0; }
.live-channels { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 22px 14px 30px; scrollbar-width: thin; }
.live-channels > * { flex-shrink: 0; }
.ch-head { padding: 4px 8px 16px; }
.ch-head h2 { font-size: 20px; }
.ch-head p { font-size: 13px; }
.ch-search { margin: 0 4px 12px; position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 0 -12px 0 var(--bg), 0 12px 16px -8px var(--bg); }
.ch-list { display: flex; flex-direction: column; gap: 4px; }
.ch-row { position: relative; }
.ch { display: grid; grid-template-columns: 34px 58px minmax(0, 1fr) 24px; align-items: center; gap: 12px; padding: 8px 46px 8px 8px; border-radius: 14px; transition: background .15s; border: 1px solid transparent; }
.ch:hover { background: rgba(255, 255, 255, .05); }
.ch.active { background: linear-gradient(90deg, rgba(247, 201, 72, .14), rgba(247, 201, 72, .04)); border-color: rgba(247, 201, 72, .3); }
.ch-num { font: 700 13px var(--display); color: var(--dim); text-align: center; }
.ch.active .ch-num { color: var(--gold); }
.ch-logo { position: relative; width: 58px; height: 40px; border-radius: 10px; background: #0d1017; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.ch-logo::before { font-size: 14px !important; }
.ch-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; position: relative; }
.ch-main { min-width: 0; display: flex; flex-direction: column; }
.ch-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-live { color: var(--gold); opacity: 0; transition: opacity .15s; }
.ch-live .ic { width: 16px; height: 16px; }
.ch.active .ch-live, .ch:hover .ch-live { opacity: 1; }
.ch-fav { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--dim); transition: color .15s, background .15s; }
.ch-fav .ic { width: 17px; height: 17px; }
.ch-fav:hover { background: rgba(255, 255, 255, .07); color: #ff5d7a; }
.ch-row.is-fav .ch-fav { color: #ff5d7a; }

.live-preview { padding: 26px var(--pad) 30px; overflow-y: auto; min-height: 0; }
.pv-box { position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow); border: 1px solid var(--line); }
.pv-box video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pv-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); background: radial-gradient(circle at center, #151a28, #07080c); }
.pv-empty .ic { width: 50px; height: 50px; color: var(--gold); margin: 0 auto 6px; }
.pv-empty p { font: 600 18px var(--display); color: var(--text); }
.pv-empty small { color: var(--dim); }
.pv-box.active .pv-empty { display: none; }
.pv-spin { position: absolute; inset: 0; display: none; place-items: center; background: rgba(0, 0, 0, .35); }
.pv-box.loading .pv-spin { display: grid; }
.pv-err { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; background: rgba(0, 0, 0, .8); color: #fca5a5; text-align: center; }
.pv-err .ic { width: 40px; height: 40px; margin: 0 auto; }
.pv-full { position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(10, 12, 18, .7); border: 1px solid var(--line-2); opacity: 0; transition: opacity .2s; }
.pv-box.active:hover .pv-full { opacity: 1; }
.pv-info { margin-top: 22px; }
.pv-title { display: flex; align-items: center; gap: 16px; }
.pv-logo { position: relative; width: 76px; height: 54px; border-radius: 12px; background: #0d1017; border: 1px solid var(--line); flex: none; overflow: hidden; }
.pv-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pv-title h2 { font-size: 24px; }
.pv-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 24px; }
.epg h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; font-family: var(--font); }
.epg-item { display: grid; grid-template-columns: 62px 1fr; gap: 16px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); margin-bottom: 8px; }
.epg-item.now { background: rgba(247, 201, 72, .06); border-color: rgba(247, 201, 72, .25); }
.epg-time { font: 700 15px var(--display); display: flex; flex-direction: column; }
.epg-time small { font: 500 12px var(--font); color: var(--dim); }
.epg-title { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.epg-body p { color: var(--muted); font-size: 13.5px; margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 6px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; }
.next-tag { height: 20px; padding: 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .1); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; display: inline-flex; align-items: center; }
.epg-none { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.epg-none .ic { width: 17px; height: 17px; }

/* ── Busca / Configurações ────────────────────────────── */
.search-big { display: flex; align-items: center; gap: 16px; height: 68px; padding: 0 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); margin-bottom: 30px; transition: border-color .15s, box-shadow .15s; }
.search-big:focus-within { border-color: rgba(247, 201, 72, .6); box-shadow: 0 0 0 5px rgba(247, 201, 72, .1); }
.search-big .ic { width: 24px; height: 24px; color: var(--gold); }
.search-big input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 20px; font-family: var(--display); }
.search-big input::placeholder { color: var(--dim); }
.search-results .row-head, .search-results .row-track { padding-left: 0; padding-right: 0; }

.settings { max-width: 900px; }
.set-card { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 18px; }
.set-card h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; font-family: var(--font); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-weight: 600; }
.set-row small { color: var(--muted); font-size: 13px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #2a3042; transition: background .2s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--gold-grad); }
.switch input:checked + i::after { transform: translateX(20px); }
body.kbd .switch input:focus + i { outline: 2.5px solid var(--gold); outline-offset: 3px; }
.set-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.account { background: linear-gradient(135deg, rgba(59, 130, 246, .10), rgba(139, 92, 246, .10)); border-color: rgba(139, 92, 246, .25); }
.acc-top { display: flex; align-items: center; gap: 16px; }
.acc-top > div:nth-child(2) { flex: 1; min-width: 0; }
.acc-top h2 { font-size: 22px; }
.acc-top p { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--royal); display: grid; place-items: center; flex: none; }
.acc-avatar .ic { width: 26px; height: 26px; }
.status { height: 28px; padding: 0 12px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; }
.status.ok { background: rgba(34, 197, 94, .15); color: #86efac; }
.status.bad { background: rgba(239, 68, 68, .15); color: #fca5a5; }
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.acc-stats > div { background: rgba(0, 0, 0, .25); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; }
.acc-stats small { color: var(--dim); font-size: 12px; }
.acc-stats b { font: 700 19px var(--display); margin: 2px 0; }
.acc-stats span { font-size: 12.5px; color: var(--muted); }
.acc-stats span.warn { color: #fbbf24; }

.app-lock { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; background: rgba(6, 7, 11, .96); backdrop-filter: blur(10px); text-align: center; padding: 24px; }
.app-lock .ic { width: 56px; height: 56px; color: var(--gold); margin: 0 auto 16px; }
.app-lock h2 { font-size: 28px; margin-bottom: 8px; }
.app-lock p { color: var(--muted); max-width: 420px; }

/* ============================================================
   PLAYER
   ============================================================ */
.player { position: fixed; inset: 0; z-index: 2000; background: #000; color: #fff; opacity: 0; transition: opacity .22s; user-select: none; -webkit-user-select: none; overflow: hidden; outline: none; }
.player.in { opacity: 1; }
.player:not(.ui) { cursor: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.p-layer { position: absolute; inset: 0; z-index: 1; touch-action: pan-y; }
.p-spin { position: absolute; inset: 0; z-index: 2; display: none; place-items: center; pointer-events: none; }
.player[data-state="loading"] .p-spin, .player.buffering .p-spin { display: grid; }
.player[data-state="error"] .p-spin { display: none !important; }
.player[data-state="loading"] .p-center, .player[data-state="error"] .p-center, .player.buffering .p-big { visibility: hidden; }

.p-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .3s; }
.player.ui .p-ui, .player.scrubbing .p-ui { opacity: 1; }
.player.ui .p-ui > * { pointer-events: auto; }
.p-ui::before, .p-ui::after { content: ''; position: absolute; left: 0; right: 0; pointer-events: none; }
.p-ui::before { top: 0; height: 170px; background: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent); }
.p-ui::after { bottom: 0; height: 240px; background: linear-gradient(0deg, rgba(0, 0, 0, .9), transparent); }
.p-top, .p-bottom, .p-center { position: absolute; left: 0; right: 0; z-index: 1; }
.p-top { top: 0; display: flex; align-items: center; gap: 14px; padding: max(18px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.p-titles { flex: 1; min-width: 0; }
.p-title { font: 700 20px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { font-size: 14px; color: #cfd2dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-live-badge { display: none; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 8px; background: var(--danger); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.p-live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.is-live .p-live-badge { display: inline-flex; }
.p-fav.on { color: #ff5d7a; }
.p-fav.on .ic { fill: currentColor; }

.p-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: background .15s, transform .15s; flex: none; }
.p-btn .ic { width: 24px; height: 24px; }
.p-btn:hover { background: rgba(255, 255, 255, .14); }
.p-btn:active { transform: scale(.92); }
.p-btn.sm { width: 36px; height: 36px; }
.p-btn.sm .ic { width: 18px; height: 18px; }
.p-pill { width: auto; padding: 0 16px 0 12px; gap: 8px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 650; font-size: 14px; background: rgba(255, 255, 255, .12); }
.p-pill .ic { width: 18px; height: 18px; }
.player .i-pause, .player .i-mute, .player .i-shr { display: none; }
.player[data-state="playing"] .i-play { display: none; }
.player[data-state="playing"] .i-pause { display: block; }
.player.muted .i-vol { display: none; }
.player.muted .i-mute { display: block; }
.player.fs .i-exp { display: none; }
.player.fs .i-shr { display: block; }

.p-center { top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; gap: clamp(28px, 8vw, 90px); pointer-events: none !important; }
.p-center > * { pointer-events: auto; }
.p-cbtn { width: 64px; height: 64px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.p-cbtn .ic { width: 32px; height: 32px; }
.p-big { width: 84px; height: 84px; background: rgba(247, 201, 72, .95); color: #1d1405; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.p-big:hover { background: #ffd970; }
.p-big .ic { width: 38px; height: 38px; }
.p-big .i-play { margin-left: 5px; }
@media (hover: hover) and (pointer: fine) {
  .p-center .p-cbtn:not(.p-big) { display: none; }
  .player[data-state="playing"] .p-center { display: none; }
}
.is-live .only-vod, .player:not(.is-live) .only-live { display: none !important; }
.no-dur .p-timeline, .no-dur .p-time, .no-dur .only-vod { display: none !important; }

.p-bottom { bottom: 0; padding: 0 max(22px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
.p-epg { max-width: 620px; margin-bottom: 14px; }
.p-epg:empty { display: none; }
.p-epg-now { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.p-epg-now b { font: 700 18px var(--display); }
.p-epg-now small { color: #c7cad6; }
.p-epg-next { font-size: 13px; color: #aeb3c2; margin-top: 8px; }
.p-timeline { position: relative; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.p-track { position: relative; width: 100%; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .22); transition: height .15s; }
.p-timeline.hover .p-track, .p-timeline.drag .p-track, .player.scrubbing .p-track { height: 8px; }
.p-buf { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .28); border-radius: inherit; }
.p-played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold-grad); border-radius: inherit; }
.p-thumb { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(247, 201, 72, .45), 0 2px 8px rgba(0, 0, 0, .5); transform: scale(0); transition: transform .15s; }
.p-timeline.hover .p-thumb, .p-timeline.drag .p-thumb, .player.scrubbing .p-thumb { transform: scale(1); }
@media (pointer: coarse) { .p-thumb { transform: scale(.85); } .p-timeline { height: 34px; } }
.p-tip { position: absolute; bottom: 30px; transform: translateX(-50%); padding: 5px 9px; border-radius: 8px; background: rgba(12, 14, 20, .92); font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .15s; pointer-events: none; font-variant-numeric: tabular-nums; }
.p-timeline.hover .p-tip { opacity: 1; }
.p-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.p-left, .p-right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.p-time { margin-left: 10px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: #e6e8ee; }
.p-sep { margin: 0 5px; color: #8b90a0; }
.p-vol { display: flex; align-items: center; }
.p-vol input { width: 0; opacity: 0; transition: width .25s var(--ease), opacity .2s; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, #fff var(--p, 100%), rgba(255, 255, 255, .25) var(--p, 100%)); }
.p-vol:hover input, .p-vol:focus-within input { width: 90px; opacity: 1; margin: 0 8px 0 2px; }
.p-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.p-vol input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
@media (pointer: coarse) { .p-vol input { display: none; } }

.p-ripple { position: absolute; top: 0; bottom: 0; width: 38%; z-index: 2; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.p-ripple.left { left: 0; border-radius: 0 50% 50% 0 / 0 60% 60% 0; }
.p-ripple.right { right: 0; border-radius: 50% 0 0 50% / 60% 0 0 60%; }
.p-ripple.on { animation: ripple .65s ease-out; }
@keyframes ripple { 0% { opacity: 0; background: rgba(255, 255, 255, .0); } 20% { opacity: 1; background: rgba(255, 255, 255, .12); } 100% { opacity: 0; background: rgba(255, 255, 255, .0); } }
.p-ripple div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.p-ripple .ic { width: 40px; height: 40px; }
.p-ripple b { font-size: 14px; font-weight: 700; }

.p-scrub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 4; display: none; flex-direction: column; align-items: center; gap: 4px; padding: 16px 26px; border-radius: 18px; background: rgba(10, 12, 18, .78); backdrop-filter: blur(10px); pointer-events: none; }
.player.scrubbing .p-scrub { display: flex; }
.player.scrubbing .p-center { visibility: hidden; }
.p-scrub b { font: 800 30px var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.p-scrub span { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.p-menu { position: absolute; right: 22px; bottom: 96px; z-index: 6; width: min(320px, calc(100vw - 32px)); max-height: calc(100vh - 140px); overflow-y: auto; padding: 14px; border-radius: 18px; background: rgba(16, 19, 28, .96); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(16px); animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.p-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px 6px; }
.p-menu-sec { padding: 8px 0; border-top: 1px solid var(--line); }
.p-menu-sec h4 { font: 700 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 4px 8px 8px; }
.p-menu-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.p-menu-opts button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 13.5px; font-weight: 600; }
.p-menu-opts button:hover { background: rgba(255, 255, 255, .12); }
.p-menu-opts button.on { background: var(--gold-grad); color: #1d1405; }
.p-menu-opts .ic { width: 15px; height: 15px; stroke-width: 3; }

.p-nextcard { position: absolute; right: 24px; bottom: 110px; z-index: 5; display: flex; align-items: center; gap: 14px; width: min(460px, calc(100vw - 32px)); padding: 12px; border-radius: 18px; background: rgba(16, 19, 28, .94); border: 1px solid rgba(247, 201, 72, .35); box-shadow: var(--shadow); animation: pop .3s var(--ease); }
.p-next-img { position: relative; width: 120px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--surface-2); flex: none; }
.p-next-img img { width: 100%; height: 100%; object-fit: cover; }
.p-next-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-next-info small { color: var(--gold); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.p-next-info b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-count { font-size: 12.5px; color: var(--muted); }
.p-next-act { display: flex; align-items: center; gap: 4px; }

.p-error { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(0, 0, 0, .82); padding: 24px; }
.p-error-box { text-align: center; max-width: 460px; }
.p-error-box > .ic { width: 52px; height: 52px; color: #fca5a5; margin: 0 auto 14px; }
.p-error-box h3 { font-size: 22px; margin-bottom: 8px; }
.p-error-box p { color: #c7cad6; margin-bottom: 22px; }
.p-error-box { max-width: 720px; }
.p-diag { text-align: left; white-space: pre-wrap; word-break: break-all; font: 12px/1.5 ui-monospace, Menlo, monospace; color: #aeb3c2; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: -8px 0 20px; max-height: 38vh; overflow: auto; user-select: text; -webkit-user-select: text; }
.p-err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.p-flash { position: absolute; top: 90px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 12px; background: rgba(16, 19, 28, .92); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.p-flash.on { animation: pop .25s var(--ease); }
.p-flash button { color: var(--gold); font-weight: 700; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1400px) { :root { --rail: 236px; } }

/* Tablet / notebook pequeno: menu lateral só com ícones */
@media (max-width: 1180px) and (min-width: 768px) {
  :root { --sidebar: 84px; --pad: 26px; }
  .sidebar { padding: 18px 12px; }
  .sb-logo { padding: 0 0 18px; }
  .sb-logo img { width: 56px; height: 56px; object-fit: cover; object-position: 50% 20%; }
  .sb-nav a { justify-content: center; padding: 0; height: 52px; }
  .sb-nav a span, .sb-user-txt, .sb-gear { display: none; }
  .sb-badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; font-size: 10px; padding: 0 5px; }
  .sb-user { justify-content: center; padding: 8px; border: 0; background: none; }
  .live { grid-template-columns: 210px minmax(280px, 360px) minmax(0, 1fr); }
  .live-cats { padding: 22px 10px 12px; }
}

/* Rail de categorias vira menu suspenso em telas médias */
@media (max-width: 1023px) {
  .sec { display: block; }
  .sec-rail, .live-cats { position: sticky; top: 0; height: auto; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(8, 9, 14, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); z-index: 20; }
  .rail-inner, .live-cats { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px var(--pad); gap: 8px; }
  .rail-head { display: none; }
  .rail-quick { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; order: 2; gap: 8px; }
  .rail-quick::-webkit-scrollbar { display: none; }
  .rail-quick a { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
  .rail-quick a.active { background: var(--gold-grad); color: #1d1405; border-color: transparent; }
  .rail-quick a.active small { color: inherit; }
  .rail-cats-btn { order: 1; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; max-width: 100%; }
  .rail-cats-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-cats-btn .ic { width: 17px; height: 17px; flex: none; }
  .rail-cats-btn.active { border-color: rgba(247, 201, 72, .5); color: var(--gold); }
  .rail-cats { display: none; position: fixed; inset: 0; z-index: 900; margin: 0; padding: 0; border: 0; }
  .rail-cats.sheet-open { display: block; }
  .rail-cats .sheet-backdrop { display: block; position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fadeIn .2s; }
  .rail-cats .sheet-close { display: grid; }
  .rail-cats .sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; border-radius: 24px 24px 0 0; background: var(--surface); border-top: 1px solid var(--line-2); padding: 18px 16px max(16px, env(safe-area-inset-bottom)); animation: sheetUp .3s var(--ease); }
  .rail-cats-head { font-size: 14px; padding: 0 6px 12px; }
  .live { display: block; height: auto; }
  .live-channels { border-right: 0; overflow: visible; padding: 16px var(--pad) 40px; }
  .ch-search { position: static; box-shadow: none; }
  .live-preview { display: none; }
  .hero-content { width: min(620px, 80%); }
}
@keyframes fadeIn { from { opacity: 0; } }

/* Celular */
@media (max-width: 767px) {
  :root { --pad: 16px; }
  body { font-size: 14.5px; }
  .app { display: block; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .m-top { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; height: 58px; padding: 0 10px 0 12px; padding-top: env(safe-area-inset-top); background: rgba(6, 7, 11, .85); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
  .m-logo img { height: 44px; width: auto; }
  .m-top-act { display: flex; gap: 2px; }
  .m-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(10, 12, 18, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line); }
  .m-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--dim); position: relative; }
  .m-tabbar a .ic { width: 22px; height: 22px; }
  .m-tabbar a.active { color: var(--gold); }
  .m-tabbar a.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); }
  .sec-rail, .live-cats { top: 58px; }
  .hero { height: 62vh; min-height: 420px; }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 4%, rgba(6, 7, 11, .7) 45%, rgba(6, 7, 11, .15) 100%); }
  .hero-content { left: var(--pad); right: var(--pad); width: auto; bottom: 56px; }
  .hero-title { font-size: 30px; }
  .hero-plot { -webkit-line-clamp: 2; font-size: 14px; }
  .hero-actions .btn-glass span { display: none; }
  .hero-actions .btn-glass { width: 46px; padding: 0; }
  .hero-dots { left: 0; right: 0; bottom: 24px; justify-content: center; }
  .poster-mode .hero-poster { display: none; }
  .rows { margin-top: -10px; }
  .row { margin-bottom: 22px; }
  .row-head h2 { font-size: 17px; }
  .row-track { gap: 12px; }
  .card { width: 124px; }
  .ccard { width: 244px; }
  .chcard { width: 132px; }
  .card-title { font-size: 13px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 12px; }
  .grid-land { grid-template-columns: 1fr; }
  .grid-mixed { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .list-head { padding-top: 20px; }
  .list-title h1 { font-size: 22px; }
  .list-ic { width: 42px; height: 42px; }
  .list-tools { width: 100%; }
  .list-tools .search-mini { flex: 1; width: auto; }
  .page { padding: 20px var(--pad) 40px; }
  .page-head h1 { font-size: 24px; }
  .login { padding: 16px; align-items: start; }
  .login-card { grid-template-columns: 1fr; border-radius: 24px; }
  .login-brand { padding: 30px 24px 10px; border-right: 0; background: none; }
  .login-logo { width: 190px; }
  .login-slogan { margin-bottom: 0; font-size: 17px; }
  .login-feats { display: none; }
  .login-form { padding: 20px 22px 28px; }
  .login-form h1 { font-size: 26px; }
  .detail-hero { min-height: 0; }
  .detail-body { flex-direction: column; align-items: flex-start; gap: 22px; padding: 80px var(--pad) 24px; }
  .detail-poster { width: 140px; }
  .detail-shade { background: linear-gradient(0deg, var(--bg) 10%, rgba(6, 7, 11, .75) 55%, rgba(6, 7, 11, .4) 100%); }
  .detail-back { top: 14px; }
  .detail-plot { font-size: 14.5px; }
  .detail-actions .btn-lg { flex: 1 1 100%; }
  .ep { grid-template-columns: 130px 1fr; gap: 12px; padding: 8px; border-radius: 16px; }
  .ep-info h3 { font-size: 15px; }
  .ep-info p { -webkit-line-clamp: 2; font-size: 13px; }
  .search-big { height: 56px; padding: 0 18px; border-radius: 16px; }
  .search-big input { font-size: 17px; }
  .acc-stats { grid-template-columns: 1fr 1fr; }
  .set-card { padding: 18px; }
  .p-title { font-size: 16px; }
  .p-sub { font-size: 12.5px; }
  .p-btn { width: 42px; height: 42px; }
  .hide-sm { display: none !important; }
  .p-nextcard { right: 12px; left: 12px; width: auto; bottom: 100px; }
  .p-next-img { width: 88px; }
  .p-menu { right: 12px; left: 12px; width: auto; bottom: 86px; }
  #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
