/* OEC performance layer. Loaded after every other stylesheet. Same look and branding:
   effects that repainted every frame (glows, pulses, grain, text sweeps) become static
   or play once, and phones / touch devices keep the scene but without continuous
   background motion. Also styles the live-content loading bar and connection notice. */

/* ===== Paint-heavy loops become static (they repainted the page every frame) ===== */
html .brand img{animation:none!important;box-shadow:0 0 22px rgba(142,61,255,.24),0 0 0 1px rgba(184,120,255,.1)}
html .btn.primary{animation:none!important}
html .elite-title{animation:none!important;text-shadow:0 0 13px rgba(142,61,255,.34),0 0 32px rgba(142,61,255,.18)}
/* Light sweeps play on arrival, not forever. */
html .page-title{animation-iteration-count:1!important}
html .elite-title:after{animation-iteration-count:2!important}
html .oec-sheen:before{animation-iteration-count:2!important}
/* Film grain keeps its texture without animating a page-sized blended layer. */
html .oec-grain{animation:none!important;will-change:auto!important;inset:0!important}

/* Render destination content immediately, including newly refreshed cards.
   Repeated fades and stagger delays make ordinary navigation feel hesitant. */
html body .reveal,html body .reveal.in,html body .reveal:not(.oec-settled){
  opacity:1!important;transform:none!important;
  transition:none!important;transition-delay:0s!important;
}

/* ===== Phones, tablets and touch screens: static background scene ===== */
@media (max-width:780px),(hover:none) and (pointer:coarse){
  html .fx-orb,html .fx-grid,html .fx3d-floor-plane,html .fx3d-logo-spin,html .fx3d-shape,html .fx3d-cube,
  html .fx3d-brand-cube .fx3d-cube,html .ambient .fx-logo,html body .ambient:before{animation:none!important}
  html .fx-orb{will-change:auto!important}
  html .fx3d-floor-plane,html .fx3d-logo-spin,html .fx3d-cube{will-change:auto!important}
  html .oec-grain{display:none!important}
  html .header{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  html nav{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  html .savebar{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:rgba(12,9,16,.98)!important}
}

/* ===== Live content loading bar ===== */
html.oec-loading body:before{
  content:"";position:fixed;top:0;left:0;z-index:10001;width:38%;height:2px;pointer-events:none;
  background:linear-gradient(90deg,transparent,#8e3dff 30%,#b878ff 70%,transparent);
  animation:oecLoadBar 1.1s ease-in-out infinite;
}
@keyframes oecLoadBar{from{transform:translateX(-100%)}to{transform:translateX(270%)}}

/* ===== Connection notice (only shown when live content cannot be reached) ===== */
#oecLiveStatus{
  position:fixed;left:16px;bottom:16px;z-index:10000;max-width:min(420px,calc(100vw - 32px));
  padding:10px 14px;border:1px solid rgba(137,66,255,.55);border-left:3px solid #8e3dff;
  background:rgba(12,9,16,.97);color:#e6e0ee;font-size:11px;font-weight:700;letter-spacing:.4px;line-height:1.5;
  box-shadow:0 14px 34px rgba(0,0,0,.4);
}
#oecLiveStatus[hidden]{display:none}

@media(prefers-reduced-motion:reduce){
  html.oec-loading body:before{animation:none;width:100%;opacity:.6}
}

/* Keep the layered OEC artwork static. Large filtered 3D layers exhaust the
   raster/compositing budget even when their motion uses transforms. */
html body .ambient,html body .ambient *,html body .ambient:before,html body .ambient:after,
html body .hero-logo,html body .hero-logo *,html body .hero-logo:before,html body .hero-logo:after,
html body .fx3d-brand-cube *{
  animation:none!important;will-change:auto!important;
}
html body .fx-orb{filter:none!important;opacity:.07}
html body .hero-logo>img,html body .fx3d-logo-layer.is-face{filter:none!important}
html body .oec-grain{display:none!important}
html body .header,html body nav,html body .savebar{
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  background-color:rgba(12,9,16,.98);
}
/* Preserve live colors and readable scores without repainting shadows or text. */
html body .page-title,html body .elite-title:after,html body .match.oec-is-live,
html body .oecp-match.is-live,html body .match-status:before,html body .oec-live-dot,
html body .oec-win-flash{animation:none!important}
html body .oec-glow{display:none!important}
/* Static loading surfaces avoid background-position repaint loops. */
html body :is(.match-grid,.team-grid,.media-grid,.rule-grid,.champion-grid,.grid-4,#oec-playoffs):empty,
html body tbody#standBody:empty:after,html body .oecp-empty:only-child{animation:none!important}
html.oec-motion-paused *,html.oec-motion-paused *:before,html.oec-motion-paused *:after{
  animation-play-state:paused!important;
}
