/* ═══════════════════════════════════════════════════════════
   🌲 FOREST THEME — Real AI-generated photo backgrounds
   + glass refraction cards + animated overlay
   ═══════════════════════════════════════════════════════════ */

:root{
  --firefly:#fff7c2;
  --glass-tint:rgba(255,255,255,.18);
  --glass-edge:rgba(255,255,255,.45);
}

/* ─── Forest scene container (full-bleed background) ─── */
.forest-scene{
  position:fixed;
  inset:0;
  z-index:0;
  overflow:hidden;
  pointer-events:none;
}

/* Live looping nature video as background */
.forest-video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Atmospheric overlays — soften the photo + add mood */
.forest-scene::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0,0,0,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255,255,255,.10) 0%, transparent 60%);
  pointer-events:none;
  z-index:2;
}

/* Mist drift removed for performance — video provides the motion */

/* ─── Bubbles rising overlay (login water scene) ─── */
.bubble-layer{
  position:absolute; inset:0;
  pointer-events:none;
  z-index:5;
  overflow:hidden;
}
.bubble{
  position:absolute;
  bottom:-50px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%,
    rgba(255,255,255,.85) 0%,
    rgba(220,245,255,.45) 35%,
    rgba(180,220,250,.20) 70%,
    transparent 100%);
  border:1.5px solid rgba(255,255,255,.7);
  box-shadow:
    inset -3px -3px 5px rgba(120,180,220,.25),
    inset 2px 2px 4px rgba(255,255,255,.4),
    0 0 6px rgba(255,255,255,.3);
  animation:bubbleRise linear infinite;
  opacity:0;
}
@keyframes bubbleRise{
  0%   { transform:translate(0, 0) scale(.5); opacity:0 }
  8%   { opacity:var(--max-opacity, .85) }
  50%  { transform:translate(var(--drift, 0), -55vh) scale(1) }
  90%  { opacity:calc(var(--max-opacity, .85) * .6) }
  100% { transform:translate(0, -115vh) scale(1.2); opacity:0 }
}
@media (hover:none) and (pointer:coarse){
  /* fewer bubbles needed on small screens — just keep them */
  .bubble{ filter:none }
}

/* ─── Fireflies / particles overlay (light, GPU-friendly) ─── */
.firefly-layer{
  position:absolute;inset:0;
  pointer-events:none;
  z-index:4;
  /* hide fireflies entirely on touch (mobile) for perf */
}
@media (hover:none) and (pointer:coarse){
  .firefly-layer{ display:none }
}
.firefly{
  position:absolute;
  width:4px;height:4px;border-radius:50%;
  background:var(--firefly);
  box-shadow:
    0 0 4px var(--firefly),
    0 0 10px rgba(255,247,194,.5);
  pointer-events:none;
  opacity:0;
  animation:fireflyBlink 3s ease-in-out infinite;
  will-change:opacity;
}
.firefly:nth-child(1){left:8%;top:55%; animation-delay:0s,0s}
.firefly:nth-child(2){left:22%;top:50%; animation-delay:-2s,-.8s}
.firefly:nth-child(3){left:38%;top:60%; animation-delay:-4s,-1.2s}
.firefly:nth-child(4){left:58%;top:48%; animation-delay:-1s,-.4s}
.firefly:nth-child(5){left:72%;top:65%; animation-delay:-3s,-1.8s}
.firefly:nth-child(6){left:84%;top:55%; animation-delay:-5s,-1.0s}
.firefly:nth-child(7){left:30%;top:72%; animation-delay:-7s,-2.2s}
.firefly:nth-child(8){left:55%;top:78%; animation-delay:-6s,-.6s}
.firefly:nth-child(9){left:6%;top:42%; animation-delay:-8s,-1.4s}
.firefly:nth-child(10){left:90%;top:38%; animation-delay:-9s,-2.0s}
.firefly:nth-child(11){left:48%;top:35%; animation-delay:-10s,-1.6s}
.firefly:nth-child(12){left:15%;top:80%; animation-delay:-11s,-.2s}

@keyframes fireflyBlink{
  0%,100%{opacity:0}
  50%{opacity:.6}
}

/* Floating dust particles */
.particle{
  position:absolute;
  width:2px;height:2px;border-radius:50%;
  background:rgba(255,255,255,.6);
  box-shadow:0 0 4px rgba(255,255,255,.4);
  animation:particleFall 20s linear infinite;
  pointer-events:none;
}
@keyframes particleFall{
  0%{transform:translate(0,-10vh); opacity:0}
  10%{opacity:.6}
  90%{opacity:.4}
  100%{transform:translate(30px,110vh); opacity:0}
}

/* ═══════════════════════════════════════════════════════════
   🪟 GLASS REFRACTION CARD
   ═══════════════════════════════════════════════════════════ */
.glass{
  position:relative;
  background:linear-gradient(135deg,
    rgba(255,255,255,.22) 0%,
    rgba(255,255,255,.10) 45%,
    rgba(255,255,255,.18) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border:1px solid rgba(255,255,255,.32);
  border-radius:24px;
  box-shadow:
    0 8px 32px rgba(0,0,0,.28),
    0 2px 8px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -1px 0 rgba(255,255,255,.08);
  overflow:hidden;
}
.glass::before{
  content:"";
  position:absolute; top:0; left:0; right:0; height:50%;
  background:linear-gradient(180deg,
    rgba(255,255,255,.15) 0%,
    transparent 100%);
  pointer-events:none;
  border-radius:inherit;
}

/* Glass tilt on hover (3D) */
.glass-tilt{
  transition:transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
  transform-style:preserve-3d;
}
.glass-tilt:hover{
  transform:perspective(900px) rotateX(2deg) rotateY(-2deg) translateY(-3px);
  box-shadow:
    0 16px 48px rgba(0,0,0,.32),
    0 4px 14px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.6);
}

/* Glass form input (scoped — apply class explicitly) */
.glass-input{
  background:rgba(255,255,255,.18) !important;
  border:1.5px solid rgba(255,255,255,.32) !important;
  color:#0a1f1c !important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  font-weight:500;
}
.glass-input::placeholder{color:rgba(15,40,30,.45) !important}
.glass-input:focus{
  border-color:rgba(255,255,255,.7) !important;
  background:rgba(255,255,255,.30) !important;
  box-shadow:0 0 0 3px rgba(255,255,255,.18), 0 4px 16px rgba(0,0,0,.12) !important;
}

/* ═══════════════════════════════════════════════════════════
   ✨ Login flash transition (light burst before navigating)
   ═══════════════════════════════════════════════════════════ */
.flash-overlay{
  position:fixed;
  inset:0;
  z-index:99999;
  background:radial-gradient(circle at center, #fff 0%, #fff 30%, rgba(255,255,255,.85) 60%, transparent 100%);
  opacity:0;
  pointer-events:none;
  transition:opacity .9s cubic-bezier(.2,.8,.2,1);
}
.flash-overlay.active{
  opacity:1;
  pointer-events:all;
  animation:flashBurst 1.2s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes flashBurst{
  0%{opacity:0; transform:scale(.5)}
  35%{opacity:.8}
  60%{opacity:1; transform:scale(1.1)}
  100%{opacity:.95; transform:scale(1)}
}

/* ═══════════════════════════════════════════════════════════
   📱 Mobile zoom-out adjustments (touch-only)
   ═══════════════════════════════════════════════════════════ */
@media (hover:none) and (pointer:coarse){
  .glass{ border-radius:28px }
  .firefly{width:7px;height:7px}
}
