/* VULU Hub player — full / fullscreen / mini. Reuses np__btn/np__bar/np__fill,
   glchip, page__seclabel, liveroom overlay model, glass tokens. Green is the
   only saturated colour (scrub fill / progress / mini hairline / focus). */

/* rail sits at the BOTTOM of the overlay ladder (rail < chatdock < popovers <
   event sheet < fab < modals < liveroom < fullscreen video < toast), so page
   takeovers actually cover it instead of the frosted rail ghosting on top. */
.app3 .rail { position: relative; z-index: 50; }

/* ---- shared stage + one bar ---------------------------------------------- */
.hub-stagewrap { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hub-canvas { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; cursor: pointer; background: #0a0d0c; }
.hub-bigplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.5); background: rgba(0,0,0,0.42); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hub-bigplay .ic, .hub-bigplay svg { width: 30px; height: 30px; }
.hub-skipbadge { position: absolute; top: 50%; transform: translateY(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,0.55); color: #fff; font-size: 14px; font-weight: 800; pointer-events: none; }
.hub-skipbadge--l { left: 10%; } .hub-skipbadge--r { right: 10%; }
.hub-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 86px; pointer-events: none; border-radius: 0 0 14px 14px; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); }

.hub-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.hub-bar .np__btn .ic, .hub-bar .np__btn svg { width: 20px; height: 20px; }
.hub-scrub { position: relative; flex: 1 1 auto; min-width: 0; padding: 9px 0; cursor: pointer; display: flex; align-items: center; }
.hub-scrub .np__bar { width: 100%; margin: 0; transition: height .12s; }
.hub-scrub:hover .np__bar { height: 7px; }
.hub-thumb { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 999px; background: var(--green); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,0.5); opacity: 0; transition: opacity .12s; pointer-events: none; }
.hub-scrub:hover .hub-thumb { opacity: 1; }
.hub-time { font-size: 12px; color: rgba(255,255,255,0.9); flex: 0 0 auto; }

/* ---- FULL (windowed theater over a scrim) -------------------------------- */
.hub-full { position: fixed; inset: 0; z-index: 64; display: flex; align-items: center; justify-content: center; padding: 24px 36px 24px 92px; background: rgba(2,3,3,0.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hub-theater { width: 100%; max-width: 900px; max-height: calc(100% - 8px); display: flex; gap: 40px; align-items: center; }
.hub-theater .hub-stagewrap { align-self: center; min-width: 0; }
/* show: video stays left (clear of the rail), episode panel pinned right, wide gap between them */
.hub-theater--show { max-width: none; }
.hub-theater--show .hub-stagewrap { flex: 0 1 auto; width: min(56vw, 1060px); }
.hub-theater--show .hub-eppanel { margin-left: auto; }
.hub-close { position: absolute; top: 12px; left: 12px; z-index: 4; width: 38px; height: 38px; border-radius: 999px; border: 0; background: rgba(0,0,0,0.5); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hub-close .ic, .hub-close svg { width: 19px; height: 19px; }
.hub-movtitle { position: absolute; top: 19px; left: 62px; z-index: 4; font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.65); }
.hub-top { display: flex; align-items: center; gap: 12px; }
.hub-top__ti { font-size: 16px; font-weight: 800; color: var(--text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-top__ep { color: var(--text-2); font-weight: 600; }
.hub-top__x { margin-left: auto; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 999px; border: 1px solid var(--border); background: var(--raised); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.hub-top__x .ic, .hub-top__x svg { width: 18px; height: 18px; }
.hub-body { display: flex; gap: 14px; min-height: 0; }

/* ---- FULLSCREEN (edge-to-edge cinema) ------------------------------------ */
.hub-fs { position: fixed; inset: 0; z-index: 1700; background: #000; display: flex; align-items: center; justify-content: center; }  /* above .liveroom (1600), below .vtoast (1800) */
.hub-fs .hub-stagewrap { width: 100%; height: 100%; }
.hub-fs .hub-canvas { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.hub-fs .hub-scrim { border-radius: 0; height: 120px; }

/* ---- episode panel (shows / anime) --------------------------------------- */
.hub-eppanel { width: 360px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; max-height: 100%; overflow-y: auto; padding: 2px 2px 2px 0; }
.hub-epinfo { padding: 2px 4px 12px; border-bottom: 1px solid var(--border); }
.hub-epinfo__show { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-epinfo__ep { font-size: 21px; font-weight: 800; color: var(--text); line-height: 1.2; margin-top: 5px; }
.hub-epinfo__meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.hub-spills { display: flex; gap: 8px; flex-wrap: wrap; }
.hub-spill { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--raised); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.hub-spill:hover { color: var(--text); }
.hub-spill.on { background: #fff; border-color: #fff; color: #0a0a0a; }
.hub-sselect { align-self: flex-start; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.hub-eplist { display: flex; flex-direction: column; gap: 6px; }
.hub-eprow { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: background .12s; }
.hub-eprow:hover { background: var(--raised); }
.hub-eprow.cur { box-shadow: inset 0 0 0 1px rgba(74,222,128,0.4); }
.hub-epthumb { position: relative; width: 116px; flex: 0 0 116px; aspect-ratio: 16 / 9; border-radius: 9px; display: grid; place-items: center; color: rgba(255,255,255,0.55); }
.hub-epthumb .ic, .hub-epthumb svg { width: 22px; height: 22px; }
.hub-eprow__meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hub-eprow__ti { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-eprow__ti b { color: var(--muted); font-weight: 800; margin-right: 2px; }
.hub-eprow__len { font-size: 11.5px; color: var(--text-2); }
.hub-eprow__prog { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 3px; margin: 0; }
.hub-eprow .np__fill { background: var(--green); }

/* ---- MINI (floating, draggable, persists across pages) ------------------- */
.hub-mini { position: fixed; right: 16px; bottom: 16px; width: 300px; aspect-ratio: 16 / 9; z-index: 80; border-radius: 14px; overflow: hidden; background: var(--raised); border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(0,0,0,0.6); cursor: grab; }
.hub-mini:active { cursor: grabbing; }
.hub-mini__art { position: absolute; inset: 0; }
.hub-mini__chip { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 3px 7px; border-radius: 7px; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-mini__x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 999px; border: 0; background: rgba(0,0,0,0.5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hub-mini__x .ic, .hub-mini__x svg { width: 15px; height: 15px; }
.hub-mini__pp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.5); background: rgba(0,0,0,0.42); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.hub-mini:hover .hub-mini__pp { opacity: 1; }
.hub-mini__pp .ic, .hub-mini__pp svg { width: 22px; height: 22px; }
.hub-mini__hair { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,0.18); }
.hub-mini__hair i { display: block; height: 100%; background: var(--green); }

/* ---- Videos: upload tile + minimal upload sheet -------------------------- */
.hub-add { border-style: dashed !important; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); }
.hub-add:hover { color: var(--text); }
.hub-add .ic, .hub-add svg { width: 22px; height: 22px; }
.hub-add span { font-size: 12.5px; font-weight: 700; }
.hub-upload { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(2,3,3,0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hub-upload__card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 24px 60px rgba(0,0,0,0.6); }
.hub-upload__head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 800; color: var(--text); }
.hub-upload__x { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border); background: var(--raised); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.hub-upload__x .ic, .hub-upload__x svg { width: 15px; height: 15px; }
.hub-upload__drop { aspect-ratio: 16 / 7; border-radius: 12px; border: 1.5px dashed var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.hub-upload__drop .ic, .hub-upload__drop svg { width: 22px; height: 22px; }
.hub-upload__in { height: 42px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.hub-upload__in:focus { border-color: var(--green); }
.hub-upload__add { height: 42px; border-radius: 11px; border: 0; background: var(--green); color: var(--green-ink); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }

/* ---- "Watching now": minimal indicator (small art thumb + friend·title + thin how-far bar) --- */
.wcard { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px; border-radius: 10px; border: 0; background: none; margin-bottom: 1px; cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: background .12s; }
.wcard:hover { background: var(--raised); }
.wcard__thumb { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.wcard__meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.wcard__who { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard__ti { color: var(--text-2); }
.wcard__prog { height: 3px; margin: 0; background: rgba(255,255,255,0.14); }
/* .wcard__prog .np__fill stays #fff (np__fill default): WHITE = a friend's watch progress; green is reserved for per-episode resume + live dot. Do NOT override to green. */
.mlist--min .wcard { justify-content: center; padding: 5px 0; }
.mlist--min .wcard__meta { display: none; }

/* ---- episode pick sheet (show/anime → choose season + episode before play) */
.wsheet { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(2,3,3,0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wsheet__card { width: min(520px, 94%); max-height: 84%; overflow-y: auto; padding: 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 26px 64px -24px rgba(0,0,0,0.72); }
.wsheet__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.wsheet__poster { width: 38px; height: 51px; flex: 0 0 auto; border-radius: 7px; }
.wsheet__id { min-width: 0; flex: 1 1 auto; }
.wsheet__ti { font-size: 18px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsheet__meta { font-size: 12.5px; color: var(--muted); }
.wsheet__from { font-size: 12px; color: var(--green); margin-top: 2px; }
.wsheet__x { flex: 0 0 auto; }
.wsheet .hub-spills { margin-bottom: 12px; }
.wsheet .hub-sselect { margin-bottom: 12px; }
.wsheet-eprow--seen { opacity: 0.55; }

/* ---- Hub toolbar: search + upload/browse (YouTube/Netflix-ish) ----------- */
.vid-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.vid-srch { align-self: auto; width: auto; flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; }   /* free .srchbar to sit inline; min-width:0 so the Upload button never clips at phone widths */
.vid-srch:focus-within { border-color: var(--green); }                                      /* one brand focus moment */
.vid-uploadbtn { height: 46px; padding: 0 16px; flex: 0 0 auto; border-radius: 13px; border: 1px solid rgba(74,222,128,0.22); background: var(--raised); color: var(--green); font: inherit; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: background .15s, color .15s; }
.vid-uploadbtn:hover { background: var(--green); color: var(--green-ink); }
.vid-uploadbtn .ic, .vid-uploadbtn svg { width: 15px; height: 15px; }
.vid-browsebtn { color: var(--text); border-color: var(--border); }                          /* neutral - green stays a create/play signal */
.vid-browsebtn:hover { background: var(--raised-2); color: var(--text); }
.vid-shelf--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; overflow: visible; }

/* ---- Entertainment genre filter: Browse popup + Browse-mode screen -------- */
.vid-browsewrap { position: relative; flex: 0 0 auto; }
.vid-browsebtn.is-on { background: #fff; border-color: #fff; color: #0a0a0a; }            /* neutral active tint (green is reserved) */
.vid-browsebtn.is-on .ic, .vid-browsebtn.is-on svg { color: #0a0a0a; }
.vid-browsebtn svg:last-child { width: 13px; height: 13px; }                              /* the trailing chevron */
.vid-genrepop { top: calc(100% + 6px); right: 0; left: auto; width: 210px; }              /* override .factions full-width default */
.vid-genrepop button.is-on { background: #fff; color: #0a0a0a; }                           /* selected row = .glchip.on look */
.vid-genrepop button.is-on .ic { color: #0a0a0a; }
.vid-bhead { display: flex; align-items: center; gap: 12px; margin: 20px 2px 12px; }
.vid-binfo { margin-right: auto; min-width: 0; }
.vid-beyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; }
.vid-btitle { font-size: 18px; font-weight: 800; color: var(--text); margin: 2px 0 0; }
.vid-bback { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 999px; border: 0; background: var(--raised-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.vid-bback .ic, .vid-bback svg { width: 18px; height: 18px; }
.vid-fchip { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }       /* rides .glchip.on (white pill) */
.vid-fchip .ic, .vid-fchip svg { width: 13px; height: 13px; }
.vid-fchip__x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: rgba(0,0,0,0.08); color: #0a0a0a; margin-left: 2px; }
.vid-fchip__x .ic, .vid-fchip__x svg { width: 12px; height: 12px; }
.srch-empty__act { display: inline-block; margin-left: 8px; background: none; border: 0; color: var(--text); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---- upload sheet extras (minimal, progressive reveal) ------------------- */
.hub-upload__drop--done { flex-direction: column; gap: 8px; align-items: stretch; justify-content: center; }
.hub-upload__prog { height: 4px; margin: 0; }
.hub-upload__lbl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.hub-upload__thumbs { display: flex; gap: 8px; }
.hub-upload__thumbs > * { width: 34px; aspect-ratio: 2 / 3; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); cursor: pointer; }
.hub-upload__thumbs > .on { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 0 1.5px var(--green); }
.hub-upload__desc { min-height: 64px; padding-top: 10px; resize: vertical; }
.hub-upload__adddesc { align-self: flex-start; }
.hub-upload__add:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================ PREMIUM PAYWALL ============================ */
/* Two colors, one job each: PURPLE = free/premium/buy-entry, GREEN = owned/play. */

/* The pre-play panel, countdown pill, and centered paywall are GONE. The premium model now lives in a
   full-length TWO-TONE progress bar (white free zone + purple locked region + a lock at the 15-min seam)
   and an under-video Like + Buy strip. --purple resolves to #C77DFF via CSS load order; use the var. */

/* GATED free user: white free zone 0..lockPct, purple locked region lockPct..end, lock glyph at the seam */
.hub-bar.is-gated .np__bar { background: rgba(255,255,255,0.16); }      /* brighter free-zone trough */
.hub-bar.is-gated .np__fill { background: #fff; }                       /* white played fill while free */
.hub-bar.is-gated .hub-thumb { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.22); }
.hub-lockzone { position: absolute; right: 0; top: 50%; transform: translateY(-50%); height: 5px; border-radius: 0 999px 999px 0; background: var(--purple); pointer-events: none; transition: height .12s; }
.hub-scrub:hover .hub-lockzone { height: 7px; }
.hub-scrub__lock { position: absolute; top: 50%; transform: translate(-50%, -50%); color: #fff; pointer-events: none; display: inline-flex; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.65)); }
.hub-scrub__lock .ic, .hub-scrub__lock svg { width: 13px; height: 13px; }

/* FULL ACCESS (owned title OR premium subscriber): plain green bar, no lock, no purple */
.hub-bar.is-owned .np__fill { background: var(--green); }

/* action strip — a blurred glass bar UNDER the video (FULL + gated only). The control bar + scrim now
   live INSIDE .hub-canvas, so this in-flow strip sits below the picture without colliding with them. */
.hub-underbar { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(20,16,28,0.55); border: 1px solid rgba(199,125,255,0.28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.hub-savebtn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--raised); color: var(--text-2); font: inherit; font-weight: 800; cursor: pointer; transition: color .15s, border-color .15s; }
.hub-savebtn:hover { color: var(--text); }
.hub-savebtn.on { color: #fff; border-color: rgba(199,125,255,0.5); }
.hub-savebtn.on .ic, .hub-savebtn.on svg { color: var(--purple); }
.hub-savebtn .ic, .hub-savebtn svg { width: 18px; height: 18px; }
.hub-buyrow { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.hub-buyrow .hub-paywall__buy { height: 40px; padding: 0 16px; flex: 0 1 auto; }
.hub-buyrow .hub-paywall__save { display: none; }
.hub-buyrow .hub-paywall__more { padding: 0 10px; }
.hub-underbar__cap { flex: 1 1 100%; font-size: 12px; color: rgba(255,255,255,0.7); text-align: right; }

/* Gem+ subscription button — the all-access alternative, gem-purple so it reads as the premium upsell */
.hub-gemplus { flex: 0 1 auto; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: linear-gradient(120deg, var(--purple), #9b5cff); color: #fff; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 16px rgba(155,92,255,0.3); }
.hub-gemplus em { font-style: normal; font-weight: 700; font-size: 11px; opacity: 0.82; margin-left: -2px; }
.hub-gemplus .ic, .hub-gemplus svg { width: 16px; height: 16px; }

/* CASH buy buttons (shared: BuyOptions is reused under the video via window.BuyOptions) — neutral, since
   purple is reserved for the locked region + Gem+, and green for full access */
.hub-paywall__buy { height: 46px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font: inherit; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; }
.hub-paywall__buy .ic, .hub-paywall__buy svg { width: 15px; height: 15px; }
.hub-paywall__buy--ghost { background: transparent; }
.hub-paywall__buy:disabled { opacity: 0.45; cursor: not-allowed; }
.hub-paywall__best { background: rgba(255,255,255,0.18); color: #fff; margin-right: 2px; }
.hub-paywall__save { font-size: 11.5px; color: var(--muted); margin: -7px 2px 0; }
.hub-paywall__more { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; }
.hub-paywall__more .ic, .hub-paywall__more svg { width: 14px; height: 14px; }
