
body.animated-bg-active{background:transparent!important;isolation:isolate}
body.animated-bg-active::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.92;background-color:var(--animated-base,#e0f2fe);background-image:var(--animated-pattern,linear-gradient(135deg,#dbeafe,#f0f9ff));background-size:cover;background-position:center;will-change:background-position,filter;}
body.animated-bg-waterfall::before{--animated-base:#0c4a6e;--animated-pattern:radial-gradient(ellipse at 50% 100%,rgba(186,230,253,.75),transparent 45%),repeating-linear-gradient(90deg,transparent 0 4%,rgba(255,255,255,.18) 4.2% 4.6%,transparent 5% 9%),linear-gradient(180deg,#082f49 0%,#075985 25%,#38bdf8 58%,#bae6fd 83%,#0c4a6e 100%);background-size:100% 100%,200% 180%,100% 220%;animation:waterfallFlow 9s linear infinite;}
body.animated-bg-waves::before{--animated-base:#0e7490;--animated-pattern:radial-gradient(ellipse at 15% 110%,rgba(255,255,255,.65),transparent 40%),radial-gradient(ellipse at 70% 120%,rgba(103,232,249,.8),transparent 42%),linear-gradient(180deg,#082f49,#0891b2 60%,#cffafe);background-size:140% 140%,160% 160%,100% 100%;animation:waveFlow 12s ease-in-out infinite alternate;}
body.animated-bg-aurora::before{--animated-base:#0f172a;--animated-pattern:radial-gradient(ellipse at 15% 20%,rgba(34,197,94,.55),transparent 38%),radial-gradient(ellipse at 80% 25%,rgba(45,212,191,.55),transparent 40%),radial-gradient(ellipse at 55% 85%,rgba(129,140,248,.55),transparent 42%),linear-gradient(135deg,#020617,#172554,#042f2e);background-size:160% 160%,180% 180%,170% 170%,100% 100%;animation:auroraFlow 16s ease-in-out infinite alternate;}
body.animated-bg-rain::before{--animated-base:#334155;--animated-pattern:repeating-linear-gradient(105deg,transparent 0 28px,rgba(219,234,254,.45) 29px,transparent 31px),linear-gradient(180deg,#0f172a,#334155 70%,#64748b);background-size:100% 180%;animation:rainFlow .8s linear infinite;}
@keyframes waterfallFlow{0%{background-position:center,0 0,center top}100%{background-position:center,0 180%,center bottom}}
@keyframes waveFlow{0%{background-position:0% 40%,100% 50%,center}100%{background-position:100% 60%,0% 45%,center}}
@keyframes auroraFlow{0%{background-position:0% 20%,100% 10%,50% 90%,center;filter:hue-rotate(0deg)}100%{background-position:100% 80%,0% 70%,80% 10%,center;filter:hue-rotate(25deg)}}
@keyframes rainFlow{from{background-position:0 0,center}to{background-position:0 180%,center}}
@media(prefers-reduced-motion:reduce){body.animated-bg-active::before{animation:none!important}}
/* Realistic nature video background: visual-only layer, never touches app records. */
#realBgVideo,#realBgShade{display:none;position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
body.real-video-bg-active{background:transparent!important;isolation:isolate}
body.real-video-bg-active::before{display:none!important}
body.real-video-bg-active #realBgVideo{display:block;z-index:-2;object-fit:cover;opacity:.88;filter:saturate(1.12) contrast(1.04)}
body.real-video-bg-active #realBgShade{display:block;z-index:-1;background:linear-gradient(135deg,rgba(2,6,23,.38),rgba(15,23,42,.12) 48%,rgba(2,6,23,.38))}
body.real-video-bg-active>*:not(#realBgVideo):not(#realBgShade){position:relative;z-index:1}
@media(prefers-reduced-motion:reduce){body.real-video-bg-active #realBgVideo{display:none!important}}
