/* ======================================================
   ❄ 3D SNOW — Anime V3
====================================================== */

.snowflake {
  position: fixed;
  top: 0;
  left: 0;
  user-select: none;
  pointer-events: none; /* mặc định tắt click, riêng snow-near bật lại */
  will-change: transform;
  font-family: system-ui, Arial, sans-serif;
}

/* FAR: nhỏ, mờ, phía sau khung */
.snow-far {
  font-size: 0.45rem;
  opacity: 0.4;
  z-index: 2; /* sau .yuna-shell */
}

/* MID: vừa, trước khung 1 chút */
.snow-mid {
  font-size: 0.75rem;
  opacity: 0.65;
  z-index: 16;
}

/* NEAR: lớn, sáng, có thể click */
.snow-near {
  font-size: 1.05rem;
  opacity: 0.9;
  z-index: 9990;
  pointer-events: auto;
  cursor: pointer;
}

/* Rare neon flake */
.snow-near {
  font-size: 1.05rem;
  opacity: 0.9;
  z-index: 9990;
  pointer-events: auto;

  /* dùng cursor nút bấm của bạn */
  cursor: url("https://mmo.yunagrp.com/cusor/Help.gif"), auto !important;
}


/* ------------------------------------------------------
   Mảnh vỡ khi burst
------------------------------------------------------ */
.snow-burst-piece {
  position: fixed;
  font-size: 0.7rem;
  pointer-events: none;
  user-select: none;
  z-index: 9999;
  transform: translate(0, 0) scale(1);
  animation: snowBurstPiece 0.4s ease-out forwards;
}

@keyframes snowBurstPiece {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  60% {
    opacity: 0.9;
    transform: translate(var(--dx), var(--dy)) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx) * 1.2), calc(var(--dy) * 1.2)) scale(0.7);
  }
}

/* Flash sáng tại tâm burst */
.snow-burst-flash {
  position: fixed;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  margin-top: -13px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0));
  pointer-events: none;
  z-index: 9998;
  animation: snowBurstFlash 0.25s ease-out forwards;
}

@keyframes snowBurstFlash {
  0% {
    opacity: 0.9;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

/* Ripple vòng tròn khi burst */
.snow-ripple {
  position: fixed;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 60%);
  pointer-events: none;
  z-index: 9997;
  animation: snowRipple 0.6s ease-out forwards;
}

@keyframes snowRipple {
  0% {
    opacity: 0.7;
    transform: scale(0.2);
  }
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}

/* Rung nhẹ khung Yuna khi burst */
.yuna-shake {
  animation: yunaShellShake 0.2s ease-out;
}

@keyframes yunaShellShake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-2px); }
  50%  { transform: translateX(2px); }
  75%  { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}
