/* FlixStage 3.0 — floating theater. Cinematic, premium, mobile-first. */
.fx-back{position:fixed;inset:0;z-index:99990;background:rgba(5,5,8,.82);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:center;padding:4vh 4vw;animation:fxIn .28s ease}
@keyframes fxIn{from{opacity:0}to{opacity:1}}
.fx-dlg{width:min(1120px,100%);max-height:92vh;display:flex;flex-direction:column;background:#101016;border:1px solid rgba(255,255,255,.09);border-radius:16px;overflow:hidden;box-shadow:0 30px 90px rgba(0,0,0,.7),0 0 40px rgba(229,9,20,.12);animation:fxUp .32s cubic-bezier(.2,.9,.25,1.2)}
@keyframes fxUp{from{opacity:0;transform:translateY(26px) scale(.98)}to{opacity:1;transform:none}}
.fx-top{display:flex;align-items:center;gap:12px;padding:12px 16px;background:linear-gradient(180deg,#181820,#101016);border-bottom:1px solid rgba(255,255,255,.07)}
.fx-thumb{width:44px;height:64px;object-fit:cover;border-radius:8px;flex:none}
.fx-tinfo{min-width:0;flex:1}
.fx-title{color:#fff;font-weight:800;font-size:1.02rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fx-sub{color:#8b8b94;font-size:.75rem;margin-top:2px}
.fx-epmark{color:#e50914;font-weight:700}
.fx-close{flex:none;width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06);color:#fff;cursor:pointer;font-size:1rem;line-height:1}
.fx-close:hover{background:#e50914;border-color:#e50914}
.fx-tabs{display:flex;gap:8px;align-items:center;padding:10px 16px 0;flex-wrap:wrap}
.fx-tab{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#d4d4d8;font-size:.78rem;font-weight:700;padding:7px 14px;border-radius:999px;cursor:pointer;text-decoration:none}
.fx-tab.on{background:#e50914;border-color:#e50914;color:#fff}
.fx-tab:hover{border-color:#e50914;color:#fff}
.fx-rep{margin-left:auto;color:#8b8b94}
.fx-stage{position:relative;margin:12px 16px 0;background:#000;border-radius:12px;overflow:hidden;aspect-ratio:16/9;max-height:56vh}
.fx-frame,.fx-video{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000}
.fx-spin{position:absolute;inset:0;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;color:#a1a1aa;font-size:.85rem}
.fx-ring{width:44px;height:44px;border-radius:50%;border:3px solid rgba(229,9,20,.25);border-top-color:#e50914;animation:fxSpin 1s linear infinite}
@keyframes fxSpin{to{transform:rotate(360deg)}}
.fx-err{position:absolute;inset:0;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;color:#d4d4d8;text-align:center;padding:20px}
.fx-err i{font-size:2rem;color:#e50914}
.fx-retry{background:#e50914;color:#fff;border:0;border-radius:8px;padding:9px 22px;font-weight:800;cursor:pointer}
.fx-eps{padding:10px 16px 0}
.fx-step{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fx-slab{color:#fff;font-weight:800;font-size:.85rem;background:rgba(229,9,20,.15);border:1px solid rgba(229,9,20,.4);padding:6px 12px;border-radius:8px}
.fx-stbtn{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);color:#fff;font-size:.75rem;font-weight:700;padding:6px 12px;border-radius:8px;cursor:pointer}
.fx-stbtn:hover{border-color:#e50914}
.fx-cont{color:#f5c518;font-size:.78rem;font-weight:700}
.fx-rail{display:flex;gap:8px;overflow-x:auto;padding:12px 16px;scrollbar-width:thin}
.fx-chip{flex:none;display:inline-flex;align-items:center;gap:7px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);color:#e4e4e7;font-size:.78rem;font-weight:700;padding:8px 14px;border-radius:10px;cursor:pointer}
.fx-chip.on{background:rgba(229,9,20,.18);border-color:#e50914;color:#fff}
.fx-chip:hover{border-color:#e50914}
.fx-dot{width:8px;height:8px;border-radius:50%;background:#4ade80;flex:none}
.fx-chip:not(.on) .fx-dot{background:#52525b}
.fx-b{font-size:.6rem;font-weight:800;padding:2px 6px;border-radius:4px;letter-spacing:.03em}
.fx-hi{background:#e50914;color:#fff}
.fx-q{background:#f5c518;color:#000}
.fx-m{background:#7c3aed;color:#fff}
.fx-c{background:#16a34a;color:#fff}
.fx-f{background:#0284c7;color:#fff}
.fx-p{background:#b45309;color:#fff}
.fx-n{background:#059669;color:#fff}
.fx-bar{display:flex;align-items:center;gap:12px;padding:10px 16px 14px;border-top:1px solid rgba(255,255,255,.07)}
.fx-hint{color:#63636b;font-size:.72rem}
.fx-sp{flex:1}
.fx-dl,.fx-next{color:#fff;font-size:.78rem;font-weight:700;text-decoration:none;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);padding:7px 14px;border-radius:8px;cursor:pointer}
.fx-dl:hover,.fx-next:hover{border-color:#e50914}
.fx-toast{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);background:rgba(0,0,0,.85);border:1px solid rgba(229,9,20,.5);color:#fff;font-size:.8rem;padding:9px 18px;border-radius:999px;white-space:nowrap;max-width:90%;overflow:hidden;text-overflow:ellipsis;z-index:5}
/* Click-shield gate: branded cover absorbing the first click. */
.fx-shield{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;gap:14px;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,rgba(10,10,16,.55),rgba(5,5,8,.88));cursor:pointer}
.fx-shield-btn{width:84px;height:84px;border-radius:50%;border:0;background:#e50914;color:#fff;font-size:1.8rem;cursor:pointer;position:relative;box-shadow:0 0 0 0 rgba(229,9,20,.55);animation:fxPulse 2s infinite}
.fx-shield-btn:hover{background:#f6121d}
.fx-shield-btn.busy{animation:fxSpin 1s linear infinite;background:#e50914}
.fx-shield-btn.busy::after{content:'';position:absolute;inset:-6px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;animation:fxSpin .8s linear infinite}
@keyframes fxPulse{0%{box-shadow:0 0 0 0 rgba(229,9,20,.55)}70%{box-shadow:0 0 0 22px rgba(229,9,20,0)}100%{box-shadow:0 0 0 0 rgba(229,9,20,0)}}
.fx-shield-t{color:#fff;font-weight:800;font-size:.95rem;letter-spacing:.02em}
/* Sentinel attention pulse on the Next-source button. */
.fx-next.fx-attn{border-color:#e50914;animation:fxPulse 1.2s infinite}
.fx-fs{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:32px;padding:0 10px;font-size:.78rem;color:#fff;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);border-radius:8px;cursor:pointer}
.fx-fs:hover{border-color:#e50914}
/* Expand-mode fallback: fills the viewport when native fullscreen is missing. */
.fx-dlg.fx-full{position:fixed;inset:0;z-index:99999;width:100%;max-width:none;max-height:none;height:100%;height:100dvh;border-radius:0}
.fx-dlg.fx-full .fx-stage{margin-left:auto;margin-right:auto;width:100%;max-width:1100px}
@media(max-width:640px){
  .fx-fs{min-height:44px;min-width:48px;font-size:.8rem}
  .fx-dlg.fx-full{border-radius:0}
}
/* Local stage extras: subtitle upload + audio track select. */
.fx-cc{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:32px;padding:0 10px;font-size:.72rem;font-weight:800;color:#fff;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);border-radius:8px;cursor:pointer}
.fx-cc:hover{border-color:#e50914}
.fx-audio{background:#14141a;color:#fff;border:1px solid rgba(255,255,255,.14);border-radius:8px;font-size:.72rem;padding:6px 8px;max-width:150px;cursor:pointer}
/* Instant loader veil over fresh iframes. */
.fx-veil{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;background:#000;pointer-events:none}
.fx-vast{position:absolute;inset:0;background:#000}
.fx-vast .fx-video{position:absolute;inset:0}
.fx-adtag{position:absolute;top:10px;left:10px;background:rgba(0,0,0,.7);color:#f5c518;font-size:.68rem;font-weight:800;padding:4px 10px;border-radius:4px;z-index:2}
.fx-adcount{position:absolute;bottom:12px;left:10px;background:rgba(0,0,0,.7);color:#fff;font-size:.72rem;padding:4px 10px;border-radius:4px;z-index:2}
.fx-skip{position:absolute;bottom:12px;right:10px;background:#e50914;color:#fff;border:0;font-size:.75rem;font-weight:800;padding:8px 16px;border-radius:6px;cursor:pointer;z-index:2}
.fx-dlg *{-webkit-tap-highlight-color:transparent}
.fx-close:focus,.fx-tab:focus,.fx-chip:focus,.fx-next:focus,.fx-dl:focus,.fx-stbtn:focus,.fx-retry:focus,.fx-skip:focus{outline:none}
.fx-close:focus-visible,.fx-tab:focus-visible,.fx-chip:focus-visible,.fx-next:focus-visible,.fx-dl:focus-visible,.fx-stbtn:focus-visible,.fx-retry:focus-visible,.fx-skip:focus-visible{box-shadow:0 0 0 2px #101016,0 0 0 4px #e50914}
/* ============ Center Stage: mobile redesign (<=640px) ============
 * Centered floating card · 12/13/14 type scale · 44px touch targets ·
 * 2-column server grid · safe-area + dvh aware. */
@media(max-width:640px){
  .fx-back{padding:12px;align-items:center;justify-content:center}
  .fx-dlg{border-radius:20px;max-height:92vh;max-height:92dvh;width:100%;box-shadow:0 24px 70px rgba(0,0,0,.75),0 0 34px rgba(229,9,20,.14);animation:fxUp .3s cubic-bezier(.2,.9,.25,1.05)}
  .fx-top{padding:10px 12px;gap:10px}
  .fx-thumb{width:36px;height:52px;border-radius:7px}
  .fx-tinfo{min-width:0}
  .fx-title{font-size:.9rem;letter-spacing:-.01em}
  .fx-sub{font-size:.72rem}
  .fx-close{width:40px;height:40px;font-size:.95rem;flex:none;background:rgba(255,255,255,.05)}
  .fx-tabs{flex-wrap:nowrap;overflow-x:auto;padding:10px 12px 2px;scrollbar-width:none;-ms-overflow-style:none}
  .fx-tabs::-webkit-scrollbar{display:none}
  .fx-tab{flex:none;font-size:.78rem;font-weight:700;padding:9px 15px;min-height:44px;display:inline-flex;align-items:center;letter-spacing:.01em}
  .fx-tab:active{transform:scale(.97)}
  .fx-rep{margin-left:0}
  .fx-stage{margin:8px 12px 0}
  .fx-hint{display:none}
  .fx-rail{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 12px;overflow-y:auto;max-height:30vh;scrollbar-width:none;-ms-overflow-style:none}
  .fx-rail::-webkit-scrollbar{display:none}
  .fx-chip{min-height:44px;font-size:.78rem;padding:8px 11px;border-radius:12px;gap:8px;justify-content:flex-start;animation:fxUp .3s ease backwards}
  .fx-chip:nth-child(2){animation-delay:.03s}.fx-chip:nth-child(3){animation-delay:.06s}
  .fx-chip:nth-child(4){animation-delay:.09s}.fx-chip:nth-child(5){animation-delay:.12s}
  .fx-chip:nth-child(n+6){animation-delay:.15s}
  .fx-chip:active{transform:scale(.97)}
  .fx-chip>span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
  .fx-dot{width:7px;height:7px}
  .fx-b{font-size:.6rem;padding:3px 6px;flex:none}
  .fx-eps{padding:8px 12px 0}
  .fx-step{flex-wrap:wrap;gap:8px}
  .fx-slab{font-size:.8rem}
  .fx-stbtn{min-height:44px;font-size:.76rem;padding:8px 13px}
  .fx-cont{width:100%;font-size:.74rem}
  .fx-bar{display:flex;flex-wrap:wrap;gap:8px;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px))}
  .fx-dl,.fx-next{flex:1 1 40%;text-align:center;min-height:44px;display:inline-flex;align-items:center;justify-content:center;font-size:.78rem}
  .fx-dl:active,.fx-next:active{transform:scale(.97)}
  .fx-audio{flex:1 1 45%;min-height:44px;font-size:.76rem}
  .fx-cc{min-height:44px;min-width:48px;font-size:.76rem}
  .fx-toast{bottom:14px;font-size:.76rem;white-space:normal;text-align:center;border-radius:12px;line-height:1.4}
  .fx-shield-btn{width:64px;height:64px;font-size:1.4rem}
  .fx-shield-t{font-size:.82rem;letter-spacing:.03em}
  .fx-vast .fx-skip{min-height:44px;padding:10px 20px}
  .fx-err{font-size:.85rem}
}
/* Landscape phones: give the stage room, keep chrome compact. */
@media(max-width:900px) and (orientation:landscape){
  .fx-back{padding:0;align-items:stretch}
  .fx-dlg{border-radius:0;max-height:100vh;width:100%}
  .fx-top{padding:8px 12px}
  .fx-thumb{display:none}
  .fx-tabs{padding:8px 12px 0}
  .fx-stage{margin:8px 12px 0;max-height:52vh}
  .fx-eps{display:none !important}
  .fx-rail{padding:8px 12px}
  .fx-bar{padding:8px 12px 10px}
}
@media (prefers-reduced-motion:reduce){
  .fx-back,.fx-dlg,.fx-ring,.fx-shield-btn,.fx-chip,.fx-next.fx-attn{animation:none !important}
}
