/* =========================================================
   SMPVN botanical motion refresh
   - keep menu botanical decoration
   - remove dense bottom bed
   - use only 2 bottom corner leaves on marketplace/home
   - keep auth botanical decoration
   ========================================================= */
.rainforest-world,.rainforest-menu,.rf-scene,.rf-page-scene,.auth-rainforest-scene,.rf-home-scene{display:none!important}

.rf-menu-scene,.rf-home-corner,.rf-auth-scene{
  position:absolute;
  pointer-events:none!important;
  user-select:none;
  -webkit-user-select:none;
  overflow:visible;
  contain:layout paint;
}
.rf-menu-scene *, .rf-home-corner *, .rf-auth-scene *{pointer-events:none!important}
.rf-botanical-img{
  position:absolute;
  display:block;
  max-width:none;
  height:auto;
  will-change:transform;
  transform:translateZ(0);
}

/* Menu: keep as decorative layer behind the existing menu structure. */
.sidebar.block-menu{isolation:isolate}
.sidebar.block-menu>:not(.rf-menu-scene){position:relative;z-index:1}
.rf-menu-scene{
  z-index:0;
  top:34px;
  right:-96px;
  width:286px;
  height:430px;
  opacity:.28;
  filter:saturate(.92) brightness(.72) drop-shadow(0 18px 26px rgba(0,0,0,.20));
}
.rf-menu-scene .rf-botanical-img{
  width:100%;
  right:0;
  top:0;
  transform-origin:76% 8%;
  animation:rf-menu-sway 8.2s ease-in-out infinite alternate;
}

/* Home / marketplace: only 2 corner leaves near the footer. */
.footer{position:relative;isolation:isolate;overflow:visible}
.footer>.rf-home-corner{z-index:0}
.footer>:not(.rf-home-corner){position:relative;z-index:1}
.rf-home-corner{
  bottom:0;
  width:245px;
  height:300px;
  opacity:.30;
  filter:saturate(.96) brightness(.70) drop-shadow(0 18px 28px rgba(0,0,0,.18));
}
.rf-home-corner .rf-botanical-img{
  width:100%;
  right:0;
  bottom:0;
  top:auto;
  transform-origin:50% 100%;
  animation:rf-corner-sway 6.2s ease-in-out infinite alternate !important;
  animation-play-state:running !important;
}
.rf-home-corner-left{left:14px}
.rf-home-corner-right{right:14px;transform:scaleX(-1)}
.rf-home-corner-right .rf-botanical-img{animation-duration:7.8s}

/* Authentication: keep existing decorative plant. */
.auth-shell{position:relative;isolation:isolate;overflow:hidden}
.auth-art,.auth-form{position:relative;z-index:2}
.rf-auth-scene{
  z-index:1;
  inset:0;
  overflow:hidden;
}
.rf-auth-scene .rf-botanical-img{
  width:min(610px,67%);
  right:-58px;
  top:-48px;
  opacity:.46;
  filter:saturate(.95) brightness(.74) drop-shadow(0 22px 30px rgba(0,0,0,.22));
  transform-origin:91% 5%;
  animation:rf-auth-sway 7.6s ease-in-out infinite alternate;
}

.rf-auth-scene::before,.rf-auth-scene::after{content:"";position:absolute;pointer-events:none;background-repeat:no-repeat;background-size:contain;background-position:center;will-change:transform,opacity;z-index:1;opacity:0}
.rf-auth-scene::before{background-image:url('rainforest/leaf.png')}
.rf-auth-scene::after{background-image:url('rainforest/fern.png')}

/* Water drops */
.rf-water-drop{
  --fall:150px;
  --drift:6px;
  position:absolute;
  left:var(--x,50%);
  top:var(--y,30%);
  z-index:3;
  width:var(--drop-w,4px);
  height:calc(var(--drop-w,4px) * 2.2);
  border-radius:55% 45% 58% 42% / 68% 68% 32% 32%;
  opacity:0;
  background:linear-gradient(165deg,rgba(248,255,253,.96) 0%,rgba(188,239,229,.7) 44%,rgba(107,192,178,.48) 100%);
  box-shadow:inset 0 0 1px rgba(255,255,255,.8),0 1px 4px rgba(126,227,207,.24);
  filter:drop-shadow(0 0 2px rgba(192,249,238,.3));
  will-change:transform,opacity;
  animation:rf-water-fall var(--speed,3.8s) cubic-bezier(.28,.05,.63,.98) infinite;
  animation-delay:var(--delay,0s);
}
.rf-water-drop::after{
  content:"";
  position:absolute;
  width:35%;
  height:25%;
  left:18%;
  top:15%;
  border-radius:50%;
  background:rgba(255,255,255,.86);
}
.rf-menu-scene .rf-water-drop{--fall:118px;--drop-w:3px}
.rf-home-corner .rf-water-drop{--fall:116px;--drop-w:3px}
.rf-auth-scene .rf-water-drop{--fall:165px;--drop-w:4px}

@keyframes rf-menu-sway{
  0%{transform:rotate(-1.8deg) translate3d(-2px,1px,0)}
  46%{transform:rotate(.35deg) translate3d(2px,-2px,0)}
  100%{transform:rotate(1.7deg) translate3d(5px,3px,0)}
}
@keyframes rf-corner-sway{
  0%{transform:rotate(-1.15deg) translate3d(-3px,1px,0)}
  50%{transform:rotate(.45deg) translate3d(1px,-2px,0)}
  100%{transform:rotate(1.1deg) translate3d(4px,2px,0)}
}
@keyframes rf-auth-mobile-leaf{
  0%{transform:translate3d(-2px,0,0) rotate(-6deg)}
  100%{transform:translate3d(4px,-3px,0) rotate(4deg)}
}
@keyframes rf-auth-mobile-fern{
  0%{transform:translate3d(0,1px,0) rotate(5deg)}
  100%{transform:translate3d(-4px,-2px,0) rotate(-4deg)}
}
@keyframes rf-auth-sway{
  0%{transform:translate3d(-2px,0,0) rotate(-1.25deg)}
  100%{transform:translate3d(6px,5px,0) rotate(1.45deg)}
}
@keyframes rf-water-fall{
  0%,14%{opacity:0;transform:translate3d(0,-2px,0) scale(.45,.55)}
  18%{opacity:.92;transform:translate3d(0,1px,0) scale(.92,1)}
  30%{opacity:.9;transform:translate3d(1px,8px,0) scale(1,1.06)}
  100%{opacity:0;transform:translate3d(var(--drift),var(--fall),0) scale(.72,1.55)}
}

@media(min-width:761px){
  /* Desktop: remove the 2 bottom home leaves; menu decoration stays. */
  .footer>.rf-home-corner{display:none!important}
  .rf-menu-scene{
    top:168px;
    right:-100px;
    width:308px;
    height:458px;
    opacity:.40;
    filter:saturate(1.08) brightness(.58) contrast(1.1) drop-shadow(0 24px 30px rgba(0,0,0,.30));
  }
  .rf-menu-scene .rf-botanical-img{
    transform-origin:74% 10%;
    animation:rf-menu-sway-strong 4.2s ease-in-out infinite alternate !important;
    animation-play-state:running !important;
  }

  .footer>.rf-home-corner{
    width:250px;
    height:312px;
    bottom:6px;
    opacity:.34;
    filter:saturate(1.02) brightness(.66) contrast(1.04) drop-shadow(0 22px 30px rgba(0,0,0,.24));
  }
  .footer>.rf-home-corner-left{left:18px}
  .footer>.rf-home-corner-right{right:18px}
  .footer>.rf-home-corner .rf-botanical-img{animation:rf-corner-sway-strong 4.6s ease-in-out infinite alternate !important;animation-play-state:running !important;transform-origin:50% 100%}

  .rf-auth-scene .rf-botanical-img{
    animation:rf-auth-sway 6.0s ease-in-out infinite alternate !important;
    animation-play-state:running !important;
    opacity:.50;
    filter:saturate(1.02) brightness(.69) contrast(1.05) drop-shadow(0 22px 30px rgba(0,0,0,.22));
  }

  .rf-menu-scene .rf-water-drop{--fall:136px;--drop-w:3.3px}
  .footer>.rf-home-corner .rf-water-drop{--fall:128px;--drop-w:3.2px}
  .rf-auth-scene .rf-water-drop{--fall:172px;--drop-w:4.1px}
}

@keyframes rf-menu-sway-strong{
  0%{transform:translate3d(-10px,1px,0) rotate(-4deg) scale(1.01)}
  50%{transform:translate3d(2px,-6px,0) rotate(.8deg) scale(1.025)}
  100%{transform:translate3d(12px,5px,0) rotate(3.8deg) scale(1.012)}
}
@keyframes rf-corner-sway-strong{
  0%{transform:translate3d(-8px,1px,0) rotate(-4.2deg) scale(1.01)}
  50%{transform:translate3d(1px,-7px,0) rotate(.7deg) scale(1.025)}
  100%{transform:translate3d(9px,3px,0) rotate(4deg) scale(1.012)}
}

@media(max-width:760px){
  .rf-menu-scene{
    top:78px;
    right:-112px;
    width:255px;
    height:390px;
    opacity:.24;
    filter:saturate(.86) brightness(.62) drop-shadow(0 14px 22px rgba(0,0,0,.18));
  }
  .rf-menu-scene .rf-botanical-img{animation:rf-menu-sway 6.8s ease-in-out infinite alternate !important;animation-play-state:running !important}

  /* Keep mobile clean: menu stays, bottom home leaves are hidden. */
  .rf-home-corner{display:none!important}

  .rf-auth-scene{z-index:1}
  .rf-auth-scene .rf-botanical-img{
    width:220px;
    right:-84px;
    top:-52px;
    opacity:.34;
    filter:saturate(.92) brightness(.67) drop-shadow(0 14px 20px rgba(0,0,0,.18));
    animation-duration:8.2s;
  }
  .rf-auth-scene::before{
    left:-30px;
    bottom:-18px;
    width:132px;
    height:150px;
    opacity:.23;
    transform-origin:18% 100%;
    animation:rf-auth-mobile-leaf 6.6s ease-in-out infinite alternate;
  }
  .rf-auth-scene::after{
    left:-12px;
    bottom:-6px;
    width:118px;
    height:86px;
    opacity:.18;
    transform-origin:8% 100%;
    animation:rf-auth-mobile-fern 7.4s ease-in-out infinite alternate;
  }
  .rf-auth-scene .rf-water-drop{--fall:120px;--drop-w:3px}
}

@media(max-width:520px){
  .rf-menu-scene{right:-122px;width:235px;opacity:.2}
  .rf-auth-scene .rf-botanical-img{width:198px;right:-84px;top:-46px;opacity:.30}
  .rf-auth-scene::before{width:110px;height:128px;left:-28px;bottom:-16px;opacity:.2}
  .rf-auth-scene::after{width:100px;height:72px;left:-10px;bottom:-6px;opacity:.16}
}

@media(prefers-reduced-motion:reduce){
  .rf-menu-scene .rf-botanical-img{animation-duration:7.5s!important;animation-play-state:running!important}
  .rf-home-corner .rf-botanical-img{animation-duration:7.2s!important;animation-play-state:running!important}
  .rf-auth-scene .rf-botanical-img{animation-duration:8s!important;animation-play-state:running!important}
  .rf-water-drop{animation-duration:6.5s!important}
}
