/* =====================================================
   WEAPON
   ===================================================== */
#weapon-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 14;
}

#weapon-idle, #hand-idle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transform-origin: bottom right;
  animation: weapon-breathe 4s ease-in-out infinite;
}

#weapon-hit, #weapon-hit-glow, #hand-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-image: none; /* set per-weapon in JS after AssetLoader */
  background-position: 0 0;
  pointer-events: none;
}

#weapon-hit-glow {
  display: none !important; /* no glow sheet assets in repo */
}

#weapon-idle-glow {
  display: none !important; /* no glow asset in repo; was empty src → broken icon */
}

.hide-weapon {
  display: none !important;
}

#weapon-hit.play-hit, #weapon-hit-glow.play-hit, #hand-hit.play-hit {
  display: block !important;
  /* 13 frames = 12 steps from 0 to 100% */
  animation: weapon-smash 0.35s steps(12) forwards;
}

/* ----- Blur echo trail ----- */
.weapon-trail {
  display: none !important; /* no trail sheet assets in repo */
}

#weapon-trail-1.play-hit {
  display: block !important;
  animation: weapon-smash 0.35s steps(12) forwards;
  animation-delay: 0.03s;
  opacity: 0.45;
  filter: blur(4px);
}

#weapon-trail-2.play-hit {
  display: block !important;
  animation: weapon-smash 0.35s steps(12) forwards;
  animation-delay: 0.06s;
  opacity: 0.2;
  filter: blur(8px);
}


.laser-ember {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 50, 50, 1)) drop-shadow(0 0 20px rgba(255, 0, 0, 0.8));
  mix-blend-mode: screen;
  z-index: 15;
}

@keyframes weapon-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(20px) scale(0.98); }
}

@keyframes blade-pulse {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}

@keyframes weapon-smash {
  from { background-position: 0 0; }
  to   { background-position: 100% 0; }
}

/* =====================================================
   FIREFLIES
   ===================================================== */
.firefly-outer {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 100;
  /* Soft, floaty return to idle */
  transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.firefly-outer.flee {
  transform: translate(var(--flee-x), var(--flee-y)) scale(1.1);
  /* Smoother, eased dash away from hit */
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.firefly-orbit {
  position: absolute;
  width: 250px;
  height: 250px;
  pointer-events: none;
  left: 0;
  top: 0;
  transform-origin: center;
  mix-blend-mode: screen;
}

.firefly-inner {
  position: absolute;
  background-image: url('../Misc/Firefly/Firefly-sheet.png');
  background-repeat: no-repeat;
}

/* =====================================================
   LEVEL PROPS
   ===================================================== */
#cave-fire {
  position: absolute;
  left: 1508px; 
  top: 629px;
  width: 300px;
  height: 400px;
  pointer-events: none;
}

#cave-fire-inner {
  position: absolute;
  background-image: url('../Misc/Fire/Fire.png');
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

@keyframes heat-haze-wiggle {
  0% { transform: scaleY(1.0) skewX(-2deg) translateY(0); opacity: 0.5; }
  50% { transform: scaleY(1.15) skewX(1deg) translateY(-10px); opacity: 0.8; }
  100% { transform: scaleY(1.05) skewX(2.5deg) translateY(5px); opacity: 0.4; }
}

.hide-prop {
  display: none !important;
}

@keyframes firefly-orbit {
  0% {
    transform: translate(-50%, -50%) rotate(var(--orbit-start)) translateX(var(--orbit-rx)) translateY(var(--orbit-ry)) rotate(calc(-1 * var(--orbit-start)));
  }
  100% {
    transform: translate(-50%, -50%) rotate(calc(var(--orbit-start) + 360deg)) translateX(var(--orbit-rx)) translateY(var(--orbit-ry)) rotate(calc(-1 * (var(--orbit-start) + 360deg)));
  }
}

/* =====================================================
   RESPONSIVE — scale handled entirely in JS
   ===================================================== */

/* ---- Bats ---- */
.bat-prop {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  will-change: transform;
}
.bat-inner {
  position: absolute;
  background-image: url('../Misc/Bat/bat-sheet.png');
  background-repeat: no-repeat;
  will-change: background-position;
}

/* ---- Torch Embers ---- */
.torch-ember {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 
    0 0 6px 3px #ffb700,
    0 0 14px 6px #ff3c00,
    0 0 20px 10px rgba(255, 20, 0, 0.7);
  mix-blend-mode: color-dodge;
  filter: contrast(1.2) brightness(1.3);
  pointer-events: none;
  z-index: 15;
}

.heat-haze-particle {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  backdrop-filter: blur(5px) brightness(1.05);
  -webkit-backdrop-filter: blur(5px) brightness(1.05);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 65%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 65%);
  pointer-events: none;
}

.smash-piece {
  position: absolute !important;
  width: 50px;
  height: 50px;
  object-fit: contain !important;
  pointer-events: none !important;
  z-index: 8;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5)) !important;
}

.snowflake {
  position: absolute !important;
  background-color: #ffffff !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  opacity: 0.9 !important;
  z-index: 1 !important;
}

.lava-spark {
  position: absolute !important;
  background-color: #fffb00 !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  box-shadow: 0 0 6px #ffee00 !important;
}

/* ---- Volcano Forge Anvil ---- */
#volcano-anvil {
  transition: filter 0.2s;
  z-index: 10;
  pointer-events: none; /* Let clicks pass to hitbox */
}
#volcano-anvil.glow {
  filter: drop-shadow(0 0 20px rgba(255, 200, 50, 0.9)) brightness(1.2);
}
#anvil-hitbox {
  cursor: pointer;
  pointer-events: auto;
}




