/* NOVA performance layer. Same look, cheaper to paint. Loaded last. */

/* background glow: the radial gradients are already soft, so the 90px blur and the blend mode are not needed */
.nv-atmos { contain: strict; }
.nv-atmos i { filter: none !important; mix-blend-mode: normal !important; will-change: transform; }
[data-theme="light"] .nv-atmos i { opacity: .22 !important; }
[data-theme="light"] .nv-atmos i:nth-child(2) { opacity: .16 !important; }
[data-theme="light"] .nv-atmos i:nth-child(3) { opacity: .1 !important; }

/* reveals: layers only while moving */
[data-rv], [data-rv].in { will-change: auto; }

/* touch devices and low-spec (class fxl): no grain overlay, no cursor glow, no blur reveals, cheaper glows */
html.fxl .nv-grain, html.fxl .nv-cursor { display: none !important; }
html.fxl [data-rv] { transition-property: opacity, transform; }
html.fxl [data-rv="blur"] { filter: none; }
html.fxl .nv-atmos i { animation-duration: 40s; }
html.fxl .nv-atmos::after { display: none; }
@keyframes egGlowT { 50% { opacity: .78; transform: scale(1.07); } }
@keyframes nvPingT { 0% { transform: scale(1); opacity: 1; } 60% { transform: scale(1.5); opacity: .55; } 100% { transform: scale(1); opacity: 1; } }
html.fxl .eg-b.on span { animation-name: egGlowT; }
html.fxl .nv-ic .nav-pip.show { animation-name: nvPingT; }
html.fxl .a-stat::after, html.fxl .nv-final .blob, html.fxl .au-art .orb2 { filter: none; }

/* lite (slow device, measured or detected): static background, no blurs, no looping shine */
html.lite .nv-atmos i { animation: none; }
html.lite .skeleton, html.lite .eg-bar i, html.lite .attend-bar-fill { animation: none !important; }
html.lite .nv-card, html.lite .nv-quiz, html.lite .au-card, html.lite .su-inner, html.lite .dk li { box-shadow: none; }
html.lite .nv-preload-glow { display: none; }

/* conic gradients that spun by animating --ang repaint every frame. Circles can rotate with a transform instead (same look, runs on the GPU). */
@keyframes nvRotT { to { transform: rotate(360deg); } }
.nv-hello::before { animation: nvRotT 9s linear infinite; }
.cp-hero::before { animation: nvRotT 8s linear infinite; }
.au-art .orb { animation: nvRotT 8s linear infinite, nvFloat 6s ease-in-out infinite; }
/* rounded borders cannot rotate that way: keep them still on touch and low-spec devices, with a soft opacity pulse instead */
@keyframes nvRingPulse { 50% { opacity: .55; } }
html.fxl .nv-ring::before, html.fxl #login-wrap .al::before { animation: nvRingPulse 3.2s ease-in-out infinite; --ang: 40deg; }

/* ===== phone hero (<= 900px): static in-flow layout, no overlap at any width, only transform/opacity motion ===== */
@keyframes nvGrowT { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
@keyframes nvFillT { from { transform: scaleX(.12); } to { transform: scaleX(.64); } }
@keyframes nvChipT { 50% { transform: translateY(-4px); } }
@media (max-width: 900px) {
  .nv-stage { height: auto !important; transform: none !important; perspective: none; transform-style: flat; margin: 18px auto 0 !important;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 380px; padding: 0 2px 8px; }
  .nv-stage .nv-obj, .nv-stage .nv-orbit { display: none !important; }
  .nv-stage .nv-card { position: static !important; inset: auto !important; margin: 0 !important; width: auto !important; transform: none !important; translate: none; rotate: none;
    transition: none; will-change: auto; min-width: 0; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 24px rgba(0,0,0,.18); }
  .nv-stage .nv-card.main { grid-column: 1 / -1; order: 1; padding: 12px; animation: none; }
  .nv-stage .nv-card.game { order: 2; animation: nvChipT 6s -3s ease-in-out infinite; }
  .nv-stage .nv-card.streak { order: 3; animation: nvChipT 7s -1s ease-in-out infinite; }
  .nv-stage .nv-card.report { order: 4; grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; animation: none; padding: 12px 16px; }
  .nv-stage .nv-card.game, .nv-stage .nv-card.streak { padding: 12px 14px; gap: 10px; }
  .nv-stage .nv-card small, .nv-stage .nv-card b { overflow-wrap: anywhere; }
  .nv-stage .nv-card.report .bars { margin: 0; height: 44px; flex: none; }
  .nv-stage .nv-card.report .bars i { height: var(--h); transform-origin: 50% 100%; animation: nvGrowT 3.6s var(--ease) infinite alternate; }
  .nvc-bar { position: relative; } .nvc-bar i { width: 100% !important; transform-origin: 0 50%; animation: nvFillT 4s var(--ease) infinite alternate !important; }
  [dir="rtl"] .nvc-bar i { transform-origin: 100% 50%; }
  .nvc-video .wave { animation: none; }
  .nvc-row b { min-width: 0; overflow-wrap: anywhere; }
  .nvc-top b { white-space: nowrap; }
  .nv-hero { overflow: hidden; }
}
@media (max-width: 380px) { .nv-stage .nv-card.game b, .nv-stage .nv-card.streak b { font-size: 1.1rem; } .nv-stage .nv-card small { font-size: .68rem; } }
@media (max-width: 400px) { .nv-nav.landing .nv-brand { display: flex; align-items: center; } .nv-nav.landing .nv-brand img { height: 24px; } }

/* sections that are off screen do not animate */
.nv-off *, .nv-off *::before, .nv-off *::after { animation-play-state: paused !important; }
/* touch / low-spec: no main-thread (layout or paint) loops */
html.fxl .nv-h2 em, html.fxl .nv-h1 em { animation: none; background-size: 100% 100%; }
html.fxl .viz.bars i { height: var(--h); transform-origin: 50% 100%; animation-name: nvGrowT; }
@media (max-width: 900px) {
  .rp-toast { position: static !important; inset: auto !important; margin: 12px 0 0 !important; max-width: none !important; animation: none !important; backdrop-filter: none !important; width: 100%; }
}
