/* Cinedex: small layer on top of Bootstrap 5.3 (colour modes use data-bs-theme) */
:root { --cx-accent: #f2a900; --bs-body-font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif; }
[data-bs-theme="dark"] { --bs-body-bg: #0c111b; --bs-body-color: #f1f3f7; --bs-secondary-color: #a6afc0; --bs-border-color: #262f44; --bs-tertiary-bg: #192133; --cx-card: #192133; --cx-top: #0a0e17; }
[data-bs-theme="light"] { --bs-body-bg: #eef1f4; --cx-card: #ffffff; --cx-top: #14213d; }
a { color: var(--cx-accent); }
.text-warning, .btn-warning { --bs-warning-rgb: 242, 169, 0; }
:focus-visible { outline: 3px solid var(--cx-accent); outline-offset: 2px; }

[x-cloak] { display: none !important; }

/* header */
.cx-top { height: 56px; background: var(--cx-top); transition: background .25s; }
.cx-top .navbar { height: 56px; padding-top: 0; padding-bottom: 0; }
.cx-top .nav-link { color: #fff; font-weight: 600; font-size: .9rem; border-radius: .375rem; }
.cx-top .nav-link:hover, .cx-top .nav-link.active { background: rgba(255,255,255,.14); color: #fff; }
.cx-top .cx-search input::placeholder { color: #d0d0d0; }
.cx-top .cx-search { min-width: 0; }
@media (min-width: 768px) { .cx-top .cx-search input { width: 11rem; } }
.cx-main { padding-top: 56px; }
.homepg:not(.nohero) .cx-main { padding-top: 0; }
.homepg .cx-top:not(.solid) { background: linear-gradient(rgba(10,14,23,.92), transparent); }
.cx-sugg { min-width: 17rem; max-width: 90vw; z-index: 1040; }
.cx-sugg img { width: 34px; height: 50px; object-fit: cover; border-radius: 3px; background: #222; }

/* hero */
.cx-hero { position: relative; height: clamp(380px, 62vh, 520px); background: #000; overflow: hidden; }
@media (min-width: 768px) { .cx-hero { height: clamp(420px, 68vh, 680px); } }
.cx-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.cx-hero-shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bs-body-bg) 0%, rgba(12,17,27,.75) 38%, rgba(12,17,27,.1) 80%); }
.cx-hero-info { position: absolute; left: 1rem; right: 1rem; bottom: 2.75rem; }
@media (min-width: 768px) {
  .cx-hero-shade { background: linear-gradient(90deg, rgba(12,17,27,.92) 0%, rgba(12,17,27,.5) 40%, transparent 75%), linear-gradient(0deg, var(--bs-body-bg) 0%, transparent 38%); }
  .cx-hero-info { left: 3rem; right: auto; bottom: 14%; max-width: 36rem; }
}
.cx-hero-syn, .cx-clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.cx-hero-syn { -webkit-line-clamp: 2; max-width: 40rem; } @media (min-width: 768px) { .cx-hero-syn { -webkit-line-clamp: 3; } }
.cx-clamp3 { -webkit-line-clamp: 3; }
.cx-hero .carousel-indicators { margin-bottom: .5rem; }
.cx-hero [data-wl][aria-pressed="true"] { background: rgba(242,169,0,.25); border-color: var(--cx-accent); }
@media (min-width: 768px) { .cx-hero .carousel-indicators { justify-content: flex-end; margin-right: 1.5rem; margin-left: 0; } }

/* chips, rows, rails */
.cx-chips { scrollbar-width: none; } .cx-chips::-webkit-scrollbar { display: none; }
.cx-chips .nav-link { color: var(--bs-body-color); background: var(--cx-card); }
.cx-chips .nav-link:hover { border-color: var(--cx-accent) !important; color: var(--cx-accent); }
.cx-hl:hover { color: var(--cx-accent) !important; }
.cx-track { display: flex; gap: .65rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.cx-track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .cx-track { gap: 1rem; scroll-snap-type: x proximity; } }
.cx-item { flex: 0 0 auto; scroll-snap-align: start; }
.cx-item-wide { width: 62vw; } @media (min-width: 576px) { .cx-item-wide { width: 260px; } } @media (min-width: 992px) { .cx-item-wide { width: 300px; } }
.cx-item-poster { width: 128px; } @media (min-width: 576px) { .cx-item-poster { width: 170px; } }
.cx-item-top10 { width: 190px; position: relative; display: flex; align-items: flex-end; } @media (min-width: 576px) { .cx-item-top10 { width: 230px; } }
.cx-item-top10 .cx-card { width: 120px; margin-left: auto; height: auto !important; } @media (min-width: 576px) { .cx-item-top10 .cx-card { width: 150px; } }
.cx-rank { position: absolute; bottom: 1.75rem; left: 0; font-size: 7.5rem; font-weight: 800; line-height: .75; letter-spacing: -.08em; color: var(--bs-body-bg); -webkit-text-stroke: 3px rgba(255,255,255,.55); pointer-events: none; }
@media (min-width: 576px) { .cx-rank { font-size: 9.5rem; } }
.cx-rail > .btn { position: absolute; top: calc(50% - 42px); z-index: 5; width: 2.5rem; height: 3.5rem; padding: 0; font-size: 2rem; line-height: 1; opacity: .85; }
.cx-prev { left: 0; } .cx-next { right: 0; }
@media (max-width: 767.98px) { .cx-rail > .btn { display: none !important; } }

/* cards with hover preview */
.cx-r23 { --bs-aspect-ratio: 150%; }
.cx-card { --bs-card-bg: var(--cx-card); }
.cx-card:hover .cx-title { color: var(--cx-accent); }
.cx-pv { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: .6rem; background: linear-gradient(0deg, rgba(8,12,20,.96) 8%, rgba(8,12,20,.55) 70%, rgba(8,12,20,.2)); color: #fff; opacity: 0; transition: opacity .2s; pointer-events: none; }
@media (hover: hover) { .cx-card { transition: transform .2s; } .cx-card:hover { transform: translateY(-3px); } .cx-card:hover .cx-pv, .cx-card a:focus-visible .cx-pv { opacity: 1; } }
.cx-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.3); } .cx-prog i { display: block; height: 100%; background: var(--cx-accent); }
.cx-rm { position: absolute; top: .4rem; right: .4rem; z-index: 3; width: 2rem; height: 2rem; padding: 0; border-radius: 50%; line-height: 1; font-size: 1.1rem; }

/* title page */
.cx-wl { position: sticky; top: 56px; z-index: 20; } @media (min-width: 992px) { .cx-wl { z-index: 1; } }
.cx-wl .tabs button { background: #3d3d3d; color: #fff; border: 1px solid #555; border-radius: .375rem; padding: .25rem .75rem; font-size: .875rem; font-weight: 600; }
.cx-wl .tabs button[aria-pressed="true"] { background: #fff; color: #111; }
.cx-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: .6rem; }
.cx-eps .btn[aria-current="true"] { background: #fff; color: #111; }
.pfail { display: flex; align-items: center; justify-content: center; padding: 1.5rem; text-align: center; color: #ffb4ab; background: #000; }
.stage .video-js, .clappr-box, .clappr-box [data-player] { width: 100% !important; height: 100% !important; }
#fav[aria-pressed="true"] { color: var(--cx-accent) !important; } #fav[aria-pressed="true"] path { fill: currentColor; }

/* mobile bar */
.cx-tabbar { background: var(--cx-top); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 1030; }
@media (max-width: 767.98px) { body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); } }
.cx-foot { border-color: var(--bs-border-color) !important; }

/* rich text from the editor (footer and notices) */
.rich { overflow-wrap: anywhere; } .rich p { margin: .5em 0; } .rich img { max-width: 100%; height: auto; border-radius: 6px; }
.rich blockquote { border-left: 3px solid var(--cx-accent); padding-left: .8em; margin: .6em 0; color: var(--bs-secondary-color); }
.rich a { text-decoration: underline; } .rich hr { margin: 1em 0; }
.nosel, .nosel body { -webkit-user-select: none; user-select: none; } .nosel input, .nosel textarea, .nosel select { -webkit-user-select: text; user-select: text; } .nosel img { -webkit-user-drag: none; }
@media (prefers-reduced-motion: reduce) { .cx-card, .cx-pv, .cx-track { transition: none; scroll-behavior: auto; } }

/* player: Plyr's stylesheet sets .plyr { position: relative }, which beat Bootstrap's ".ratio > *" and pushed the video below the 16:9 box */
.player .stage > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.stage .plyr, .stage .plyr__video-wrapper { height: 100%; }
.stage .plyr video { object-fit: contain; }
.cx-logo { width: auto; max-width: 60vw; object-fit: contain; }

/* Alpine-enhanced movie cards and responsive filters */
.cx-card { position: relative; }
.cx-card { position: relative; }
.cx-card-wl { z-index: 5; min-width: 2.25rem; opacity: .94; backdrop-filter: blur(8px); }
.cx-card-wl[aria-pressed="true"] { color: var(--bs-warning); border-color: var(--bs-warning); }
[x-cloak] { display: none !important; }
@media (max-width: 767.98px) { .cx-filter-panel #cxFilters { padding-bottom: .75rem; } .cx-card-wl { min-width: 2rem; min-height: 2rem; padding: .15rem .55rem; } }
/* Reactive watchlist, live genre filters and mobile navigation refinements */
.cx-card-wl, .cx-rm { transition: transform .18s ease, background-color .18s ease, color .18s ease; }
.cx-card-wl:active, .cx-rm:active { transform: scale(.92); }
#grid .col { transition: opacity .18s ease, transform .18s ease; }
.cx-filter-panel { position: relative; z-index: 2; }
.cx-filter-panel #cxFilters { background: var(--cx-card); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: .85rem; margin-bottom: .8rem; }
.cx-tabbar { backdrop-filter: blur(16px); box-shadow: 0 -8px 24px rgba(0,0,0,.18); }
.cx-tabbar a, .cx-tabbar button { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: color .2s, transform .2s; }
.cx-tabbar a[aria-current="page"] { color: var(--bs-warning) !important; }
.cx-tabbar a:active { transform: scale(.94); }
.cx-tabbar svg { transition: transform .2s; }
.cx-tabbar a[aria-current="page"] svg { transform: translateY(-1px); }
.cx-rm { position:absolute; top:.5rem; right:.5rem; z-index:6; border-radius:50%; width:2.2rem; height:2.2rem; }
@media (max-width:767.98px) { .cx-filter-panel #cxFilters { border-radius: .85rem; } .cx-tabbar { border-color: rgba(255,255,255,.12) !important; } }
@media (prefers-reduced-motion: reduce) { .cx-card-wl, .cx-rm, #grid .col, .cx-tabbar a, .cx-tabbar svg { transition:none !important; } }

/* Card thumbnails: one aspect-ratio box, no extra in-flow spacer.
   Keep Bootstrap's ratio class for existing watchlist/progress selectors. */
.cx-card { overflow: hidden; }
.cx-card > a { display: block; min-width: 0; }
.cx-card .cx-card-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.cx-card .cx-card-media.cx-r23 { aspect-ratio: 2 / 3; }
.cx-card .cx-card-media::before { display: none; }
.cx-card .cx-card-media > div { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-card .cx-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Cinematic UI 2.0 — scoped to the existing public frontend. */
:root { --cx-accent:#f5b942; --cx-gold:#f5b942; --cx-radius:12px; }
[data-bs-theme="dark"] { --bs-body-bg:#090d16; --bs-body-color:#f8fafc; --bs-secondary-color:#94a3b8; --bs-border-color:#273449; --bs-tertiary-bg:#192133; --cx-card:#192133; }
[data-bs-theme="light"] { --cx-accent:#855400; }
.cx-top.solid { background:rgba(10,14,23,.92); backdrop-filter:blur(18px); box-shadow:0 4px 24px #0003; }
.cx-top .nav-link { position:relative; }
.cx-top .nav-link.active::after { content:''; position:absolute; left:25%; right:25%; bottom:1px; height:2px; background:var(--cx-gold); border-radius:2px; }
.cx-top .navbar-brand { min-width:0; max-width:48%; }
.cx-top .navbar-brand span { overflow:hidden; text-overflow:ellipsis; }
.cx-top .cx-search input { border-radius:24px; padding:.42rem 2rem .42rem .85rem; color:white; background:#ffffff0d!important; }
.cx-top .cx-search input:focus { box-shadow:0 0 0 2px #f5b94266; }
.cx-search input::-webkit-search-cancel-button { appearance:none; }
.cx-sugg { border-radius:14px; overflow:auto; max-height:min(60vh,420px); background:var(--cx-card); border:1px solid var(--bs-border-color); padding:5px; }
.cx-sugg .list-group-item { border:0; border-radius:8px; }
.cx-sugg .list-group-item.cx-search-active { background:var(--bs-tertiary-bg); outline:2px solid var(--cx-accent); outline-offset:-2px; }
.cx-sugg img { width:40px; height:56px; flex-shrink:0; }
.cx-search-note { padding:.6rem .8rem; color:var(--bs-secondary-color); font-size:.8rem; list-style:none; }
.cx-search-recent { display:flex; justify-content:space-between; align-items:center; }
.cx-search-recent button { color:var(--bs-body-color); }
.cx-hero-info { z-index:2; text-shadow:0 2px 16px #0009; }
.cx-hero-info h1 { font-size:clamp(1.8rem,4vw,3.8rem); line-height:1.06; letter-spacing:-.035em; }
.cx-featured { color:var(--cx-gold); font-size:.72rem; letter-spacing:.18em; text-transform:uppercase; font-weight:800; display:block; margin-bottom:.5rem; }
.cx-hero-shade { background:linear-gradient(0deg,#090d16 0%,#090d16c9 36%,#090d1620 85%); }
@media(min-width:768px){.cx-hero-shade { background:linear-gradient(90deg,#090d16f5 0%,#090d1690 42%,transparent 80%),linear-gradient(0deg,#090d16 0%,transparent 44%); }}
.cx-hero .btn { border-radius:10px; text-shadow:none; padding-block:.65rem; }
.cx-hero .btn-warning { background:var(--cx-gold); border-color:var(--cx-gold); color:#101522; }
.cx-hero .carousel-indicators [data-bs-target] { width:26px; height:4px; border:0; border-radius:8px; background:#fff6; opacity:1; position:relative; margin:0 4px; overflow:hidden; }
.cx-hero .carousel-indicators .active { background:var(--cx-gold); }
.cx-hero .carousel-indicators .active.cx-timed { background:#fff5; }
.cx-hero .carousel-indicators .cx-timed::after { content:''; position:absolute; inset:0; background:var(--cx-gold); transform:scaleX(var(--cx-slide-progress,0)); transform-origin:left; }
.cx-hero-toggle { position:absolute; bottom:.8rem; right:1rem; z-index:4; border:1px solid #fff6; background:#0a0e17bd; color:white; border-radius:50%; width:34px; height:34px; font-size:.8rem; }
.cx-hero:has(.cx-hero-toggle) .carousel-indicators { margin-right:4rem; justify-content:flex-end; bottom:12px; }
.cx-chips .nav-link { padding-inline:1rem; }
.cx-row h2 { font-size:clamp(1.1rem,1.6vw,1.5rem); font-weight:800; letter-spacing:-.02em; }
.cx-hl { display:flex; justify-content:space-between; align-items:center; gap:.6rem; }
.cx-view-all { color:var(--cx-accent); font-size:.78rem; font-weight:600; white-space:nowrap; }
.cx-track { padding:6px 3px 12px; }
.cx-track.cx-dragging { cursor:grabbing; scroll-snap-type:none; scroll-behavior:auto; user-select:none; }
.cx-rail > .btn { border-radius:10px; background:#090d16de; border:1px solid #ffffff2b; box-shadow:0 4px 20px #0005; }
.cx-card { border-radius:var(--cx-radius); box-shadow:0 0 0 1px #94a3b81a,0 5px 16px #0002!important; }
.cx-card .card-body { padding:.65rem .75rem!important; }
.cx-card .cx-title { font-size:.94rem; }
.cx-card .cx-card-media { background:#202936!important; }
.cx-card .cx-pv { padding:.75rem; padding-top:2.7rem; overflow:hidden; font-size:.84rem; }
.cx-card .cx-pv .cx-clamp3 { -webkit-line-clamp:2; }
.cx-card .cx-pv .fw-bold:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cx-card .cx-play-icon { display:inline-grid; place-items:center; background:var(--cx-gold); color:#111827; border-radius:50%; width:25px; height:25px; margin-right:3px; font-size:.7rem; }
.cx-card .cx-card-media .badge { z-index:2; pointer-events:none; }
.cx-card:focus-within .cx-pv { opacity:1; }
.cx-card-wl { background:#090d16cc; color:#fff; border:1px solid #fff4; width:36px; height:36px; padding:0!important; font-size:1.05rem; }
.cx-card-wl[aria-pressed="true"] { background:var(--cx-gold); color:#111827; border-color:var(--cx-gold); }
@media(hover:hover){ .cx-card:hover,.cx-card:focus-within { box-shadow:0 0 0 1px var(--cx-accent),0 9px 24px #0005!important; } .cx-card:hover .cx-card-media .badge { opacity:0; } }
.cx-resume { position:absolute; inset:0; display:grid; place-items:center; color:white; font-weight:700; background:#0006; opacity:0; }
.cx-card:hover .cx-resume,.cx-card:focus-within .cx-resume { opacity:1; }
.cx-prog { height:5px; z-index:3; }
.cx-cw-remove { position:absolute; right:.5rem; top:.5rem; z-index:6; width:32px; height:32px; border-radius:50%; padding:0; background:#090d16d9; color:white; }
.cx-cw-meta { color:var(--bs-secondary-color); font-size:.72rem; display:block; margin-top:3px; }
.cx-loading-media { background:linear-gradient(105deg,#202936 20%,#39465a 45%,#202936 70%); background-size:220% 100%; }
.cx-loading-media img { opacity:0; }
.cx-loading-status { margin:1rem; display:flex; justify-content:center; gap:.45rem; align-items:center; color:var(--bs-secondary-color); font-size:.8rem; }
.cx-loading-status::before { content:''; width:1rem; height:1rem; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; }
.cx-toast-stack { position:fixed; bottom:1.25rem; right:1.25rem; z-index:1090; max-width:min(340px,calc(100vw - 2rem)); pointer-events:none; }
.cx-ui-toast { background:var(--cx-card); color:var(--bs-body-color); border:1px solid var(--bs-border-color); border-left:3px solid var(--cx-accent); border-radius:10px; box-shadow:0 6px 24px #0004; padding:.8rem 1rem; margin-top:.5rem; font-size:.9rem; }
.cx-filter-panel #cxFilters { margin-inline:0; }
.cx-filter-panel .form-select { border-radius:8px; }
[data-filter-toggle][hidden], [data-clear-search][hidden], #cxFilters[hidden] { display:none!important; }
.watchpg .cx-wl { border-radius:0 0 16px 16px; box-shadow:0 15px 55px #f5b94219; }
.watchpg .player .stage { isolation:isolate; }
.watchpg .player .ptitle { font-weight:700; letter-spacing:.02em; }
.cx-wl .tabs button,.cx-eps .btn { border-radius:8px; min-height:36px; }
.cx-wl .tabs button[aria-pressed="true"],.cx-eps .btn[aria-current="true"] { background:var(--cx-gold); border-color:var(--cx-gold); color:#111827; font-weight:800; }
#descAcc .accordion-item { background:var(--cx-card); }
.cx-foot { line-height:1.7; }
@media(max-width:767.98px){
 .cx-top .navbar-brand { font-size:1.25rem!important; }
 .cx-logo { max-width:35vw; }
 .cx-tabbar { left:10px; right:10px; bottom:calc(8px + env(safe-area-inset-bottom)); border:1px solid #ffffff24!important; border-radius:18px; background:#101827f2; padding:5px; box-shadow:0 10px 32px #0007; }
 .cx-tabbar a[aria-current="page"] { background:#f5b94219; border-radius:12px; }
 .cx-tabbar .text-secondary { color:#bac5d6!important; }
 body { padding-bottom:calc(86px + env(safe-area-inset-bottom)); }
 .cx-toast-stack { bottom:calc(90px + env(safe-area-inset-bottom)); right:10px; }
 .cx-card .cx-pv { font-size:.7rem; }
 .cx-hero-info { bottom:3.1rem; }
 .cx-hero .btn { padding-inline:1rem!important; }
 .cx-cw-remove { width:36px; height:36px; }
}
@media(prefers-reduced-motion:reduce){ .cx-top,.cx-card,.cx-pv,.cx-resume,.cx-tabbar *,.cx-hero .carousel-item { transition:none!important; } .cx-track { scroll-behavior:auto!important; } }
[data-bs-theme="light"] .cx-hero-shade { background:linear-gradient(0deg,#090d16 0%,#090d16c9 36%,#090d1620 85%); }
@media(min-width:768px){[data-bs-theme="light"] .cx-hero-shade {background:linear-gradient(90deg,#090d16f5 0%,#090d1690 42%,transparent 80%),linear-gradient(0deg,#090d16 0%,transparent 44%);}}
html:not([data-motion]) .cx-track {scroll-behavior:auto;}
html:not([data-motion]) .cx-card,html:not([data-motion]) .cx-pv,html:not([data-motion]) .cx-tabbar *,html:not([data-motion]) .cx-card img {transition:none;}
html:not([data-motion]) .cx-card:hover {transform:none;}

/* 4.0.6: compact hover previews; preserve normal title and card geometry. */
.cx-card:has(.cx-pv) .cx-pv .cx-clamp3{display:none!important}
.cx-card:has(.cx-pv):focus-within > a > .card-body .cx-title{opacity:0}
@media (hover:hover){.cx-card:has(.cx-pv):hover > a > .card-body .cx-title{opacity:0}}
