/* ===== 전투·상태이상 효과 (장면 위) ===== */
#fxLayer { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.fxv { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.fxv.hurt { background: radial-gradient(ellipse at center, rgba(255,0,0,0) 35%, rgba(190,0,10,.75) 100%); }
.fxv.hurt.flash { animation: hurtFlash .5s ease-out; }
@keyframes hurtFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
.fxv.bleed { background: radial-gradient(ellipse at center, rgba(120,0,0,0) 55%, rgba(120,0,10,.45) 100%); } .fxv.bleed.on { opacity: 1; animation: pulseSlow 1.6s ease-in-out infinite alternate; }
.fxv.poison { background: radial-gradient(ellipse at center, rgba(40,160,40,0) 45%, rgba(50,170,50,.4) 100%); } .fxv.poison.on { opacity: 1; animation: pulseSlow 1.2s ease-in-out infinite alternate; }
.fxv.blind { background: radial-gradient(ellipse at center, rgba(0,0,0,.35) 0%, rgba(0,0,0,.92) 75%); } .fxv.blind.on { opacity: 1; }
.fxv.stun { background: rgba(20,20,30,.35); } .fxv.stun.on { opacity: 1; animation: dizzy 1.4s ease-in-out infinite; }
@keyframes pulseSlow { to { opacity: .55; } }
@keyframes dizzy { 0%,100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }

/* 붙잡힘: 양쪽 사슬 + 남은 시간 */
#fxLayer.holding::before, #fxLayer.holding::after { content: ""; position: absolute; top: 0; bottom: 0; width: 26px; background: repeating-linear-gradient(180deg, #9aa 0 10px, #556 10px 18px); opacity: .85; box-shadow: 0 0 12px rgba(0,0,0,.6); }
#fxLayer.holding::before { left: 0; } #fxLayer.holding::after { right: 0; }
#fxHold { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); text-align: center; background: rgba(10,10,18,.82); border: 2px solid #aab; border-radius: 12px; padding: 8px 16px; color: #e8e8f4; font-size: 15px; min-width: 130px; }
#fxHold b { font-size: 24px; color: #ffd166; }
.holdBar { height: 6px; background: #2a2a3a; border-radius: 3px; margin-top: 5px; overflow: hidden; }
.holdBar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff7b7b, #ffd166); transition: width .1s linear; }

/* 경고 배너 (공룡 공격 준비) */
#fxBanner { position: absolute; left: 50%; top: 50px; transform: translateX(-50%); z-index: 8; width: max-content; max-width: min(78%, 320px); text-align: center; font-size: 12.5px; line-height: 1.35; font-weight: 700; color: #fff; background: rgba(150,15,15,.9); border: 1px solid #ff7b7b; border-radius: 9px; padding: 5px 11px; word-break: keep-all; text-wrap: balance; }
#fxBanner.go { animation: bannerPulse .5s ease-in-out infinite alternate; }
@keyframes bannerPulse { to { background: rgba(210,30,30,.95); } }

/* 총구 섬광 */
.muzzle { position: absolute; left: 50%; bottom: 0; width: 180px; height: 140px; margin-left: -90px; opacity: 0; background: radial-gradient(ellipse at 50% 100%, rgba(255,240,160,.95), rgba(255,160,40,.5) 40%, rgba(255,120,0,0) 70%); }
.muzzle.rocket { width: 320px; height: 240px; margin-left: -160px; background: radial-gradient(ellipse at 50% 100%, rgba(255,255,220,1), rgba(255,120,30,.7) 40%, rgba(255,60,0,0) 70%); }
.muzzle.tranq { background: radial-gradient(ellipse at 50% 100%, rgba(160,220,255,.7), rgba(80,160,255,0) 65%); }
.muzzle.go { animation: muzzleGo .22s ease-out; }
@keyframes muzzleGo { 0% { opacity: 1; } 100% { opacity: 0; } }

/* 쓰러짐(후송) */
#fxFaint { position: absolute; inset: 0; background: #000; color: #ff8c90; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; opacity: 0; }
#fxFaint.go { animation: faintGo 1.7s ease-in-out; }
@keyframes faintGo { 0% { opacity: 0; } 25% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* 떠오르는 숫자 */
.fnum { position: absolute; transform: translate(-50%, -50%); font-weight: 800; white-space: nowrap; text-shadow: 0 2px 4px #000, 0 0 8px rgba(0,0,0,.6); animation: fnumUp 1.05s ease-out forwards; }
.fnum.dmg { color: #ff4a4a; font-size: 26px; } .fnum.big { font-size: 30px; }
.fnum.hit { color: #ffb14a; font-size: 22px; } .fnum.crit { color: #ffe066; font-size: 26px; }
.fnum.miss { color: #c9d1cc; font-size: 17px; } .fnum.blk { color: #7fc8ff; font-size: 15px; }
.fnum.warn { color: #ffd166; font-size: 14px; } .fnum.stat { color: #ff9a8a; font-size: 16px; } .fnum.down { color: #ffe08a; font-size: 18px; }
@keyframes fnumUp { 0% { opacity: 0; margin-top: 8px; scale: .7; } 15% { opacity: 1; scale: 1.15; } 100% { opacity: 0; margin-top: -58px; scale: 1; } }

/* 흔들림 */
#scene.sk1 { animation: sk1 .3s linear; } #scene.sk2 { animation: sk2 .36s linear; } #scene.sk3 { animation: sk3 .42s linear; }
@keyframes sk1 { 0%,100% { transform: none; } 25% { transform: translate(-2px, 1px); } 75% { transform: translate(2px, -1px); } }
@keyframes sk2 { 0%,100% { transform: none; } 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(3px, 0); } }
@keyframes sk3 { 0%,100% { transform: none; } 15% { transform: translate(-9px, 4px) rotate(-.4deg); } 35% { transform: translate(9px, -4px) rotate(.4deg); } 55% { transform: translate(-6px, 2px); } 75% { transform: translate(5px, -1px); } }

#fxFaint:not(.go) { display: none; }
#fxHold[hidden], #fxBanner[hidden] { display: none !important; }
#fxLayer:not(.holding)::before, #fxLayer:not(.holding)::after { display: none; }
