/* Television layout: 1280 x 720 logical pixels, remote focus and mouse parity. */
html, body { background: var(--app-background, #00050d); }
#wrapper { background: var(--wrapper-background, #00050d); padding: 0 48px; z-index: 1; }
#appHeader { position: relative; z-index: 5; height: 72px; margin: 0; }
.brand { font-size: 24px; letter-spacing: -.5px; text-transform: none; }

#navAnchor, #topMenu { gap: 8px; }
.topmenuitem { font-size: 18px; text-transform: none; letter-spacing: 0; border: 0; padding: 10px 16px; margin: 0; border-radius: 8px; color: var(--menu-text-color,#d9dce2); transition: background .2s, color .2s; }
.topmenuitem.selected { background: rgba(var(--menu-highlight-color-rgb,32,40,51),.22); color: var(--menu-text-active-color,#fff); }
.topmenuitem.focused { background: var(--menu-highlight-color,#fff); color: var(--menu-text-active-color,#00050d); box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
#hero { width: 1280px; height: 440px; margin: -72px -48px 0; padding: 80px 48px 44px; background-color: var(--surface-color, #00050d); }
#hero .hero-poster { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
#hero .hero-blur { display: none; }
#hero .hero-gradient { background: linear-gradient(90deg,var(--surface-color,#00050d) 0%,rgba(var(--surface-rgb,0,5,13),.92) 20%,rgba(var(--surface-rgb,0,5,13),.35) 62%,rgba(var(--surface-rgb,0,5,13),.08) 100%); }
#hero .hero-gradient:after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(0deg,var(--surface-color,#00050d) 0%,rgba(var(--surface-rgb,0,5,13),0) 48%,rgba(var(--surface-rgb,0,5,13),.65) 100%); }
.hero-details { width: 560px; padding: 12px 0 0; gap: 12px; }
.hero-details .eyebrow { color: var(--menu-highlight-color,#79c8ff); font-size: 15px; font-weight: 700; letter-spacing: 1px; }
#heroTitle { font-size: 44px; line-height: 1.05; letter-spacing: -1.2px; max-height: 96px; overflow: hidden; }
#heroDescription { font-size: 17px; line-height: 1.4; max-width: 510px; min-height: 0; max-height: 72px; overflow: hidden; color: var(--app-text-color,#e4e7eb); }
.hero-badges span { border: 0; border-radius: 4px; background: rgba(255,255,255,.14); padding: 3px 7px; }
.hero-actions button, .primary-action { border-radius: 8px; padding: 13px 26px; font-size: 19px; }
#heroPlay:before { content: '\25B6'; padding-right: 12px; font-size: 15px; }
#hero .hero-video { position: absolute; top: 8px; left: 520px; width: 760px; height: 427px; object-fit: contain; opacity: 0; z-index: 1; pointer-events: none; transition: opacity .5s; }
#hero .hero-gradient { background: linear-gradient(90deg,var(--surface-color,#00050d) 0%,var(--surface-color,#00050d) 36%,rgba(var(--surface-rgb,0,5,13),.95) 42%,rgba(var(--surface-rgb,0,5,13),.2) 65%,rgba(var(--surface-rgb,0,5,13),0) 100%); }
#hero .hero-video.is-playing { opacity: 1; }
#hero .hero-gradient { z-index: 2; }
#hero .hero-details { z-index: 3; }
#menu { margin: -8px -18px 0; width: 1220px; height: 300px; overflow: hidden; }
#gridScrollView { width: 100%; height: 300px; padding: 0; }
.row-container { padding: 0 18px; margin-bottom: 14px; }
.row-container:first-of-type { margin-top: 0; }
.row-container:first-of-type .grid { margin-top: 0; }
.grid-title { font-size: 22px; font-weight: 700; letter-spacing: -.4px; text-transform: none; color: var(--app-text-color,#fff); margin: 0 0 2px; }
.row-window { min-height: 220px; padding: 0 0 12px; }
.grid { gap: 18px; padding: 14px 10px 20px; align-items: flex-start; }
.gridColumn { flex: 0 0 264px; width: 264px; position: relative; transition: transform .25s ease; }
.gridViewBox { width: 264px; height: 149px; border-radius: 9px; background: #18212c; transform-origin: center center; transition: transform .25s ease, box-shadow .25s ease; }
.gridViewBox img { width: 100%; height: 100%; object-fit: cover; }
.gridViewBox.focused { transform: scale(1.09); box-shadow: 0 0 0 3px var(--menu-highlight-color,#fff),0 14px 28px rgba(0,0,0,.7); z-index: 10; }
.gridViewBox > span { display: block; position: absolute; left: 0; right: 0; bottom: 0; padding: 25px 12px 10px; font-size: 15px; font-weight: 700; color: var(--app-text-color,#fff); background: linear-gradient(transparent,rgba(var(--surface-rgb,0,5,13),.94)); opacity: 0; transform: translateY(8px); transition: opacity .2s,transform .2s; }
.gridViewBox.focused > span { opacity: 1; transform: translateY(0); }
.gridViewBox_badges { display: none; }
.gridViewBox_showAll { min-width: 264px; border: 1px solid #405168; }
.gridViewBox_showAll > span { position: static; opacity: 1; background: none; transform: none; }
.gridViewBox_showAll-back { min-width: 264px; }
.row-nav { border-radius: 6px; width: 28px; height: 70px; background: rgba(var(--surface-rgb,0,5,13),.8); }
.row-nav.prev { left: 0; }
.row-nav.next { right: 0; }
.row-nav.disabled { opacity: 0; }
.search-view, .episode-view { background: var(--app-background, #00050d); }
.search-result-card, .episode-item { border-radius: 9px; }
.search-result-card.is-focused, .episode-item.focused { border-color: var(--app-text-color,#fff); box-shadow: 0 0 0 2px #fff; }
.hero-details.is-changing { animation: hero-reveal .35s ease; }
.catalogue-peek { position: absolute; width: 320px; z-index: 20; border-radius: 10px; overflow: hidden; background: var(--surface-color,#00050d); color: var(--app-text-color,#fff); box-shadow: 0 14px 40px rgba(0,0,0,.8); opacity: 0; visibility: hidden; pointer-events: none; transform: scale(.86); transform-origin: center 80px; transition: transform .3s cubic-bezier(.2,.8,.2,1),opacity .18s,visibility .18s; }
.catalogue-peek.is-visible { opacity: 1; visibility: visible; transform: scale(1); pointer-events: auto; }
.peek-image { width: 320px; height: 180px; object-fit: cover; display: block; }
.peek-details { padding: 14px 16px 16px; }
.peek-details h3 { font-size: 21px; line-height: 1.1; margin: 0 0 8px; max-height: 46px; overflow: hidden; }
.peek-details p { font-size: 14px; line-height: 1.3; margin: 0 0 12px; opacity: .75; max-height: 36px; overflow: hidden; }
.peek-details button { padding: 10px 18px; font-size: 16px; border: 0; border-radius: 7px; background: #fff; color: #00050d; font-weight: 700; cursor: pointer; }
.peek-details button:focus { outline: 3px solid var(--menu-highlight-color,#79c8ff); }
/* The reference player's diagnostic counter is not part of the catalogue UI. */
#video-playtimer { display: none; }
@keyframes hero-reveal { from { opacity: .25; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    .gridViewBox, .gridColumn, .grid-track, .hero-details, .hero-video, .catalogue-peek { transition: none !important; animation: none !important; }
}
