/* Rain Animation System */
.rain {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.rain.active {
  opacity: 1;
}

.rain.back-row {
  z-index: -2;
  opacity: 0.3;
}

.rain.back-row.active {
  opacity: 0.3;
}

.drop {
  position: absolute;
  bottom: 100%;
  width: 15px;
  height: 120px;
  pointer-events: none;
  animation: drop linear infinite;
}

@keyframes drop {
  0% {
    transform: translateY(0vh);
  }
  75% {
    transform: translateY(100vh);
  }
  100% {
    transform: translateY(100vh);
  }
}

.stem {
  width: 1px;
  height: 60%;
  margin-left: 7px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6));
  animation: stem linear infinite;
}

@keyframes stem {
  0% {
    opacity: 1;
  }
  65% {
    opacity: 1;
  }
  75% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.splat {
  width: 15px;
  height: 10px;
  border-top: 2px dotted rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  opacity: 1;
  transform: scale(0);
  animation: splat linear infinite;
}

@keyframes splat {
  0% {
    opacity: 1;
    transform: scale(0);
  }
  80% {
    opacity: 1;
    transform: scale(0);
  }
  90% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* Rain intensity variations */
.rain.light-rain .drop {
  animation-duration: 0.8s;
}

.rain.heavy-rain .drop {
  animation-duration: 0.4s;
}

.rain.storm .drop {
  animation-duration: 0.3s;
}

.rain.storm .stem {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8));
  width: 2px;
  margin-left: 6px;
}

.rain.storm .splat {
  border-top: 3px dotted rgba(255, 255, 255, 0.9);
  width: 20px;
  height: 12px;
}

/* Wind angle adjustments */
.rain.wind-light {
  transform: skewX(-5deg);
}

.rain.wind-medium {
  transform: skewX(-10deg);
}

.rain.wind-strong {
  transform: skewX(-15deg);
}

.rain.wind-very-strong {
  transform: skewX(-20deg);
}
