/* ==========================================================================
   CINEXIS — Screen-specific styles
   ========================================================================== */

/* ---- Splash ------------------------------------------------------------- */

.splash {
  position: relative;
  display: grid; place-items: center; align-content: center; gap: var(--s-5);
  min-height: 100vh; padding: var(--s-6);
  text-align: center;
  background:
    radial-gradient(80% 50% at 50% 42%, rgba(124,58,237,.22), transparent 70%),
    var(--void);
  overflow: hidden;
}
.splash__mark { width: 128px; animation: flare var(--cine) var(--ease) both; }
@keyframes flare {
  from { opacity: 0; transform: scale(.72) rotate(-14deg); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.splash__wm {
  font-family: var(--font-brand); font-size: 30px; letter-spacing: var(--tr-brand);
  animation: rise var(--slow) var(--ease) 340ms both;
}
.splash__tag { animation: rise var(--slow) var(--ease) 500ms both; }
.splash__acts { width: 100%; max-width: 320px; animation: rise var(--slow) var(--ease) 660ms both; }

/* Auth landing sits on a moody generated backdrop */
.authbg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 60% at 20% 12%, hsl(288 78% 46% / .34), transparent 62%),
    radial-gradient(80% 55% at 84% 30%, hsl(200 82% 44% / .28), transparent 62%),
    linear-gradient(180deg, #0B0916 0%, #04030A 100%);
}
.authbg::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain); opacity: .05; mix-blend-mode: overlay;
}

/* ---- Home hero ---------------------------------------------------------- */

.hero { position: relative; }
/* Capped rather than a fixed ratio, so the first content rail always lands
   above the fold on a 844pt screen instead of below it. */
.hero .poster { border-radius: 0; aspect-ratio: auto; height: min(54vh, 440px); }
.hero__body {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
  padding: var(--s-5) var(--s-4) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.hero__t {
  font-family: var(--font-brand); font-size: 26px; line-height: 1.1;
  letter-spacing: .05em; text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,.9);
}
.hero__meta { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.hero__dots { display: flex; gap: 5px; justify-content: center; padding-top: 10px; }
.hero__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--hairline-strong); }
.hero__dot.is-on { background: var(--prism); width: 16px; border-radius: 3px; }

.metaline { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-xs); color: var(--ink-2); }
.metaline .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.pill-rating {
  padding: 1px 5px; border-radius: 4px; font-size: 10.5px; font-weight: 700;
  border: 1px solid var(--hairline-strong); color: var(--ink-2);
}

/* Continue Watching progress, pinned inside the artwork frame */
.tile__prog {
  position: absolute; z-index: 3; inset-inline: 0; bottom: 0;
  display: block; height: 3px; background: rgba(255,255,255,.24);
}
.tile__prog i { display: block; height: 100%; background: var(--prism); }

/* ---- Genre cards --------------------------------------------------------
   Flat colour blocks told the viewer nothing. These show real catalogue art
   behind the genre name, so browsing reads as content rather than swatches. */

.gcard {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-md);
  overflow: hidden;
  display: block; width: 100%;
  background: var(--surface-2);
  box-shadow: var(--sh-1);
  transition: transform var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.gcard:hover { transform: translateY(-2px); box-shadow: var(--sh-2), var(--glow-prism); }
.gcard:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.gcard__img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.04);
  /* the source art is already graded down; lift it back so dark frames
     (nebula, night interiors) still read as pictures rather than blocks */
  filter: brightness(1.32) saturate(1.12);
  transition: transform var(--slow) var(--ease);
}
.gcard:hover .gcard__img { transform: scale(1.1); }

.gcard__tint {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.28) 48%, rgba(0,0,0,.8) 100%),
    linear-gradient(135deg, hsl(var(--h, 280) 88% 46% / .3), transparent 66%);
}
.gcard__tint::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain); opacity: .06; mix-blend-mode: overlay;
}
/* prism edge-light along the top of every card */
.gcard__tint::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px;
  background: var(--prism); opacity: .5;
}

.gcard__body {
  position: absolute; z-index: 2; inset-inline: 0; bottom: 0;
  padding: var(--s-3);
  display: flex; flex-direction: column; gap: 2px;
  text-align: left;
}
.gcard__n {
  font-family: var(--font-brand);
  font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.95);
  line-height: 1.25;
}
.gcard__c {
  font-size: 10px; color: rgba(255,255,255,.72);
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}

/* ---- Title detail ------------------------------------------------------- */

.detail__hero { position: relative; }
.detail__hero .poster { border-radius: 0; aspect-ratio: auto; height: min(46vh, 380px); }
.detail__ttl {
  position: absolute; z-index: 2; inset-inline: 0; bottom: 0; padding: var(--s-4);
  font-family: var(--font-brand); font-size: 22px; line-height: 1.12;
  letter-spacing: .05em; text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.9);
}
.castcard { width: 84px; }
.castcard__img {
  aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
  background: linear-gradient(150deg, hsl(var(--h) 40% 34%), hsl(var(--h) 30% 14%));
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: var(--t-lg); color: rgba(255,255,255,.72);
}
.ep {
  display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--hairline);
}
.ep__n { width: 92px; flex: none; }

/* ---- Player ------------------------------------------------------------- */

.player {
  position: fixed; inset: 0; z-index: var(--z-player);
  background: #000; display: flex; flex-direction: column;
}
.player__stage {
  position: relative; flex: 1;
  display: grid; place-items: center;
  overflow: hidden;
}
.player__stage .poster {
  position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto;
  width: 100%; height: 100%;
}
.player__stage .poster::after { display: none; }

.player__ui {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,.6), transparent 26%, transparent 62%, rgba(0,0,0,.82));
  transition: opacity var(--base) var(--ease);
}
.player__top { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); }
.player__mid { display: flex; align-items: center; justify-content: center; gap: var(--s-8); }
.player__big {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: rgba(255,255,255,.14); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.24); color: #fff;
}
.player__big .ico { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.player__bot { padding: var(--s-3) var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }

.scrub { position: relative; height: 20px; display: flex; align-items: center; cursor: pointer; }
.scrub__track { height: 3px; width: 100%; border-radius: 2px; background: rgba(255,255,255,.24); }
.scrub__buf { position: absolute; height: 3px; border-radius: 2px; background: rgba(255,255,255,.34); }
.scrub__fill { position: absolute; height: 3px; border-radius: 2px; background: var(--prism); }
.scrub__knob {
  position: absolute; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px rgba(193,63,224,.9); transform: translateX(-50%);
}
.scrub--ad .scrub__fill { background: var(--gold); }
.scrub--ad .scrub__knob { background: var(--gold); box-shadow: 0 0 10px rgba(251,191,36,.9); }

/* Ad break overlay — MSA 1.2A(c) */
.adbar {
  position: absolute; z-index: 4; top: 0; inset-inline: 0;
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: linear-gradient(180deg, rgba(0,0,0,.86), transparent);
}
.adbar__tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px var(--s-2); border-radius: var(--r-xs);
  background: var(--gold); color: #2A1B00;
  font-family: var(--font-head); font-size: var(--t-2xs); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.adskip {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.28);
  color: #fff; font-size: var(--t-xs); font-weight: 600;
  backdrop-filter: blur(6px);
}
.adskip:disabled { opacity: .72; }
.ad-slate {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; align-content: center; gap: var(--s-2);
  text-align: center;
  /* clear the ad bar above and the scrubber below */
  padding: 72px var(--s-6) 104px;
  background: linear-gradient(150deg, #1A1608, #0A0904);
}
.ad-slate__mark {
  font-family: var(--font-brand); font-size: 15px; letter-spacing: .16em;
  color: rgba(251,191,36,.9);
}

/* "No ads on your plan" confirmation — proves entitlement visibly */
.entitle {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-pill);
  background: rgba(52,211,153,.14); border: 1px solid rgba(52,211,153,.3);
  color: var(--mint); font-size: var(--t-2xs); font-weight: 600;
}

/* ---- Shorts ------------------------------------------------------------- */

.shorts {
  height: 100vh; overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.shorts::-webkit-scrollbar { display: none; }
.short {
  position: relative; height: 100vh; scroll-snap-align: start; scroll-snap-stop: always;
  overflow: hidden;
}
.short .poster { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; height: 100%; }
.short__body {
  position: absolute; z-index: 3; inset-inline: 0; bottom: 0;
  padding: var(--s-5) 74px calc(var(--nav-h) + var(--safe-b) + var(--s-4)) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.short__t {
  font-family: var(--font-brand); font-size: 21px; letter-spacing: .05em;
  text-transform: uppercase; text-shadow: 0 2px 16px rgba(0,0,0,.9);
}
.short__rail {
  position: absolute; z-index: 3; right: var(--s-3);
  bottom: calc(var(--nav-h) + var(--safe-b) + var(--s-6));
  display: flex; flex-direction: column; gap: var(--s-4); align-items: center;
}
.short__act {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: var(--tap); min-height: var(--tap); justify-content: center;
  color: #fff; font-size: 10.5px; font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,.9);
}
.short__act .ico { filter: drop-shadow(0 1px 6px rgba(0,0,0,.8)); }
.short__act.is-on { color: var(--magenta); }
.short__act.is-on .ico { fill: currentColor; }

/* Community voting (Technical Proposal, Module C) */
.stars { display: flex; gap: 2px; margin-left: -6px; }
.stars button { min-width: 36px; min-height: var(--tap); display: grid; place-items: center; color: rgba(255,255,255,.4); }
.stars button.is-on { color: var(--gold); }
.stars button.is-on .ico { fill: currentColor; }
.stars .ico { width: 17px; height: 17px; }

/* ---- Plans -------------------------------------------------------------- */

.plan {
  position: relative;
  padding: var(--s-5) var(--s-4) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.plan:hover { border-color: var(--hairline-strong); }
.plan.is-sel { border-color: rgba(193,63,224,.6); box-shadow: var(--glow-prism); }
.plan--pop { border-color: rgba(251,191,36,.4); }
.plan__flag { position: absolute; top: -10px; left: var(--s-4); }
.plan__price { font-family: var(--font-head); font-size: 30px; font-weight: 700; line-height: 1; }
.plan__per { font-size: var(--t-xs); color: var(--ink-3); font-weight: 500; }
.plan__feat { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--t-xs); color: var(--ink-2); }
.plan__feat .ico { width: 15px; height: 15px; color: var(--mint); flex: none; margin-top: 2px; }

/* ---- Card / payment ----------------------------------------------------- */

.paycard {
  position: relative; overflow: hidden;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #241C42, #120E24);
  border: 1px solid var(--hairline-strong);
}
.paycard::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--prism);
}
.lockrow {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-2xs); color: var(--ink-3);
}
.lockrow .ico { width: 13px; height: 13px; color: var(--mint); }

/* ---- Settings rows ------------------------------------------------------ */

.setgroup { margin-top: var(--s-5); }
.setgroup__h {
  padding: 0 var(--s-4) var(--s-2);
  font-size: var(--t-2xs); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.setgroup .list { background: var(--surface-2); border-block: 1px solid var(--hairline); }

/* Device / cross-device sync */
.device { display: flex; align-items: center; gap: var(--s-3); }
.device__b {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2);
}
.device--live .device__b { background: rgba(52,211,153,.16); color: var(--mint); }

/* ==========================================================================
   Creator portal + AI Script Engine
   ========================================================================== */

/* ---- Dashboard ---------------------------------------------------------- */

.greet {
  padding: var(--s-5) var(--s-4) var(--s-4);
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(193,63,224,.16), transparent 62%),
    radial-gradient(100% 80% at 92% 8%, rgba(41,182,246,.12), transparent 62%);
}
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.statgrid .panel { padding: var(--s-3); text-align: center; }
.statgrid .stat__v { font-size: var(--t-lg); }

.cta-card {
  position: relative; overflow: hidden;
  padding: var(--s-5) var(--s-4);
  border-radius: var(--r-md);
  background: linear-gradient(140deg, #2A1246, #120E24 70%);
  border: 1px solid rgba(193,63,224,.28);
  box-shadow: var(--glow-prism);
  text-align: center;
}
.cta-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 90% at 50% 0%, rgba(193,63,224,.28), transparent 70%);
}
.cta-card > * { position: relative; }

/* ---- Project rows ------------------------------------------------------- */

.proj {
  display: flex; gap: var(--s-3); width: 100%; text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--hairline);
  transition: background var(--fast) var(--ease);
}
.proj:hover { background: rgba(255,255,255,.04); }
.proj__art { width: 54px; flex: none; }
.proj__art .poster { aspect-ratio: 2/3; }

/* ---- Service choice ($30 vs $70) ---------------------------------------- */

.svc {
  position: relative;
  padding: var(--s-5) var(--s-4) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  transition: all var(--fast) var(--ease);
}
.svc--express {
  border-color: rgba(251,191,36,.34);
  background: linear-gradient(150deg, rgba(251,191,36,.09), var(--surface-2) 62%);
}
.svc__ico {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2);
}
.svc--express .svc__ico { background: rgba(251,191,36,.16); color: var(--gold); }

/* ---- AI processing ------------------------------------------------------ */

.proc {
  display: grid; place-items: center; align-content: center; gap: var(--s-5);
  min-height: 100vh; padding: var(--s-6); text-align: center;
  background: radial-gradient(70% 44% at 50% 40%, rgba(124,58,237,.2), transparent 70%), var(--surface);
}
.proc__mark { width: 108px; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 18px rgba(193,63,224,.5)); }
  50%      { transform: scale(1.07); filter: drop-shadow(0 0 34px rgba(41,182,246,.75)); }
}
.proc__steps { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: var(--s-3); }
.pstep { display: flex; align-items: center; gap: var(--s-3); text-align: left; opacity: .38; transition: opacity var(--base); }
.pstep.is-on, .pstep.is-done { opacity: 1; }
.pstep__b {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--hairline-strong); color: var(--ink-3);
}
.pstep.is-on  .pstep__b { border-color: var(--magenta); color: var(--magenta); }
.pstep.is-done .pstep__b { background: var(--prism); border-color: transparent; color: #fff; }
.pstep.is-on .pstep__b::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25 } }

/* ---- Report ------------------------------------------------------------- */

.scorewrap { display: grid; justify-items: center; gap: var(--s-2); }
.score {
  display: grid; place-items: center;
  width: 78px; height: 78px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--magenta) calc(var(--v) * 1%), var(--surface-3) 0);
  position: relative;
}
.score::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface-2);
}
.score__v { position: relative; font-family: var(--font-head); font-size: 24px; font-weight: 700; line-height: 1; }
.score__k {
  font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; line-height: 1.25;
}

.budget-band { position: relative; height: 40px; margin-top: var(--s-2); }
.budget-band__track { position: absolute; top: 17px; inset-inline: 0; height: 6px; border-radius: 3px; background: var(--surface-4); }
.budget-band__fill {
  position: absolute; top: 17px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--mint), var(--gold), var(--rose));
}
.budget-band__mid {
  position: absolute; top: 10px; width: 2px; height: 20px; background: #fff; border-radius: 1px;
  box-shadow: 0 0 8px rgba(255,255,255,.8);
}

.flag { display: flex; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-sm); background: var(--surface-3); }
.flag__b { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 6px; }
.flag--warn .flag__b { background: rgba(245,158,11,.18); color: var(--amber); }
.flag--info .flag__b { background: rgba(56,189,248,.18); color: var(--sky); }
.flag--ok   .flag__b { background: rgba(52,211,153,.18); color: var(--mint); }

.beatline { position: relative; height: 56px; margin-top: var(--s-3); }
.beatline__rail { position: absolute; top: 26px; inset-inline: 4px; height: 2px; background: var(--surface-4); }
.beat { position: absolute; top: 20px; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; }
.beat i { width: 9px; height: 9px; border-radius: 50%; background: var(--prism); }
.beat span { font-size: 8.5px; color: var(--ink-3); white-space: nowrap; }

/* ---- Version history / timeline ----------------------------------------- */

.tl { position: relative; padding-left: var(--s-6); }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--hairline-strong); }
.tl__i { position: relative; padding-bottom: var(--s-5); }
.tl__i::before {
  content: ""; position: absolute; left: calc(var(--s-6) * -1 + 5px); top: 5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--surface-4);
  box-shadow: 0 0 0 3px var(--surface);
}
.tl__i.is-now::before { background: var(--prism); }

/* ---- Messages ----------------------------------------------------------- */

.msg { max-width: 84%; padding: var(--s-3); border-radius: var(--r-md); font-size: var(--t-sm); line-height: 1.5; }
.msg--in  { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 5px; }
.msg--out { align-self: flex-end; background: linear-gradient(135deg, var(--violet), var(--magenta)); border-bottom-right-radius: 5px; }
.msg__m { font-size: 10.5px; color: var(--ink-3); margin-top: 5px; }
.msg--out .msg__m { color: rgba(255,255,255,.7); }

/* ---- Licence ------------------------------------------------------------ */

.split-bar { display: flex; height: 34px; border-radius: var(--r-sm); overflow: hidden; }
.split-bar > div { display: grid; place-items: center; font-size: var(--t-2xs); font-weight: 700; }
