:root { color-scheme: dark; font: 18px/1.4 system-ui, sans-serif; font: clamp(18px, 1.35vw, 32px)/1.4 system-ui, sans-serif; background: #0b090a; color: #f4f2f2; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; color: inherit; }
button { background: #232024; border: 1px solid #686268; border-radius: .5rem; padding: .55rem .85rem; cursor: pointer; }
button[aria-current], button:focus-visible, input:focus-visible { background: #76101d; outline: 3px solid #ff4159; outline-offset: 2px; }
input { border: 1px solid #67616a; border-radius: .45rem; padding: .5rem; width: 100%; background: #222024; }
[hidden] { display: none !important; }
.activation, .loading { display: grid; align-content: center; min-height: 100vh; padding: 5vw; gap: 1rem; background: radial-gradient(ellipse at 18% 55%, #3a0d14, #09090b 62%); }
.activation {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
}
.activation img, .loading .logo { width: min(65%, 15rem); justify-self: center; }
.activation div { background: #0b080bec; border: 1px solid #585056; border-radius: 1rem; padding: 1.25rem; text-align: center; }
.activation h1 { font-size: 2.2rem; margin: 0; }
.activation button { margin: .25rem; }
.loading { text-align: center; justify-items: center; }
.loading h1, .loading p { margin: 0; }
progress { width: min(60vw, 32rem); accent-color: #df2139; }
.tv-frame { min-height: 100vh; display: grid; grid-template-columns: 16vw minmax(0, 1fr); grid-template-columns: minmax(0, clamp(12rem, 16vw, 13rem)) minmax(0, 1fr); gap: 1rem; padding: 3vh 3vw; background: #000; }
nav, .categories { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
main, .results { min-width: 0; }
h1 { margin: 0 0 .75rem; }
.catalog { display: grid; grid-template-columns: 22% minmax(0, 1fr) 28%; gap: .8rem; }
.categories, .media-items { max-height: 75vh; overflow: auto; padding: .3rem; }
.media-items { display: grid; gap: .45rem; }
.media-items img { width: 100%; max-height: 20vh; object-fit: cover; display: block; margin-bottom: .3rem; }
.preview { padding: .5rem; min-width: 0; }
video { display: block; max-width: 100%; }
.loading video { max-height: 48vh; }
.live .media-items button { display: flex; gap: .6rem; align-items: center; text-align: left; }
.live .media-items img { width: 2.6rem; height: 1.7rem; object-fit: contain; margin: 0; }
.program-guide { padding-inline-start: 1.2rem; font-size: .8rem; }

.activation img, .loading .logo { aspect-ratio: 1; border-radius: 50%; object-fit: cover; }

.catalog.live { grid-template-columns: 22% minmax(0, 1fr) 38%; }
.tv-frame nav, .catalog.live .categories, .results, .preview {
    border: 1px solid #41383e;
    border-radius: .7rem;
    background: linear-gradient(155deg, #211a1e, #100e11 60%);
    padding: .65rem;
}
.tv-frame nav { align-self: start; gap: .35rem; padding: .55rem; }
.tv-frame nav { gap: 0; }
.menu-brand {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: .3vw;
    height: 5.5vh;
    margin-bottom: calc(.75vh + .25vw);
}
.menu-brand span {
    display: block;
    background-repeat: no-repeat;
    mix-blend-mode: screen;
}
.menu-brand-symbol {
    width: 4.25vw;
    height: 3.1vw;
    background-size: 153% 209%;
    background-position: 51% 20%;
}
.menu-brand-wordmark {
    width: 6.2vw;
    height: 2.14vw;
    background-size: 129% 374%;
    background-position: 50% 80%;
}
.tv-frame nav .nav-button + .nav-button { margin-top: 2.25vh; }
.tv-frame nav .categories { border-top: 1px solid #64575c; max-height: 38vh; margin-top: .55rem; }
.categories h2 { font-size: .9rem; margin: 0 .2rem .2rem; }
.preview-surface { aspect-ratio: 16 / 9; overflow: hidden; background: #08070a; border: 1px solid #5b3039; border-radius: .4rem; }
.preview-surface video { width: 100%; height: 100%; object-fit: contain; }
.catalog.movies, .catalog.series { grid-template-columns: minmax(0, 1fr); }
.movies .media-items, .series .media-items { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: .65rem; }
.movies .media-items button, .series .media-items button { min-width: 0; text-align: left; align-self: start; overflow-wrap: anywhere; }
.movies .media-items img, .series .media-items img, .poster-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    max-height: none;
    object-fit: cover;
    border-radius: .3rem;
}
.poster-placeholder { display: grid; place-items: center; background: radial-gradient(at top, #50232e, #141016); color: #d999a9; }
.catalog.playing > .results { display: none; }
.catalog.playing > .preview { max-width: min(70vw, 100%); margin-inline: auto; width: 100%; }

.live .media-items button[aria-pressed="true"] {
    border-color: #ff5b6c;
    background: linear-gradient(120deg, #a11624, #4f1019);
    box-shadow: inset 0 0 .7rem #e6263955;
}
.live .preview > button { display: block; width: 100%; margin-block: .35rem; }
.live .preview > button:disabled { opacity: .5; }
.catalog.live-fullscreen > .preview {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 10;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #08070a;
}
.live-fullscreen > .preview > :not(.preview-surface):not(button:first-of-type) { display: none; }
.live-fullscreen > .preview > button:first-of-type {
    position: absolute;
    right: 3vw;
    bottom: 4vh;
    width: auto;
    z-index: 1;
}
.live-fullscreen .preview-surface { width: 100%; height: 100%; border: 0; border-radius: 0; }

.nav-button {
    display: flex; align-items: center; width: 100%; min-width: 0;
    gap: .45rem; padding: .48rem .5rem; white-space: nowrap; text-align: left;
    font-size: .94rem; line-height: 1.2; min-height: 9.5vh;
}
.nav-button:focus-visible { outline-offset: -3px; }
.nav-exit-demo { font-size: .69rem; margin-top: .2rem; }
.nav-button svg { width: 1.05rem; height: 1.05rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tv-frame button[aria-current], .tv-frame button[aria-pressed="true"] {
    border-color: #ff485f;
    background: linear-gradient(145deg, #b9162c, #570c17);
    box-shadow: inset 0 0 .75rem #ff263880, 0 0 .65rem #e5123844;
}
.preview h2 { margin: .75rem 0 0; font-size: .85rem; color: #d9cbd1; }
.channel-selection { margin: .35rem 0 0; font-weight: 700; }

.resume-label { display: block; margin-top: .25rem; color: #f7b6c2; font-size: .7rem; }

.activation {
    background: #0b090a linear-gradient(#0b090a25, #0b090a55);
    background-image: linear-gradient(#0b090a25, #0b090a55), url("../assets/panel-background.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.content-loading h1, .content-loading p { text-shadow: 0 .08em .4em #000, 0 .1em .6em #000; }

.content-loading {
    background: #0b090a linear-gradient(#09060b19, #09060b50);
    background-image: linear-gradient(#09060b19, #09060b50), url("../assets/loading-background.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.content-loading .logo { width: clamp(9rem, 22vh, 13rem); }
.load-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; width: min(69vw, 39rem); }
.load-section {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .45rem .65rem;
    padding: .7rem .85rem; text-align: left; border: 1px solid #69434a; border-radius: .55rem;
    background: linear-gradient(145deg, #28161def, #100d12ef);
}
.load-section h2 { grid-column: 1 / -1; display: flex; align-items: center; gap: .45rem; font-size: .86rem; margin: 0; }
.load-section svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: #ff6376; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.load-section progress { display: block; width: 100%; height: .5rem; appearance: none; border: 0; border-radius: 1rem; background: #31242a; }
.load-section progress::-webkit-progress-bar { background: #31242a; border-radius: 1rem; }
.load-section progress::-webkit-progress-value { background: linear-gradient(90deg, #a9152a, #ff5067); border-radius: 1rem; }
.load-section progress::-moz-progress-bar { background: #df2139; border-radius: 1rem; }
.load-percent { font-size: .7rem; color: #f2dfe5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.load-failed progress { visibility: hidden; }

.tv-frame.watching { background: #000; }
.tv-frame.watching > nav,
.tv-frame.watching > main > h1,
.tv-frame.watching .catalog > .categories,
.tv-frame.watching .catalog > .results { display: none; }
.catalog.vod-fullscreen > .preview {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; max-width: none; width: 100%;
    padding: 0; border: 0; border-radius: 0; background: #000;
}
.vod-fullscreen .preview-surface, .live-fullscreen .preview-surface {
    width: 100%; height: 100%; border: 0; border-radius: 0; background: #000;
}
.vod-fullscreen .preview > :not(.preview-surface):not(.vod-controls) { display: none; }
.vod-fullscreen .vod-controls {
    position: absolute; bottom: 4vh; left: 3vw; right: 3vw;
    display: flex; gap: .4rem; align-items: end; pointer-events: none;
}
.vod-controls button { pointer-events: auto; }

/* Older TV engines need a layout when CSS Grid is unavailable. */
@supports not (display: grid) {
    .activation, .loading, .tv-frame, .catalog { display: flex; }
    .activation { align-items: center; }
    .activation img { flex: 0 0 33%; margin: 0 5vw 0 2vw; }
    .activation > div { flex: 1; }
    .loading { flex-direction: column; align-items: center; justify-content: center; }
    .loading .load-sections { display: flex; }
    .load-section { flex: 1; }
    .tv-frame > nav { width: 16vw; min-width: 12rem; flex: none; margin-right: 1rem; }
    .tv-frame > main, .catalog > .results { flex: 1; min-width: 0; }
    .catalog > .categories { width: 22%; margin-right: .8rem; }
    .catalog.live > .preview { width: 38%; margin-left: .8rem; }
    .catalog.live-fullscreen > .preview, .catalog.vod-fullscreen > .preview { width: 100%; margin: 0; }
    .movies .media-items, .series .media-items { display: flex; flex-wrap: wrap; }
    .movies .media-items button, .series .media-items button { width: 24%; margin-right: 1%; }
}

.exit-notice {
    position: fixed;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 0.7em 1.2em;
    border: 1px solid #777;
    border-radius: 0.6em;
    background: #141416;
    color: #fff;
    box-shadow: 0 0.2em 0.8em #000;
    pointer-events: none;
}

/* Shared dashboard layout for the live and on-demand catalogs. */
.catalog-frame {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    grid-template-columns: minmax(0, 15fr) minmax(0, 85fr);
    grid-template-rows: minmax(0, 1fr);
    gap: .85vw;
    padding: 2.8vh 1.15vw;
    font-size: 1.22vw;
}
.catalog-frame > nav { align-self: stretch; padding: .8vw; }
.catalog-frame .nav-button {
    font-size: 1.48vw;
    padding: 0 .72vw;
    height: 9.5vh;
    gap: .62vw;
}
.catalog-frame .nav-button svg { width: 1.65vw; height: 1.65vw; }
.catalog-frame .nav-exit-demo { font-size: .88vw; padding-inline: .48vw; gap: .48vw; }
.catalog-frame > main { display: flex; flex-direction: column; min-height: 0; }
.catalog-frame > main h1 { flex: none; font-size: 2.5vw; line-height: 1.12; margin: 0 0 1.8vh; }
.catalog-frame .catalog {
    flex: 1;
    min-height: 0;
    gap: .85vw;
    grid-template-rows: minmax(0, 1fr);
}
.catalog-frame .catalog.live { grid-template-columns: minmax(0,22fr) minmax(0,24fr) minmax(0,39fr); }
.catalog-frame .catalog.movies, .catalog-frame .catalog.series { grid-template-columns: minmax(0,20fr) minmax(0,65fr); }
.catalog-frame .categories, .catalog-frame .results, .catalog-frame .preview {
    background: linear-gradient(150deg, #21171b, #111013 60%);
    border: 1px solid #4c373e;
    border-radius: .8vw;
    padding: .8vw;
    min-height: 0;
    min-width: 0;
}
.catalog-frame .categories, .catalog-frame .media-items { overflow: auto; scrollbar-width: thin; scrollbar-color: #65434c transparent; }
.catalog-frame .categories { max-height: none; gap: .75vh; }
.catalog-frame .categories h2, .catalog-frame .results h2 {
    font-size: 1.65vw;
    line-height: 1.2;
    margin: 0 0 .65vh;
}
.catalog-frame .categories button, .catalog-frame .live .media-items button {
    flex: none;
    min-width: 0;
    min-height: 0;
    height: 7.5vh;
    padding: 0 .7vw;
    border-radius: .55vw;
    text-align: left;
}
.catalog-frame .categories button, .catalog-frame .live .media-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.catalog-frame .results { display: flex; flex-direction: column; gap: .9vh; }
.catalog-frame .results input { flex: none; padding: .65vh .7vw; min-height: 4.7vh; }
.catalog-frame .media-items { max-height: none; align-content: start; padding: .35vw; gap: .75vh; }
.catalog-frame .live .media-items button { width: 100%; gap: .65vw; }
.catalog-frame .live .media-items img { width: 3.1vw; height: 4.7vh; flex: none; }
.catalog-frame .live:not(.live-fullscreen) .preview { overflow: auto; }
.catalog-frame .live:not(.live-fullscreen) .preview-surface { height: 0; padding-bottom: 56.25%; position: relative; }
.catalog-frame .live:not(.live-fullscreen) .preview-surface video { position: absolute; top: 0; left: 0; }
.catalog-frame .channel-identity { display: flex; align-items: center; gap: .65vw; margin-top: 1vh; }
.catalog-frame .channel-identity > div { min-width: 0; }
.catalog-frame .channel-identity h2 { margin: 0; font-size: 1vw; }
.catalog-frame .channel-selection { font-size: 1.5vw; overflow-wrap: anywhere; }
.catalog-frame .selected-channel-logo { width: 4.6vw; height: 6.4vh; object-fit: contain; }
.catalog-frame .program-guide { margin: .6vh 0; font-size: .98vw; overflow-wrap: anywhere; }
.catalog-frame .live:not(.live-fullscreen) .preview > button { padding: .45vh .55vw; margin: .65vh 0; font-size: 1.07vw; }
.catalog-frame .movies .media-items, .catalog-frame .series .media-items {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.1vh .65vw;
}
@media (min-width: 1600px) {
    .catalog-frame .movies .media-items, .catalog-frame .series .media-items { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.catalog-frame .movies .media-items button, .catalog-frame .series .media-items button {
    align-self: stretch;
    padding: .3vw;
    border-radius: .55vw;
}
.catalog-frame .poster-frame {
    display: block;
    position: relative;
    height: 0;
    padding-bottom: 150%;
    overflow: hidden;
    border-radius: .35vw;
}
.catalog-frame .poster-frame img, .catalog-frame .poster-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}
.catalog-frame .movies .media-title, .catalog-frame .series .media-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: .5vh;
    min-height: 2.5em;
    max-height: 2.5em;
    font-size: 1.04vw;
    line-height: 1.25;
}
.catalog-frame .resume-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .8vw;
}
.catalog-frame .catalog.playing:not(.vod-fullscreen) > .preview { grid-column: 2; }
.catalog-frame.watching > main { grid-column: 1 / -1; }
@supports not (display: grid) {
    .catalog-frame > nav { width: 15%; min-width: 0; margin: 0 .85vw 0 0; }
    .catalog-frame .catalog > .categories { width: 23.5%; margin: 0 .85vw 0 0; }
    .catalog-frame .catalog.live > .categories { width: 25.9%; }
    .catalog-frame .catalog.live:not(.live-fullscreen) > .preview { width: 45.9%; margin: 0 0 0 .85vw; }
    .catalog-frame .movies .media-items button, .catalog-frame .series .media-items button { width: 19%; margin-right: 1%; }
}
.catalog-frame .poster-placeholder svg {
    width: 2.1vw;
    height: 2.1vw;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.playlist-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; padding: .35rem; }
.playlist-cards button { min-width: 0; min-height: 4rem; text-align: left; overflow-wrap: anywhere; }
.playlist-cards small { display: block; margin-top: .25rem; }

.catalog.vod-fullscreen .vod-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    border-radius: .7rem;
    background: #101014ed;
    pointer-events: auto;
}
.vod-title { flex-basis: 100%; }
.vod-timing { display: flex; align-items: center; gap: .7rem; flex: 1 1 100%; }
.vod-timing input {
    margin: 0;
    padding: 0;
    height: .45rem;
    appearance: none;
    background: linear-gradient(to right, #ea263f var(--progress,0%), #73717a var(--progress,0%));
}
.vod-timing input::-webkit-slider-thumb {
    appearance: none;
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
    background: #ff304b;
}

.catalog-frame .live .categories { overflow: hidden; }
.live-category-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .75vh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #65434c transparent;
    padding: .25vw;
}
.catalog-frame .live .media-items { min-height: 0; overflow-x: hidden; }
.live-name {
    display: block;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.live-name-text { display: inline; }
.live-name.long-name .live-name-text {
    display: inline-block;
    animation: live-name-pan var(--live-name-duration, 4s) ease-in-out 1s infinite alternate;
}
@keyframes live-name-pan {
    0%, 15% { transform: translateX(0); }
    85%, 100% { transform: translateX(var(--live-name-offset, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    .live-name.long-name .live-name-text { display: inline; animation: none; }
}

.catalog-frame .catalog .categories { overflow: hidden; }
.catalog-frame .catalog .categories h2 {
    display: flex;
    flex: 0 0 5.5vh;
    align-items: center;
    margin: 0;
}
.vod-search { display: flex; flex: none; gap: .5rem; justify-content: flex-end; }
.vod-search.open {
    position: relative;
    display: block;
    margin: 0 calc(.65vw + 1px);
}
.catalog-frame .results .vod-search.open input {
    display: block;
    padding-right: 9rem;
}
.vod-search.open button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    height: calc(100% - 6px);
    padding: 0;
}
.vod-search.open button:first-child { right: 5.6rem; width: 2.6rem; }
.vod-search.open button:last-child { right: .25rem; width: 5rem; }
.vod-search button svg { display: block; width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; }
.catalog.movies.playing .preview, .catalog.series.playing .preview { overflow: auto; }

/* Align the first live row across navigation, categories and channels. */
.live-frame .menu-brand { margin-bottom: calc(.9vh + .35vw); }
.catalog-frame .catalog.live .categories > h2,
.catalog-frame .catalog.live .results > h2 {
    display: block;
    flex: 0 0 5.5vh;
    margin: 0;
    padding: 0;
    font: 700 1.65vw/5.5vh system-ui, sans-serif;
    transform: translateY(-1vh);
}
.catalog-frame .live .live-category-list {
    margin-top: .15vh;
    padding-top: .35vw;
}

.catalog-frame .catalog.live .categories { padding-top: .8vw; }

.catalog-frame .live:not(.live-fullscreen) .preview > .live-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    width: 65%;
    min-height: 5.35vh;
    margin: .85vh auto;
    padding: .35em .5em;
    border: 2px solid transparent;
    border-radius: .55vw;
    background: #d71920;
    color: #fff;
    font-size: 1.22vw;
    font-weight: 700;
}
.catalog-frame .live:not(.live-fullscreen) .preview > .live-action:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.live-action svg, .detail-actions svg, .detail-episodes svg {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.live-fullscreen > .preview > .live-action svg { display: none; }

.catalog-frame .catalog.vod-detail-open > .preview { width: 100%; max-width: none; }
.vod-detail-open .preview > :not(.vod-detail) { display: none; }
.vod-fullscreen .vod-detail { display: none; }
.vod-detail { padding: 1.05vw; }
.detail-header { display: flex; align-items: flex-start; gap: 1.25vw; }
.detail-header > div:last-child { min-width: 0; flex: 1; }
.detail-header h2 { font-size: 2.3vw; line-height: 1.1; margin: 0 0 .8vh; }
.detail-poster { flex: 0 0 9vw; overflow: hidden; border-radius: .55vw; background: #221820; }
.detail-poster:empty { display: none; }
.detail-poster img { width: 100%; display: block; aspect-ratio: 2 / 3; object-fit: cover; }
.detail-summary { color: #eacdd2; margin: .4vh 0 1vh; }
.detail-summary:empty { display: none; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .7vw; margin: 1.5vh 0; }
.detail-actions button { display: flex; align-items: center; gap: .55em; border-radius: .65em; font-weight: 700; }
.tv-frame .detail-actions button[aria-pressed="true"] { background: #291a21; color: #fff; }
.detail-actions .detail-play { background: #fff; color: #171217; }
.detail-actions button:focus, .detail-episodes button:focus, .season-options button:focus {
    outline: 2px solid #ff6477;
    outline-offset: 2px;
}
.detail-facts { display: grid; grid-template-columns: max-content 1fr; gap: .5vh .8vw; margin: 1vh 0; font-size: .93em; }
.detail-facts dt { font-weight: 700; color: #f2bac1; }
.detail-facts dd { margin: 0; overflow-wrap: anywhere; }
.season-picker { position: relative; }
.season-picker > button { justify-content: space-between; width: 100%; }
.season-options {
    position: absolute;
    z-index: 2;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    max-height: 32vh;
    overflow: auto;
    padding: .25rem;
    border: 1px solid #69575d;
    border-radius: .55rem;
    background: #24191e;
    box-shadow: 0 .45rem 1.2rem #0009;
}
.season-options button { width: 100%; text-align: left; }
.season-options button + button { margin-top: .2rem; }
.season-options button:focus { outline-offset: -2px; }
.detail-episodes { display: flex; flex-direction: column; gap: .65vh; }
.detail-episodes button { display: flex; align-items: center; text-align: left; gap: .8vw; }
.episode-thumbnail { flex: 0 0 7vw; }
.episode-thumbnail:empty { display: none; }
.episode-thumbnail img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: .35vw; }
.episode-info { display: flex; flex: 1; flex-direction: column; gap: .2em; }

.vod-detail { position: relative; isolation: isolate; }
.detail-backdrops { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.detail-backdrops img {
    position: absolute;
    top: 0;
    right: 0;
    width: 93%;
    height: min(100%, 64vh);
    object-fit: contain;
    object-position: right top;
    opacity: 0;
    transition: opacity .55s ease;
}
.detail-backdrops img.visible { opacity: .87; }
.detail-backdrops.poster-backdrop img { width: 57%; }
.detail-backdrops::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #120e12f5 4%, #120e12c9 30%, transparent 84%),
        linear-gradient(0deg, #120e12 13%, transparent 79%);
}
.vod-detail > :not(.detail-backdrops) { position: relative; }
.detail-header, .detail-facts { text-shadow: 0 1px 3px #000, 0 0 8px #000; }
.detail-actions { z-index: 1; }
@media (prefers-reduced-motion: reduce) {
    .detail-backdrops img { transition: none; }
}

.catalog.movies .detail-summary { font-size: 1.17em; overflow-wrap: anywhere; }
.catalog.movies .detail-facts {
    font-size: 1.09em;
    grid-template-columns: fit-content(38%) minmax(0, 1fr);
}
.catalog.movies .detail-facts dt { overflow-wrap: anywhere; }

.tv-frame.premium-screen {
    padding: 4vh 2.7vw;
    gap: 2.7vw;
    background: radial-gradient(ellipse at 105% 0%, #450910, transparent 45%),
        radial-gradient(ellipse at -12% 100%, #3c050a, transparent 45%),
        linear-gradient(119deg, transparent 9%, #18070a 9.2%, #410a11 13%, transparent 13.2%,
            transparent 83%, #2d090e 83.2%, #500711 91%, transparent 91.2%), #090809;
}
.tv-frame.premium-settings { grid-template-columns: minmax(0, 18vw) minmax(0, 1fr); }
.tv-frame.premium-playlists { display: block; }
.tv-frame.premium-settings > nav { height: 100%; position: relative; align-self: stretch; border: 0; border-right: 1px solid #ffffff50; border-radius: 0; background: none; align-items: center; }
.premium-screen .menu-brand { width: 100%; gap: .45vw; height: auto; margin: 0; }
.premium-screen .menu-brand-symbol { width: 6.65vw; height: 4.82vw; }
.premium-screen .menu-brand-wordmark { width: 9.74vw; height: 3.39vw; }
.premium-screen svg, .premium-refresh-progress { width: 1.5em; height: 1.5em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.premium-screen .premium-heading h1 { margin: 0; font-size: clamp(1.65rem, 3.35vw, 3rem); line-height: 1.1; letter-spacing: -.035em; }
.premium-heading p { margin: .3em 0 0; color: #ddd7da; font-size: clamp(.95rem, 1.8vw, 1.35rem); }
.premium-settings .premium-heading { border-left: .4rem solid #ff2944; padding-left: 1.35rem; }
.premium-settings-badge { display: grid; place-items: center; width: 54%; aspect-ratio: 1; border: 2px solid #ff3344; border-radius: 26%; background: radial-gradient(circle, #370a12, #19080d); box-shadow: 0 0 1.3rem #d20b316e; margin: auto 0; }
.premium-settings-badge svg { width: 61%; height: 61%; }
.premium-rows { display: grid; gap: 1.5vh; margin-top: 5vh; }
.premium-screen .premium-card {
    min-width: 0; display: grid; grid-template-columns: 3.8em minmax(0, 1fr) 1.4em;
    gap: 1.4vw; align-items: center; text-align: left; color: #fff; padding: .7em 1.05em;
    border: 2px solid #3f393f; border-radius: 1rem; background: linear-gradient(155deg, #242226, #131214 72%);
}
.premium-screen .premium-card[aria-pressed="true"] { border-color: #9a1829; background: linear-gradient(155deg, #341218, #181014); }
.premium-screen .premium-card:focus { background: linear-gradient(150deg, #4b1016, #250a0d 75%); border-color: #ff3344; outline: 2px solid #e80520; outline-offset: 1px; box-shadow: 0 0 .95rem #d9144e72, inset 0 2px #ffbcc6; }
.premium-card > svg:last-child { justify-self: end; }
.premium-glyph { display: grid; place-items: center; height: 3em; border-radius: .7em; background: linear-gradient(150deg, #49454a, #28262b); }
.premium-glyph svg { width: 1.8em; height: 1.8em; }
.premium-refresh .premium-glyph { background: linear-gradient(145deg,#ff1935,#b70012); }
.premium-copy { min-width: 0; }
.premium-copy strong { display: block; font-size: clamp(1.02rem, 2.05vw, 1.6rem); line-height: 1.14; overflow-wrap: anywhere; }
.premium-copy small { display: block; color: #ded9dc; margin-top: .22em; font-size: .96rem; line-height: 1.26; }
.premium-detail { margin: 4vh 0; padding: 1rem; background: #20191e; border: 1px solid #4d393f; border-radius: 1rem; }
.premium-engine-options { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.premium-status { color: #f5cbd2; margin: .4rem 0 0; }
.premium-playlists .premium-heading { display: grid; grid-template-columns: minmax(0, 20%) minmax(0, 1fr) auto; gap: 1.5vw; text-align: center; align-items: center; }
.premium-playlists .menu-brand { border-right: 1px solid #ffffff50; }
.premium-count { white-space: nowrap; display: flex; align-items: center; gap: .3em; border: 2px solid #453a41; padding: .55em .8em; border-radius: .75em; background: #201b20; }
.premium-count strong, .premium-list-icon { color: #ff243c; }
.premium-search { display: flex; align-items: center; gap: .6em; width: 61%; margin: 5vh auto; border: 2px solid #615960; border-radius: 2rem; padding: .25rem .8rem; background: #201e21; }
.premium-search input { border: 0; background: transparent; min-width: 0; border-radius: 1rem; }
.premium-screen .premium-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2vh 1.45vw; padding: 0; }
.premium-grid .premium-card { min-height: 13.6vh; grid-template-columns: 2.6em minmax(0, 1fr) 1em; }
.premium-card .premium-list-icon { width: 2.4em; height: 2.4em; }
.premium-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: .45em; margin-top: 4vh; }
.premium-pages button { min-width: 2.15em; padding: .25em .45em; display: grid; place-items: center; }
.premium-pages button:disabled { opacity: .45; }
.premium-empty { text-align: center; }
.premium-back { display: inline-flex; align-items: center; gap: .2em; margin-top: .6em; font-size: .75rem; }
.premium-refresh-progress { color: #ff344e; animation: rotate-refresh 1.6s linear infinite; }
@keyframes rotate-refresh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .premium-refresh-progress { animation: none; } }
@media (max-width: 900px) {
    .premium-screen .premium-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .premium-playlists .premium-heading { grid-template-columns: minmax(0, 1fr) auto; text-align: left; }
    .premium-playlists .premium-heading > .menu-brand { grid-column: 1 / -1; justify-content: flex-start; border: 0; }
    .premium-screen .menu-brand-symbol { width: 75px; height: 55px; }
    .premium-screen .menu-brand-wordmark { width: 109px; height: 38px; }
    .premium-search { width: 90%; }
    .tv-frame.premium-settings { display: block; }
    .tv-frame.premium-settings > nav { height: auto; flex-direction: row; justify-content: space-between; border: 0; padding: 0; margin-bottom: 1rem; }
    .premium-settings > nav .menu-brand { width: auto; }
    .premium-settings-badge { display: none; }
}
@media (max-width: 550px) {
    .premium-screen .premium-grid { grid-template-columns: minmax(0, 1fr); }
    .premium-playlists .premium-heading { grid-template-columns: minmax(0, 1fr); }
    .premium-count { justify-self: start; }
    .premium-screen .premium-card { padding: .55em; grid-template-columns: 2.6em minmax(0, 1fr) 1em; }
}

.vod-detail-open .detail-information {
    max-height: 48vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #7c4e58 transparent;
}
.vod-detail-open .detail-header .detail-information { max-height: 26vh; }
.detail-information::-webkit-scrollbar { width: 6px; }
.detail-information::-webkit-scrollbar-thumb { background: #7c4e58; border-radius: 6px; }
.detail-information:focus-visible { outline: 2px solid #ff6477; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
    .detail-information { scroll-behavior: smooth; }
}

/* Keep the film focus indicator on the scrollbar, without changing the reading area. */
.movies.vod-detail-open .detail-information:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}
.movies.vod-detail-open .detail-information:focus::-webkit-scrollbar-track {
    background: rgba(124, 78, 88, .25);
    border-radius: 6px;
}
@supports selector(::-webkit-scrollbar) {
    .movies.vod-detail-open .detail-information { scrollbar-color: auto; scrollbar-width: auto; }
}
.movies.vod-detail-open .detail-information::-webkit-scrollbar-track { margin: 8px 0; }
.movies.vod-detail-open .detail-information::-webkit-scrollbar-thumb {
    background-clip: padding-box;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    min-height: 26px;
}

/* Controles de navegador y datos locales del televisor. */
.tv-sidebar-extras { width: 100%; margin-top: auto; padding-top: .35rem; border-top: 1px solid #41383e; }
.tv-clock { display: block; margin-top: .3rem; font-size: 1.35rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tv-date, .tv-weather { font-size: .7rem; color: #ccc3c8; line-height: 1.28; }
.tv-date { margin: .12rem 0 .35rem; }
.tv-weather { display: flex; align-items: center; gap: .3rem; min-height: 1.9em; max-width: 100%; }
.tv-weather svg, .tv-app-fullscreen svg { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tv-weather small { display: block; font-size: .95em; }
.tv-app-fullscreen { display: flex; align-items: center; justify-content: center; gap: .35rem; }
.tv-sidebar-extras .tv-app-fullscreen { width: 100%; font-size: .75rem; padding: .3rem .25rem; min-height: 1.8rem; }
.tv-fullscreen-status { display: block; font-size: .7rem; color: #ffc4ce; }
.tv-fullscreen-status:empty { display: none; }
.activation .tv-fullscreen-control { display: inline-flex; vertical-align: middle; align-items: center; gap: .2rem; border: 0; background: transparent; padding: 0; box-shadow: none; }
.tv-frame.catalog-frame > nav .nav-button + .nav-button { margin-top: 1.3vh; }
.tv-frame.premium-settings > nav .tv-sidebar-extras { margin-top: .5rem; }
.tv-weather-cities { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .7rem; }
.tv-weather-settings > button { margin: .15rem .35rem .15rem 0; }
.tv-weather-settings p { min-height: 1.4em; }
.tv-weather-settings small { display: block; }
#app[data-input-mode="remote"] button:focus,
#app[data-input-mode="remote"] a:focus,
#app[data-input-mode="remote"] input:focus { outline: 3px solid #ff4159; outline-offset: -2px; }
.activation .tv-fullscreen-control { display: flex; flex-direction: column; justify-content: center; margin-top: .25rem; }
