/* Performance pass (loaded last): same layout and colours, far less GPU/CPU work.
   Decorative infinite animations, blur filters and backdrop blurs on lists are what made the Scripts page lag. */

/* 1. No always-running decoration on ordinary cards. New / updated scripts keep their glow (few cards, cheap). */
.is-anime, .is-anime::before, .is-anime::after, .afx-ring::before, .afx-hud, .afx-shine, .afx-bg i,
.is-excl::before, .is-excl::after, .xbadge, .xbadge::after, .xbadge svg { animation: none !important; }
.is-anime { opacity: 1 !important; }
.afx-bg i { display: none !important; }

/* New-script glow: soft green ring that keeps breathing on cards marked New. */
@keyframes scNewGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(52,245,181,.55), 0 0 14px -2px rgba(52,245,181,.45); }
  50%      { box-shadow: 0 0 0 1px rgba(52,245,181,.9),  0 0 26px 2px rgba(52,245,181,.55); }
}
#cards > .sc:has(.newb), #cards > .ig-post.is-hot:not(.is-anime):not(.is-excl) { opacity: 1 !important; transform: none; animation: scNewGlow 2.8s ease-in-out infinite; }
#cards > .sc:has(.newb):hover { animation: none; transform: translateY(-4px); }

/* 2. Entrance animations without blur filters (blur is very expensive per card). */
@keyframes hotIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes arrReveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 3. No backdrop blur inside the Scripts page content. */
#view-scripts .sc, #view-scripts .sc *, #view-scripts .ig-post, #view-scripts .ig-post *, #view-scripts .arrivals, #view-scripts .arrivals *,
#view-scripts .sc-tools, #view-scripts .sx-hero, #view-scripts .sx-hero * {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}

/* 4. Skip painting cards that are far off screen. */
#cards > .sc, #cards > .ig-post { content-visibility: auto; contain-intrinsic-size: auto 280px; }

/* 5. Scripts hero: static (blurred floating orbs and scan lines are costly). */
#view-scripts .sx-orb, #view-scripts .sx-scan { display: none !important; }
#view-scripts .sx-art, #view-scripts .sx-live::after, #view-scripts .sx-since i { animation: none !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
