/**
 * 青柏祭の伝説セクションの雨のアニメーション用スタイル
 */

/* 雨のコンテナ */
.rain-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

/* 雨滴 */
.raindrop {
  position: absolute;
  top: -10px;
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
  border-radius: 50%;
  opacity: 0;
  animation: rain linear infinite;
}

/* 雨のアニメーション */
@keyframes rain {
  0% {
    transform: translate(-10px, -10px);
    opacity: 0;
  }
  5% {
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  20% {
    opacity: 0.5;
  }
  30% {
    opacity: 0.7;
  }
  40% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.9;
  }
  60% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(100vh * 0.2), calc(100vh + 10px));
    opacity: 0;
  }
}

/* 青柏祭セクションの位置を相対に設定 */
.ly_seihakusai_wrap {
  position: relative;
  overflow: hidden;
}

.ly_seihakusai_wrap .rain-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: url(#seihakusai-wave-clip);
  z-index: 1;
}

/* テキストの可読性を確保 */
.bl_seihakusai_cont {
  position: relative;
  z-index: 2;
}

/* 暴風雨の効果を追加 */
.ly_seihakusai::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* 雨滴の種類を追加 */
.raindrop:nth-child(3n) {
  animation-duration: 0.8s !important;
}

.raindrop:nth-child(3n + 1) {
  animation-duration: 0.6s !important;
}

.raindrop:nth-child(3n + 2) {
  animation-duration: 0.7s !important;
}

/* 稲妻のアニメーション */
@keyframes lightning {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
  }
}

/* 雨の跳ね返りのアニメーション */
@keyframes splat {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1);
    opacity: 0.15;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}
