/* CaipiraPlay Desktop — layout 2.0 (topbar em pílula, hero, fileiras, modal de detalhes) */
:root {
    color-scheme: dark;
    --bg: #08080A;
    --surface: #131317;
    --surface2: #1B1B21;
    --glass: rgba(19, 19, 23, 0.78);
    --glass-strong: rgba(14, 14, 18, 0.92);
    --specular: inset 0 1px 0 rgba(255, 255, 255, 0.10);
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.22);
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --dim: #71717a;
    --orange: #ff6a1a;
    --orange-2: #ff8a3d;
    --orange-dark: #cc5100;
    --orange-glow: rgba(255, 106, 26, 0.35);
    --amber: #ffb547;
    --rose: #ff6b6b;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --pad-x: clamp(24px, 3.6vw, 56px);
    --top-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; }
#app { height: 100vh; position: relative; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- fundo ambiente ---------- */
.ambient {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(900px 520px at 8% -10%, rgba(255, 106, 26, 0.13), transparent 60%),
        radial-gradient(700px 500px at 100% 0%, rgba(255, 138, 61, 0.06), transparent 60%),
        var(--bg);
}

/* ---------- login ---------- */
.login-screen { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 100vh; padding: 24px; }
.login-box {
    width: 100%; max-width: 400px; padding: 40px 36px 32px; text-align: center;
    background: var(--glass); backdrop-filter: blur(22px);
    border: 1px solid var(--line); border-radius: 26px;
    box-shadow: var(--specular), 0 30px 90px rgba(0, 0, 0, 0.6);
}
.login-box img.logo { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 18px; box-shadow: 0 10px 40px var(--orange-glow); }
.login-box h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.login-box h1 b { color: var(--orange); }
.login-box p.subtitle { color: var(--muted); font-size: 13.5px; margin: 6px 0 26px; }
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input {
    width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.35); color: var(--text); font-size: 14.5px; user-select: text; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.15); }
.error-msg { color: var(--rose); font-size: 13px; margin-top: 14px; }

/* ---------- botões ---------- */
.btn-primary, .btn-glass {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 46px; padding: 0 24px; border-radius: 999px;
    font-size: 14.5px; font-weight: 700; white-space: nowrap;
    transition: transform .2s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 24px var(--orange-glow); }
.btn-primary:hover { background: var(--orange-2); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-glass { background: rgba(255, 255, 255, 0.10); border: 1px solid var(--line-strong); backdrop-filter: blur(14px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.18); }
.btn-glass.on { color: var(--orange-2); border-color: rgba(255, 106, 26, 0.5); }
.btn-block { width: 100%; margin-top: 8px; }
.btn-primary svg, .btn-glass svg { width: 18px; height: 18px; }

/* ---------- topbar ---------- */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--top-h);
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
    padding: 0 var(--pad-x);
    background: linear-gradient(to bottom, rgba(8, 8, 10, 0.85), rgba(8, 8, 10, 0));
    transition: background .3s, box-shadow .3s;
}
.topbar.solid { background: rgba(8, 8, 10, 0.86); backdrop-filter: blur(18px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; justify-self: start; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.brand span b { color: var(--orange); }

.nav-pill {
    justify-self: center; display: inline-flex; align-items: center; gap: 3px; height: 44px; padding: 4px;
    border-radius: 999px; background: var(--glass); backdrop-filter: blur(18px);
    border: 1px solid var(--line); box-shadow: var(--specular), 0 8px 30px rgba(0, 0, 0, 0.35);
}
.nav-btn {
    height: 100%; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    color: var(--muted); white-space: nowrap; transition: color .2s, background .2s;
}
.nav-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-btn.active { background: var(--orange); color: #fff; font-weight: 700; box-shadow: 0 2px 14px var(--orange-glow); }

.top-tools { justify-self: end; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px);
    color: var(--muted); transition: color .2s, background .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.12); }
.icon-btn.active { color: #fff; background: var(--orange); border-color: var(--orange); }
.icon-btn svg { width: 19px; height: 19px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 0 14px 0 5px; height: 42px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.user-chip { cursor: pointer; transition: background .2s, color .2s; }
.user-chip:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.user-chip .avatar.av { width: 32px; height: 32px; border-radius: 10px; font-size: 17px; }

/* ---------- página ---------- */
.page { position: absolute; inset: 0; z-index: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.page-inner { padding: calc(var(--top-h) + 24px) var(--pad-x) 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; letter-spacing: -0.03em; }
.page-title .count { font-size: 15px; color: var(--muted); font-weight: 700; margin-left: 10px; letter-spacing: 0; }
.filter-input, .search-input {
    padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--glass); color: var(--text); font-size: 14px; user-select: text; transition: border-color .2s, box-shadow .2s;
}
.filter-input { width: 280px; }
.filter-input:focus, .search-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.14); }
.search-input { width: 100%; padding: 16px 24px; font-size: 17px; margin-bottom: 16px; }

.chips-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 18px; scrollbar-width: thin; }
.chip {
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
    color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--text); border-color: var(--text); color: #111; }

.loading, .empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    min-height: 260px; color: var(--muted); text-align: center; padding: 0 24px; font-size: 14px;
}
.loading::before {
    content: ""; width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: var(--orange); animation: spin .8s linear infinite;
}
.loading.small { min-height: 120px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-inline { color: var(--dim); font-size: 13.5px; padding: 4px 0 18px; }
.section-title { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin: 26px 0 14px; display: flex; align-items: baseline; gap: 8px; }
.section-title .count { font-size: 13px; color: var(--muted); font-weight: 700; }
.more-wrap { display: flex; justify-content: center; margin-top: 22px; }

/* ---------- hero ---------- */
.hero {
    position: relative; width: 100%; min-height: 72vh; max-height: 760px; height: 72vh;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
    padding: 0 var(--pad-x) 56px; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center 20%;
    transform: scale(1.03); animation: heroIn 1.1s var(--ease) both;
}
.hero-bg.poster { background-size: cover; filter: blur(28px) saturate(1.2); transform: scale(1.25); opacity: .65; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1.03); } }
.hero-scrim {
    position: absolute; inset: 0;
    background:
        linear-gradient(to top, var(--bg) 0%, rgba(8, 8, 10, 0.55) 38%, rgba(8, 8, 10, 0.1) 70%),
        linear-gradient(to right, rgba(8, 8, 10, 0.92) 0%, rgba(8, 8, 10, 0.5) 42%, transparent 72%);
}
.hero-poster {
    position: relative; z-index: 2; width: 190px; aspect-ratio: 2/3; border-radius: 16px; overflow: hidden; flex-shrink: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); border: 1px solid var(--line); background: var(--surface2);
    animation: fadeUp .7s var(--ease) both;
}
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.hero-left { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 28px; max-width: 900px; }
.hero-content { max-width: 620px; animation: fadeUp .7s .05s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 12px; }
.hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.hero-title { font-size: clamp(34px, 4.1vw, 58px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin-bottom: 14px; text-wrap: balance; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.meta-chip { padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); }
.meta-rate { color: var(--amber); font-weight: 800; }
.hero-desc {
    font-size: 15px; line-height: 1.55; color: #d4d4d8; margin-bottom: 22px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-thumbs { position: relative; z-index: 2; display: flex; gap: 10px; align-items: flex-end; }
.hero-thumb {
    width: 62px; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; opacity: .5;
    border: 2px solid transparent; transition: all .3s var(--ease); background: var(--surface2);
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb:hover { opacity: .85; }
.hero-thumb.active { opacity: 1; width: 78px; border-color: var(--orange); box-shadow: 0 8px 24px var(--orange-glow); }
.hero-skel { position: absolute; inset: 0; background: linear-gradient(110deg, #101014 30%, #17171c 50%, #101014 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- fileiras ---------- */
.rows { position: relative; z-index: 2; padding-bottom: 40px; }
.rows.no-hero { padding-top: calc(var(--top-h) + 16px); }
.row { margin-bottom: 30px; }
.row-head { display: flex; align-items: center; gap: 12px; padding: 0 var(--pad-x); margin-bottom: 12px; }
.row-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.row-count { font-size: 14px; color: var(--muted); font-weight: 700; margin-left: 6px; }
.row-link { font-size: 13px; font-weight: 700; color: var(--orange-2); margin-left: 4px; opacity: .85; }
.row-link:hover { opacity: 1; text-decoration: underline; }
.row-nav { margin-left: auto; display: flex; gap: 6px; }
.row-arrow {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1;
    background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--muted); transition: all .2s;
}
.row-arrow:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.row-scroller {
    display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth;
    padding: 6px var(--pad-x) 14px; scroll-padding-left: var(--pad-x); scrollbar-width: none;
}
.row-scroller::-webkit-scrollbar { display: none; }
.row-scroller > * { flex: 0 0 auto; }
.row-skel { display: flex; gap: 14px; padding: 6px var(--pad-x); overflow: hidden; }
.row-skel div { flex: 0 0 170px; aspect-ratio: 2/3; border-radius: 14px; background: linear-gradient(110deg, #121216 30%, #1a1a20 50%, #121216 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* ---------- cards de pôster ---------- */
.card { width: 170px; cursor: pointer; position: relative; }
.poster-grid .card { width: auto; }
.card-art {
    position: relative; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden;
    background: var(--surface2); border: 1px solid var(--line);
    transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 45%); opacity: 0; transition: opacity .3s; }
.card:hover .card-art { transform: translateY(-4px) scale(1.03); border-color: rgba(255, 106, 26, 0.7); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 106, 26, 0.4); }
.card:hover .card-art::after { opacity: 1; }
.card-noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-size: 13px; font-weight: 700; color: var(--dim); }
.card-rating {
    position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 3px 8px; border-radius: 8px;
    background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px); color: var(--amber); font-size: 11.5px; font-weight: 800;
}
.card-title { margin-top: 9px; font-size: 13px; font-weight: 600; line-height: 1.3; color: #e4e4e7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }

.fav-btn {
    position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(6px); color: #fff; font-size: 16px; line-height: 32px;
    opacity: 0; transition: opacity .2s, background .2s, transform .2s;
}
.card:hover .fav-btn, .ch-card:hover .fav-btn, .fav-btn.on { opacity: 1; }
.fav-btn.on { color: var(--orange); }
.fav-btn:hover { background: rgba(0, 0, 0, 0.85); transform: scale(1.08); }

.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 22px 16px; }

/* ---------- canais ---------- */
.ch-card {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 44px 12px 12px; cursor: pointer;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
    transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.row-scroller .ch-card { width: 270px; }
.ch-card:hover { transform: translateY(-3px); border-color: rgba(255, 106, 26, 0.6); background: var(--surface2); }
.ch-logo { width: 60px; height: 60px; border-radius: 12px; flex-shrink: 0; background: rgba(255, 255, 255, 0.05); display: grid; place-items: center; overflow: hidden; }
.ch-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.ch-logo span { font-weight: 800; color: var(--dim); font-size: 18px; }
.ch-info { min-width: 0; }
.ch-name { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--rose); letter-spacing: .08em; margin-top: 3px; }
.ch-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.ch-card .fav-btn { top: 50%; transform: translateY(-50%); }
.ch-card .fav-btn:hover { transform: translateY(-50%) scale(1.08); }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 14px; }

/* ---------- modal de detalhes ---------- */
body.modal-open .page { overflow: hidden; }
.modal-backdrop {
    position: fixed; inset: 0; z-index: 80; overflow-y: auto; padding: 48px 24px;
    background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(10px);
    display: flex; justify-content: center; animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.detail-modal {
    position: relative; width: 100%; max-width: 1080px; margin: auto 0; border-radius: 26px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--specular), 0 30px 90px rgba(0, 0, 0, 0.76); animation: modalIn .35s var(--ease) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.modal-close {
    position: absolute; top: 16px; right: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line-strong); color: #fff; backdrop-filter: blur(8px);
}
.modal-close:hover { background: rgba(0, 0, 0, 0.85); }
.modal-close svg { width: 18px; height: 18px; }
.detail-banner { position: relative; overflow: hidden; min-height: 430px; display: flex; align-items: flex-end; padding: 36px; }
.detail-banner .hero-bg { animation: none; }
.detail-banner .hero-scrim { background: linear-gradient(to top, var(--surface) 2%, rgba(19, 19, 23, 0.6) 45%, rgba(19, 19, 23, 0.15)), linear-gradient(to right, rgba(19, 19, 23, 0.9), transparent 70%); }
.detail-inner { position: relative; z-index: 2; display: flex; gap: 28px; align-items: flex-end; width: 100%; }
.detail-inner .hero-poster { width: 170px; }
.detail-inner .hero-title { font-size: clamp(28px, 3.2vw, 44px); }
.detail-body { padding: 8px 36px 36px; }
.detail-facts { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; font-size: 13.5px; margin-top: 6px; }
.detail-facts dt { color: var(--dim); font-weight: 700; }
.detail-facts dd { color: #d4d4d8; }
.seasons { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ep-card { cursor: pointer; border-radius: 14px; overflow: hidden; background: var(--surface2); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .25s; }
.ep-card:hover { transform: translateY(-3px); border-color: rgba(255, 106, 26, 0.6); }
.ep-card.last { border-color: var(--orange); }
.ep-thumb { position: relative; aspect-ratio: 16/9; background: #0d0d10 center/cover no-repeat; }
.ep-thumb .play-ico {
    position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line-strong); opacity: 0; transition: opacity .2s;
}
.ep-card:hover .play-ico { opacity: 1; }
.play-ico svg { width: 18px; height: 18px; margin-left: 2px; }
.ep-num { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.7); font-size: 11.5px; font-weight: 800; }
.ep-tag { position: absolute; right: 8px; top: 8px; padding: 3px 8px; border-radius: 8px; background: var(--orange); font-size: 11px; font-weight: 800; }
.ep-info { padding: 10px 12px 12px; }
.ep-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ep-desc { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-dur { font-size: 11.5px; color: var(--dim); margin-top: 6px; font-weight: 600; }

/* ---------- player ---------- */
.player-screen { position: fixed; inset: 0; background: #000; z-index: 100; animation: fadeIn .2s ease both; }
.player-screen video { width: 100%; height: 100%; background: #000; display: block; }
.player-top-bar {
    position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 20px 24px 40px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    display: flex; align-items: center; gap: 14px; transition: opacity .35s;
}
.player-screen.idle .player-top-bar { opacity: 0; pointer-events: none; }
.player-screen.idle { cursor: none; }
.back-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--line-strong); color: #fff; }
.back-btn:hover { background: rgba(255, 255, 255, 0.22); }
.back-btn svg { width: 20px; height: 20px; }
.player-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--orange-2); text-transform: uppercase; }
.player-title { color: #fff; font-size: 17px; font-weight: 700; }
.player-msg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    background: rgba(12, 12, 15, 0.85); border: 1px solid var(--line); backdrop-filter: blur(12px);
    color: #fff; padding: 22px 28px; border-radius: 18px; font-size: 14.5px; text-align: center; max-width: 420px;
}
.player-msg[hidden] { display: none; }
.player-msg.loading-msg::before { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--orange); animation: spin .8s linear infinite; }


/* ---------- avatares de perfil ---------- */
.avatar {
    --av: #FF6A1A;
    display: grid; place-items: center; flex-shrink: 0; border-radius: 22px;
    background: radial-gradient(120% 120% at 20% 10%, color-mix(in srgb, var(--av) 75%, #fff 25%), var(--av) 55%, color-mix(in srgb, var(--av) 60%, #000 40%));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 30px color-mix(in srgb, var(--av) 35%, transparent);
}
.avatar span { line-height: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); }
.avatar-lg { width: 132px; height: 132px; font-size: 64px; border-radius: 30px; }
.avatar-md { width: 84px; height: 84px; font-size: 42px; border-radius: 22px; margin: 0 auto 14px; }

/* ---------- Quem está assistindo? ---------- */
.profiles-screen { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; animation: fadeIn .4s ease both; }
.profiles-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 22px; box-shadow: 0 8px 30px var(--orange-glow); }
.profiles-title { font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 40px; }
.profiles-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; max-width: 980px; min-height: 200px; }
.profile-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 150px; padding: 8px; border-radius: 26px; transition: transform .25s var(--ease); }
.profile-tile .avatar { transition: box-shadow .25s, outline-color .25s; outline: 3px solid transparent; outline-offset: 4px; }
.profile-tile:hover { transform: translateY(-4px); }
.profile-tile:hover .avatar, .profile-tile:focus-visible .avatar { outline-color: #fff; }
.profile-name { font-size: 16px; font-weight: 700; color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.profile-tile:hover .profile-name { color: var(--text); }
.profile-badges { display: flex; align-items: center; gap: 6px; min-height: 20px; margin-top: -4px; }
.profile-kids { padding: 2px 8px; border-radius: 999px; background: rgba(95, 224, 168, 0.15); color: #5fe0a8; font-size: 11px; font-weight: 800; }
.profile-lock { color: var(--dim); display: grid; }
.profile-lock svg { width: 15px; height: 15px; }
.profile-edit { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 132px; height: 132px; border-radius: 30px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); color: #fff; }
.profile-edit svg { width: 34px; height: 34px; }
.add-av { --av: #2a2a31; background: rgba(255, 255, 255, 0.05); border: 2px dashed rgba(255, 255, 255, 0.2); box-shadow: none; color: var(--muted); }
.add-av svg { width: 44px; height: 44px; }
.profile-tile.add:hover .add-av { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.profiles-actions { display: flex; gap: 10px; margin-top: 44px; flex-wrap: wrap; justify-content: center; }

/* ---------- diálogos (PIN, perfil) ---------- */
.dialog-backdrop { z-index: 120; align-items: center; }
.dlg {
    width: 100%; max-width: 440px; margin: auto; padding: 30px 28px 24px; text-align: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
    box-shadow: var(--specular), 0 30px 90px rgba(0, 0, 0, 0.7); animation: modalIn .3s var(--ease) both;
}
.dlg.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.dlg-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.dlg-msg { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.dlg-err { color: var(--rose); font-size: 13px; min-height: 18px; margin: 10px 0 4px; }
.dlg-actions { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.dlg-label { display: block; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 7px; }
.dlg-input {
    width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.35); color: var(--text); font-size: 15px; user-select: text;
}
.dlg-input:focus, .pin-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.15); }
.pin-input {
    width: 210px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.4);
    color: var(--text); font-size: 30px; letter-spacing: 18px; text-align: center; text-indent: 18px; user-select: text;
}
.btn-link { color: var(--orange-2); font-size: 13.5px; font-weight: 700; padding: 8px 10px; }
.btn-link:hover { text-decoration: underline; }
.btn-danger { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--rose); border: 1px solid rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); }
.btn-danger:hover { background: rgba(255, 107, 107, 0.18); }
.prof-form { text-align: left; }
.prof-preview { display: flex; justify-content: center; margin: 4px 0 6px; }
.prof-preview .avatar-lg { width: 96px; height: 96px; font-size: 46px; border-radius: 24px; }
.swatches, .icons { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--av); outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .2s, transform .2s; }
.swatch:hover { transform: scale(1.08); }
.swatch.on { outline-color: #fff; }
.icon-pick { width: 44px; height: 44px; border-radius: 12px; font-size: 24px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); transition: all .2s; }
.icon-pick:hover { background: rgba(255, 255, 255, 0.1); }
.icon-pick.on { border-color: var(--orange); background: rgba(255, 106, 26, 0.15); }
.toggle { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--orange); }
.toggle small { color: var(--dim); font-weight: 500; }

/* ---------- progresso / avisos ---------- */
.card-progress { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.card-progress span { display: block; height: 100%; background: var(--orange); border-radius: 999px; }
.card-art .card-progress ~ .card-rating, .card-progress + .card-rating { bottom: 18px; }
.ep-tag.done { background: rgba(95, 224, 168, 0.9); color: #08130e; }
.toast {
    position: fixed; left: 50%; bottom: 32px; z-index: 200; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    padding: 12px 20px; border-radius: 14px; background: rgba(20, 20, 24, 0.95); border: 1px solid var(--line-strong);
    color: var(--text); font-size: 14px; font-weight: 600; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); transition: all .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- atualização obrigatória ---------- */
.force-update { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 8, 10, 0.94); backdrop-filter: blur(12px); }
.force-logo { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 16px; box-shadow: 0 8px 30px var(--orange-glow); }

/* ---------- barra do modo convertido (MKV/HEVC) ---------- */
.rx-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 14px;
    padding: 40px 24px 20px; background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent); transition: opacity .35s;
}
.rx-bar[hidden] { display: none; }
.player-screen.idle .rx-bar { opacity: 0; pointer-events: none; }
.rx-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.12); flex-shrink: 0; }
.rx-btn:hover { background: rgba(255, 255, 255, 0.22); }
.rx-btn svg { width: 20px; height: 20px; }
.rx-time { color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; }
.rx-seek, .rx-vol { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); cursor: pointer; }
.rx-seek { flex: 1; accent-color: var(--orange); }
.rx-vol { width: 90px; accent-color: #fff; }
.rx-seek::-webkit-slider-thumb, .rx-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.25); }
.rx-vol::-webkit-slider-thumb { background: #fff; box-shadow: none; }
.player-screen.rx-mode video { cursor: pointer; }

/* ---------- menu do perfil ---------- */
.user-chip .chev { display: grid; color: var(--dim); transition: transform .25s var(--ease), color .2s; }
.user-chip .chev svg { width: 14px; height: 14px; }
.user-chip.open { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.user-chip.open .chev { transform: rotate(180deg); color: var(--text); }
.user-menu {
    position: fixed; top: calc(var(--top-h) - 4px); right: var(--pad-x); z-index: 90; width: 290px; padding: 8px;
    background: rgba(20, 20, 25, 0.94); backdrop-filter: blur(22px); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: var(--specular), 0 24px 70px rgba(0, 0, 0, 0.6); transform-origin: top right; animation: menuIn .22s var(--ease) both;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.um-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.avatar.um-av { width: 48px; height: 48px; font-size: 25px; border-radius: 14px; box-shadow: none; }
.avatar.um-av-sm { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; box-shadow: none; }
.um-who { min-width: 0; }
.um-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-acc { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.um-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 6px 12px 6px; }
.um-item {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    font-size: 14px; font-weight: 600; color: #d4d4d8; text-align: left; transition: background .15s, color .15s;
}
.um-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.um-item > svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.um-item:hover > svg { color: var(--orange-2); }
.um-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-prof { padding: 7px 12px; }
.um-lock { display: grid; color: var(--dim); }
.um-lock svg { width: 14px; height: 14px; }
.um-danger, .um-danger > svg { color: var(--rose); }
.um-danger:hover { background: rgba(255, 107, 107, 0.1); color: var(--rose); }
.um-danger:hover > svg { color: var(--rose); }
.um-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.um-foot { font-size: 11.5px; color: var(--dim); text-align: center; padding: 8px 0 4px; }

@media (max-width: 1180px) {
    .nav-btn { padding: 0 12px; font-size: 13px; }
    .brand span { display: none; }
    .user-chip span.name { display: none; }
    .user-chip { padding: 0 5px; }
}
@media (max-width: 1020px) {
    .hero-thumbs { display: none; }
    .hero-poster { display: none; }
    .filter-input { width: 100%; }
}
@media (max-height: 700px) {
    .hero { min-height: 64vh; height: 64vh; }
    .hero-desc { -webkit-line-clamp: 2; }
    .detail-banner { min-height: 340px; }
}
