/* ============================================================
   冰川极地风 - 动画样式文件 (Glacier Arctic Animations)
   包含：冰晶生长、极光波动、雪花飘落、冰裂扩展
   ============================================================ */

/* === 动画一：极光波动 (Aurora Wave) === */
@keyframes glacier-aurora-wave {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === 动画二：冰晶生长 (Ice Crystal Growth) === */
@keyframes glacier-ice-grow {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%);
  }
  50% {
    opacity: 0.7;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% 50%, calc(100% - 12px) 50%, 12px 50%, 0 50%, 0 12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  }
}

.glacier-animate-in {
  opacity: 0;
  transform: translateY(30px);
}

.glacier-animate-in--visible {
  animation: glacier-ice-grow 0.6s ease-out forwards;
}

/* === 动画三：雪花飘落 (Snowflake Drift) === */
@keyframes glacier-snowfall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(110vh) translateX(80px) rotate(360deg);
    opacity: 0;
  }
}

.glacier-snowflake-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glacier-snowflake {
  position: absolute;
  color: rgba(176, 224, 230, 0.3);
  font-size: 12px;
  animation: glacier-snowfall linear infinite;
  user-select: none;
}

.glacier-snowflake::before {
  content: '❄';
  display: block;
}

/* 不同雪花的随机位置和速度 */
.glacier-snowflake:nth-child(1) { left: 5%; animation-duration: 15s; animation-delay: 0s; font-size: 10px; opacity: 0.4; }
.glacier-snowflake:nth-child(2) { left: 15%; animation-duration: 20s; animation-delay: 2s; font-size: 8px; opacity: 0.3; }
.glacier-snowflake:nth-child(3) { left: 25%; animation-duration: 18s; animation-delay: 4s; font-size: 14px; opacity: 0.5; }
.glacier-snowflake:nth-child(4) { left: 35%; animation-duration: 22s; animation-delay: 1s; font-size: 6px; opacity: 0.3; }
.glacier-snowflake:nth-child(5) { left: 45%; animation-duration: 16s; animation-delay: 3s; font-size: 12px; opacity: 0.4; }
.glacier-snowflake:nth-child(6) { left: 55%; animation-duration: 19s; animation-delay: 5s; font-size: 10px; opacity: 0.35; }
.glacier-snowflake:nth-child(7) { left: 65%; animation-duration: 21s; animation-delay: 0.5s; font-size: 8px; opacity: 0.3; }
.glacier-snowflake:nth-child(8) { left: 75%; animation-duration: 17s; animation-delay: 2.5s; font-size: 14px; opacity: 0.45; }
.glacier-snowflake:nth-child(9) { left: 85%; animation-duration: 23s; animation-delay: 4.5s; font-size: 6px; opacity: 0.25; }
.glacier-snowflake:nth-child(10) { left: 95%; animation-duration: 14s; animation-delay: 1.5s; font-size: 10px; opacity: 0.4; }
.glacier-snowflake:nth-child(11) { left: 10%; animation-duration: 24s; animation-delay: 6s; font-size: 8px; opacity: 0.3; }
.glacier-snowflake:nth-child(12) { left: 30%; animation-duration: 16s; animation-delay: 7s; font-size: 12px; opacity: 0.35; }
.glacier-snowflake:nth-child(13) { left: 50%; animation-duration: 20s; animation-delay: 3.5s; font-size: 10px; opacity: 0.4; }
.glacier-snowflake:nth-child(14) { left: 70%; animation-duration: 18s; animation-delay: 5.5s; font-size: 6px; opacity: 0.25; }
.glacier-snowflake:nth-child(15) { left: 90%; animation-duration: 22s; animation-delay: 8s; font-size: 14px; opacity: 0.45; }

/* === 动画四：冰裂扩展 (Ice Crack Spread) === */
@keyframes glacier-ice-crack {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

.glacier-crack-effect {
  position: absolute;
  width: 60px;
  height: 60px;
  pointer-events: none;
  z-index: 100;
}

.glacier-crack-effect::before,
.glacier-crack-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.6);
  animation: glacier-ice-crack 0.4s ease-out forwards;
}

.glacier-crack-effect::before {
  width: 30px;
  height: 30px;
}

.glacier-crack-effect::after {
  width: 50px;
  height: 50px;
  animation-delay: 0.05s;
}

/* === 雪花闪烁动画（导航用） === */
@keyframes glacier-snowflake-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === 滚动中奖信息动画 === */
@keyframes glacier-scroll-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

.glacier-draw-scroll {
  overflow: hidden;
  max-height: 300px;
}

.glacier-draw-scroll__inner {
  animation: glacier-scroll-up 20s linear infinite;
}

.glacier-draw-scroll:hover .glacier-draw-scroll__inner {
  animation-play-state: paused;
}

/* === 脉冲发光效果 === */
@keyframes glacier-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.6);
  }
}

.glacier-pulse {
  animation: glacier-pulse-glow 3s ease-in-out infinite;
}

/* === 渐入动画 === */
@keyframes glacier-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 懒加载图片占位 === */
.glacier-lazy {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glacier-lazy--loaded {
  opacity: 1;
}
