:root {
  color-scheme: dark;
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
  --night: #100d20;
  --panel: #1b162e;
  --control: #28213e;
  --line: #494061;
  --text: #f5f0ff;
  --muted: #c7bddb;
  --cyan: #65e3ff;
  --pink: #ee9afe;
  --lilac: #b9b8ff;
  --green: #93e4bf;
  --gold: #ffd38a;
  --accent: var(--lilac);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; color: var(--text); background: linear-gradient(125deg, #1c1634, #100d20 60%) fixed; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
select { min-width: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.muted, small { color: var(--muted); }
.canais { --accent: var(--cyan); --card: #26334f; }
.filmes { --accent: var(--pink); --card: #3a234b; }
.series { --accent: var(--lilac); --card: #302955; }
.kids { --accent: var(--gold); }
.radio { --accent: var(--green); }
.jogos { --accent: var(--cyan); }
.favoritos { --accent: var(--pink); }
.glyph { display: block; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; z-index: 3; top: .7rem; left: .7rem; padding: .6rem .9rem; border-radius: .5rem; background: var(--panel); translate: 0 -180%; }
.skip:focus { translate: 0; }
.quiet, .primary, .icon-button {
  display: inline-flex; justify-content: center; align-items: center; gap: .5rem;
  min-height: 42px; padding: .45rem .8rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--control); font-weight: 620;
}
.primary { color: white; background: linear-gradient(108deg, #7b34c4, #4449b6); border-color: #a273d4; }
.primary:hover { filter: brightness(1.14); }
.quiet:hover, .icon-button:hover, .tab:hover, .category:hover { background: #382b51; }
.quiet[aria-current], .quiet[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.icon-button { flex: none; width: 44px; height: 44px; padding: 0; }
.favorite[aria-pressed="true"] { color: var(--pink); }
.favorite[aria-pressed="true"] .glyph { fill: currentColor; }
.startup, .access { min-height: 100svh; display: grid; place-content: center; padding: 1.25rem; }
.startup { justify-items: center; gap: 1rem; color: var(--muted); }
.startup img { width: 220px; }
.access { background: radial-gradient(ellipse at 23% 52%, #302453, #18132c 51%, #100c1e 82%); }
.login-layout { width: min(820px, calc(100vw - 2.5rem)); display: grid; grid-template-columns: minmax(170px, 1fr) minmax(300px, 405px); align-items: center; gap: clamp(1.5rem, 6vw, 4rem); }
.login-brand { width: min(100%, 325px); justify-self: center; filter: drop-shadow(0 12px 33px #7149ad7a); }
.login-card { display: grid; gap: .6rem; padding: clamp(1.15rem, 3vw, 1.7rem); background: #1b152d; border: 1px solid #564271; border-radius: 22px; box-shadow: 0 18px 50px #09071163; }
.login-card h1 { font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.16; }
.login-card .muted { margin-bottom: .65rem; }
.login-card label { font-size: .86rem; font-weight: 650; }
input, select, .field, .search { padding: .5rem .7rem; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: #120e23; }
.field, .search { display: flex; padding: 0; align-items: center; }
.field input, .search input { min-width: 0; flex: 1; border: 0; background: transparent; }
.field:focus-within, .search:focus-within { border-color: var(--accent); }
.field input:focus-visible, .search input:focus-visible { outline: 0; }
.field .icon-button { width: 40px; height: 38px; min-height: 0; margin-right: 3px; }
.login-card .primary { min-height: 47px; margin-top: .4rem; }
.login-note { min-height: 1.3em; color: #ffc3d2; font-size: .875rem; }
.topbar, .page { width: min(1530px, 100%); margin: 0 auto; padding-inline: clamp(.9rem, 2.4vw, 2rem); }
.topbar { min-height: 78px; display: flex; align-items: center; gap: .8rem; padding-block: .6rem; }
.brand { flex: none; display: grid; place-items: center; border-radius: 8px; }
.brand img { width: clamp(106px, 11vw, 160px); height: 52px; object-fit: contain; }
.tabs { display: flex; flex: 1; gap: .37rem; min-width: 0; }
.tab { flex: 1 0 auto; display: flex; justify-content: center; align-items: center; gap: .42rem; min-height: 42px; padding: .4rem .58rem; white-space: nowrap; background: #211a35; border: 1px solid var(--line); border-radius: 9px; font-size: .88rem; font-weight: 640; }
.tab .glyph { width: 16px; height: 16px; }
.tab[aria-current="page"] { border-color: var(--accent); color: var(--accent); background: #2b2442; }
.logout { margin-left: auto; }
.page { padding-top: .75rem; padding-bottom: 2rem; }
.screen-title, .page-heading h1 { font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.16; }
.screen-title { margin-bottom: 1rem; }
.page-heading { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.home-deck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(208px, 1.03fr); gap: .85rem; }
.home-card { min-width: 0; min-height: clamp(250px, 51vh, 460px); display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: center; justify-items: center; padding: clamp(.85rem, 2vw, 1.5rem); border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(ellipse at 51% 43%, var(--card), #1b152c 84%); transition: border-color .15s, background-color .15s; }
.home-card:hover { border-color: var(--accent); }
.illustration { width: min(100%, 224px); height: clamp(105px, 22vw, 225px); object-fit: contain; }
.hero-label { display: flex; align-items: center; justify-content: space-between; gap: .35rem; width: 100%; padding-left: .7rem; border-left: 3px solid var(--accent); }
.hero-label h2 { font-size: clamp(1.16rem, 2.4vw, 2rem); line-height: 1.15; }
.hero-label .glyph { color: var(--accent); }
.quick { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 1rem; display: grid; grid-template-rows: auto repeat(4, minmax(44px, 1fr)); gap: .65rem; }
.quick h2 { font-size: .94rem; color: var(--muted); }
.quick-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .5rem .65rem; border: 1px solid #544664; background: #2a2140; border-radius: 10px; font-weight: 640; min-height: 44px; }
.quick-link .glyph:first-child { color: var(--accent); }
.quick-link .glyph:last-child { width: 15px; color: var(--muted); }
.quick-link:hover { border-color: var(--accent); }
.statusbar { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1.3rem; padding: .75rem 1rem; margin-top: .9rem; border-radius: 15px; border: 1px solid var(--line); background: var(--panel); }
.welcome { display: flex; align-items: center; flex: 1 1 240px; gap: .65rem; }
.welcome .glyph, .metric strong { color: var(--lilac); }
.metric { display: grid; padding-left: 1rem; border-left: 1px solid var(--line); }
.metric span { font-size: .8rem; color: var(--muted); }
.browse-tools, .subtabs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.browse-tools { margin-bottom: .8rem; }
.search { width: min(445px, 100%); padding-left: .65rem; }
.search .glyph { color: var(--accent); }
.mobile-categories { display: none; }
.workspace { display: grid; align-items: start; grid-template-columns: minmax(155px, 226px) minmax(0, 1fr); gap: .7rem; }
.workspace.live-layout { grid-template-columns: minmax(148px, .66fr) minmax(205px, 1.03fr) minmax(0, 1.8fr); }
.well { min-width: 0; border: 1px solid var(--line); background: #19142b; border-radius: 14px; overflow: hidden; }
.well-heading { padding: .7rem .8rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
.well-body { padding: .65rem; }
.categories .well-body { display: grid; gap: .32rem; max-height: min(68vh, 760px); overflow: auto; }
.category { text-align: left; min-height: 41px; padding: .45rem .55rem; border: 1px solid transparent; background: transparent; border-radius: 8px; }
.category[aria-pressed="true"] { background: #2c2344; border-color: var(--accent); color: var(--accent); }
.channel-list { display: grid; gap: .38rem; max-height: min(68vh, 760px); overflow: auto; }
.channel { min-width: 0; display: flex; align-items: center; gap: .3rem; padding: .25rem; border: 1px solid #3f3455; border-radius: 9px; background: #221a36; }
.channel:has([aria-current]) { border-color: var(--accent); background: #2d2646; }
.channel .favorite { width: 42px; }
.channel-open { display: flex; flex: 1; align-items: center; min-height: 44px; min-width: 0; gap: .45rem; padding: .25rem; border: 0; border-radius: 6px; background: transparent; text-align: left; overflow-wrap: anywhere; }
.channel-open:hover { color: var(--accent); }
.channel-open img { flex: none; width: 35px; height: 35px; border-radius: 5px; object-fit: contain; background: #130f22; }
.channel-count { margin-left: auto; font-size: .73rem; text-align: right; }
.poster-grid { min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 143px), 1fr)); gap: .7rem; }
.tile { min-width: 0; position: relative; background: #231a36; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tile:hover { border-color: var(--accent); }
.tile-link { display: flex; flex-direction: column; width: 100%; height: 100%; border: 0; padding: 0 0 .55rem; background: transparent; text-align: left; }
.tile-link:focus-visible { outline-offset: -2px; }
.tile-link strong { display: block; padding: .5rem .52rem .05rem; line-height: 1.25; overflow-wrap: anywhere; }
.tile .cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: #120e23; }
.tile .placeholder, .station .cover { padding: 12%; object-fit: contain; background: radial-gradient(ellipse, #35284d, #150f25); }
.tile .favorite { position: absolute; top: .38rem; right: .38rem; background: #1b142c; }
.tile .rating { padding-inline: .52rem; color: var(--gold); }
.page-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-top: .7rem; font-size: .85rem; }
.list-note { grid-column: 1 / -1; color: var(--muted); padding: .65rem .35rem; }
.preview { scroll-margin-top: .6rem; }
.preview .well-body { padding: .65rem; }
.video-stage, .audio-stage { display: grid; border-radius: 10px; overflow: hidden; background: #0b0914; }
.video-stage { min-height: 130px; }
.screen-image { grid-area: 1 / 1; display: grid; place-items: center; color: #9183aa; min-width: 0; }
.video-stage .screen-image { aspect-ratio: 16 / 9; background: radial-gradient(ellipse at center, #241b39, #0c0a17 80%); }
.video-stage:has(video:not([hidden])) .screen-image { visibility: hidden; }
.screen-image .glyph { width: 42px; height: 42px; translate: 0 -12px; }
.audio-stage .screen-image img { width: 100%; max-height: 250px; object-fit: cover; opacity: .78; }
.player { grid-area: 1 / 1; align-self: end; z-index: 1; min-width: 0; }
.player video, .vod-playback video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.player audio { display: block; width: 100%; padding: 0 .5rem; }
.player-status { padding: .55rem .65rem; font-size: .88rem; background: #12101eee; color: var(--muted); }
.player-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; padding: .4rem .6rem; background: #1b152b; }
.player-actions label { color: var(--muted); font-size: .84rem; }
.player-actions select { min-height: 38px; margin-left: .24rem; }
.preview-info { display: grid; gap: .55rem; padding: .65rem .3rem .2rem; }
.preview-title { display: flex; justify-content: space-between; align-items: center; gap: .55rem; }
.preview-title h3 { color: var(--accent); font-size: 1.12rem; }
.source-quality { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; font-size: .9rem; }
.guide { padding: .85rem .3rem .35rem; }
.guide-title { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: .95rem; }
.guide-title .glyph { color: var(--accent); width: 17px; }
.programme { display: grid; grid-template-columns: 3.15rem minmax(0, 1fr) auto; gap: .35rem; align-items: start; padding: .5rem .1rem; border-bottom: 1px solid #352b49; font-size: .83rem; }
.programme .now { color: var(--green); font-weight: 700; }
.programme strong { overflow-wrap: anywhere; }
.favorites-grid { margin-top: .85rem; }
.sports-feed { margin-top: .85rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: .7rem; }
.game-card { min-width: 0; display: grid; align-content: start; gap: .65rem; padding: .8rem; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.match { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto minmax(0, 1fr) 35px; gap: .5rem; align-items: center; text-align: center; font-weight: 680; }
.match img { height: 35px; width: 35px; border-radius: 5px; object-fit: contain; }
.match span { overflow-wrap: anywhere; }
.score, .facts { color: var(--accent); }
.facts { font-size: .875rem; }
.broadcasts { display: flex; gap: .37rem; flex-wrap: wrap; }
.broadcasts .quiet { font-size: .85rem; }
.details-dialog { border: 1px solid #6a538a; width: min(760px, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); padding: 0; border-radius: 16px; background: #1b152c; color: var(--text); }
.details-dialog::backdrop { background: #070510c9; }
.dialog-content { padding: .8rem; }
.dialog-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.dialog-bar h2 { font-size: clamp(1.1rem, 2.6vw, 1.6rem); overflow-wrap: anywhere; }
.details-layout { display: grid; grid-template-columns: minmax(0, 25%) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: .8rem; }
.detail-art { width: 100%; max-height: 300px; object-fit: contain; border-radius: 9px; background: #120e23; }
.description, .description > .muted { display: grid; gap: .6rem; align-content: start; justify-items: start; }
.synopsis { overflow-wrap: anywhere; }
.episodes { display: grid; gap: .35rem; width: 100%; max-height: 255px; overflow: auto; }
.episodes .quiet { justify-content: flex-start; text-align: left; }
.vod-playback { overflow: hidden; border-radius: 9px; margin-top: .8rem; }
#toast { position: fixed; z-index: 4; right: 1rem; bottom: 1rem; padding: .66rem .9rem; margin: 0; border: 1px solid var(--accent); border-radius: 9px; background: #231934; max-width: calc(100vw - 2rem); }
@media (max-width: 1060px) {
  .tab .glyph { display: none; }
  .home-deck { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick { grid-column: 1 / -1; grid-template: auto auto / repeat(4, minmax(0, 1fr)); padding: .8rem; }
  .quick h2 { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
  .brand { justify-self: start; }
  .tabs { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; padding: 3px; }
  .tab .glyph { display: block; }
  .home-card { min-height: 245px; }
}
@media (max-width: 760px) {
  .workspace, .workspace.live-layout { grid-template-columns: minmax(0, 1fr); }
  .categories { display: none; }
  .mobile-categories { display: block; flex: 1 1 138px; }
  .search { flex: 1 1 170px; }
  .preview { grid-row: 1; }
  .channel-list { max-height: none; }
  .quick { grid-template: auto auto auto / repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 545px) {
  .login-layout { grid-template-columns: 1fr; gap: .75rem; }
  .login-brand { width: 165px; }
  .login-card { gap: .5rem; }
  .home-deck { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem; }
  .home-card { min-height: 156px; padding: .7rem; }
  .home-card.canais { grid-column: 1 / -1; grid-template: auto / minmax(0, 1.05fr) minmax(0, 1fr); }
  .illustration { height: 100px; }
  .canais .illustration { height: 124px; }
  .hero-label { padding-left: .45rem; gap: .25rem; }
  .hero-label .glyph { width: 16px; }
  .quick { gap: .44rem; padding: .65rem; }
  .statusbar { padding: .7rem .8rem; gap: .6rem 1rem; }
  .metric { padding-left: .55rem; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .list-note { padding: .55rem .25rem; }
  .details-layout { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .detail-art { max-height: 148px; width: auto; }
  .programme { grid-template-columns: 2.7rem minmax(0, 1fr) auto; font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
