/* Khung chứa các hạt rơi toàn màn hình */
#season-particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none; /* Tránh cản trở việc click trên màn hình */
  z-index: 1; /* Nằm trên lớp hình nền và dưới các nội dung text/menu */
}

/* Base class cho từng hạt */
.drop-particle {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0;
}

/* ==================================================
   CSS EFFECTS BY SEASON
   ================================================== */

/* Mùa xuân: Cánh hoa đào */
.spring-petal {
  background: #ffb7c5;
  border-radius: 10px 0 10px 10px; /* Tạo hình dáng giống cánh hoa */
  animation: fallDown linear infinite, swaySlow linear infinite alternate;
}

/* Mùa hạ: Đom đóm lấp lánh (Bay từ dưới lên) */
/* .summer-firefly {
  background: radial-gradient(circle, rgba(235, 255, 120, 1) 0%, rgba(235, 255, 120, 0) 70%);
  border-radius: 50%;
  animation: floatUp linear infinite, flicker ease-in-out infinite alternate;
} */
.summer-firefly {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, rgba(85, 181, 251, 0.1) 60%, rgba(218, 114, 255, 0.1) 100%);
  
  border: 1px solid rgba(85, 181, 251, 0.6); 
  border-radius: 50%;
  
  box-shadow: 
    inset -2px -2px 6px rgba(218, 114, 255, 0.4), 
    inset 2px 2px 6px rgba(85, 181, 251, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.08); 
  
  animation: floatUpBubble linear infinite, bubbleSway ease-in-out infinite alternate;
}

.summer-firefly::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 25%;
  height: 25%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}
@keyframes floatUpBubble {
  0% {
    top: 105vh;
    opacity: 0;
  }
  5% {
    opacity: var(--max-opacity, 0.7);
  }
  85% {
    opacity: var(--max-opacity, 0.7);
    transform: scale(1);
  }
  /* Giả lập bong bóng bị vỡ ở gần đỉnh */
  90% {
    opacity: 0;
    transform: scale(1.2); 
  }
  100% {
    top: -5vh;
    opacity: 0;
  }
}

/* Bong bóng tự uốn lượn uốn éo khi bay */
@keyframes bubbleSway {
  0% {
    margin-left: -25px;
  }
  100% {
    margin-left: 25px;
  }
}

/* Mùa thu: Chiếc lá vàng/cam */
.autumn-leaf {
  border-radius: 0 50% 0 50%; /* Tạo hình dáng chiếc lá */
  animation: fallDown linear infinite, swayFast linear infinite alternate;
}

/* Mùa đông: Bông tuyết */
.winter-snowflake {
  background: #ffffff;
  border-radius: 50%;
  animation: fallDown linear infinite, swaySlow linear infinite alternate;
}

/* ==================================================
   ANIMATION KEYFRAMES
   ================================================== */

/* Hiệu ứng rơi từ trên xuống */
@keyframes fallDown {
  0% {
    top: -5vh;
    opacity: 0;
  }
  10% {
    opacity: var(--max-opacity, 0.7);
  }
  90% {
    opacity: var(--max-opacity, 0.7);
  }
  100% {
    top: 105vh;
    opacity: 0;
  }
}

/* Hiệu ứng đom đóm bay từ dưới lên */
@keyframes floatUp {
  0% {
    top: 105vh;
    opacity: 0;
  }
  10% {
    opacity: var(--max-opacity, 0.8);
  }
  90% {
    opacity: var(--max-opacity, 0.8);
  }
  100% {
    top: -5vh;
    opacity: 0;
  }
}

/* Đung đưa nhẹ (Hoa đào & Tuyết) */
@keyframes swaySlow {
  0% {
    transform: translateX(-20px) rotate(0deg);
  }
  100% {
    transform: translateX(20px) rotate(45deg);
  }
}

/* Đung đưa mạnh & chao đảo (Chiếc lá rơi) */
@keyframes swayFast {
  0% {
    transform: translateX(-40px) rotate(0deg);
  }
  100% {
    transform: translateX(40px) rotate(180deg);
  }
}

/* Hiệu ứng nhấp nháy phát sáng (Đom đóm) */
@keyframes flicker {
  0% {
    transform: scale(0.8) translateX(-15px);
    filter: brightness(0.8);
  }
  100% {
    transform: scale(1.2) translateX(15px);
    filter: brightness(1.3);
  }
}