/* =====================================================================
   PhimSubViet design system (dark). Classes are prefixed "ps-" so they never
   collide with the legacy FlixGo stylesheet while pages are migrated.
   ===================================================================== */
:root {
  --ps-bg: #0a0a10;
  --ps-surface: #14151d;
  --ps-surface-2: #1d1f2a;
  --ps-border: #2a2d3b;
  --ps-glass: rgba(18, 19, 27, .78);
  --ps-text: #f4f4f8;
  --ps-soft: #cdd0da;
  --ps-muted: #a2a7b8;
  --ps-accent: #ff4f9a;
  --ps-accent-2: #7b6cff;
  --ps-accent-hover: #ff7ab3;
  --ps-on-accent: #17060f;
  --ps-star: #ffc94d;
  --ps-shadow: 0 18px 40px -18px rgba(0, 0, 0, .75);
  --ps-radius: 14px;
  --ps-radius-lg: 22px;
  --ps-page: 1380px;
  --ps-header-h: 68px;
  --ps-font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

/* ---------- base (overrides legacy body/link styles) ---------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--ps-header-h) + 12px); }
body.ps-body { margin: 0; min-height: 100vh; background: var(--ps-bg); color: var(--ps-text); font: 400 16px/1.55 var(--ps-font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.ps-body *, .ps-body *::before, .ps-body *::after { box-sizing: border-box; }
.ps-body a { color: var(--ps-accent); text-decoration: none; transition: color .15s ease; }
.ps-body a:hover { color: var(--ps-accent-hover); }
.ps-body h1, .ps-body h2, .ps-body h3, .ps-body h4 { margin: 0; color: var(--ps-text); font-family: var(--ps-font); letter-spacing: -.02em; line-height: 1.2; }
.ps-body img { max-width: 100%; }
/* keyboard focus ring; it follows each element's own corners (never change border-radius here) */
.ps-body :focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 3px; }
/* text fields show focus on their own border + a soft ring of the same shape instead of an offset outline */
.ps-body input:focus-visible, .ps-body textarea:focus-visible, .ps-body select:focus-visible { outline: none; }
.ps-body ::selection { background: var(--ps-accent); color: var(--ps-on-accent); }

/* minimal reboot (the legacy Bootstrap/FlixGo stylesheets are no longer loaded) */
.ps-body p, .ps-body ul, .ps-body ol, .ps-body dl, .ps-body figure { margin-top: 0; }
.ps-body img, .ps-body svg, .ps-body video, .ps-body iframe { vertical-align: middle; }
.ps-body button, .ps-body input, .ps-body select, .ps-body textarea { font: inherit; color: inherit; }
.ps-body button { cursor: pointer; }
.ps-body button:disabled { cursor: default; }
.ps-body [hidden] { display: none !important; }
.ps-body table { border-collapse: collapse; }
.ps-body hr { border: 0; border-top: 1px solid var(--ps-border); }
/* Bootstrap JS (tabs) and app scripts toggle these classes */
.ps-body .tab-content > .tab-pane { display: none; }
.ps-body .tab-content > .active { display: block; }
.ps-body .fade { transition: opacity .15s linear; }
.ps-body .fade:not(.show) { opacity: 0; }
.ps-body .d-none { display: none !important; }
@media (prefers-reduced-motion: reduce) { .ps-body .fade { transition: none; } }

/* cinematic background: one fixed layer + grain, no images, no animation */
body.ps-body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 6% -8%, rgba(255, 79, 154, .15), transparent 70%),
    radial-gradient(820px 700px at 104% 18%, rgba(123, 108, 255, .13), transparent 70%),
    radial-gradient(760px 520px at 48% 112%, rgba(255, 79, 154, .10), transparent 70%),
    var(--ps-bg);
}
body.ps-body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ps-container { width: 100%; max-width: var(--ps-page); margin: 0 auto; padding: 0 28px; }
.ps-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ps-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ps-accent); color: var(--ps-on-accent) !important; font-weight: 600; }
.ps-skip:focus { top: 12px; }
.ps-muted { color: var(--ps-muted); }
.ps-main { padding: 24px 0 44px; min-height: 60vh; }
.ps-stack { display: flex; flex-direction: column; gap: 52px; }
.ps-lazy { content-visibility: auto; contain-intrinsic-size: auto 480px; }

/* ---------- buttons / chips ---------- */
.ps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 12px; border: 0; font: 600 15px/1 var(--ps-font); white-space: nowrap; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease; text-decoration: none; }
.ps-btn:active { transform: scale(.97); }
.ps-btn svg { flex: none; }
.ps-btn--primary { background: var(--ps-accent); color: var(--ps-on-accent) !important; box-shadow: 0 10px 24px -10px var(--ps-accent); }
.ps-btn--primary:hover { background: var(--ps-accent-hover); }
.ps-btn--ghost { background: rgba(255, 255, 255, .08); color: var(--ps-text) !important; }
.ps-btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.ps-btn--glass { background: rgba(255, 255, 255, .14); color: #fff !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ps-btn--glass:hover { background: rgba(255, 255, 255, .22); }
.ps-btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.ps-btn--block { width: 100%; }
.ps-btn[disabled], .ps-btn.is-disabled { opacity: .5; pointer-events: none; }
.ps-icon-btn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--ps-border); background: rgba(20, 21, 29, .8); color: var(--ps-text); cursor: pointer; }
.ps-icon-btn:hover { border-color: var(--ps-accent); color: var(--ps-text); }
.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; line-height: 1.5; background: rgba(255, 255, 255, .12); color: #fff; }
.ps-chip--accent { background: var(--ps-accent); color: var(--ps-on-accent); }
.ps-chip--outline { background: transparent; border: 1px solid var(--ps-border); color: var(--ps-soft); }
.ps-tag { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; background: rgba(20, 21, 29, .8); border: 1px solid var(--ps-border); color: var(--ps-soft) !important; font-size: 14px; }
.ps-tag:hover { border-color: var(--ps-accent); color: var(--ps-text) !important; }

/* ---------- header ---------- */
.ps-header { position: sticky; top: 0; z-index: 60; background: var(--ps-glass); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(42, 45, 59, .7); transition: transform .3s ease; }
.ps-header.is-hidden { transform: translateY(-100%); }
.ps-header__inner { display: flex; align-items: center; gap: 12px 20px; min-height: var(--ps-header-h); }
/* wordmark image (Views/Shared/Partials/_LogoPartial.cshtml) */
.ps-logo { display: inline-flex; align-items: center; flex: none; line-height: 0; border-radius: 8px; }
.ps-logo img { display: block; width: auto; height: 30px; filter: drop-shadow(0 4px 14px rgba(255, 79, 154, .25)); transition: filter .2s ease, transform .2s ease; }
.ps-logo:hover img { filter: drop-shadow(0 4px 18px rgba(255, 79, 154, .45)) brightness(1.08); }
.ps-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
.ps-nav > li { position: relative; }
.ps-nav__link { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--ps-soft) !important; font: 500 15px/1.3 var(--ps-font); white-space: nowrap; cursor: pointer; }
.ps-nav__link:hover, .ps-nav > li:focus-within > .ps-nav__link { color: var(--ps-text) !important; background: rgba(255, 255, 255, .07); }
.ps-nav__link[aria-current="page"] { color: var(--ps-text) !important; box-shadow: inset 0 -2px 0 var(--ps-accent); }
.ps-mega { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; width: min(620px, 80vw); padding: 16px; border-radius: 16px; background: #15161f; border: 1px solid var(--ps-border); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.ps-nav > li:hover > .ps-mega, .ps-nav > li:focus-within > .ps-mega { opacity: 1; visibility: visible; transform: none; }
.ps-mega a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ps-soft) !important; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-mega a:hover { background: rgba(255, 255, 255, .07); color: var(--ps-text) !important; }
.ps-search { display: flex; align-items: center; gap: 8px; width: min(320px, 30vw); min-height: 44px; margin: 0; padding: 0 14px; border-radius: 12px; background: rgba(20, 21, 29, .85); border: 1px solid var(--ps-border); color: var(--ps-muted); }
.ps-search:focus-within { border-color: var(--ps-accent); box-shadow: 0 0 0 3px rgba(255, 79, 154, .22); color: var(--ps-text); }
.ps-search { transition: border-color .15s ease, box-shadow .15s ease; }
.ps-search input { flex: 1; min-width: 0; height: 42px; border: 0; background: none; color: var(--ps-text); font: 15px var(--ps-font); outline: none; }
.ps-search input::placeholder { color: var(--ps-muted); }
.ps-search kbd { font: 600 11px var(--ps-font); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--ps-border); color: var(--ps-muted); background: none; }
.ps-search button { display: none; }
.ps-account { position: relative; }
.ps-account > summary { list-style: none; }
.ps-account > summary::-webkit-details-marker { display: none; }
.ps-account__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 200px; padding: 8px; margin: 0; list-style: none; border-radius: 14px; background: #15161f; border: 1px solid var(--ps-border); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
.ps-account__menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ps-soft) !important; }
.ps-account__menu a:hover { background: rgba(255, 255, 255, .07); color: var(--ps-text) !important; }
.ps-avatar-sm { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); }
/* always available: it opens the full menu, including categories that do not fit in the header */
.ps-menu-btn { display: inline-grid; }
/* site.js measures the header and hides the categories that would run into the search box */
.ps-nav > li.is-overflow { display: none; }

/* mobile drawer */
.ps-drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.ps-drawer.is-open { visibility: visible; }
.ps-drawer__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s ease; }
.ps-drawer.is-open .ps-drawer__backdrop { opacity: 1; }
.ps-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); display: flex; flex-direction: column; gap: 16px; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: #111219; border-left: 1px solid var(--ps-border); transform: translateX(100%); transition: transform .28s ease; }
.ps-drawer.is-open .ps-drawer__panel { transform: none; }
.ps-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.ps-drawer .ps-search { width: 100%; }
.ps-drawer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ps-drawer__list > li > a, .ps-drawer__list summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--ps-text) !important; font-weight: 600; cursor: pointer; list-style: none; }
.ps-drawer__list summary::-webkit-details-marker { display: none; }
.ps-drawer__list > li > a:hover, .ps-drawer__list summary:hover { background: rgba(255, 255, 255, .06); }
.ps-drawer__list details[open] summary svg { transform: rotate(180deg); }
.ps-drawer__sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 4px 0 8px 8px; }
.ps-drawer__sub a { padding: 9px 10px; border-radius: 8px; color: var(--ps-soft) !important; font-size: 14px; }
body.ps-no-scroll { overflow: hidden; }

/* bottom navigation (phones) */
.ps-bottom-nav { display: none; }

/* loading overlay used by client.startLoading() */
.ps-body .dv-loading { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(10, 10, 16, .55); backdrop-filter: blur(2px); }
.ps-body .dv-loading.d-none { display: none; }
.ps-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--ps-accent); animation: ps-spin .8s linear infinite; }
@keyframes ps-spin { to { transform: rotate(360deg); } }

/* ---------- sections ---------- */
.ps-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ps-section__title { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-left: 16px; }
.ps-section__title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--ps-accent), var(--ps-accent-2)); }
.ps-kicker { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ps-accent); }
.ps-section__title h1, .ps-section__title h2 { font-size: 26px; font-weight: 800; }
.ps-more { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 16px; border-radius: 999px; border: 1px solid var(--ps-border); background: rgba(255, 255, 255, .04); color: var(--ps-soft) !important; font-weight: 600; font-size: 14px; white-space: nowrap; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.ps-more:hover { border-color: var(--ps-accent); background: rgba(255, 79, 154, .12); color: var(--ps-text) !important; }
.ps-panel { background: rgba(20, 21, 29, .88); border: 1px solid var(--ps-border); border-radius: var(--ps-radius-lg); padding: 26px; }
.ps-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ps-muted); }
.ps-breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--ps-muted); }
.ps-breadcrumb a { color: var(--ps-soft) !important; }
.ps-breadcrumb a:hover { color: var(--ps-text) !important; }

/* ---------- movie cards ---------- */
.ps-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--ps-text) !important; }
.ps-poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: var(--ps-radius); overflow: hidden; background: linear-gradient(160deg, #262838, #14151d); box-shadow: var(--ps-shadow); transition: transform .25s ease, box-shadow .25s ease; }
.ps-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-badge { position: absolute; top: 8px; left: 8px; z-index: 1; max-width: calc(100% - 16px); padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; line-height: 1.4; background: rgba(10, 10, 16, .8); color: #f4f4f8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-badge--q { left: auto; right: 8px; background: var(--ps-accent); color: var(--ps-on-accent); }
.ps-badge--bottom { top: auto; bottom: 8px; }
.ps-card__play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 10, 16, .35); opacity: 0; transition: opacity .2s ease; }
.ps-card__play span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--ps-accent); box-shadow: 0 8px 24px -6px var(--ps-accent); }
@media (hover: hover) {
  .ps-card:hover .ps-poster { transform: translateY(-6px); box-shadow: 0 26px 40px -18px rgba(0, 0, 0, .8), 0 0 0 2px var(--ps-accent); }
  .ps-card:hover .ps-card__play { opacity: 1; }
}
.ps-card__title { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ps-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-card__title a { color: inherit !important; }
.ps-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable, one link */
.ps-card__meta { margin-top: -4px; font-size: 13px; color: var(--ps-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px 20px; }
.ps-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 20px) / 6); gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px 2px 10px; margin: -8px -2px 0; }
.ps-rail::-webkit-scrollbar { display: none; }
.ps-rail > * { scroll-snap-align: start; }
.ps-rail-wrap { position: relative; }
.ps-rail-arrow { position: absolute; top: 38%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ps-border); background: rgba(10, 10, 16, .85); color: var(--ps-text); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s ease; }
.ps-rail-arrow--prev { left: -16px; } .ps-rail-arrow--next { right: -16px; }
@media (hover: hover) { .ps-rail-wrap:hover .ps-rail-arrow { opacity: 1; } }
.ps-rail-arrow[hidden] { display: none; }
.ps-empty { padding: 48px 16px; text-align: center; color: var(--ps-muted); }

/* ---------- hero carousel ---------- */
.ps-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--ps-radius-lg); min-height: 500px; background: #120f1c; }
.ps-hero__slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: center; gap: 40px; padding: 56px; color: #fff; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.ps-hero__slide.is-active { position: relative; opacity: 1; visibility: visible; }
.ps-hero__bg { position: absolute; inset: 0; z-index: -2; }
.ps-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.ps-hero__slide::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 130% at 0% 100%, rgba(8, 8, 14, .95), rgba(8, 8, 14, .55) 55%, rgba(8, 8, 14, .15)), linear-gradient(0deg, rgba(8, 8, 14, .75), transparent 45%); }
.ps-hero__body { display: flex; flex-direction: column; gap: 16px; max-width: 660px; min-width: 0; }
.ps-hero__title { font-size: clamp(30px, 4.4vw, 56px) !important; font-weight: 800; letter-spacing: -.035em !important; color: #fff !important; }
.ps-hero__origin { margin: -8px 0 0; font-size: 16px; color: rgba(255, 255, 255, .7); }
.ps-hero__desc { margin: 0; color: rgba(255, 255, 255, .82); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ps-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 15px; color: rgba(255, 255, 255, .82); }
.ps-meta .ps-star { color: var(--ps-star); font-weight: 700; }
.ps-hero__poster { perspective: 900px; }
.ps-hero__poster .ps-poster { transform: rotateY(-14deg) rotateX(4deg); box-shadow: 30px 40px 60px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .12); }
.ps-thumbs { display: flex; gap: 12px; margin-top: 14px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.ps-thumbs::-webkit-scrollbar { display: none; }
.ps-thumb { flex: none; width: 160px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; opacity: .6; transition: opacity .2s ease; }
.ps-thumb:hover, .ps-thumb[aria-current="true"] { opacity: 1; }
.ps-thumb__img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #1d1f2a; outline: 2px solid transparent; outline-offset: -2px; }
.ps-thumb__img img { width: 100%; height: 100%; object-fit: cover; }
.ps-thumb[aria-current="true"] .ps-thumb__img { outline-color: var(--ps-accent); }
.ps-thumb small { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ps-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- top 10 ---------- */
.ps-top10 { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 8px 2px 8px; scroll-snap-type: x mandatory; }
.ps-top10::-webkit-scrollbar { display: none; }
.ps-top10__item { display: grid; grid-template-columns: 104px 170px; align-items: end; color: var(--ps-text) !important; scroll-snap-align: start; }
.ps-top10__num { font-size: 150px; line-height: .8; font-weight: 800; letter-spacing: -.08em; color: transparent; -webkit-text-stroke: 2px rgba(244, 244, 248, .4); margin-right: -18px; text-align: right; user-select: none; }
.ps-top10__item:hover .ps-top10__num { -webkit-text-stroke-color: var(--ps-accent); }
.ps-top10__item .ps-poster { z-index: 1; }

/* ---------- genre tiles ---------- */
.ps-genres { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.ps-genre { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 104px; padding: 16px; border-radius: var(--ps-radius); color: #fff !important; background: linear-gradient(135deg, var(--g1), var(--g2)); transition: transform .2s ease; }
.ps-genre:hover { transform: translateY(-3px); }
.ps-genre b { font-size: 17px; font-weight: 800; }
.ps-genre small { font-size: 13px; opacity: .85; }
.ps-genre svg { position: absolute; right: 12px; top: 12px; opacity: .5; }

/* ---------- details / watch ---------- */
.ps-detail-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--ps-radius-lg); padding: 48px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: end; color: #fff; background: #120f1c; }
.ps-detail-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 8, 14, .95), rgba(8, 8, 14, .55) 60%, rgba(8, 8, 14, .35)); }
.ps-detail-hero h1 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; color: #fff; }
.ps-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; font-size: 15px; }
.ps-facts dt { color: var(--ps-muted); font-weight: 400; } .ps-facts dd { margin: 0; color: var(--ps-soft); }
.ps-prose { color: var(--ps-soft); line-height: 1.75; }
.ps-prose p { margin: 0 0 12px; }
.ps-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.ps-tabs button, .ps-tabs a { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: none; color: var(--ps-soft) !important; font: 600 14px/40px var(--ps-font); cursor: pointer; }
.ps-tabs [aria-selected="true"], .ps-tabs .is-active { background: var(--ps-accent); color: var(--ps-on-accent) !important; }
.ps-episodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.ps-episodes a { display: grid; place-items: center; min-height: 46px; padding: 0 6px; border-radius: 11px; border: 1px solid var(--ps-border); background: rgba(29, 31, 42, .7); color: var(--ps-text) !important; font-weight: 600; font-size: 14px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-episodes a:hover { border-color: var(--ps-accent); }
.ps-episodes a[aria-current="true"], .ps-episodes a.is-active { background: var(--ps-accent); border-color: var(--ps-accent); color: var(--ps-on-accent) !important; }
.ps-watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.ps-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--ps-radius-lg); overflow: hidden; background: #000; box-shadow: 0 30px 80px -30px rgba(255, 79, 154, .55); }
.ps-player iframe, .ps-player video, .ps-player > div { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.ps-servers { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-servers a, .ps-servers button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--ps-border); background: rgba(20, 21, 29, .85); color: var(--ps-text) !important; font-weight: 600; font-size: 14px; cursor: pointer; }
.ps-servers .is-active, .ps-servers [aria-pressed="true"] { border-color: var(--ps-accent); color: var(--ps-accent) !important; }

/* ---------- forms ---------- */
.ps-field { display: grid; gap: 6px; }
.ps-field label { font-size: 14px; font-weight: 600; color: var(--ps-soft); }
.ps-input, .ps-body textarea.ps-input, .ps-body select.ps-input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ps-border); background: rgba(10, 10, 16, .7); color: var(--ps-text); font: 15px var(--ps-font); outline: none; }
.ps-body textarea.ps-input { min-height: 104px; padding: 12px 14px; resize: vertical; }
.ps-input:focus, .ps-filter__grid select:focus, .ps-body .ss-content .ss-search input:focus { border-color: var(--ps-accent); box-shadow: 0 0 0 3px rgba(255, 79, 154, .22); }
.ps-input, .ps-filter__grid select { transition: border-color .15s ease, box-shadow .15s ease; }
.ps-auth { max-width: 440px; margin: 24px auto 0; }
.ps-auth h1 { font-size: 28px; font-weight: 800; }
.ps-error { color: #ff7d8f; font-size: 14px; }

/* ---------- pagination ---------- */
.ps-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 32px 0 0; padding: 0; list-style: none; }
.ps-pager a, .ps-pager span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--ps-border); background: rgba(20, 21, 29, .85); color: var(--ps-text) !important; font-weight: 600; }
.ps-pager a:hover { border-color: var(--ps-accent); }
.ps-pager [aria-current="page"] { background: var(--ps-accent); border-color: var(--ps-accent); color: var(--ps-on-accent) !important; }
.ps-pager .is-gap { border: 0; background: none; min-width: 20px; padding: 0; color: var(--ps-muted) !important; }

/* ---------- footer ---------- */
.ps-footer { margin-top: 32px; border-top: 1px solid var(--ps-border); background: rgba(12, 12, 18, .85); color: var(--ps-muted); font-size: 14px; }
.ps-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; padding: 44px 0 28px; }
.ps-footer h2 { font-size: 14px !important; font-weight: 700; color: var(--ps-text); margin-bottom: 12px; letter-spacing: 0; }
.ps-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ps-footer a { color: var(--ps-muted) !important; }
.ps-footer a:hover { color: var(--ps-text) !important; }
.ps-footer__note { margin: 14px 0 0; line-height: 1.7; }
.ps-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 26px; border-top: 1px solid var(--ps-border); }

/* ---------- comments / misc ---------- */
.ps-comment { display: grid; grid-template-columns: 42px 1fr; gap: 12px; }
.ps-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); overflow: hidden; }
.ps-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== responsive ===================== */
/* large screens (1920px and up) get a wider page, enough for every header category */
@media (min-width: 1760px) { :root { --ps-page: 1640px; } }
/* the nav keeps as many categories as fit (measured by site.js, which adds .ps-nav--fit);
   these rough limits only apply until the script has run */
.ps-nav:not(.ps-nav--fit) > li:nth-child(n+7) { display: none; }
@media (max-width: 1480px) { .ps-search { width: min(260px, 22vw); } }
@media (max-width: 1100px) { .ps-header .ps-search kbd { display: none; } }
@media (max-width: 1300px) { .ps-nav:not(.ps-nav--fit) > li:nth-child(n+6) { display: none; } }
@media (max-width: 1140px) { .ps-nav:not(.ps-nav--fit) > li:nth-child(n+4) { display: none; } }
@media (max-width: 1000px) { .ps-nav:not(.ps-nav--fit) > li:nth-child(n+3) { display: none; } }
@media (max-width: 1100px) {
  .ps-grid, .ps-genres { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ps-rail { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
  .ps-watch { grid-template-columns: minmax(0, 1fr); }
  .ps-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .ps-nav, .ps-header .ps-search--desktop { display: none; }
  .ps-menu-btn { display: inline-grid; }
  .ps-header__actions { margin-left: auto; }
}
@media (max-width: 760px) {
  :root { --ps-header-h: 60px; }
  .ps-container { padding: 0 16px; }
  .ps-header .ps-login-text { display: none; }
  .ps-stack { gap: 38px; }
  .ps-section__title h1, .ps-section__title h2 { font-size: 21px; }
  .ps-hero { border-radius: 18px; min-height: 0; }
  .ps-hero__slide { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px; }
  .ps-hero__poster { display: none; }
  .ps-hero__slide { min-height: 440px; align-items: end; }
  .ps-hero__body .ps-btn { flex: 1; }
  .ps-thumb { width: 124px; }
  .ps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .ps-genres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ps-rail { grid-auto-columns: 40%; gap: 12px; }
  .ps-top10__item { grid-template-columns: 78px 128px; }
  .ps-top10__num { font-size: 110px; }
  .ps-card__title { font-size: 14px; }
  .ps-card__meta { font-size: 12px; }
  .ps-badge { font-size: 11px; padding: 2px 6px; }
  .ps-detail-hero { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 20px; }
  .ps-detail-hero__poster { width: 44%; }
  .ps-panel { padding: 16px; border-radius: 18px; }
  .ps-facts { grid-template-columns: 1fr; gap: 2px; }
  .ps-facts dd { margin-bottom: 8px; }
  /* room for the fixed bottom navigation is kept at the very end of the page (footer), not under the content */
  .ps-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .ps-footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 32px; }
  .ps-footer__brand { grid-column: 1 / -1; }
  .ps-bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 80; padding: 6px; border-radius: 20px; background: var(--ps-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--ps-border); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .7); }
  .ps-bottom-nav a, .ps-bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border: 0; border-radius: 14px; background: none; color: var(--ps-muted) !important; font: 600 11px var(--ps-font); cursor: pointer; }
  .ps-bottom-nav [aria-current="page"] { color: var(--ps-accent) !important; }
  .ps-bottom-nav .ps-fab { width: 56px; height: 56px; margin: -22px auto 0; border-radius: 18px; background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); color: #fff !important; box-shadow: 0 12px 26px -10px var(--ps-accent); }
}
@media (max-width: 380px) {
  .ps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .ps-body *, .ps-body *::before, .ps-body *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* legacy ad slots: keep the bottom catfish banner above the phone bottom bar */
@media (max-width: 760px) {
  .ps-body .catfish-bottom { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}

/* hero thumbnails: titles only on phones (no extra image downloads) */
@media (max-width: 760px) {
  .ps-thumb { width: auto; max-width: 46vw; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--ps-border); background: rgba(20, 21, 29, .85); }
  .ps-thumb__img { display: none; }
  .ps-thumb small { margin: 0; font-size: 12px; }
  .ps-thumb[aria-current="true"] { border-color: var(--ps-accent); }
  .ps-thumb[aria-current="true"] small { color: var(--ps-text); }
}

/* ---------- detail page extras ---------- */
.ps-note { margin: 0; padding: 12px 16px; border-radius: 14px; border: 1px dashed rgba(255, 201, 77, .35); background: rgba(255, 201, 77, .06); color: #f3dca2; font-size: 14px; }
.ps-clamp { max-height: 8.75em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.ps-clamp.is-expanded { max-height: none; -webkit-mask-image: none; mask-image: none; }
.ps-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.ps-facts a { color: var(--ps-text) !important; } .ps-facts a:hover { color: var(--ps-accent) !important; }
.ps-fav svg { transition: transform .2s; }
.ps-fav.bookmarked { background: rgba(255, 79, 154, .18); border-color: rgba(255, 79, 154, .55); color: #ffd1e5 !important; }
.ps-fav.bookmarked svg { fill: currentColor; transform: scale(1.08); }
.ps-detail-hero .ps-meta { color: rgba(255, 255, 255, .82); }

/* comments & reviews (markup produced by comment/review scripts) */
.ps-body .comments, .ps-body .reviews { display: grid; gap: 14px; }
.ps-body .comments__list, .ps-body .reviews__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ps-body .comments__item, .ps-body .reviews__item { margin: 0; padding: 16px; border-radius: 16px; border: 1px solid var(--ps-border); background: rgba(10, 10, 16, .55); }
.ps-body .comments__autor, .ps-body .reviews__autor { position: relative; display: grid; grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 40px; padding: 0; margin: 0 0 10px; }
.ps-body .comments__avatar, .ps-body .reviews__avatar { position: static; grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); padding: 6px; }
.ps-body .comments__name, .ps-body .reviews__name { display: block; font-weight: 700; font-size: 15px; color: var(--ps-text); line-height: 1.3; }
.ps-body .comments__time, .ps-body .reviews__time { display: block; grid-column: 2; font-size: 12.5px; color: var(--ps-muted); line-height: 1.4; }
.ps-body .reviews__rating { position: static; grid-column: 3; grid-row: 1 / 3; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; background: rgba(255, 201, 77, .12); color: var(--ps-star); }
.ps-body .reviews__rating svg { width: 14px; height: 14px; fill: currentColor; }
.ps-body .reviews__rating--red { background: rgba(255, 107, 107, .12); color: #ff8b8b; }
.ps-body .reviews__rating--green { background: rgba(61, 220, 151, .12); color: #5fe3a8; }
.ps-body .comments__text, .ps-body .reviews__text { margin: 0; padding: 0; color: var(--ps-soft); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.ps-body .comments__text img { max-width: 100%; height: auto; }
.ps-body .comments__actions { display: flex; justify-content: flex-end; margin-top: 10px; padding: 0; border: 0; }
.ps-body .comments__rate { display: inline-flex; gap: 6px; }
.ps-body .comments__rate button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; margin: 0; border-radius: 999px; border: 1px solid var(--ps-border); background: rgba(255, 255, 255, .04); color: var(--ps-soft); font: 600 13px var(--ps-font); cursor: pointer; }
.ps-body .comments__rate button svg { width: 15px; height: 15px; fill: currentColor; margin: 0; }
.ps-body .comments__rate button:disabled { cursor: default; opacity: .7; }
.ps-body .comments__rate .btn-like.active { color: #5fe3a8; border-color: rgba(61, 220, 151, .5); }
.ps-body .comments__rate .btn-dislike.active { color: #ff8b8b; border-color: rgba(255, 107, 107, .5); }
.ps-body .sign__form--comments { margin: 0; padding: 0; background: none; border: 0; }
.ps-body .tox-tinymce { border-radius: 12px !important; border-color: var(--ps-border) !important; }
.ps-body .fb-comments { display: block; min-height: 120px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); }

/* slim-select inside forms (review rating) */
.ps-tabs { scroll-margin-top: 96px; }
.ps-csv { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.ps-csv > a:not(:last-child)::after { content: ","; color: var(--ps-muted); }
.ps-episodes--scroll { position: relative; max-height: 352px; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.ps-detail-hero::after { background: linear-gradient(90deg, rgba(8, 8, 14, .94) 0%, rgba(8, 8, 14, .7) 45%, rgba(8, 8, 14, .35) 100%), linear-gradient(0deg, rgba(8, 8, 14, .9), rgba(8, 8, 14, 0) 55%); }
.ps-detail-hero h1, .ps-detail-hero .ps-kicker, .ps-detail-hero .ps-meta, .ps-detail-hero p { text-shadow: 0 2px 14px rgba(0, 0, 0, .65); }
@media (max-width: 760px) {
  .ps-episodes--scroll { max-height: 300px; }
  .ps-detail-hero::after { background: linear-gradient(0deg, rgba(8, 8, 14, .97) 35%, rgba(8, 8, 14, .55) 75%, rgba(8, 8, 14, .4)); }
}

/* ---------- watch page ---------- */
.ps-watch { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
.ps-watch--single { grid-template-columns: minmax(0, 1fr); }
.ps-watch__main { display: grid; gap: 16px; min-width: 0; }
.ps-watch__side { position: sticky; top: 88px; min-width: 0; }
.ps-watch__side .ps-panel { padding: 18px; }
.ps-watch__side .ps-section__head h2 { font-size: 17px !important; }
.ps-watch__side .ps-episodes { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); max-height: min(560px, calc(100vh - 260px)); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; position: relative; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.ps-watch__side #episodeSearchInput { width: 120px !important; }
.ps-player__empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ps-muted); }
.ps-watch__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ps-watch__nav { display: flex; gap: 8px; }
.ps-body .btn-episode-nav { margin: 0; box-shadow: none; }
.ps-body .btn-episode-nav.disabled, .ps-body .btn-episode-nav:disabled { opacity: .4; cursor: not-allowed; }
.ps-servers a { gap: 8px; }
.ps-watch__info { display: grid; gap: 16px; }
.ps-watch__head { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.ps-watch__thumb { width: 84px; height: 126px; object-fit: cover; border-radius: 12px; background: var(--ps-surface-2, #1d1f2a); }
.ps-watch__title { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 800; line-height: 1.25; }
.ps-watch__title a { color: var(--ps-text) !important; }
.ps-watch__title a:hover { color: var(--ps-accent) !important; }
.ps-watch__ep { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--ps-accent); }
.ps-watch__actions { display: flex; flex-direction: column; gap: 8px; }
.ps-watch__hint { margin: 0; font-size: 13.5px; }

/* "next episode" dialog (classes/ids driven by episode/index.js and eps.js) */
.ps-body .next-episode-modal { position: fixed; inset: 0; z-index: 2000; display: none !important; align-items: center; justify-content: center; padding: 20px; }
.ps-body .next-episode-modal.show { display: flex !important; }
.ps-body .next-episode-modal.d-none { display: none !important; }
.ps-body .next-episode-modal__overlay { position: absolute; inset: 0; background: rgba(5, 5, 9, .8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; }
.ps-body .next-episode-modal__content { position: relative; width: min(440px, 100%); max-height: none; margin: 0; overflow: hidden; border-radius: 20px; border: 1px solid var(--ps-border); background: #15161f; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); animation: none; }
.ps-body .next-episode-modal__content::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--ps-accent), var(--ps-accent-2)); box-shadow: none; }
.ps-body .next-episode-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; border: 0; }
.ps-body .next-episode-modal__title { margin: 0; font-size: 18px; font-weight: 800; color: var(--ps-text); }
.ps-body .next-episode-modal__close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--ps-text); cursor: pointer; }
.ps-body .next-episode-modal__body { display: grid; gap: 14px; padding: 8px 20px 18px; }
.ps-body .next-episode-modal__message { margin: 0; color: var(--ps-soft); }
.ps-body .next-episode-modal__episode-info { margin: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ps-border); background: rgba(255, 255, 255, .04); }
.ps-body .episode-info__title { font-size: 13px; color: var(--ps-muted); margin: 0 0 2px; }
.ps-body .episode-info__name { font-weight: 700; color: var(--ps-text); }
.ps-body .next-episode-modal__countdown { display: flex; align-items: center; gap: 12px; margin: 0; }
.ps-body .countdown-circle { display: grid; place-items: center; width: 46px; height: 46px; margin: 0; border-radius: 50%; border: 3px solid var(--ps-accent); background: none; box-shadow: none; animation: none; }
.ps-body .countdown-text { font-size: 18px; font-weight: 800; color: var(--ps-text); }
.ps-body .countdown-desc { margin: 0; font-size: 14px; color: var(--ps-muted); }
.ps-body .countdown-desc span { color: var(--ps-text); font-weight: 700; }
.ps-body .next-episode-modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; border: 0; }

@media (max-width: 1100px) {
  .ps-watch { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  /* one column: player, controls, episode list, then the movie info */
  .ps-watch__main { display: contents; }
  .ps-watch .ps-player { order: 1; }
  .ps-watch__bar { order: 2; }
  .ps-watch__side { order: 3; }
  .ps-watch__info { order: 4; }
  .ps-watch__side { position: static; }
  .ps-watch__side .ps-episodes { max-height: 320px; }
  .ps-watch__side #episodeSearchInput { width: 150px !important; }
}
@media (max-width: 760px) {
  .ps-watch .ps-player { width: calc(100% + 32px); max-width: none; margin: 0 -16px; border-radius: 0; box-shadow: none; }
  .ps-watch__bar { flex-direction: column; align-items: stretch; }
  .ps-watch__nav .ps-btn { flex: 1; }
  .ps-servers { justify-content: center; }
  .ps-watch__head { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
  .ps-watch__thumb { width: 64px; height: 96px; }
  .ps-watch__actions { grid-column: 1 / -1; flex-direction: row; }
  .ps-watch__actions .ps-btn { flex: 1; }
  .ps-body .next-episode-modal { align-items: flex-end; padding: 0; }
  .ps-body .next-episode-modal__content { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .ps-body .next-episode-modal__footer .ps-btn { flex: 1; }
}

/* ---------- listing pages: title, filter panel (bottom sheet on phones), people cards ---------- */
.ps-page-head { display: grid; gap: 14px; }
.ps-page-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ps-page-title { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.01em; }
.ps-filter-toggle { display: none; }
.ps-filter__sheet { padding: 18px; border-radius: var(--ps-radius-lg); border: 1px solid var(--ps-border); background: rgba(20, 21, 29, .88); }
.ps-filter__head, .ps-filter__backdrop { display: none; }
.ps-filter__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.ps-filter__grid .ps-field label { font-size: 13px; color: var(--ps-muted); font-weight: 600; }
.ps-filter__grid select { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--ps-border); background: rgba(10, 10, 16, .7); color: var(--ps-text); font: inherit; }
.ps-filter__actions { display: flex; gap: 8px; }
.ps-filter__actions .ps-btn { flex: 1; }
.ps-pager .is-disabled { opacity: .35; }
.ps-person .ps-poster { display: grid; place-items: center; background: linear-gradient(160deg, #23243a, #15161f); }
.ps-person__initial { font-size: 56px; font-weight: 800; color: rgba(255, 255, 255, .35); }

/* SlimSelect, dark */
body.ps-body {
  --ss-primary-color: var(--ps-accent); --ss-bg-color: #12131b; --ss-font-color: var(--ps-text); --ss-font-placeholder-color: var(--ps-muted);
  --ss-disabled-color: #1d1f2a; --ss-border-color: var(--ps-border); --ss-highlight-color: rgba(255, 79, 154, .35);
  --ss-main-height: 46px; --ss-border-radius: 12px; --ss-spacing-l: 10px; --ss-spacing-m: 8px;
}
.ps-body .ss-main { min-height: 46px; padding: 0 10px; align-items: center; border-radius: 12px; border: 1px solid var(--ps-border); background: rgba(10, 10, 16, .7); color: var(--ps-text); font-size: 15px; }
.ps-body .ss-main:focus { box-shadow: 0 0 0 3px rgba(255, 79, 154, .25); }
.ps-body .ss-main .ss-values .ss-placeholder, .ps-body .ss-main .ss-values .ss-single { color: var(--ps-text); margin: 0; padding: 0; }
.ps-body .ss-main .ss-values .ss-placeholder { color: var(--ps-muted); }
.ps-body .ss-main .ss-arrow path { stroke: var(--ps-muted); }
.ps-body .ss-main .ss-deselect path { stroke: var(--ps-muted); }
.ps-body .ss-content { z-index: 2100; margin-top: 4px; border-radius: 14px; border: 1px solid var(--ps-border); background: #15161f; color: var(--ps-text); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); overflow: hidden; }
.ps-body .ss-content.ss-open-above { margin-top: 0; margin-bottom: 4px; }
.ps-body .ss-content .ss-search { padding: 8px; background: none; }
.ps-body .ss-content .ss-search input { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ps-border); background: rgba(10, 10, 16, .8); color: var(--ps-text); font: inherit; }
.ps-body .ss-content .ss-list .ss-option { padding: 10px 14px; color: var(--ps-soft); font-size: 15px; background: none; }
.ps-body .ss-content .ss-list .ss-option:hover, .ps-body .ss-content .ss-list .ss-option.ss-highlighted { background: rgba(255, 255, 255, .07); color: var(--ps-text); }
.ps-body .ss-content .ss-list .ss-option.ss-selected, .ps-body .ss-content .ss-list .ss-option:not(.ss-disabled).ss-selected { background: rgba(255, 79, 154, .16); color: #ffd1e5; }
.ps-body .ss-content .ss-list .ss-search-text, .ps-body .ss-content .ss-list .ss-error { padding: 12px 14px; color: var(--ps-muted); }

@media (max-width: 760px) {
  .ps-page-head__row { align-items: center; }
  .ps-filter-toggle { display: inline-flex; flex-shrink: 0; }
  .ps-filter { position: fixed; inset: 0; z-index: 1900; visibility: hidden; pointer-events: none; }
  .ps-filter.is-open { visibility: visible; pointer-events: auto; }
  .ps-filter__backdrop { display: block; position: absolute; inset: 0; background: rgba(5, 5, 9, .72); opacity: 0; transition: opacity .2s; }
  .ps-filter.is-open .ps-filter__backdrop { opacity: 1; }
  .ps-filter__sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #13141c; transform: translateY(100%); transition: transform .25s ease; }
  .ps-filter.is-open .ps-filter__sheet { transform: none; }
  .ps-filter__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 18px; }
  .ps-filter__grid { grid-template-columns: 1fr 1fr; }
  .ps-filter__actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .ps-filter__sheet, .ps-filter__backdrop { transition: none; } }
.ps-body .ss-main .ss-values { flex: 1; min-width: 0; }
.ps-body .ss-main .ss-values .ss-single, .ps-body .ss-main .ss-values .ss-placeholder { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- auth & account ---------- */
.ps-auth { width: 100%; max-width: 440px; margin: 16px auto 0; padding: 32px; display: grid; gap: 18px; }
.ps-auth__head { display: grid; justify-items: center; gap: 8px; text-align: center; }
.ps-auth__head .ps-logo { margin-bottom: 8px; }
.ps-auth__head .ps-logo img { height: 32px; }
.ps-auth__head h1 { margin: 6px 0 0; font-size: 26px; font-weight: 800; }
.ps-auth__head p { margin: 0; font-size: 14.5px; }
.ps-auth__form { display: grid; gap: 14px; }
.ps-auth__foot { margin: 0; text-align: center; font-size: 14.5px; color: var(--ps-muted); }
.ps-auth__divider { display: flex; align-items: center; gap: 12px; color: var(--ps-muted); font-size: 13px; }
.ps-auth__divider::before, .ps-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--ps-border); }
.ps-btn--block { width: 100%; }
.ps-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ps-link-sm { font-size: 13.5px; font-weight: 600; }
.ps-password { position: relative; }
.ps-password .ps-input { padding-right: 48px; }
.ps-password__toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--ps-muted); cursor: pointer; }
.ps-password__toggle[aria-pressed="true"] { color: var(--ps-accent); }
.ps-check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ps-soft); cursor: pointer; }
.ps-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ps-accent); }
.ps-input[readonly] { opacity: .65; }
.ps-alert { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; }
.ps-alert ul { margin: 0; padding-left: 18px; }
.ps-alert--error { border: 1px solid rgba(255, 107, 107, .4); background: rgba(255, 107, 107, .1); color: #ffb3b3; }
.ps-alert--success { border: 1px solid rgba(61, 220, 151, .4); background: rgba(61, 220, 151, .1); color: #a6f0cd; }
.ps-alert.validation-summary-valid { display: none; }
.ps-body .field-validation-error, .ps-body label.error, .ps-body span.error { display: block; margin-top: 4px; color: #ff9b9b; font-size: 13px; font-weight: 500; }
.ps-body input.error { border-color: rgba(255, 107, 107, .6); }

.ps-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.ps-profile__avatar { width: 64px; height: 64px; font-size: 26px; }
.ps-profile__meta { display: grid; gap: 6px; min-width: 0; }
.ps-profile__meta h1 { margin: 0; font-size: 24px; font-weight: 800; overflow-wrap: anywhere; }
.ps-badge-ok, .ps-badge-warn { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.ps-badge-ok { background: rgba(61, 220, 151, .12); color: #5fe3a8; }
.ps-badge-warn { background: rgba(255, 201, 77, .12); color: var(--ps-star) !important; }
.ps-profile__forms { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ps-form-card { display: grid; gap: 16px; }
.ps-form-card h2, .ps-panel__title { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.ps-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ps-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14.5px; }
.ps-table th { padding: 10px 12px; text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ps-muted); border-bottom: 1px solid var(--ps-border); }
.ps-table td { padding: 12px; border-bottom: 1px solid var(--ps-border); color: var(--ps-soft); vertical-align: middle; }
.ps-table__title { font-weight: 700; color: var(--ps-text) !important; }
.ps-table__text { max-width: 420px; max-height: 4.8em; overflow: hidden; overflow-wrap: anywhere; }
.ps-table__text p { margin: 0; }
.ps-table__actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.ps-table__actions .ps-icon-btn { width: 38px; height: 38px; }
.ps-icon-btn--danger:hover { color: #ff8b8b !important; border-color: rgba(255, 107, 107, .6) !important; }
.ps-table-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--ps-muted); font-size: 14px; }
.ps-table-pager ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ps-table-pager .page-link { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--ps-border); background: rgba(20, 21, 29, .85); color: var(--ps-text); font-weight: 600; text-decoration: none; }
.ps-table-pager .active .page-link { background: var(--ps-accent); border-color: var(--ps-accent); color: var(--ps-on-accent); }
.ps-table-pager .disabled .page-link { opacity: .35; pointer-events: none; }

@media (max-width: 900px) {
  .ps-profile__forms { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ps-auth { padding: 24px 18px; margin-top: 4px; }
  .ps-profile { grid-template-columns: auto minmax(0, 1fr); }
  .ps-profile .profile__logout { grid-column: 1 / -1; }
  .ps-form-grid { grid-template-columns: 1fr; }
  .ps-table thead { display: none; }
  .ps-table, .ps-table tbody, .ps-table tr, .ps-table td { display: block; width: 100%; }
  .ps-table tr { padding: 12px 0; border-bottom: 1px solid var(--ps-border); }
  .ps-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .ps-table td[data-label]::before { content: attr(data-label); flex: none; color: var(--ps-muted); font-size: 13px; text-align: left; }
  .ps-table td:first-child { display: block; text-align: left; font-size: 16px; }
  .ps-table td:first-child::before { display: none; }
  .ps-table__text { max-width: none; text-align: left; }
  .ps-table__actions { justify-content: flex-start; padding-top: 8px !important; }
}

/* ---------- error page & legal text ---------- */
.ps-errorpage { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; padding-top: 32px; padding-bottom: 48px; text-align: center; }
.ps-errorpage .ps-logo { margin-bottom: 18px; }
.ps-errorpage .ps-logo img { height: 34px; }
.ps-errorpage__code { margin: 0; font-size: clamp(88px, 18vw, 160px); font-weight: 800; line-height: 1; letter-spacing: -.04em; background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ps-errorpage h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.ps-errorpage > p { margin: 0; max-width: 460px; }
.ps-errorpage__search { display: flex; gap: 8px; width: min(440px, 100%); margin: 8px 0 4px; }
.ps-legal { max-width: 900px; }
.ps-legal h2 { margin: 22px 0 8px; font-size: 19px; font-weight: 700; color: var(--ps-text); }
.ps-legal ul { margin: 0 0 12px; padding-left: 20px; color: var(--ps-soft); line-height: 1.75; }

/* ---------- ad slots (markup from BannerCatfish / BannerPopup components) ---------- */
.ps-body .catfish-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; text-align: center; background: rgba(5, 5, 9, .85); }
.ps-body .banner-catfish-bottom { display: inline-flex; max-width: 100%; margin: auto; }
.ps-body .banner-catfish-bottom img { display: block; max-width: 100%; height: auto; }
.ps-body .catfish-bottom-close, .ps-body .banner-preload-close { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(20, 21, 29, .92); border: 1px solid var(--ps-border); color: var(--ps-text); font-size: 13px; font-weight: 700; cursor: pointer; }
.ps-body .catfish-bottom-close { position: absolute; right: 6px; top: -36px; }
.ps-body .banner-preload { position: fixed; inset: 0; z-index: 2200; display: grid; place-items: center; padding: 20px; background: rgba(5, 5, 9, .82); }
.ps-body .banner-preload-container { position: relative; width: min(500px, 100%); }
.ps-body .banner-preload-container > a, .ps-body .banner-preload-container img { display: block; width: 100%; height: auto; border-radius: 14px; }
.ps-body .banner-preload-close { position: absolute; top: -12px; right: -12px; }

/* ---------- home: rows separated by soft dividers, highlights (trending, genres) on their own "bands" ---------- */
.ps-home { gap: 34px; }
.ps-home > .recently:empty { display: none; }
.ps-home__row, .ps-tagband { position: relative; padding-top: 34px; }
.ps-home__row::before, .ps-tagband::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1) 15%, rgba(255, 79, 154, .32) 50%, rgba(255, 255, 255, .1) 85%, transparent);
}
.ps-tagband { margin-top: 0; }
.ps-tagband::before { left: 28px; right: 28px; }
/* a row right after a band needs no divider: the band already closes the previous block */
.ps-band + .ps-home__row { padding-top: 0; }
.ps-band + .ps-home__row::before { display: none; }
.ps-band {
  position: relative; padding: 26px 26px 20px; border-radius: var(--ps-radius-lg); border: 1px solid rgba(255, 255, 255, .07);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(255, 79, 154, .13), transparent 60%),
    radial-gradient(80% 140% at 100% 100%, rgba(123, 108, 255, .13), transparent 60%),
    rgba(17, 18, 26, .78);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9);
}
@media (max-width: 760px) {
  .ps-home { gap: 26px; }
  .ps-home__row, .ps-tagband { padding-top: 26px; }
  .ps-tagband::before { left: 16px; right: 16px; }
  .ps-main { padding-bottom: 32px; }
  .ps-header .ps-logo img { height: 25px; }
  .ps-band { padding: 18px 14px 14px; border-radius: 18px; }
  .ps-more { min-height: 36px; padding: 0 12px; font-size: 13px; }
}

/* =====================================================================
   Home page v3: quick links, trending tabs, charts, wide cards, country tabs
   ===================================================================== */
@keyframes ps-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ps-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 154, .7); } 70% { box-shadow: 0 0 0 8px rgba(255, 79, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 79, 154, 0); } }

/* quick entry pills */
.ps-quick { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: -24px 0 -10px; padding: 4px 2px; }
.ps-quick::-webkit-scrollbar { display: none; }
.ps-quick__item { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: #fff !important; background: linear-gradient(135deg, var(--q1), var(--q2)); box-shadow: 0 10px 24px -14px var(--q1); transition: transform .2s ease, filter .2s ease; }
.ps-quick__item:hover { transform: translateY(-2px); filter: brightness(1.1); }
.ps-quick__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .9); }
.ps-quick__item--soft { background: rgba(255, 255, 255, .06); border: 1px solid var(--ps-border); color: var(--ps-soft) !important; box-shadow: none; font-weight: 600; }
.ps-quick__item--soft:hover { border-color: var(--ps-accent); color: var(--ps-text) !important; }

/* live dot in kickers */
.ps-live { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ps-accent); vertical-align: 1px; animation: ps-pulse 1.8s infinite; }

/* segmented tabs (trending periods, countries) */
.ps-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--ps-border); }
.ps-seg button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--ps-soft); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.ps-seg button:hover { color: var(--ps-text); }
.ps-seg button.is-active { background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); color: #fff; box-shadow: 0 8px 20px -10px var(--ps-accent); }
.ps-seg--scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ps-seg--scroll::-webkit-scrollbar { display: none; }
.ps-section__head--wrap { flex-wrap: wrap; align-items: center; }
.ps-tabpanel__more { display: flex; justify-content: center; margin-top: 8px; }
.ps-tabpanel:not([hidden]) { animation: ps-rise .35s ease; }

/* trending top 10 (title under the poster, glowing podium numbers) */
.ps-band--trending { background:
    radial-gradient(70% 120% at 0% 0%, rgba(255, 79, 154, .22), transparent 60%),
    radial-gradient(60% 120% at 100% 100%, rgba(123, 108, 255, .2), transparent 60%),
    rgba(17, 18, 26, .82); }
.ps-top10 { gap: 10px; transition: opacity .2s ease; }
.ps-top10.is-loading { opacity: .35; pointer-events: none; }
.ps-top10__item { grid-template-columns: 92px 168px; align-items: start; animation: ps-rise .4s ease both; }
.ps-top10__item:nth-child(2) { animation-delay: .04s; } .ps-top10__item:nth-child(3) { animation-delay: .08s; }
.ps-top10__item:nth-child(4) { animation-delay: .12s; } .ps-top10__item:nth-child(5) { animation-delay: .16s; }
.ps-top10__num { align-self: end; margin-bottom: 52px; }
.ps-top10__num--podium { -webkit-text-stroke: 0; color: transparent; background: linear-gradient(180deg, #ffe08a, var(--ps-accent) 70%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 6px 18px rgba(255, 79, 154, .35)); }
.ps-top10__card { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ps-top10__title { font-weight: 700; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-top10__meta { display: flex; gap: 10px; font-size: 12px; color: var(--ps-muted); }
.ps-top10__meta .ps-star, .ps-wide__meta .ps-star { color: var(--ps-star); font-weight: 700; }
@media (hover: hover) {
  .ps-top10__item:hover .ps-poster { transform: translateY(-6px); box-shadow: 0 26px 40px -18px rgba(0, 0, 0, .8), 0 0 0 2px var(--ps-accent); }
}

/* weekly charts */
.ps-band--charts { background:
    radial-gradient(60% 120% at 100% 0%, rgba(255, 201, 77, .12), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(123, 108, 255, .14), transparent 60%),
    rgba(17, 18, 26, .82); }
.ps-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ps-chart { min-width: 0; padding: 16px; border-radius: var(--ps-radius); background: rgba(10, 10, 16, .55); border: 1px solid rgba(255, 255, 255, .06); }
.ps-chart__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ps-chart__head h3 { font-size: 18px; font-weight: 800; }
.ps-chart__more { font-size: 13px; font-weight: 600; color: var(--ps-soft) !important; }
.ps-chart__more:hover { color: var(--ps-accent) !important; }
.ps-chart__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ps-chart__item { display: grid; grid-template-columns: 34px 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 8px; border-radius: 12px; color: var(--ps-text) !important; transition: background .15s ease, transform .15s ease; }
.ps-chart__item:hover { background: rgba(255, 255, 255, .06); transform: translateX(3px); }
.ps-chart__item img { width: 40px; height: 60px; object-fit: cover; border-radius: 8px; background: var(--ps-surface-2); }
.ps-chart__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-chart__text b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-chart__text small { font-size: 12px; color: var(--ps-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-weight: 800; font-size: 15px; color: var(--ps-soft); background: rgba(255, 255, 255, .06); }
.ps-rank--gold { color: #3b2600; background: linear-gradient(135deg, #ffe08a, #f5a623); box-shadow: 0 6px 16px -6px #f5a623; }
.ps-rank--silver { color: #1b1f2a; background: linear-gradient(135deg, #f1f3f8, #9aa3b5); }
.ps-rank--bronze { color: #2c1406; background: linear-gradient(135deg, #f3b98a, #b8692e); }

/* landscape cards (theatrical) */
.ps-rail--wide { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
.ps-wide { position: relative; isolation: isolate; aspect-ratio: 16 / 10; border-radius: var(--ps-radius); overflow: hidden; background: linear-gradient(160deg, #262838, #14151d); box-shadow: var(--ps-shadow); color: #fff !important; transition: box-shadow .25s ease; }
.ps-wide__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.ps-wide__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 8, 14, .95) 5%, rgba(8, 8, 14, .35) 55%, transparent); }
.ps-wide__body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.ps-wide__title { font-size: 17px !important; font-weight: 800; color: #fff !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-wide__title a { color: inherit !important; }
.ps-wide__title a::after { content: ""; position: absolute; inset: 0; }
.ps-wide__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.ps-wide .ps-chip { font-size: 11px; padding: 2px 8px; }
.ps-wide__play { position: absolute; top: 42%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; display: grid; place-items: center; border-radius: 50%; background: var(--ps-accent); box-shadow: 0 10px 26px -8px var(--ps-accent); opacity: 0; transform: scale(.8); transition: opacity .2s ease, transform .2s ease; }
@media (hover: hover) {
  .ps-wide:hover .ps-wide__img img { transform: scale(1.06); }
  .ps-wide:hover .ps-wide__play { opacity: 1; transform: none; }
  .ps-wide:hover { box-shadow: 0 26px 40px -18px rgba(0, 0, 0, .8), 0 0 0 2px var(--ps-accent); }
}

/* rating badge + "sắp chiếu" badge */
.ps-rating { position: absolute; left: 8px; bottom: 8px; z-index: 1; display: inline-flex; align-items: baseline; gap: 1px; padding: 4px 9px; border-radius: 10px; background: linear-gradient(135deg, #ffe08a, #f5a623); color: #3b2600; box-shadow: 0 8px 18px -8px #f5a623; }
.ps-rating b { font-size: 16px; font-weight: 800; }
.ps-rating small { font-size: 11px; font-weight: 700; opacity: .75; }
.ps-badge--soon { background: linear-gradient(135deg, var(--ps-accent-2), var(--ps-accent)); color: #fff; }

@media (max-width: 1100px) {
  .ps-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-rail--wide { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
}
@media (max-width: 760px) {
  .ps-quick { margin: -14px -16px -6px; padding: 4px 16px; }
  .ps-quick__item { min-height: 38px; padding: 0 14px; font-size: 13px; }
  .ps-section__head { flex-wrap: wrap; align-items: center; }
  .ps-seg { width: 100%; }
  .ps-seg button { flex: 1; padding: 0 10px; font-size: 13px; min-height: 34px; }
  .ps-seg--scroll button { flex: none; }
  /* phones: the three charts become one swipeable row */
  .ps-charts { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .ps-charts::-webkit-scrollbar { display: none; }
  .ps-chart { padding: 12px 10px; scroll-snap-align: start; }
  .ps-rail--wide { grid-auto-columns: 78%; }
  .ps-top10__item { grid-template-columns: 66px 124px; }
  .ps-top10__num { font-size: 96px; margin-bottom: 48px; }
  .ps-wide__title { font-size: 15px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-live { animation: none; }
}

/* =====================================================================
   Ads: top banner, popup, catfish, footer text links (Views/Shared/Components/Banner*)
   ===================================================================== */
.ps-ad-label { display: inline-block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ps-muted); }
.ps-ad-top { margin-top: 16px; }
.ps-ad-top__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ps-ad-top__item { position: relative; display: block; max-width: min(100%, 970px); line-height: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .8); }
.ps-ad-top__item img { display: block; width: 100%; height: auto; max-height: 120px; object-fit: contain; background: #0f1017; }
.ps-ad-top__item .ps-ad-label { position: absolute; right: 6px; top: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .55); line-height: 1.5; }
@media (min-width: 761px) { .ps-ad-top__grid--many .ps-ad-top__item { max-width: calc(50% - 5px); } }

.ps-ad-popup { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(5, 5, 9, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
.ps-ad-popup.is-open { opacity: 1; visibility: visible; }
.ps-ad-popup__box { position: relative; width: min(560px, 100%); border-radius: 18px; overflow: hidden; background: #111219; border: 1px solid var(--ps-border); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); transform: translateY(16px) scale(.97); transition: transform .3s ease; }
.ps-ad-popup.is-open .ps-ad-popup__box { transform: none; }
.ps-ad-popup__box > a { display: block; line-height: 0; }
.ps-ad-popup__box img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.ps-ad-popup__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.ps-ad-close { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ps-border); background: rgba(255, 255, 255, .08); color: var(--ps-text); font-weight: 700; font-size: 13px; }
.ps-ad-close:hover { border-color: var(--ps-accent); }
.ps-ad-close[disabled] { opacity: .6; }

.ps-ad-catfish { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 75; width: min(728px, calc(100% - 20px)); transform: translate(-50%, 140%); transition: transform .4s ease; }
.ps-ad-catfish.is-open { transform: translate(-50%, 0); }
.ps-ad-catfish__item { display: block; line-height: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .85); }
.ps-ad-catfish__item img { display: block; width: 100%; height: auto; max-height: 110px; object-fit: contain; background: #0f1017; }
.ps-ad-catfish .ps-ad-close { position: absolute; top: -14px; right: -6px; height: 28px; min-width: 28px; padding: 0 8px; background: #15161f; }
@media (max-width: 760px) {
  .ps-ad-catfish { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .ps-ad-catfish__item img { max-height: 70px; }
  .ps-ad-top { margin-top: 10px; }
  .ps-ad-top__item img { max-height: 90px; }
  .ps-ad-popup__box { width: 100%; border-radius: 16px; }
}
.ps-footer .ps-ad-links a { color: var(--ps-star) !important; }
