/*
 * NEXUS takeover animation styles (see backdoor-takeover.js).
 * The glitch rules target #marquee, #page and #floor (and #bd-decoy when a decoy image is used).
 */
  /* ---- backdoor takeover: the page glitches, then NEXUS takes the screen ---- */
  body.bd-glitch #marquee,body.bd-glitch #page,body.bd-glitch #floor,body.bd-glitch #bd-decoy{animation:bd-tear .16s steps(2) infinite;}
  #bd-decoy{position:fixed;inset:0;z-index:2999;background:#0b0b1a center top / cover no-repeat;}
  body.bd-glitch #page{animation-delay:-.05s;}
  @keyframes bd-tear{
    0%{transform:translate(-8px,2px);filter:hue-rotate(80deg) contrast(1.7);clip-path:inset(0 0 42% 0);}
    35%{transform:translate(7px,-3px);filter:hue-rotate(-60deg) saturate(3);clip-path:inset(30% 0 8% 0);}
    70%{transform:translate(-3px,0) skewX(-6deg);filter:invert(.15) contrast(1.4);clip-path:none;}
    100%{transform:none;filter:none;clip-path:none;}
  }
  #bd{position:fixed;inset:0;z-index:3000;background:transparent;transition:background .35s steps(4);cursor:default;overflow:hidden;}
  #bd.dark{background:#020604;}
  #bd canvas{position:absolute;inset:0;width:100%;height:100%;display:block;}
  #bd-term{
    position:absolute;left:50%;top:58%;transform:translate(-50%,-50%);width:min(760px,calc(100% - 32px));
    font:700 clamp(13px,2.1vw,19px)/1.9 "Courier New",monospace;color:#39ff9e;letter-spacing:1px;
    text-shadow:0 0 8px rgba(57,255,158,.6),0 0 22px rgba(57,255,158,.25);
  }
  #bd-term .ln{white-space:pre-wrap;}
  #bd-term .ln.big{font-size:1.5em;color:#dfffea;}
  #bd-term .ln.dim{opacity:.55;}
  #bd-term .cur{display:inline-block;width:.6em;height:1em;background:#39ff9e;vertical-align:-.15em;margin-left:2px;animation:bd-blink .7s steps(1) infinite;}
  @keyframes bd-blink{50%{opacity:0;}}
  #bd-term.rgb{text-shadow:-3px 0 rgba(255,40,90,.85),3px 0 rgba(0,220,255,.85);transform:translate(-50%,-50%) skewX(-8deg);}
  #bd-skip{position:absolute;bottom:18px;left:0;right:0;text-align:center;font:12px "Courier New",monospace;color:#39ff9e;opacity:.45;margin:0;}
  #bd.flash{animation:bd-flash .5s ease-out forwards;}
  @keyframes bd-flash{0%{background:#020604;}30%{background:#dfffea;}100%{background:#000;}}
  @media (prefers-reduced-motion: reduce){
    body.bd-glitch #marquee,body.bd-glitch #page,body.bd-glitch #floor,body.bd-glitch #bd-decoy,#bd.flash{animation:none;}
    #bd-term.rgb{text-shadow:none;transform:translate(-50%,-50%);}
  }
