:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #071421;
  color: #f7fbff;
  --red: #ff3858;
  --pink: #e73569;
  --blue: #1d3f68;
  --line: rgba(204, 231, 255, .28);
  --panel: rgba(10, 28, 44, .88);
  --muted: #8eabc2;
  --success: #55dda0;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; background: #071421; text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }

.update-banner { position: fixed; z-index: 100; top: 18px; left: 50%; width: min(820px, calc(100vw - 36px)); transform: translateX(-50%); display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 15px 16px 15px 20px; border: 1px solid rgba(255,255,255,.48); border-radius: 17px; background: linear-gradient(105deg,rgba(126,12,39,.98),rgba(19,20,27,.98)); box-shadow: 0 20px 55px rgba(0,0,0,.58); }
.update-banner div { min-width: 0; display: grid; gap: 4px; }
.update-banner strong { font-size: 18px; }
.update-banner span { overflow: hidden; color: #e0cbd1; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.update-banner button { min-width: 118px; padding: 11px 15px; }

.screen {
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(circle at 84% 60%, rgba(255, 41, 84, .14), transparent 34%),
    radial-gradient(circle at 18% 92%, rgba(115, 206, 104, .12), transparent 30%),
    linear-gradient(135deg, #071421, #122630 58%, #11141e);
}
.screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 78%); }

.splash { display: grid; place-content: center; justify-items: center; gap: 24px; }
.splash p { color: #9ec7e9; font-size: 22px; }
.spinner { width: 46px; height: 46px; border: 5px solid rgba(255,255,255,.18); border-top-color: var(--red); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand { display: flex; align-items: baseline; gap: 1px; font-weight: 900; font-style: italic; letter-spacing: -3px; font-size: 44px; }
.brand span { color: #fff; }
.brand b { color: var(--red); }
.brand small { margin-left: 8px; color: #fff; font-size: 16px; letter-spacing: 3px; font-style: normal; }
.brand.custom-brand { max-width: min(70vw, 520px); overflow: hidden; color: #fff; font-style: normal; letter-spacing: 0; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.brand.custom-brand img { display: block; width: auto; max-width: 100%; height: auto; max-height: 1.35em; object-fit: contain; }
.transition-brand.custom-brand { max-width: min(76vw, 560px); color: #fff; font-style: normal; letter-spacing: 0; line-height: 1.05; }
.transition-brand.custom-brand img { display: block; width: auto; max-width: 100%; max-height: 1.4em; object-fit: contain; }

.activation { display: grid; place-content: center; justify-items: center; gap: 24px; padding: 42px; }
.activation-panel { width: min(1320px, 90vw); padding: 34px 46px; text-align: center; border: 1px solid var(--line); border-radius: 28px; background: rgba(8, 29, 47, .88); box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.eyebrow { margin: 0 0 10px; color: #ff5570; font-size: 14px; font-weight: 800; letter-spacing: 4px; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 52px); }
.lead { margin: 12px auto 24px; max-width: 850px; color: #a9c5dc; font-size: 18px; line-height: 1.45; }
.activation-methods { display: grid; grid-template-columns: minmax(0,1fr) 48px minmax(0,1fr); align-items: stretch; gap: 18px; text-align: left; }
.client-login,.portal-activation { padding: 24px 28px; border: 1px solid rgba(204,231,255,.2); border-radius: 20px; background: rgba(5,20,34,.58); }
.method-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.method-heading>span { display: grid; flex: 0 0 36px; height: 36px; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg,#f33151,#8b285e); font-weight: 900; }
.method-heading div { display: flex; flex-direction: column; }
.method-heading strong { font-size: 19px; }
.method-heading small { margin-top: 3px; color: #7899b4; font-size: 12px; }
.client-login label { display: block; margin-bottom: 10px; color: #a9c5dc; font-size: 12px; font-weight: 700; }
.client-login input { width: 100%; height: 48px; margin-top: 6px; padding: 0 14px; border: 1px solid rgba(204,231,255,.3); border-radius: 11px; outline: 0; color: #fff; background: rgba(4,18,31,.88); font: inherit; }
.client-login input:focus { border-color: #ff5470; box-shadow: 0 0 0 4px rgba(255,56,88,.16); }
.client-login .primary { width: 100%; margin-top: 2px; }
.client-login .primary:disabled { opacity: .6; }
.activation-divider { display: grid; place-items: center; position: relative; color: #6f8da7; font-size: 11px; font-weight: 900; }
.activation-divider::before { content:""; position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(204,231,255,.18); }
.activation-divider span { position: relative; padding: 8px 0; background: #0a2135; }
.portal-activation { display: flex; flex-direction: column; align-items: center; text-align: center; }
.portal-activation .method-heading { align-self: stretch; text-align: left; }
.activation-code { margin: 25px auto 14px; padding: 15px 25px; width: max-content; border: 2px solid rgba(255,255,255,.85); border-radius: 16px; background: linear-gradient(135deg, #f33151, #8b285e); font-size: 43px; font-weight: 900; letter-spacing: 12px; box-shadow: 0 0 34px rgba(255,56,88,.24); }
.status { min-height: 28px; color: #dbeeff; }
.login-status { margin: 11px 0 0; color: #7798b2; font-size: 11px; line-height: 1.4; text-align: center; }
.login-status.error { color: #ff8397; }
.activation footer { color: #7599b6; }
.installation-identifiers { display: flex; align-items: center; justify-content: center; gap: 24px; font-size: 14px; }
.installation-identifiers b { color: #e9f5ff; font-family: Consolas, monospace; letter-spacing: 1px; }
.installation-identifiers small { color: #587a95; }

.topbar { height: 138px; position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; padding: 0 48px; border-bottom: 1px solid rgba(184,220,247,.18); background: linear-gradient(180deg, rgba(7,24,37,.96), rgba(7,25,38,.78)); box-shadow: 0 12px 34px rgba(0,0,0,.18); backdrop-filter: blur(18px); }
.top-actions { display: flex; gap: 18px; }
.icon-button { width: 62px; height: 62px; border: 1px solid rgba(219,238,255,.72); border-radius: 50%; background: linear-gradient(145deg, rgba(24,55,82,.92), rgba(8,25,40,.92)); font-size: 28px; cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.12), 0 8px 22px rgba(0,0,0,.2); }
.device-box { justify-self: end; min-width: 255px; padding: 14px 18px; border: 1px solid rgba(219,238,255,.48); border-radius: 17px; display: flex; flex-direction: column; background: rgba(11,32,50,.72); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.device-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; font-size: 14px; }
.device-meta span { color: var(--success); }
.device-meta span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.device-meta time { color: #aac3d6; font-variant-numeric: tabular-nums; }

.home-content { position: relative; z-index: 1; padding: 34px 48px 120px; }
.home-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.home-heading h1 { margin: 0; }
.home-heading p { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.secure-pill { margin-bottom: 5px; padding: 9px 13px; border: 1px solid rgba(85,221,160,.3); border-radius: 999px; color: #7ee7ae; background: rgba(20,88,67,.2); font-size: 11px; font-weight: 800; letter-spacing: 1.3px; }
.dashboard { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) 310px; gap: 22px; min-height: 390px; }
.feature-card, .side-button, .primary, .secondary { border: 2px solid rgba(255,255,255,.82); cursor: pointer; }
.feature-card { min-height: 390px; position: relative; isolation: isolate; overflow: hidden; padding: 28px; border-radius: 24px; background: linear-gradient(145deg, rgba(211,58,83,.90), rgba(65,39,91,.93)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; box-shadow: inset 0 1px rgba(255,255,255,.18), 0 22px 40px rgba(0,0,0,.22); }
.feature-card::before { content: ""; position: absolute; z-index: -1; width: 240px; height: 240px; top: -85px; right: -75px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 36px rgba(255,255,255,.035), 0 0 0 72px rgba(255,255,255,.025); }
.feature-card::after { position: absolute; top: 18px; left: 18px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(0,0,0,.15); font-size: 10px; font-weight: 900; letter-spacing: 1.3px; }
.feature-card.live::after { content: "AO VIVO"; }
.feature-card.movies::after { content: "VOD"; }
.feature-card.series::after { content: "EPISÓDIOS"; }
.feature-card.movies { background: linear-gradient(145deg, #cf3157, #613152); }
.feature-card.series { background: linear-gradient(145deg, #aa345e, #3b345f); }
.feature-icon { font-size: 66px; text-shadow: 0 6px 12px rgba(0,0,0,.35); }
.feature-card strong { font-size: 31px; }
.feature-card small { font-size: 17px; color: #f1dfe7; }
.side-panel { display: grid; gap: 18px; }
.side-button { position: relative; border-radius: 18px; padding: 22px 50px 22px 22px; text-align: left; background: linear-gradient(105deg, rgba(169,52,83,.86), rgba(51,38,75,.92)); font-weight: 800; font-size: 20px; box-shadow: inset 0 1px rgba(255,255,255,.12), 0 12px 24px rgba(0,0,0,.16); }
.side-button::after { content: "›"; position: absolute; right: 20px; top: 50%; transform: translateY(-52%); color: rgba(255,255,255,.56); font-size: 32px; font-weight: 300; }
.statusbar { position: absolute; left: 48px; right: 48px; bottom: 18px; height: 72px; padding: 0 24px; border: 1px solid #dbeeff; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; background: #12283b; }
.statusbar b { color: #ff5570; }
.statusbar p { color: #a9c5dc; }

.focusable { outline: none; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, filter .14s ease; }
.focusable:focus, .focusable.focused { transform: scale(1.028); border-color: #fff; box-shadow: 0 0 0 3px #ff3658, 0 14px 34px rgba(0,0,0,.48), 0 0 28px rgba(255,54,88,.28); filter: brightness(1.08); z-index: 2; }
.secondary, .primary { padding: 14px 28px; border-radius: 12px; background: #234c79; font-weight: 800; }
.primary { min-width: 170px; background: var(--red); }

.dialog-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 50px; background: rgba(0, 5, 11, .78); z-index: 20; }
.dialog-card { width: min(760px, 84vw); max-height: 78vh; overflow: auto; padding: 38px 44px; border: 2px solid #dbeeff; border-radius: 24px; background: linear-gradient(145deg, #132c48, #251c3e); box-shadow: 0 30px 80px #000; }
.dialog-card h2 { margin: 0 0 20px; font-size: 34px; }
.dialog-card ul { padding-left: 22px; color: #c8def0; font-size: 19px; line-height: 1.6; }
.dialog-card p { color: #c8def0; font-size: 19px; line-height: 1.5; }
.dialog-card .primary { margin-top: 20px; }

.catalog { min-height: 100vh; padding: 32px 42px; overflow: auto; background: radial-gradient(circle at 82% 12%, rgba(236,55,91,.16), transparent 32%), radial-gradient(circle at 8% 92%, rgba(26,132,120,.18), transparent 30%), linear-gradient(135deg, #071421, #101d2c 58%, #171322); }
.catalog::after { content: "ERY"; position: fixed; right: 3vw; bottom: -7vh; pointer-events: none; color: rgba(255,255,255,.018); font-size: 26vw; font-weight: 950; font-style: italic; letter-spacing: -2vw; }
.catalog-header { position: relative; z-index: 1; display: grid; grid-template-columns: 180px 1fr 330px; align-items: center; gap: 24px; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid rgba(202,228,247,.13); }
.catalog-header h1 { font-size: 42px; }
.back-button, .player-button { min-height: 58px; padding: 12px 22px; border: 2px solid #dbeeff; border-radius: 14px; background: #173653; font-weight: 800; }
.catalog-tools { justify-self: end; width: 100%; display: grid; gap: 8px; }
.catalog-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.catalog-total { justify-self: end; color: #a9c5dc; font-size: 16px; }
.catalog-favorite { width: max-content; padding: 7px 11px; border: 1px solid rgba(255,102,130,.5); border-radius: 999px; color: #ff91a5; background: rgba(152,35,69,.18); font-size: 12px; font-weight: 850; cursor: pointer; }
.catalog-favorite.active { color: #fff; background: linear-gradient(105deg,#dc3658,#84315f); }
.search-control { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid rgba(219,238,255,.6); border-radius: 14px; background: rgba(9,29,47,.92); box-shadow: inset 0 1px rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.16); }
.search-control span { font-size: 28px; }
.search-control input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: 17px; }
.search-control:focus-within { box-shadow: 0 0 0 4px #ff3658; }
.catalog-message { width: min(760px, 80vw); margin: 70px auto; padding: 36px 42px; text-align: center; color: #d8e9f6; font-size: 21px; font-weight: 650; line-height: 1.5; border: 1px solid rgba(190,222,247,.3); border-radius: 22px; background: linear-gradient(145deg, rgba(12,37,58,.96), rgba(19,25,44,.96)); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 24px 60px rgba(0,0,0,.34); }
.catalog-message.loading::before { content: ""; display: block; width: 46px; height: 46px; margin: 0 auto 20px; border: 5px solid rgba(255,255,255,.16); border-top-color: #ff3d5d; border-radius: 50%; animation: spin .9s linear infinite; }
.catalog-message.loading::after { content: "Não feche o aplicativo durante a primeira sincronização"; display: block; margin-top: 12px; color: #7899b5; font-size: 14px; font-weight: 500; }
.catalog-message.loading { position: relative; overflow: hidden; }
.catalog-message.loading > * { position: relative; z-index: 1; }
.catalog-message.loading { background-image: linear-gradient(145deg, rgba(12,37,58,.96), rgba(19,25,44,.96)), linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
.catalog-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 22px; align-items: start; }
.category-list { position: sticky; top: 0; display: grid; gap: 9px; max-height: calc(100vh - 150px); overflow: auto; padding: 4px 8px 30px 4px; }
.category-list::before { content: "CATEGORIAS"; position: sticky; top: -4px; z-index: 3; display: block; padding: 8px 12px 11px; color: #7898b2; background: #0b1826; font-size: 11px; font-weight: 900; letter-spacing: 2px; }
.category-button { min-height: 54px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.34); border-radius: 12px; background: linear-gradient(115deg, rgba(18,43,67,.96), rgba(24,34,57,.96)); text-align: left; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 5px 12px rgba(0,0,0,.18); }
.category-button.active { background: linear-gradient(105deg, #d43c59, #71305f); border-color: #fff; }
.category-button.personal { color: #ff93a6; border-color: rgba(255,76,108,.36); }
.category-button small { min-width: 42px; padding: 4px 7px; color: #d8e9f7; margin-left: 12px; border-radius: 12px; background: rgba(0,0,0,.22); text-align: center; }
.content-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 18px; padding: 4px 8px 40px; }
.content-card { min-height: 238px; padding: 0; overflow: hidden; border: 1px solid rgba(203,227,245,.36); border-radius: 16px; background: linear-gradient(160deg, #132a40, #101b2d); text-align: left; box-shadow: inset 0 1px rgba(255,255,255,.06), 0 10px 22px rgba(0,0,0,.28); }
.content-card:focus, .content-card.focused { transform: translateY(-3px) scale(1.035); }
.content-poster { height: 168px; position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #9f3157, #243455); color: #fff; font-size: 48px; }
.content-poster img { width: 100%; height: 100%; object-fit: cover; }
.content-kind { position: absolute; left: 9px; bottom: 8px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.28); border-radius: 7px; color: #fff; background: rgba(3,11,18,.72); box-shadow: 0 4px 12px rgba(0,0,0,.24); font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: 1px; backdrop-filter: blur(5px); }
.kind-live .content-kind { color: #fff; background: rgba(217,43,74,.9); }
.favorite-mark { position: absolute; right: 9px; top: 9px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: #fff; background: rgba(218,48,84,.92); box-shadow: 0 5px 14px rgba(0,0,0,.32); font-size: 14px; font-style: normal; }
.content-card.kind-live { min-height: 205px; }
.content-card.kind-live .content-poster { height: 128px; padding: 14px; background: radial-gradient(circle, #203a55, #0b1826 72%); }
.content-card.kind-live .content-poster img { object-fit: contain; padding: 8px; filter: drop-shadow(0 5px 8px rgba(0,0,0,.38)); }
.content-load-more { min-height: 64px; grid-column: 1 / -1; border: 1px solid rgba(255,255,255,.45); border-radius: 14px; color: #fff; background: linear-gradient(105deg,#76152f,#251b35); font-size: 16px; font-weight: 850; }
.catalog[data-kind="live"] .content-load-more { flex: 0 0 64px; width: 100%; }
.content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { height: 225px; }
.content-card.kind-movie, .content-card.kind-series { min-height: 300px; }
.content-copy { display: block; min-height: 70px; padding: 13px 14px 15px; border-top: 1px solid rgba(255,255,255,.055); }
.content-copy strong { font-size: 15px; line-height: 1.25; letter-spacing: .05px; }
.content-copy strong, .content-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.content-copy small { margin-top: 6px; color: #8faac0; font-size: 11px; text-transform: uppercase; letter-spacing: .45px; }

.player-overlay { position: fixed; inset: 0; z-index: 50; background: #000; }
.player-overlay video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 55%, rgba(0,0,0,.88)); }
.player-info { position: absolute; left: 42px; bottom: 105px; }
.player-info h2 { margin: 5px 0; font-size: 30px; }
.player-info p:last-child { color: #c8def0; }
.player-actions { position: absolute; right: 42px; bottom: 42px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; max-width: calc(100vw - 84px); }
.player-button { min-width: 118px; background: rgba(14,45,72,.94); }
.player-button:disabled { opacity: .4; cursor: not-allowed; }
.favorite-action { border-color: rgba(255,111,137,.8); color: #ffd9e0; background: rgba(126,31,62,.88); }
.tv-toast { position: fixed; left: 50%; bottom: 34px; z-index: 80; transform: translateX(-50%); padding: 14px 22px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; color: #fff; background: linear-gradient(105deg,rgba(218,48,84,.97),rgba(101,42,100,.97)); box-shadow: 0 16px 40px rgba(0,0,0,.48); font-size: 15px; font-weight: 850; }

@media (max-width: 1000px) {
  body { overflow: auto; }
  .activation { padding: 24px; }
  .activation-panel { width: min(760px,94vw); padding: 28px; }
  .activation-methods { grid-template-columns: 1fr; }
  .activation-divider { min-height: 28px; }
  .activation-divider::before { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 1px; }
  .activation-divider span { padding: 0 10px; }
  .topbar { height: 108px; padding: 0 28px; }
  .home-content { padding: 24px 28px 105px; }
  .dashboard { grid-template-columns: repeat(3, 1fr); min-height: 315px; }
  .feature-card { min-height: 315px; }
  .side-panel { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .statusbar { left: 28px; right: 28px; }
}

@media (max-height: 800px) and (min-width: 1001px) {
  .topbar { height: 110px; padding: 0 40px; }
  .topbar .brand { font-size: 38px; }
  .icon-button { width: 56px; height: 56px; font-size: 26px; }
  .device-box { padding: 12px 18px; }
  .home-content { padding: 22px 40px 88px; }
  .home-content h1 { margin-bottom: 18px; font-size: 40px; }
  .dashboard { min-height: 330px; gap: 18px; }
  .feature-card { min-height: 330px; padding: 22px; }
  .feature-icon { font-size: 54px; }
  .feature-card strong { font-size: 28px; }
  .side-panel { gap: 14px; }
  .side-button { padding: 18px; font-size: 18px; }
  .statusbar { left: 40px; right: 40px; bottom: 12px; height: 60px; }
  .catalog { padding: 22px 34px; }
  .catalog-header { margin-bottom: 18px; }
  .catalog-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
  .category-list { max-height: calc(100vh - 120px); }
  .content-grid { grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 14px; }
  .content-card { min-height: 190px; }
  .content-card.kind-live { min-height: 178px; }
  .content-card.kind-live .content-poster { height: 105px; }
  .content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { height: 178px; }
  .content-card.kind-movie, .content-card.kind-series { min-height: 250px; }
}

/* Escala intermediaria: tablets, navegadores de TV menores e celulares grandes. */
@media (max-width: 1000px) {
  .brand { font-size: clamp(30px, 5vw, 40px); }
  .brand small { font-size: 12px; letter-spacing: 2px; }
  .home { min-height: 100dvh; }
  .topbar { grid-template-columns: 1fr auto; gap: 18px; height: auto; min-height: 92px; padding-top: 14px; padding-bottom: 14px; }
  .top-actions { justify-self: end; gap: 12px; }
  .icon-button { width: 52px; height: 52px; font-size: 24px; }
  .device-box { grid-column: 1 / -1; width: 100%; min-width: 0; padding: 10px 14px; }
  .home-heading { align-items: flex-start; gap: 18px; }
  .home-heading h1 { font-size: clamp(28px, 5vw, 42px); }
  .dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .feature-card { min-width: 0; min-height: 260px; padding: 18px 12px; border-radius: 19px; }
  .feature-icon { font-size: clamp(42px, 7vw, 58px); }
  .feature-card strong { font-size: clamp(21px, 3.5vw, 28px); text-align: center; }
  .feature-card small { font-size: clamp(13px, 2vw, 16px); text-align: center; }
  .side-button { min-height: 72px; padding: 16px 42px 16px 16px; font-size: 16px; }
  .statusbar { position: relative; left: auto; right: auto; bottom: auto; height: auto; min-height: 64px; margin: 18px 28px 22px; gap: 14px; }

  .catalog { padding: 20px 22px; }
  .catalog-header { grid-template-columns: 145px minmax(0, 1fr); gap: 16px; }
  .catalog-header h1 { font-size: clamp(30px, 5vw, 38px); }
  .catalog-tools { grid-column: 1 / -1; }
  .catalog-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
  .content-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding-right: 2px; }
  .content-card.kind-live { min-height: 180px; }
  .content-card.kind-live .content-poster { height: 108px; }
  .content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { height: clamp(190px, 28vw, 250px); }
  .content-card.kind-movie, .content-card.kind-series { min-height: 270px; }
  .category-list { max-height: calc(100dvh - 205px); }
  .category-button { min-height: 52px; }

  .player-info { left: 24px; right: 24px; bottom: 118px; }
  .player-info h2 { font-size: clamp(22px, 4vw, 30px); }
  .player-actions { left: 20px; right: 20px; bottom: 24px; max-width: none; justify-content: center; gap: 9px; }
  .player-button { min-width: 104px; min-height: 52px; padding: 10px 14px; }
}

/* Celular em retrato: leitura, toque e rolagem horizontal de categorias. */
@media (max-width: 600px) {
  .update-banner { top: 10px; grid-template-columns: 1fr 1fr; padding: 14px; }
  .update-banner div { grid-column: 1 / -1; }
  .update-banner span { white-space: normal; }
  .update-banner button { min-width: 0; }
  body { overflow-x: hidden; }
  .screen { min-height: 100dvh; }
  .splash { gap: 18px; padding: 24px; }
  .splash p { font-size: 17px; text-align: center; }
  .activation { display: flex; min-height: 100dvh; flex-direction: column; justify-content: center; gap: 16px; padding: max(16px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)); }
  .activation-panel { width: 100%; padding: 21px 16px; border-radius: 20px; }
  .activation-panel h1 { font-size: 28px; }
  .lead { margin-bottom: 18px; font-size: 15px; }
  .client-login, .portal-activation { padding: 18px 15px; border-radius: 16px; }
  .method-heading strong { font-size: 17px; }
  .client-login input { height: 54px; font-size: 16px; }
  .activation-code { margin-top: 16px; padding: 12px 14px; max-width: 100%; font-size: clamp(25px, 9vw, 36px); letter-spacing: 6px; }
  .installation-identifiers { width: 100%; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; }
  .installation-identifiers small { width: 100%; text-align: center; }

  .topbar { min-height: 74px; padding: 10px 14px; }
  .top-actions { gap: 8px; }
  .icon-button { width: 46px; height: 46px; font-size: 21px; }
  .device-box { font-size: 13px; }
  .device-meta { font-size: 12px; }
  .home-content { padding: 22px 14px 18px; }
  .home-heading { display: block; margin-bottom: 18px; }
  .home-heading p { font-size: 15px; }
  .secure-pill { display: inline-block; margin-top: 14px; }
  .dashboard { grid-template-columns: 1fr; min-height: 0; gap: 12px; }
  .feature-card { min-height: 164px; padding: 20px; }
  .feature-card::before { width: 180px; height: 180px; }
  .feature-icon { font-size: 43px; }
  .feature-card strong { font-size: 25px; }
  .feature-card small { font-size: 14px; }
  .side-panel { grid-column: auto; grid-template-columns: 1fr; gap: 10px; }
  .side-button { min-height: 62px; font-size: 15px; }
  .statusbar { margin: 16px 14px 18px; padding: 14px 16px; flex-direction: column; align-items: flex-start; font-size: 13px; }
  .statusbar p { margin: 0; }

  .catalog { min-height: 100dvh; padding: 12px 12px max(20px, env(safe-area-inset-bottom)); }
  .catalog-header { position: sticky; top: 0; z-index: 8; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; margin: -12px -12px 12px; padding: 12px; background: rgba(7,20,33,.96); backdrop-filter: blur(14px); }
  .catalog-header h1 { font-size: clamp(23px, 7vw, 30px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .back-button { min-height: 48px; padding: 9px 12px; font-size: 14px; }
  .catalog-tools { gap: 7px; }
  .catalog-meta { justify-content: space-between; }
  .catalog-total { justify-self: start; font-size: 13px; }
  .search-control { height: 50px; }
  .catalog-layout { display: block; }
  .category-list { position: sticky; top: 124px; z-index: 7; display: flex; max-height: none; margin: 0 -12px 12px; padding: 9px 12px 11px; overflow-x: auto; overflow-y: hidden; background: rgba(8,23,37,.95); scrollbar-width: none; }
  .category-list::-webkit-scrollbar { display: none; }
  .category-list::before { display: none; }
  .category-button { flex: 0 0 auto; width: auto; max-width: 245px; min-height: 48px; padding: 9px 12px; white-space: nowrap; }
  .category-button span { overflow: hidden; text-overflow: ellipsis; }
  .category-button small { min-width: 34px; margin-left: 8px; }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 2px 0 28px; }
  .content-card { border-radius: 13px; }
  .content-card.kind-live { min-height: 166px; }
  .content-card.kind-live .content-poster { height: 94px; padding: 9px; }
  .content-card.kind-live .content-poster img { padding: 5px; }
  .content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { height: clamp(205px, 63vw, 300px); }
  .content-card.kind-movie, .content-card.kind-series { min-height: 280px; }
  .content-copy { min-height: 68px; padding: 11px 10px 13px; }
  .content-copy strong { font-size: 14px; }
  .content-copy small { font-size: 10px; }
  .content-kind { left: 7px; bottom: 6px; }
  .favorite-mark { right: 7px; top: 7px; }
  .catalog-message { width: 100%; margin: 38px auto; padding: 28px 20px; font-size: 17px; }

  .dialog-backdrop { align-items: end; padding: 0; }
  .dialog-card { width: 100%; max-height: 88dvh; padding: 26px 20px max(22px, env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 22px 22px 0 0; }
  .dialog-card h2 { font-size: 27px; }
  .dialog-card p, .dialog-card ul { font-size: 16px; }

  .player-info { left: 16px; right: 16px; bottom: 154px; }
  .player-info h2 { font-size: 22px; }
  .player-actions { left: 10px; right: 10px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .player-button { min-width: 0; min-height: 48px; padding: 8px 5px; border-width: 1px; border-radius: 10px; font-size: 12px; }
  .tv-toast { bottom: max(12px, env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); font-size: 13px; text-align: center; }
}

/* Celular deitado: preserva o video e usa a largura sem criar botoes gigantes. */
@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .activation { display: block; padding: 14px; overflow: auto; }
  .activation > .brand { justify-content: center; margin-bottom: 12px; }
  .activation-panel { padding: 18px 22px; }
  .activation-methods { grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 10px; }
  .activation-divider::before { top: 0; bottom: 0; left: 50%; right: auto; width: 1px; height: auto; }
  .activation-divider span { padding: 8px 0; }
  .topbar { grid-template-columns: 1fr auto 220px; min-height: 70px; padding: 8px 18px; }
  .device-box { grid-column: auto; padding: 8px 12px; }
  .home-content { padding: 14px 18px 12px; }
  .home-heading { display: flex; margin-bottom: 12px; }
  .dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)) 220px; gap: 10px; }
  .feature-card { min-height: 190px; padding: 12px; }
  .side-panel { grid-column: auto; grid-template-columns: 1fr; gap: 8px; }
  .side-button { min-height: 58px; padding: 10px 34px 10px 12px; font-size: 13px; }
  .statusbar { display: none; }
  .catalog { padding: 12px 16px; }
  .catalog-header { position: relative; grid-template-columns: 120px 1fr 285px; margin: 0 0 12px; padding: 0 0 10px; background: none; }
  .catalog-tools { grid-column: auto; }
  .catalog-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 10px; }
  .category-list { position: sticky; top: 0; display: grid; max-height: calc(100dvh - 92px); margin: 0; padding: 2px 5px 20px 2px; overflow: auto; background: transparent; }
  .category-list::before { display: block; }
  .category-button { width: 100%; max-width: none; }
  .content-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .content-card.kind-live .content-poster { height: 84px; }
  .content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { height: 150px; }
  .content-card.kind-movie, .content-card.kind-series { min-height: 218px; }
  .player-info { bottom: 82px; }
  .player-actions { left: auto; right: 14px; bottom: 14px; display: flex; max-width: calc(100vw - 28px); }
  .player-button { min-width: 92px; }
}

/* TV 1080p e superiores: aumenta a distancia de leitura sem deformar capas. */
@media (min-width: 1600px) and (min-height: 850px) {
  .topbar { height: clamp(138px, 8.2vh, 168px); padding: 0 clamp(48px, 3.4vw, 76px); }
  .brand { font-size: clamp(44px, 2.8vw, 58px); }
  .brand small { font-size: clamp(16px, 1vw, 21px); }
  .icon-button { width: 68px; height: 68px; }
  .device-box { min-width: 290px; font-size: 18px; }
  .home-content { padding: 40px clamp(48px, 3.4vw, 76px) 125px; }
  .dashboard { grid-template-columns: repeat(3, minmax(220px, 1fr)) minmax(330px, .82fr); gap: 26px; }
  .feature-card { min-height: clamp(390px, 43vh, 480px); }
  .feature-card strong { font-size: clamp(31px, 2vw, 39px); }
  .feature-card small { font-size: clamp(17px, 1.1vw, 21px); }
  .side-button { font-size: clamp(20px, 1.25vw, 24px); }
  .statusbar { left: clamp(48px, 3.4vw, 76px); right: clamp(48px, 3.4vw, 76px); }

  .catalog { padding: 34px clamp(42px, 2.8vw, 64px); }
  .catalog-header { grid-template-columns: 210px 1fr 390px; }
  .catalog-header h1 { font-size: clamp(42px, 2.7vw, 54px); }
  .catalog-layout { grid-template-columns: clamp(285px, 18vw, 360px) minmax(0, 1fr); gap: 28px; }
  .category-button { min-height: 62px; padding: 12px 17px; font-size: 17px; }
  .content-grid { grid-template-columns: repeat(5, minmax(175px, 1fr)); gap: 22px; }
  .content-card.kind-live .content-poster { height: clamp(128px, 14vh, 165px); }
  .content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { height: clamp(235px, 29vh, 315px); }
  .content-copy strong { font-size: 17px; }
  .content-copy small { font-size: 12px; }
  .player-info { left: 58px; bottom: 122px; }
  .player-info h2 { font-size: 38px; }
  .player-actions { right: 58px; bottom: 48px; }
  .player-button { min-width: 138px; min-height: 62px; font-size: 17px; }
}

/* 4K: limita o comprimento das linhas e escala por distancia de visualizacao. */
@media (min-width: 2500px) {
  .topbar { height: 210px; padding: 0 100px; }
  .brand { font-size: 74px; }
  .brand small { font-size: 26px; }
  .icon-button { width: 92px; height: 92px; font-size: 39px; }
  .device-box { min-width: 430px; padding: 24px 28px; font-size: 25px; }
  .device-meta { font-size: 20px; }
  .home-content { padding: 60px 100px 180px; }
  .home-heading h1 { font-size: 72px; }
  .home-heading p { font-size: 28px; }
  .dashboard { gap: 38px; grid-template-columns: repeat(3, minmax(340px, 1fr)) 510px; }
  .feature-card { min-height: 650px; border-radius: 34px; }
  .feature-icon { font-size: 100px; }
  .feature-card strong { font-size: 52px; }
  .feature-card small { font-size: 27px; }
  .side-button { border-radius: 26px; font-size: 31px; }
  .statusbar { left: 100px; right: 100px; height: 108px; font-size: 23px; }
  .catalog { padding: 54px 84px; }
  .catalog-header { grid-template-columns: 300px 1fr 560px; }
  .catalog-header h1 { font-size: 70px; }
  .back-button, .player-button { min-height: 82px; font-size: 23px; }
  .search-control { height: 76px; }
  .search-control input { font-size: 24px; }
  .catalog-layout { grid-template-columns: 460px minmax(0, 1fr); gap: 38px; }
  .category-button { min-height: 84px; border-radius: 18px; font-size: 23px; }
  .content-grid { grid-template-columns: repeat(6, minmax(240px, 1fr)); gap: 30px; }
  .content-card { border-radius: 23px; }
  .content-card.kind-live .content-poster { height: 220px; }
  .content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { height: 430px; }
  .content-copy { min-height: 104px; padding: 20px; }
  .content-copy strong { font-size: 24px; }
  .content-copy small { font-size: 17px; }
}

/* Direcao visual Eryphos Cinema: organizacao inspirada em players de TV, identidade propria. */
:root {
  --red: #ef1839;
  --pink: #d3173c;
  --panel: rgba(15, 16, 20, .94);
  --line: rgba(255,255,255,.18);
  --muted: #a5a7ae;
}
.screen {
  background:
    radial-gradient(circle at 78% 20%, rgba(174,15,45,.16), transparent 31%),
    linear-gradient(128deg, #050608, #101116 56%, #08090c);
}
.screen::before { opacity: .32; background-size: 24px 24px; }
.topbar { background: rgba(5,6,9,.95); border-bottom-color: rgba(239,24,57,.46); }
.feature-card, .feature-card.movies, .feature-card.series {
  border-color: rgba(255,255,255,.32);
  background: linear-gradient(145deg, #a50d27, #5b0b20 66%, #171017);
}
.feature-card { box-shadow: inset 0 1px rgba(255,255,255,.18), 0 18px 38px rgba(0,0,0,.3), 0 0 0 1px rgba(239,24,57,.08); }
.feature-card::after { color: #fff; background: rgba(0,0,0,.34); }
.feature-card .feature-icon { display: grid; width: 96px; height: 96px; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(0,0,0,.17); }
.feature-card:focus .feature-icon, .feature-card.focused .feature-icon { background: rgba(255,255,255,.12); }
.side-button { background: linear-gradient(105deg, rgba(116,11,34,.96), rgba(30,15,24,.96)); }
.statusbar { border-color: rgba(239,24,57,.42); background: rgba(13,14,18,.92); }
.catalog { background: radial-gradient(circle at 86% 9%, rgba(175,15,45,.15), transparent 27%), linear-gradient(135deg,#050608,#111217 60%,#08090c); }
.catalog-header { grid-template-columns: 150px minmax(420px, 1fr) minmax(290px, 390px); }
.catalog-heading { min-width: 0; }
.catalog-heading h1 { display: inline-block; margin-right: 24px; vertical-align: middle; }
.catalog-tabs { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.catalog-tabs button { min-height: 44px; padding: 8px 14px; border: 0; border-bottom: 3px solid transparent; color: #aeb0b6; background: transparent; font-weight: 750; cursor: pointer; }
.catalog-tabs button.active { color: #fff; border-bottom-color: var(--red); }
.catalog-tabs button:focus, .catalog-tabs button.focused { transform: none; color: #fff; border-bottom-color: #fff; box-shadow: 0 3px 0 var(--red); }
.catalog-layout { grid-template-columns: 270px minmax(0, 1fr); }
.category-button { border-color: rgba(255,255,255,.18); background: rgba(28,29,35,.94); }
.category-button.active { background: linear-gradient(100deg,#b40e2d,#630b24); }
.content-card { border-color: rgba(255,255,255,.18); background: #15161b; }
.content-card { content-visibility: auto; contain-intrinsic-size: 180px 300px; }
.content-poster { background: linear-gradient(145deg,#581427,#171922); }
.content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { aspect-ratio: 2 / 3; height: auto; }
.content-card.kind-movie, .content-card.kind-series { min-height: 0; }
.content-card:focus, .content-card.focused { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--red), 0 18px 34px rgba(0,0,0,.55); }

.live-preview { display: none; min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(14,15,19,.95); box-shadow: 0 18px 42px rgba(0,0,0,.34); }
.live-preview-media { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle,#242833,#090a0d 72%); }
.live-preview-media img { width: 100%; height: 100%; padding: 7%; object-fit: contain; filter: drop-shadow(0 8px 13px rgba(0,0,0,.5)); }
.live-preview-media span { color: rgba(255,255,255,.8); font-size: 46px; font-weight: 900; font-style: italic; }
.live-preview > p, .live-preview > h2, .live-preview > button { margin-left: 20px; margin-right: 20px; }
.live-preview > .eyebrow { margin-top: 18px; }
.live-preview h2 { margin-top: 0; margin-bottom: 8px; font-size: clamp(20px,1.7vw,29px); }
.live-preview > p:not(.eyebrow) { min-height: 42px; margin-top: 0; color: var(--muted); }
.live-preview .primary { width: calc(100% - 40px); margin-top: 8px; margin-bottom: 20px; }

.catalog[data-kind="live"] .catalog-layout { grid-template-columns: minmax(220px, 17vw) minmax(300px, 28vw) minmax(360px, 1fr); }
.catalog[data-kind="live"] .live-preview { display: block; position: sticky; top: 0; }
.catalog[data-kind="live"] .content-grid { display: flex; max-height: calc(100vh - 175px); flex-direction: column; gap: 8px; overflow-y: auto; padding: 4px 7px 35px; }
.catalog[data-kind="live"] .content-card.kind-live { display: grid; grid-template-columns: 78px minmax(0,1fr); min-height: 76px; flex: 0 0 auto; border-radius: 10px; }
.catalog[data-kind="live"] .content-card.kind-live .content-poster { height: 74px; padding: 7px; }
.catalog[data-kind="live"] .content-card.kind-live .content-copy { min-height: 74px; padding: 13px 12px; }
.catalog[data-kind="live"] .content-card.kind-live .content-kind { display: none; }
.catalog[data-kind="live"] .content-card.kind-live:focus,
.catalog[data-kind="live"] .content-card.kind-live.focused { transform: translateX(4px); background: linear-gradient(100deg,#9b1029,#33121e); }

.player-chrome { opacity: 1; transition: opacity .28s ease, transform .28s ease; }
.player-overlay.controls-hidden { cursor: none; }
.player-overlay.controls-hidden .player-chrome { opacity: 0; pointer-events: none; }
.player-overlay.controls-hidden .player-info { transform: translateY(18px); }
.player-overlay.controls-hidden .player-actions { transform: translateY(18px); }
.player-actions { padding: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(4,5,7,.72); backdrop-filter: blur(14px); }
.player-button { background: rgba(30,31,37,.94); border-color: rgba(255,255,255,.42); }
.player-button:focus, .player-button.focused { background: #a70d2b; }

/* Navegadores de TV: evita camadas duplicadas e garante foco visivel no
   controle remoto, inclusive no Fire TV com Vega OS. */
html.tv-browser-mode,
html.tv-browser-mode body { width: 100%; height: 100%; background: #000; }
html.tv-browser-mode.remote-input-active,
html.tv-browser-mode.remote-input-active body,
html.tv-browser-mode.remote-input-active body * { cursor: none !important; }
html.tv-browser-mode.pointer-input-active,
html.tv-browser-mode.pointer-input-active body,
html.tv-browser-mode.pointer-input-active body * { cursor: auto !important; }
html.tv-browser-mode.pointer-input-active button,
html.tv-browser-mode.pointer-input-active [data-focusable] { cursor: pointer !important; }
html.tv-browser-mode.remote-input-active .focusable:focus,
html.tv-browser-mode.remote-input-active .focusable.focused,
html.tv-browser-mode.remote-input-active [data-focusable]:focus,
html.tv-browser-mode.remote-input-active [data-focusable].focused {
  outline: 3px solid #fff !important;
  outline-offset: 2px !important;
}
html.tv-browser-mode.pointer-input-active [data-focusable]:hover,
html.tv-browser-mode.pointer-input-active [data-focusable]:focus,
html.tv-browser-mode.pointer-input-active [data-focusable].focused {
  outline: 3px solid #ff315d !important;
  outline-offset: 2px !important;
}
html.tv-browser-mode.player-fullscreen-active,
html.tv-browser-mode body.player-fullscreen-active { overflow: hidden !important; }
html.tv-browser-mode .player-overlay.app-fullscreen {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #000 !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}
html.tv-browser-mode .player-overlay video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: contain !important;
  background: #000 !important;
  transform: none !important;
  filter: none !important;
}
html.tv-browser-mode .player-overlay .player-chrome,
html.tv-browser-mode .player-overlay .player-button,
html.tv-browser-mode .player-overlay .focusable {
  transition: none !important;
  animation: none !important;
  transform: none !important;
  filter: none !important;
  will-change: auto !important;
}
html.tv-browser-mode .player-overlay .player-actions {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: #090a0e !important;
  box-shadow: none !important;
}
html.tv-browser-mode .player-overlay.controls-hidden .player-info,
html.tv-browser-mode .player-overlay.controls-hidden .player-actions { transform: none !important; }
html.tv-browser-mode .player-overlay.controls-hidden .player-chrome {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}
html.vega-tv-browser .content-card { content-visibility: visible; contain-intrinsic-size: auto; }
html.native-android-shell .focusable,
html.native-android-shell .content-card,
html.native-android-shell .category-button { transition: none !important; will-change: auto !important; }
html.native-android-shell .topbar,
html.native-android-shell .catalog-header,
html.native-android-shell .player-actions,
html.native-android-shell .content-kind { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.native-android-shell .content-card,
html.native-android-shell .category-button { box-shadow: none; }
html.native-android-shell .content-card:focus,
html.native-android-shell .content-card.focused { transform: none; box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--red); filter: none; }
html.vega-tv-browser .screen,
html.vega-tv-browser .home { min-height: 100vh; }
.catalog-loading .content-grid { opacity: .45; pointer-events: none; }
.catalog-loading .catalog-message { position: fixed; left: 50%; bottom: 24px; z-index: 20; width: auto; max-width: calc(100vw - 28px); margin: 0; padding: 12px 18px; transform: translateX(-50%); border-radius: 999px; background: rgba(7,20,33,.96); box-shadow: 0 14px 38px rgba(0,0,0,.45); font-size: 14px; }

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

/* WebViews de TV costumam ter GPU limitada; evita filtros caros nas telas menores. */
@media (max-width: 1280px), (max-height: 720px) {
  .topbar, .catalog-header, .player-actions { backdrop-filter: none; }
  .screen::before { opacity: .18; }
}

@media (max-width: 1000px) {
  .catalog-header { grid-template-columns: 125px minmax(0,1fr); }
  .catalog-heading h1 { margin-right: 12px; }
  .catalog-tabs { margin-top: 8px; }
  .catalog[data-kind="live"] .catalog-layout { grid-template-columns: 200px minmax(260px, .9fr) minmax(330px, 1.2fr); }
}

@media (max-width: 600px) {
  .catalog-header { grid-template-columns: 92px minmax(0,1fr); }
  .catalog-heading .eyebrow { display: none; }
  .catalog-heading h1 { display: block; margin: 0; }
  .catalog-tabs { display: flex; margin-top: 5px; overflow-x: auto; }
  .catalog-tabs button { min-height: 38px; padding: 6px 10px; font-size: 13px; }
  .catalog[data-kind="live"] .catalog-layout { display: flex; flex-direction: column; }
  .catalog[data-kind="live"] .category-list { order: 1; }
  .catalog[data-kind="live"] .live-preview { position: relative; order: 2; margin-bottom: 12px; }
  .catalog[data-kind="live"] .content-grid { order: 3; max-height: none; overflow: visible; }
  .live-preview-media { aspect-ratio: 16 / 8; }
  .live-preview > p, .live-preview > h2, .live-preview > button { margin-left: 15px; margin-right: 15px; }
  .live-preview .primary { width: calc(100% - 30px); }
  .catalog[data-kind="live"] .content-card.kind-live { grid-template-columns: 72px minmax(0,1fr); }
  .player-actions { border-radius: 13px; padding: 7px; }
}

@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .catalog-header { grid-template-columns: 105px minmax(0,1fr) 270px; }
  .catalog-tabs { margin-top: 0; }
  .catalog[data-kind="live"] .catalog-layout { display: grid; grid-template-columns: 185px minmax(260px,.8fr) minmax(310px,1.2fr); }
  .catalog[data-kind="live"] .category-list { order: initial; }
  .catalog[data-kind="live"] .content-grid { order: initial; max-height: calc(100dvh - 88px); overflow-y: auto; }
  .catalog[data-kind="live"] .live-preview { position: sticky; order: initial; }
}

@media (min-width: 1600px) and (min-height: 850px) {
  .catalog-header { grid-template-columns: 190px minmax(620px,1fr) 410px; }
  .catalog[data-kind="live"] .catalog-layout { grid-template-columns: minmax(290px,17vw) minmax(390px,26vw) minmax(520px,1fr); }
  .catalog[data-kind="live"] .content-card.kind-live { grid-template-columns: 98px minmax(0,1fr); min-height: 92px; }
  .catalog[data-kind="live"] .content-card.kind-live .content-poster { height: 90px; }
  .catalog[data-kind="live"] .content-card.kind-live .content-copy { min-height: 90px; padding: 18px 15px; }
  .live-preview > p, .live-preview > h2, .live-preview > button { margin-left: 28px; margin-right: 28px; }
  .live-preview .primary { width: calc(100% - 56px); }
}

/* Experiencia Eryphos Home: destaque, navegacao lateral e trilhos leves. */
.home { height: 100dvh; min-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
.home .topbar { position: sticky; top: 0; z-index: 12; height: 92px; padding: 0 34px; }
.home .topbar .brand { font-size: 34px; }
.home .icon-button { width: 48px; height: 48px; font-size: 22px; }
.home .device-box { min-width: 220px; padding: 10px 15px; }
.home-stage { position: relative; z-index: 1; display: grid; grid-template-columns: 82px minmax(0, 1fr); min-height: calc(100dvh - 92px); }
.home-rail { position: sticky; top: 92px; z-index: 4; align-self: start; height: calc(100dvh - 92px); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 10px 96px; border-right: 1px solid rgba(255,255,255,.11); background: rgba(5,6,9,.9); }
.rail-button { width: 62px; min-height: 62px; display: grid; place-items: center; gap: 2px; padding: 7px 4px; border: 1px solid transparent; border-radius: 15px; color: #a7aab2; background: transparent; cursor: pointer; }
.rail-button span { font-size: 23px; line-height: 1; }
.rail-button small { font-size: 9px; font-weight: 750; }
.rail-button:focus, .rail-button.focused { transform: translateX(4px) scale(1.04); color: #fff; border-color: #fff; background: linear-gradient(145deg,#b50d2d,#5a0d21); }
.home .home-content { min-width: 0; padding: 24px 34px 108px; }
.home-hero { min-height: 250px; position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; padding: 30px 36px; border: 1px solid rgba(255,255,255,.18); border-radius: 25px; background-image: radial-gradient(circle at 83% 32%,rgba(238,24,57,.38),transparent 34%),linear-gradient(105deg,#121318 0%,#191017 58%,#6d0c24 100%); background-position: center; background-size: cover; box-shadow: 0 22px 54px rgba(0,0,0,.34); }
.home-hero::before { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,rgba(4,5,8,.96) 0%,rgba(8,8,12,.83) 48%,rgba(8,8,12,.22) 100%); }
.home-hero-copy { position: relative; z-index: 1; width: min(720px, 72%); }
.hero-badges { display:flex; gap:8px; margin-bottom:13px; }
.hero-badges span { padding:5px 9px; border:1px solid rgba(255,255,255,.22); border-radius:999px; color:#f4dce2; background:rgba(20,7,12,.6); font-size:9px; font-weight:900; letter-spacing:1.3px; }
.home-hero h1 { max-width: 760px; font-size: clamp(34px,3.5vw,58px); line-height:1.02; }
.home-hero-copy > p:not(.eyebrow) { max-width:680px; margin:13px 0 20px; color:#d0d1d6; font-size:clamp(15px,1.25vw,20px); line-height:1.42; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; }
.hero-actions button { min-height:48px; padding:12px 20px; border-radius:13px; }
.home-hero-brand { position:absolute; right:5%; bottom:-8%; opacity:.16; display:flex; align-items:baseline; font-size:clamp(110px,15vw,240px); font-style:italic; font-weight:950; letter-spacing:-16px; }
.home-hero-brand b { color:var(--red); }
.home .home-heading { align-items:center; margin:24px 0 14px; }
.home .home-heading .eyebrow, .shelf-heading .eyebrow { margin-bottom:5px; }
.home .home-heading h2, .shelf-heading h2 { margin:0; font-size:clamp(21px,1.7vw,30px); }
.home .dashboard { grid-template-columns:repeat(3,minmax(170px,1fr)) minmax(250px,.82fr); min-height:176px; gap:14px; }
.home .feature-card { min-height:176px; padding:18px; gap:8px; border-width:1px; border-radius:19px; }
.home .feature-card::before { width:150px; height:150px; top:-60px; right:-48px; }
.home .feature-card .feature-icon { width:62px; height:62px; font-size:37px; }
.home .feature-card strong { font-size:24px; }
.home .feature-card small { font-size:13px; }
.home .side-panel { gap:10px; }
.home .side-button { min-height:0; padding:13px 42px 13px 17px; border-width:1px; border-radius:13px; font-size:13px; }
.home-shelf { margin-top:27px; }
.shelf-heading { display:flex; align-items:end; justify-content:space-between; margin-bottom:12px; }
.shelf-heading > span { color:var(--muted); font-size:13px; }
.home-row { display:flex; gap:14px; min-height:142px; overflow-x:auto; overflow-y:hidden; padding:5px 5px 16px; scroll-snap-type:x proximity; scrollbar-width:none; }
.home-row::-webkit-scrollbar { display:none; }
.home-item { flex:0 0 clamp(205px,17vw,290px); min-height:126px; position:relative; isolation:isolate; overflow:hidden; display:flex; align-items:end; padding:0; scroll-snap-align:start; border:1px solid rgba(255,255,255,.2); border-radius:16px; background:linear-gradient(145deg,#42101f,#15161c); text-align:left; cursor:pointer; }
.home-item-media { position:absolute; z-index:-2; inset:0; display:grid; place-items:center; color:rgba(255,255,255,.42); font-size:42px; font-weight:900; background:radial-gradient(circle,#43202c,#111218 70%); }
.home-item-media img { width:100%; height:100%; object-fit:cover; }
.home-item::after { content:""; position:absolute; z-index:-1; inset:32% 0 0; background:linear-gradient(transparent,rgba(5,6,9,.94)); }
.home-item-copy { width:100%; display:grid; gap:3px; padding:30px 13px 12px; }
.home-item-copy strong { overflow:hidden; font-size:14px; white-space:nowrap; text-overflow:ellipsis; }
.home-item-copy small { overflow:hidden; color:#c0c1c7; font-size:10px; white-space:nowrap; text-overflow:ellipsis; }
.home-empty { width:100%; min-height:120px; display:flex; align-items:center; justify-content:center; border:1px dashed rgba(255,255,255,.16); border-radius:16px; color:#8e9098; background:rgba(255,255,255,.025); font-size:13px; }
.content-source { display:block; overflow:hidden; margin-top:4px; color:#ff7b91; font-size:9px; font-style:normal; font-weight:800; letter-spacing:.7px; white-space:nowrap; text-overflow:ellipsis; }
.home .statusbar { position:fixed; z-index:10; left:116px; right:34px; bottom:12px; height:62px; }

@media (max-width: 1000px) {
  .home .topbar { height:82px; padding:0 20px; }
  .home-stage { grid-template-columns:70px minmax(0,1fr); min-height:calc(100dvh - 82px); }
  .home-rail { top:82px; height:calc(100dvh - 82px); padding-left:5px; padding-right:5px; }
  .rail-button { width:56px; }
  .home .home-content { padding:18px 20px 95px; }
  .home-hero { min-height:220px; padding:25px 28px; }
  .home .dashboard { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .home .side-panel { grid-column:1 / -1; grid-template-columns:repeat(3,1fr); }
  .home .statusbar { left:90px; right:20px; }
}

@media (max-width: 600px) {
  .home { overflow-y:auto; }
  .home .topbar { position:relative; height:auto; min-height:82px; padding:13px 14px; }
  .home .device-box { min-width:0; }
  .home-stage { display:block; }
  .home-rail { position:sticky; top:0; z-index:11; width:100%; height:auto; flex-direction:row; justify-content:space-around; gap:5px; padding:7px 10px; border-right:0; border-bottom:1px solid rgba(255,255,255,.12); }
  .rail-button { width:auto; min-width:56px; min-height:52px; }
  .rail-button:focus, .rail-button.focused { transform:scale(1.03); }
  .home .home-content { padding:14px 14px 32px; }
  .home-hero { min-height:360px; align-items:end; padding:24px 20px; border-radius:20px; }
  .home-hero::before { background:linear-gradient(0deg,rgba(4,5,8,.98) 0%,rgba(5,5,8,.72) 64%,rgba(5,5,8,.24) 100%); }
  .home-hero-copy { width:100%; }
  .home-hero h1 { font-size:34px; }
  .home-hero-brand { top:18px; right:9%; bottom:auto; font-size:105px; }
  .hero-actions { display:grid; grid-template-columns:1fr; }
  .hero-actions button { width:100%; }
  .home .home-heading { align-items:end; margin-top:22px; }
  .home .secure-pill { display:none; }
  .home .dashboard { display:flex; min-height:0; overflow-x:auto; gap:11px; padding:4px 4px 14px; scroll-snap-type:x mandatory; }
  .home .feature-card { flex:0 0 76vw; min-height:190px; scroll-snap-align:start; }
  .home .side-panel { flex:0 0 76vw; display:grid; }
  .home-item { flex-basis:72vw; }
  .home .statusbar { display:none; }
}

@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .home .topbar { min-height:64px; height:64px; }
  .home-stage { grid-template-columns:62px minmax(0,1fr); min-height:calc(100dvh - 64px); }
  .home-rail { top:64px; height:calc(100dvh - 64px); padding-top:8px; }
  .rail-button { min-height:48px; }
  .rail-button small { display:none; }
  .home .home-content { padding:10px 14px 20px; }
  .home-hero { min-height:176px; padding:18px 24px; }
  .home-hero-copy > p:not(.eyebrow) { margin:7px 0 12px; font-size:13px; }
  .home-hero h1 { font-size:31px; }
  .hero-actions button { min-height:40px; padding:8px 14px; }
  .home .home-heading { margin:13px 0 8px; }
  .home .dashboard { min-height:128px; gap:8px; }
  .home .feature-card { min-height:128px; padding:10px; }
  .home .feature-card .feature-icon { width:45px; height:45px; font-size:27px; }
  .home .feature-card strong { font-size:18px; }
  .home-shelf { margin-top:17px; }
  .home .statusbar { display:none; }
}


/* Eryphos Card Refresh — Web/Android */
:root{--card-surface:#10263b;--card-surface-2:#172f48;--card-line:rgba(216,237,255,.2);--card-accent:#ff3858;--card-focus:#ff6f84}
.home-item{min-width:0;display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--card-line);border-radius:15px;background:linear-gradient(145deg,rgba(19,48,73,.96),rgba(13,28,46,.98));text-align:left;box-shadow:0 10px 22px rgba(0,0,0,.2)}.home-item:hover,.home-item:focus,.home-item.focused{border-color:#fff;background:linear-gradient(145deg,rgba(174,47,82,.92),rgba(43,40,91,.96));outline:0}.home-item-media{display:grid;flex:0 0 58px;width:58px;height:58px;place-items:center;overflow:hidden;border:1px solid rgba(255,255,255,.18);border-radius:13px;background:linear-gradient(145deg,#264b68,#151f36);color:#fff;font-size:22px}.home-item-media img{width:100%;height:100%;object-fit:cover}.home-item-copy{min-width:0;display:grid;gap:5px}.home-item-copy strong,.home-item-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-item-copy strong{font-size:14px}.home-item-copy small{color:#a7bfd1;font-size:11px}.content-grid{grid-template-columns:repeat(auto-fill,minmax(176px,1fr));gap:16px;padding:4px 5px 42px}.content-card{min-height:0;border:1px solid var(--card-line);border-radius:17px;background:linear-gradient(160deg,#142d44,#0e1d30);box-shadow:0 12px 26px rgba(0,0,0,.3);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.content-card:hover,.content-card:focus,.content-card.focused{border-color:#fff;box-shadow:0 0 0 3px var(--card-accent),0 18px 34px rgba(0,0,0,.42);transform:translateY(-4px) scale(1.025);outline:0}.content-poster{height:178px;background:linear-gradient(145deg,#a4335d,#253c62)}.content-poster img{object-fit:cover}.content-card.kind-live{min-height:0}.content-card.kind-live .content-poster{height:132px;padding:14px;background:radial-gradient(circle at 50% 35%,#2b5576,#0b1826 76%)}.content-card.kind-live .content-poster img{object-fit:contain;padding:9px;filter:drop-shadow(0 6px 9px rgba(0,0,0,.4))}.content-card.kind-movie .content-poster,.content-card.kind-series .content-poster{height:238px}.content-card.kind-movie,.content-card.kind-series{min-height:0}.content-copy{min-height:82px;padding:13px 14px 15px;background:linear-gradient(180deg,rgba(10,29,46,.12),rgba(4,15,26,.22))}.content-copy strong{display:-webkit-box;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:36px;font-size:15px;line-height:1.2}.content-copy small{margin-top:7px;max-width:100%;font-size:10px;letter-spacing:.5px}.content-source{display:block;overflow:hidden;margin-top:7px;color:#ff92a5;font-size:9px;font-style:normal;letter-spacing:.45px;text-overflow:ellipsis;white-space:nowrap}.content-kind{left:10px;bottom:10px;border-radius:999px;padding:5px 8px;background:rgba(3,11,18,.76)}.favorite-mark{right:10px;top:10px;width:30px;height:30px}.catalog[data-kind="live"] .content-grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr))}.catalog[data-kind="live"] .content-card.kind-live .content-poster{height:145px}.content-load-more{border-radius:15px;background:linear-gradient(105deg,#8f183b,#3b2052);border-color:rgba(255,255,255,.55)}
@media(max-width:1000px){.content-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.catalog[data-kind="live"] .content-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.content-card.kind-movie .content-poster,.content-card.kind-series .content-poster{height:clamp(190px,28vw,250px)}}
/* Preferências funcionais do Eryphos Web/Android */html[data-wallpaper="nebula"] body{background:#0c0b19}html[data-wallpaper="nebula"] .home{background:radial-gradient(circle at 75% 10%,#3b1f56 0,transparent 35%),#0c0b19}html[data-wallpaper="night"] body{background:#080a10}html[data-show-personal="off"] .home-shelf{display:none}html[data-live-style="thai"] .catalog-layout{grid-template-columns:280px minmax(0,1fr) 330px}html[data-live-type="move"] .category-button{background:linear-gradient(90deg,#253f76,#152743)}html[data-content-strategy="all"] .content-grid{content-visibility:auto;contain-intrinsic-size:700px}.preferences-form{display:grid;gap:11px}.preferences-form label{display:grid;gap:6px;color:#dce8f6;font-size:13px}.preferences-form select{width:100%;border:1px solid #ffffff55;border-radius:8px;background:#101f35;color:#fff;padding:10px}.preferences-form .primary{margin-top:5px}.settings-dialog-note{color:#afc3d8;font-size:12px;line-height:1.4;margin:3px 0 0}@media(max-width:600px){.home-item-media{flex-basis:50px;width:50px;height:50px}.content-grid,.catalog[data-kind="live"] .content-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.content-poster{height:clamp(168px,58vw,240px)}.content-card.kind-live .content-poster,.catalog[data-kind="live"] .content-card.kind-live .content-poster{height:108px;padding:9px}.content-card.kind-movie .content-poster,.content-card.kind-series .content-poster{height:clamp(205px,63vw,300px)}.content-copy{min-height:76px;padding:11px 10px 13px}.content-copy strong{font-size:13px}.content-copy small{font-size:9px}.content-kind{left:7px;bottom:7px;padding:4px 6px;font-size:8px}.favorite-mark{right:7px;top:7px;width:27px;height:27px}}

/* Fire TV Android WebView video visibility override. */
html.native-android-shell .player-overlay:not(.hidden) { position:fixed !important; inset:0 !important; z-index:50 !important; display:block !important; opacity:1 !important; visibility:visible !important; overflow:hidden !important; background:#000 !important; transform:none !important; filter:none !important; }
html.native-android-shell .player-overlay:not(.hidden) video { position:absolute !important; inset:0 !important; z-index:0 !important; display:block !important; visibility:visible !important; opacity:1 !important; width:100% !important; height:100% !important; margin:0 !important; object-fit:contain !important; background:#000 !important; transform:none !important; filter:none !important; }
html.native-android-shell .player-overlay:not(.hidden) .player-shade { z-index:1 !important; display:block !important; pointer-events:none !important; background:linear-gradient(transparent 55%, rgba(0,0,0,.88)) !important; }
html.native-android-shell .player-overlay:not(.hidden) .player-info, html.native-android-shell .player-overlay:not(.hidden) .player-actions { z-index:2 !important; }
html.native-android-shell .player-overlay:not(.hidden) .player-chrome { transform:none !important; filter:none !important; will-change:auto !important; }

/* Sessão do cliente */
.session-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:22px; padding-top:20px; border-top:1px solid rgba(255,255,255,.18); }
.session-action { display:flex; align-items:center; justify-content:flex-start; gap:12px; min-height:72px; padding:13px 16px; text-align:left; }
.session-action .ui-icon { flex:0 0 24px; }
.session-action span, .session-action strong, .session-action small { display:block; }
.session-action small { margin-top:3px; color:#aebfd1; font-size:11px; line-height:1.35; }
.session-action.danger, .session-confirmation .danger { border-color:rgba(255,92,121,.65); color:#ffe9ed; background:#3a111d; }
.session-confirmation p { margin:0; color:#c8def0; }
.session-confirmation .primary { width:100%; margin-top:18px; }
@media(max-width:600px) {
  .session-actions { grid-template-columns:1fr; }
  .session-action { min-height:64px; }
  .session-action small { font-size:10px; }
}
