:root {
    color-scheme: dark;
    --app-bg: #080d11;
    --app-surface: #0d151a;
    --app-surface-2: #121c22;
    --app-line: rgba(175, 207, 220, .16);
    --app-text: #f4f8fa;
    --app-muted: #99a8b1;
    --app-cyan: #05c7f2;
    --app-cyan-2: #008fb6;
    --app-yellow: #ffc72c;
    --app-danger: #ff6c77;
    --content-width: 1480px;
    --ion-background-color: var(--app-bg);
    --ion-text-color: var(--app-text);
    --ion-color-primary: #05c7f2;
    --ion-color-primary-rgb: 5, 199, 242;
    --ion-font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: var(--ion-font-family);
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}

ion-app {
    background:
        radial-gradient(circle at 12% 10%, rgba(0, 175, 220, .07), transparent 30rem),
        var(--app-bg);
}

.app-shell {
    min-height: 100%;
    background: transparent;
}

.app-header {
    position: relative;
    z-index: 80;
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto minmax(260px, 1fr);
    align-items: center;
    min-height: 72px;
    padding: 0 clamp(22px, 3.2vw, 56px);
    border-bottom: 1px solid var(--app-line);
    background: rgba(5, 10, 14, .88);
    backdrop-filter: blur(24px) saturate(130%);
}

.brand {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.brand img {
    width: 32px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(5, 199, 242, .35));
}

.brand span {
    background: linear-gradient(105deg, #fff 8%, #d5f8ff 46%, var(--app-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    height: 72px;
    align-items: stretch;
    gap: 40px;
}

.desktop-nav a {
    position: relative;
    display: flex;
    align-items: center;
    color: #b9c3c9;
    font-size: 14px;
    transition: color .2s ease;
}

.desktop-nav a::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--app-cyan);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 14px rgba(5, 199, 242, .8);
    content: "";
    opacity: 0;
    transform: scaleX(.25);
    transition: .25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #fff;
}

.desktop-nav a.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.icon-button,
.search-trigger {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    cursor: pointer;
    transition: .2s ease;
}

.icon-button:hover,
.search-trigger:hover {
    border-color: rgba(5, 199, 242, .55);
    background: rgba(5, 199, 242, .1);
    transform: translateY(-1px);
}

.icon-button ion-icon {
    font-size: 20px;
}

.search-trigger {
    display: flex;
    width: min(23vw, 310px);
    justify-content: flex-start;
    gap: 10px;
    padding: 0 15px;
    color: var(--app-muted);
}

.app-content {
    --background: transparent;
    --padding-bottom: 0;
}

.app-content::part(scroll) {
    scrollbar-width: none;
}

.app-content::part(scroll)::-webkit-scrollbar {
    display: none;
}

.route-content {
    min-height: 100%;
}

.mobile-tabs {
    display: none;
}

.hero {
    position: relative;
    display: flex;
    min-height: 335px;
    align-items: center;
    isolation: isolate;
    overflow: hidden;
    background-image: var(--hero-image);
    background-position: 68% 22%;
    background-size: cover;
}

.hero::before,
.detail-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, #061015 0%, rgba(6, 16, 21, .94) 26%, rgba(6, 16, 21, .52) 53%, rgba(6, 16, 21, .06) 78%),
        linear-gradient(0deg, var(--app-bg) 0%, transparent 36%, rgba(5, 10, 14, .1) 85%);
    content: "";
}

.hero::after {
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 32%;
    background: linear-gradient(0deg, var(--app-bg), transparent);
    content: "";
}

.hero__ambient {
    position: absolute;
    top: 28%;
    left: 12%;
    width: 14rem;
    height: 14rem;
    z-index: -1;
    border-radius: 50%;
    background: rgba(0, 177, 224, .08);
    filter: blur(50px);
}

.hero__content {
    width: min(650px, 52vw);
    margin-left: max(7vw, calc((100% - var(--content-width)) / 2));
    padding: 18px 0 34px;
    animation: heroIn .75s cubic-bezier(.2, .75, .2, 1) both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translate3d(-28px, 12px, 0); }
}

.hero__kicker,
.eyebrow {
    color: var(--app-cyan);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .19em;
}

.hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero__kicker i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--app-cyan);
    box-shadow: 0 0 12px var(--app-cyan);
}

.hero h1 {
    max-width: 720px;
    margin: 14px 0 12px;
    color: #fff;
    font-family: "Arial Narrow", "Bahnschrift Condensed", Impact, sans-serif;
    font-size: clamp(48px, 4vw, 64px);
    font-stretch: condensed;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: .94;
    text-transform: uppercase;
    text-shadow: 0 3px 28px rgba(0, 0, 0, .55);
}

.hero__meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #c6d0d5;
    font-size: 14px;
}

.hero__meta > span:not(:first-child)::before,
.detail-meta > span:not(:first-child)::before {
    margin-right: 14px;
    color: #62727c;
    content: "•";
}

.rating {
    color: var(--app-yellow) !important;
    font-weight: 700;
}

.certificate {
    padding: 2px 7px;
    border: 1px solid rgba(225, 235, 240, .35);
    border-radius: 4px;
    color: #e7edef;
    font-size: 11px;
}

.hero__meta .certificate::before,
.detail-meta .certificate::before {
    content: none !important;
}

.hero__content > p:not(.external-note) {
    max-width: 510px;
    margin: 18px 0 23px;
    color: #c3cdd2;
    font-size: 15px;
    line-height: 1.65;
}

.hero__actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.primary-action,
.secondary-action,
.round-action,
.load-more,
.text-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.primary-action {
    background: linear-gradient(125deg, #05cdf7, #008caf);
    box-shadow: 0 8px 30px rgba(0, 174, 216, .22);
    color: #fff;
}

.primary-action:hover {
    box-shadow: 0 10px 36px rgba(0, 190, 235, .38);
    transform: translateY(-2px);
}

.secondary-action {
    border: 1px solid rgba(226, 239, 245, .25);
    background: rgba(13, 23, 29, .76);
    color: #eef5f7;
    backdrop-filter: blur(10px);
}

.secondary-action:hover {
    border-color: rgba(5, 199, 242, .55);
    background: rgba(19, 38, 47, .9);
}

.external-note {
    margin: 10px 0 0 !important;
    color: #74868f !important;
    font-size: 10px !important;
}

.home-catalog,
.detail-body,
.browse-results,
.library-section {
    width: min(calc(100% - 64px), var(--content-width));
    margin: -28px auto 0;
    padding-bottom: 70px;
}

.catalog-section {
    position: relative;
    z-index: 2;
    margin: 0 0 18px;
}

.section-heading {
    display: flex;
    min-height: 40px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.section-heading h2 {
    margin: 3px 0 0;
    color: #f7fbfc;
    font-size: 19px;
    font-weight: 690;
    letter-spacing: -.02em;
}

.section-heading > a {
    color: var(--app-muted);
    font-size: 12px;
    transition: color .2s ease;
}

.section-heading > a span {
    margin-left: 5px;
    color: var(--app-cyan);
}

.section-heading > a:hover {
    color: var(--app-cyan);
}

.media-rail,
.cast-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 238px;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 1px 8px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.media-rail::-webkit-scrollbar,
.cast-rail::-webkit-scrollbar {
    display: none;
}

.media-rail:has(.media-card--wide) {
    grid-auto-columns: 360px;
}

.media-card {
    min-width: 0;
    cursor: pointer;
    outline: none;
    scroll-snap-align: start;
}

.media-card__art {
    position: relative;
    aspect-ratio: 2.05;
    overflow: hidden;
    border: 1px solid var(--app-line);
    border-radius: 7px;
    background: var(--app-surface);
    box-shadow: 0 9px 24px rgba(0, 0, 0, .18);
    transition: transform .28s cubic-bezier(.2, .7, .2, 1), border-color .28s ease, box-shadow .28s ease;
}

.media-card--wide .media-card__art {
    aspect-ratio: 2.55;
}

.media-card__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    transition: transform .65s cubic-bezier(.2, .75, .2, 1), filter .3s ease;
}

.media-card__veil {
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(transparent, rgba(2, 6, 8, .78));
}

.media-card:hover .media-card__art,
.media-card:focus .media-card__art {
    z-index: 3;
    border-color: rgba(5, 199, 242, .55);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .44), 0 0 0 1px rgba(5, 199, 242, .12);
    transform: translateY(-5px) scale(1.015);
}

.media-card:hover .media-card__art img {
    filter: saturate(1.08) brightness(.82);
    transform: scale(1.055);
}

.media-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding-left: 2px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: rgba(4, 12, 16, .62);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    font-size: 14px;
    opacity: 0;
    transform: translate(-50%, -40%) scale(.8);
    transition: .25s ease;
}

.media-card:hover .media-card__play,
.media-card:focus .media-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.media-card__rank {
    position: absolute;
    bottom: -10px;
    left: 4px;
    color: rgba(255, 255, 255, .2);
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .48);
}

.media-card__episode {
    position: absolute;
    bottom: 8px;
    left: 10px;
    z-index: 1;
    color: #eef5f7;
    font-size: 10px;
}

.media-card__progress {
    position: absolute;
    right: 9px;
    bottom: 6px;
    left: 9px;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, .24);
}

.media-card__progress i {
    display: block;
    height: 100%;
    background: var(--app-cyan);
}

.media-card__copy {
    padding: 8px 2px 0;
}

.media-card__copy h3 {
    overflow: hidden;
    margin: 0 0 4px;
    color: #edf3f5;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card__copy p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #7f909a;
    font-size: 10px;
}

.media-card__copy small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #92a1a9;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card__copy p > span + span::before {
    margin-right: 8px;
    content: "·";
}

.media-card__copy .rating {
    color: var(--app-yellow) !important;
}

.reveal {
    animation: revealUp .55s both;
    animation-timeline: view();
    animation-range: entry 0% entry 34%;
}

@keyframes revealUp {
    from { opacity: .15; transform: translateY(24px); }
}

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    overflow-y: auto;
    background: rgba(4, 9, 12, .96);
    backdrop-filter: blur(26px) saturate(120%);
    animation: overlayIn .2s ease both;
}

@keyframes overlayIn {
    from { opacity: 0; transform: translateY(-8px); }
}

.search-overlay__top {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px max(24px, calc((100% - 1040px) / 2));
    border-bottom: 1px solid var(--app-line);
    background: rgba(5, 11, 15, .86);
    backdrop-filter: blur(20px);
}

.global-searchbar {
    flex: 1;
    --background: #111b21;
    --border-radius: 12px;
    --box-shadow: inset 0 0 0 1px var(--app-line);
    --color: #fff;
    --icon-color: var(--app-cyan);
    --placeholder-color: #82929b;
    padding: 0;
}

.search-overlay__body {
    width: min(calc(100% - 48px), 1040px);
    margin: 0 auto;
    padding: 34px 0 70px;
}

.search-grid,
.media-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px 12px;
}

.search-prompt,
.empty-state {
    display: flex;
    min-height: 420px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.search-prompt > span,
.empty-state > span {
    display: grid;
    min-width: 58px;
    height: 58px;
    place-items: center;
    padding: 0 12px;
    border: 1px solid rgba(5, 199, 242, .24);
    border-radius: 18px;
    background: rgba(5, 199, 242, .07);
    color: var(--app-cyan);
    font-size: 16px;
}

.search-prompt h2,
.empty-state h2 {
    margin: 20px 0 7px;
    font-size: 26px;
}

.search-prompt p,
.empty-state p {
    max-width: 440px;
    margin: 0 0 20px;
    color: var(--app-muted);
}

.search-count {
    margin: 0 0 18px;
    color: var(--app-muted);
    font-size: 13px;
}

.settings-popover {
    position: fixed;
    top: 62px;
    right: 24px;
    z-index: 250;
    width: min(390px, calc(100vw - 30px));
    padding: 22px;
    border: 1px solid rgba(128, 169, 185, .24);
    border-radius: 18px;
    background: rgba(12, 21, 27, .96);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
    backdrop-filter: blur(24px);
    animation: overlayIn .2s ease both;
}

.settings-popover__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.settings-popover h2 {
    margin: 2px 0 0;
    font-size: 22px;
}

.status-line {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--app-line);
}

.status-line i {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-top: 5px;
    border-radius: 50%;
    background: #efb436;
    box-shadow: 0 0 12px rgba(239, 180, 54, .5);
}

.status-line.is-live i {
    background: #39d98a;
    box-shadow: 0 0 12px rgba(57, 217, 138, .5);
}

.status-line strong {
    display: block;
    font-size: 13px;
}

.status-line p,
.settings-fineprint {
    margin: 4px 0 0;
    color: var(--app-muted);
    font-size: 11px;
    line-height: 1.5;
}

.settings-link {
    display: flex;
    justify-content: space-between;
    margin: 4px 0 0;
    padding: 13px 15px;
    border-radius: 9px;
    background: rgba(5, 199, 242, .09);
    color: #e6faff;
    font-size: 13px;
}

.settings-link span {
    color: var(--app-cyan);
}

.loading-state {
    display: flex;
    min-height: 55vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--app-muted);
}

.loader-orbit {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(5, 199, 242, .2);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-orbit i {
    position: absolute;
    top: -3px;
    left: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--app-cyan);
    box-shadow: 0 0 15px var(--app-cyan);
}

@keyframes spin { to { transform: rotate(360deg); } }

.browse-hero,
.page-heading {
    width: min(calc(100% - 64px), var(--content-width));
    margin: 0 auto;
    padding: 88px 0 32px;
}

.browse-hero {
    min-height: 280px;
    background: radial-gradient(ellipse at 30% 10%, rgba(5, 199, 242, .08), transparent 42%);
}

.browse-hero h1,
.page-heading h1 {
    margin: 8px 0;
    font-size: clamp(42px, 5vw, 70px);
    letter-spacing: -.05em;
    line-height: 1;
}

.browse-hero p,
.page-heading p {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--app-muted);
    line-height: 1.6;
}

.filter-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    width: min(calc(100% - 64px), var(--content-width));
    gap: 12px;
    margin: 0 auto 30px;
    padding: 13px;
    border: 1px solid var(--app-line);
    border-radius: 12px;
    background: rgba(11, 19, 24, .92);
    backdrop-filter: blur(18px);
}

.filter-bar label {
    display: flex;
    min-width: 180px;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    color: #84949d;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.filter-bar select,
.section-heading select {
    min-height: 38px;
    flex: 1;
    padding: 0 32px 0 11px;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    outline: 0;
    background: #111b21;
    color: #e8eef1;
    font-size: 12px;
}

.browse-results {
    margin-top: 0;
}

.browse-results .media-grid,
.library-section .media-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.browse-results .media-card__art,
.library-section .media-card__art,
.search-grid .media-card__art {
    aspect-ratio: 2 / 3;
}

.load-more {
    min-width: 180px;
    margin: 40px auto 0;
    border: 1px solid rgba(5, 199, 242, .3);
    background: rgba(5, 199, 242, .08);
    color: var(--app-cyan);
}

.detail-hero {
    position: relative;
    min-height: 620px;
    isolation: isolate;
    overflow: hidden;
    background-image: var(--detail-image);
    background-position: center 18%;
    background-size: cover;
}

.detail-hero__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(5, 10, 14, .98) 0%, rgba(5, 10, 14, .8) 35%, rgba(5, 10, 14, .2) 70%),
        linear-gradient(0deg, var(--app-bg) 0%, transparent 50%);
}

.detail-hero__content {
    display: flex;
    width: min(calc(100% - 64px), 1220px);
    min-height: 620px;
    align-items: center;
    gap: 38px;
    margin: 0 auto;
    padding: 60px 0 88px;
}

.detail-poster {
    width: 255px;
    aspect-ratio: 2 / 3;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .55);
    animation: posterIn .6s ease both;
}

@keyframes posterIn { from { opacity: 0; transform: translateY(20px) rotate(-1deg); } }

.detail-copy {
    max-width: 650px;
}

.detail-copy h1 {
    margin: 6px 0 8px;
    font-size: clamp(48px, 6vw, 86px);
    letter-spacing: -.06em;
    line-height: .95;
}

.tagline {
    margin: 0 0 18px;
    color: #b0bec5;
    font-style: italic;
}

.detail-overview {
    max-width: 600px;
    margin: 22px 0 26px;
    color: #bdc8ce;
    line-height: 1.7;
}

.round-action {
    width: 44px;
    padding: 0;
    border: 1px solid var(--app-line);
    border-radius: 50%;
    background: rgba(18, 30, 37, .8);
}

.round-action.selected {
    border-color: rgba(5, 199, 242, .5);
    background: rgba(5, 199, 242, .15);
    color: var(--app-cyan);
}

.detail-body {
    margin-top: -50px;
}

.episodes-section,
.cast-section {
    position: relative;
    z-index: 2;
    margin-bottom: 48px;
}

.episode-list {
    border: 1px solid var(--app-line);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(12, 20, 25, .65);
}

.episode-card {
    display: grid;
    grid-template-columns: 185px 38px 1fr;
    align-items: center;
    gap: 18px;
    min-height: 116px;
    padding: 10px;
    border-bottom: 1px solid var(--app-line);
    transition: background .2s ease;
}

.episode-card:last-child { border-bottom: 0; }
.episode-card:hover { background: rgba(5, 199, 242, .045); }

.episode-card__still {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 7px;
}

.episode-card__still img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-card__still button {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding-left: 2px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
    background: rgba(3, 8, 11, .6);
    transform: translate(-50%, -50%);
}

.episode-number {
    color: #536570;
    font-size: 22px;
    font-weight: 300;
}

.episode-card h3 {
    margin: 0 0 5px;
    font-size: 15px;
}

.episode-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 6px;
    color: #84959e;
    font-size: 11px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.episode-card small { color: #637781; }

.cast-rail {
    grid-auto-columns: 120px;
    gap: 14px;
}

.cast-card img {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--app-line);
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
}

.cast-card h3 {
    margin: 9px 0 2px;
    overflow: hidden;
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cast-card p {
    margin: 0;
    overflow: hidden;
    color: var(--app-muted);
    font-size: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-heading {
    padding-top: 82px;
}

.list-tabs {
    display: flex;
    width: min(calc(100% - 64px), var(--content-width));
    gap: 8px;
    margin: 0 auto 34px;
    border-bottom: 1px solid var(--app-line);
}

.list-tabs button {
    position: relative;
    padding: 14px 18px;
    border: 0;
    background: transparent;
    color: var(--app-muted);
    cursor: pointer;
}

.list-tabs button::after {
    position: absolute;
    right: 12px;
    bottom: -1px;
    left: 12px;
    height: 2px;
    background: var(--app-cyan);
    content: "";
    opacity: 0;
}

.list-tabs button.active { color: #fff; }
.list-tabs button.active::after { opacity: 1; }

.list-tabs span {
    margin-left: 5px;
    color: #60717a;
    font-size: 10px;
}

.library-section { margin-top: 0; }

.player-surface {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(2, 6, 8, .88);
    backdrop-filter: blur(22px);
    animation: overlayIn .22s ease both;
}

.player-surface--page {
    position: relative;
    z-index: 1;
    min-height: 620px;
    padding-top: 0;
    background: transparent;
    backdrop-filter: none;
}

.player-panel {
    width: min(1050px, 100%);
    overflow: hidden;
    border: 1px solid rgba(149, 189, 204, .22);
    border-radius: 18px;
    background: #0b1217;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .65);
}

.player-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 22px 14px;
}

.player-panel__header h2 {
    margin: 3px 0 0;
    font-size: 22px;
}

.source-entry {
    padding: 0 22px 18px;
}

.source-entry label {
    display: block;
    margin-bottom: 7px;
    color: #9baab2;
    font-size: 11px;
}

.source-entry > div {
    display: flex;
    gap: 8px;
}

.source-entry input {
    min-width: 0;
    min-height: 44px;
    flex: 1;
    padding: 0 13px;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    outline: 0;
    background: #111b21;
    color: #fff;
}

.source-entry input:focus { border-color: rgba(5, 199, 242, .55); }

.source-entry > p {
    margin: 7px 0 0;
    color: #6f828c;
    font-size: 10px;
}

.source-entry .source-error { color: var(--app-danger); }

.video-stage {
    position: relative;
    min-height: 360px;
    background: #020405;
}

.video-stage video {
    display: block;
    width: 100%;
    max-height: min(58vh, 590px);
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

.video-stage__idle {
    display: flex;
    min-height: 390px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 50%, rgba(5, 199, 242, .09), transparent 32%),
        linear-gradient(135deg, #071015, #020405);
}

.video-stage__idle ion-icon {
    color: var(--app-cyan);
    font-size: 64px;
    filter: drop-shadow(0 0 18px rgba(5, 199, 242, .3));
}

.video-stage__idle h3 { margin: 14px 0 6px; }
.video-stage__idle p { max-width: 500px; margin: 0; color: var(--app-muted); font-size: 12px; }

.player-spinner {
    width: 54px;
    height: 54px;
    border: 3px solid rgba(5, 199, 242, .16);
    border-top-color: var(--app-cyan);
    border-radius: 50%;
    box-shadow: 0 0 28px rgba(5, 199, 242, .16);
    animation: playerSpin .8s linear infinite;
}

@keyframes playerSpin {
    to { transform: rotate(360deg); }
}

.text-action {
    min-height: 36px;
    margin-top: 16px;
    padding: 0 14px;
    background: rgba(5, 199, 242, .1);
    color: var(--app-cyan);
}

.player-controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 35px 14px 13px;
    background: linear-gradient(transparent, rgba(1, 3, 4, .96));
}

.player-controls button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.player-controls button:hover { background: rgba(255, 255, 255, .1); }
.player-controls ion-icon { font-size: 20px; }

.player-time {
    min-width: 90px;
    color: #c2cdd2;
    font-size: 10px;
}

.player-seek {
    min-width: 70px;
    flex: 1;
    accent-color: var(--app-cyan);
}

.player-controls select {
    height: 30px;
    border: 1px solid var(--app-line);
    border-radius: 6px;
    background: #111b21;
    color: #e8eef1;
    font-size: 10px;
}

.player-assurance {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    padding: 13px 20px;
    border-top: 1px solid var(--app-line);
    color: #78909a;
    font-size: 10px;
}

.player-assurance span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-assurance ion-icon { color: #4faac0; font-size: 14px; }

.player-page-heading { padding-bottom: 18px; }

.login-page {
    display: grid;
    width: min(calc(100% - 64px), 1120px);
    min-height: calc(100vh - 72px);
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 70px;
    margin: 0 auto;
    padding: 70px 0;
}

.login-visual {
    position: relative;
    isolation: isolate;
    padding: 30px;
}

.login-visual > .brand {
    display: none;
}

.login-visual__mark {
    position: absolute;
    top: 50%;
    left: 45%;
    z-index: -1;
    width: min(38vw, 430px);
    opacity: .1;
    filter: blur(.2px) drop-shadow(0 0 35px rgba(5, 199, 242, .35));
    transform: translate(-50%, -50%) rotate(-6deg);
}

.login-visual__mark img {
    display: block;
    width: 100%;
}

.login-visual h1 {
    margin: 11px 0 20px;
    font-size: clamp(56px, 6vw, 86px);
    letter-spacing: -.065em;
    line-height: .9;
}

.login-visual > p {
    max-width: 510px;
    color: #99aab3;
    font-size: 15px;
    line-height: 1.7;
}

.login-assurances {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}

.login-assurances span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: rgba(14, 25, 31, .58);
    color: #8fa1aa;
    font-size: 10px;
}

.login-assurances ion-icon {
    color: var(--app-cyan);
}

.login-form {
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid rgba(142, 180, 194, .2);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(18, 31, 38, .92), rgba(9, 16, 20, .95));
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.login-form__heading {
    margin-bottom: 28px;
}

.login-form__heading h2 {
    margin: 4px 0 8px;
    font-size: 30px;
    letter-spacing: -.04em;
}

.login-form__heading p {
    margin: 0;
    color: #81929b;
    font-size: 11px;
    line-height: 1.6;
}

.login-form > label {
    display: block;
    margin: 16px 0 7px;
    color: #aebbc1;
    font-size: 11px;
    font-weight: 650;
}

.field-shell {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--app-line);
    border-radius: 9px;
    background: #0b1419;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.field-shell:focus-within {
    border-color: rgba(5, 199, 242, .6);
    box-shadow: 0 0 0 3px rgba(5, 199, 242, .07);
}

.field-shell > ion-icon {
    flex: 0 0 auto;
    color: #5e7985;
}

.field-shell input {
    min-width: 0;
    height: 46px;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f4f8fa;
    font-size: 13px;
}

.field-shell button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7e919a;
    cursor: pointer;
}

.local-storage-warning {
    display: flex;
    gap: 9px;
    margin: 20px 0;
    padding: 11px;
    border: 1px solid rgba(240, 180, 64, .17);
    border-radius: 9px;
    background: rgba(240, 180, 64, .055);
}

.local-storage-warning ion-icon {
    flex: 0 0 auto;
    color: #e6ad42;
    font-size: 17px;
}

.local-storage-warning p {
    margin: 0;
    color: #a99b7e;
    font-size: 9px;
    line-height: 1.55;
}

.login-status {
    margin: 0 0 12px;
    color: #39d98a;
    font-size: 11px;
}

.login-status.is-error {
    color: var(--app-danger);
}

.login-save {
    width: 100%;
    border-radius: 9px;
}

.clear-login {
    width: 100%;
    margin-top: 10px;
    background: rgba(255, 108, 119, .07);
    color: #ff8891;
}

#blazor-error-ui {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    display: none;
    padding: 12px 16px;
    border: 1px solid rgba(255, 108, 119, .4);
    border-radius: 9px;
    background: #271316;
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}

#blazor-error-ui .dismiss { margin-left: 12px; cursor: pointer; }

.loading-progress {
    position: absolute;
    top: calc(50% - 3.25rem);
    left: calc(50% - 3.25rem);
    width: 6.5rem;
    height: 6.5rem;
}

.loading-progress circle {
    fill: none;
    stroke: #142127;
    stroke-width: .42rem;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.loading-progress circle:last-child {
    stroke: var(--app-cyan);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%)), 500%;
    transition: stroke-dasharray .05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    top: calc(50% + 3.5rem);
    left: 0;
    width: 100%;
    color: var(--app-muted);
    text-align: center;
}

.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading"); }

@media (max-width: 1100px) {
    .app-header {
        grid-template-columns: 1fr auto 1fr;
    }
    .desktop-nav { gap: 22px; }
    .search-trigger { width: 44px; justify-content: center; padding: 0; }
    .search-trigger span { display: none; }
    .browse-results .media-grid,
    .library-section .media-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .search-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .app-header {
        min-height: 76px;
        grid-template-columns: 1fr auto;
        padding: max(8px, env(safe-area-inset-top)) 18px 6px;
        border-bottom: 0;
        background: linear-gradient(180deg, rgba(4, 9, 12, .98), rgba(4, 9, 12, .82));
    }

    .brand {
        font-size: 22px;
        text-transform: none;
    }

    .brand img { display: none; }
    .brand span { letter-spacing: -.06em; }
    .desktop-nav { display: none; }
    .header-actions .icon-button:last-child { display: none; }
    .search-trigger {
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        color: #fff;
    }
    .search-trigger ion-icon { font-size: 28px; }

    .mobile-tabs {
        position: relative;
        z-index: 90;
        display: grid;
        min-height: calc(66px + env(safe-area-inset-bottom));
        grid-template-columns: repeat(5, 1fr);
        align-items: start;
        padding: 7px 4px env(safe-area-inset-bottom);
        border-top: 1px solid rgba(147, 178, 191, .2);
        background: rgba(7, 13, 17, .96);
        backdrop-filter: blur(20px);
    }

    .mobile-tabs a,
    .mobile-tabs button {
        display: flex;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 3px 0;
        border: 0;
        background: transparent;
        color: #778791;
        font-size: 9px;
    }

    .mobile-tabs ion-icon { font-size: 21px; }
    .mobile-tabs .active { color: var(--app-cyan); }
    .mobile-tabs button { margin-top: -22px; }
    .mobile-tabs .mobile-search {
        display: grid;
        width: 48px;
        height: 48px;
        place-items: center;
        border: 4px solid var(--app-bg);
        border-radius: 50%;
        background: linear-gradient(140deg, #08cef6, #0089ae);
        box-shadow: 0 5px 24px rgba(0, 184, 224, .3);
        color: #fff;
    }

    .hero {
        min-height: 505px;
        align-items: flex-end;
        margin: 8px 14px 0;
        border: 1px solid rgba(163, 196, 209, .18);
        border-radius: 22px;
        background-position: 56% 18%;
    }

    .hero::before {
        background:
            linear-gradient(0deg, rgba(4, 10, 14, .98) 0%, rgba(4, 10, 14, .8) 34%, rgba(4, 10, 14, .1) 72%),
            linear-gradient(90deg, rgba(4, 10, 14, .45), transparent 70%);
    }

    .hero::after { height: 50%; }
    .hero__content {
        width: 100%;
        margin: 0;
        padding: 28px 22px 33px;
    }

    .hero__kicker { display: none; }
    .hero h1 {
        margin: 0 0 10px;
        font-size: clamp(46px, 13vw, 64px);
    }
    .hero__meta { font-size: 13px; }
    .hero__content > p:not(.external-note) {
        display: -webkit-box;
        overflow: hidden;
        margin: 14px 0 18px;
        font-size: 13px;
        line-height: 1.55;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .hero__actions { flex-wrap: nowrap; }
    .hero__actions .primary-action,
    .hero__actions .secondary-action {
        min-height: 46px;
        padding: 0 15px;
        font-size: 12px;
    }
    .external-note { display: none; }

    .home-catalog,
    .detail-body,
    .browse-results,
    .library-section {
        width: 100%;
        margin: 0;
        padding: 17px 0 40px 14px;
    }

    .catalog-section { margin-bottom: 25px; }
    .section-heading { margin-right: 14px; margin-bottom: 10px; }
    .section-heading h2 { font-size: 18px; }
    .section-heading .eyebrow { display: none; }
    .section-heading > a { color: var(--app-cyan); font-size: 11px; }

    .media-rail {
        grid-auto-columns: 47vw;
        gap: 10px;
        padding-right: 14px;
    }
    .media-rail:has(.media-card--wide) { grid-auto-columns: 76vw; }
    .media-card__art { aspect-ratio: 2 / 3; border-radius: 10px; }
    .media-card--wide .media-card__art { aspect-ratio: 1.8; }
    .media-card__copy { padding-top: 7px; }
    .media-card__copy h3 { font-size: 12px; }
    .media-card__play { opacity: 1; transform: translate(-50%, -50%) scale(.85); }
    .media-card__rank { font-size: 54px; }

    .search-overlay__top { padding: max(12px, env(safe-area-inset-top)) 12px 10px; }
    .search-overlay__body { width: calc(100% - 28px); padding-top: 20px; }
    .search-grid,
    .media-grid,
    .browse-results .media-grid,
    .library-section .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 10px;
    }
    .search-prompt,
    .empty-state { min-height: 55vh; padding-right: 14px; }

    .browse-hero,
    .page-heading {
        width: calc(100% - 28px);
        min-height: auto;
        padding: 48px 0 26px;
    }
    .browse-hero h1,
    .page-heading h1 { font-size: 44px; }
    .filter-bar {
        width: calc(100% - 28px);
        flex-wrap: wrap;
        margin-bottom: 22px;
        padding: 8px;
    }
    .filter-bar label { min-width: calc(50% - 6px); flex: 1; }
    .filter-bar label:last-child { flex-basis: 100%; }
    .browse-results,
    .library-section { padding-right: 14px; }

    .detail-hero {
        min-height: 650px;
        background-position: 55% top;
    }
    .detail-hero__shade {
        background: linear-gradient(0deg, var(--app-bg) 3%, rgba(5, 10, 14, .9) 37%, rgba(5, 10, 14, .1) 78%);
    }
    .detail-hero__content {
        width: calc(100% - 36px);
        min-height: 650px;
        align-items: flex-end;
        gap: 0;
        padding: 270px 0 44px;
    }
    .detail-poster { display: none; }
    .detail-copy h1 { font-size: 50px; }
    .tagline { display: none; }
    .detail-overview {
        display: -webkit-box;
        overflow: hidden;
        margin: 16px 0 19px;
        font-size: 13px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
    .detail-actions .primary-action,
    .detail-actions .secondary-action { font-size: 11px; padding: 0 12px; }
    .detail-body { margin-top: 0; padding-top: 5px; padding-right: 14px; }

    .episode-card {
        grid-template-columns: 112px 1fr;
        gap: 10px;
    }
    .episode-number { display: none; }
    .episode-card p { -webkit-line-clamp: 1; }
    .cast-rail { grid-auto-columns: 92px; }

    .list-tabs {
        width: calc(100% - 28px);
        overflow-x: auto;
        margin-bottom: 20px;
    }
    .list-tabs button { flex: 0 0 auto; padding: 12px 10px; font-size: 11px; }

    .player-surface { padding: 0; align-items: end; }
    .player-surface:not(.player-surface--page) .player-panel {
        border-radius: 18px 18px 0 0;
    }
    .player-surface--page { min-height: 560px; padding: 0 14px 40px; }
    .player-panel { border-radius: 14px; }
    .source-entry > div { flex-direction: column; }
    .video-stage { min-height: 240px; }
    .video-stage__idle { min-height: 270px; padding: 25px; }
    .player-controls { gap: 3px; padding-right: 6px; padding-left: 6px; }
    .player-controls button { width: 30px; }
    .player-time { min-width: 64px; font-size: 8px; }
    .player-controls select { display: none; }
    .player-assurance { gap: 10px; font-size: 8px; }

    .login-page {
        display: block;
        width: calc(100% - 28px);
        min-height: auto;
        padding: 28px 0 45px;
    }
    .login-visual {
        padding: 15px 4px 30px;
        text-align: center;
    }
    .login-visual h1 { margin-top: 8px; font-size: 48px; }
    .login-visual > p { margin-right: auto; margin-left: auto; font-size: 12px; }
    .login-visual__mark { left: 50%; width: 72vw; opacity: .06; }
    .login-assurances { justify-content: center; }
    .login-form { padding: 26px 18px; border-radius: 15px; }
}

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