/* Animated weather icons
 * Original work: Copyright (c) 2025 by Atiya Haider (CodePen: XwmPxq)
 * Licensed under the MIT License – see svg/animated-icons.svg or plugin docs.
 */


body {
  background-color: #3286e7;
  font-family: 'Roboto', sans-serif;
}

div {
  margin: 5% auto;
  text-align: center;
  color: white;
  height: 100vh;
}

h1 {
  padding: 20px 0;  
  font-weight: 300;
}

.icon {
  width: 100px;
  height: 100px;
}

figure {
  display: inline-block;
  font-weight: 300;
}

.longRay {
  stroke: #ffdd1a;
  stroke-width: 3;
  stroke-dasharray: 10;
  stroke-dashoffset: 10;
  -webkit-animation: longRayAnimation 4s linear infinite;
  animation: longRayAnimation 4s linear infinite;
}

@keyframes longRayAnimation {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@-webkit-keyframes longRayAnimation {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.shortRay {
  stroke: #ffdd1a;
  stroke-width: 1.5;
  stroke-dasharray: 3;
  stroke-dashoffset: 1;
  -webkit-animation: shortRayAnimation 3s linear infinite;
  animation: shortRayAnimation 3s linear infinite;
}

@-webkit-keyframes shortRayAnimation {
  from {
    stroke-dashoffset: 20;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes shortRayAnimation {
  from {
    stroke-dashoffset: 20;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.small-cloud {
  -webkit-animation: float 8s linear infinite;
  animation: float 8s linear infinite;
}

@-webkit-keyframes float {
  0% {
    -webkit-transform: translate(0px, 15px);
    opacity: 0.75;
  }
  25% {
    -webkit-transform: translate(15px, 0px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translate(30px, 0px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translate(25px, 0px);
    opacity: 1;
  }
  100% {
    -webkit-transform: translate(0px, 15px);
    opacity: 0.75;
  }
}
@keyframes float {
  0% {
    -ms-transform: translate(0px, 15px);
    transform: translate(0px, 15px);
    opacity: 0.75;
  }
  25% {
    -ms-transform: translate(15px, 0px);
    transform: translate(15px, 0px);
    opacity: 1;
  }
  50% {
    -ms-transform: translate(30px, 0px);
    transform: translate(30px, 0px);
    opacity: 1;
  }
  75% {
    -ms-transform: translate(25px, 0px);
    transform: translate(25px, 0px);
    opacity: 1;
  }
  100% {
    -ms-transform: translate(0px, 15px);
    transform: translate(0px, 15px);
    opacity: 0.75;
  }
}

.reverse-small-cloud {
  -webkit-animation: reverse-float 6s linear infinite;
  animation: reverse-float 6s linear infinite;
}

@-webkit-keyframes reverse-float {
  0% {
    -webkit-transform: translate(0px, -15px);
    opacity: 0.75;
  }
  25% {
    -webkit-transform: translate(-15px, 0px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translate(-30px, 0px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translate(-25px, 0px);
    opacity: 1;
  }
  100% {
    -webkit-transform: translate(0px, -15px);
    opacity: 0.75;
  }
}
@keyframes reverse-float {
  0% {
    -ms-transform: translate(0px, -15px);
    transform: translate(0px, -15px);
    opacity: 0.75;
  }
  25% {
    -ms-transform: translate(-15px, 0px);
    transform: translate(-15px, 0px);
    opacity: 1;
  }
  50% {
    -ms-transform: translate(-30px, 0px);
    transform: translate(-30px, 0px);
    opacity: 1;
  }
  75% {
    -ms-transform: translate(-25px, 0px);
    transform: translate(-25px, 0px);
    opacity: 1;
  }
  100% {
    -ms-transform: translate(0px, -15px);
    transform: translate(0px, -15px);
    opacity: 0.75;
  }
}

#drop1 {
  -webkit-animation: rain 1s linear infinite;
  animation: rain 1s linear infinite;
}

#drop3 {
  -webkit-animation: rain 1s linear infinite 0.5s;
  animation: rain 1s linear infinite 0.5s;
}

#drop2 {
  -webkit-animation: rain 2s linear infinite 1s;
  animation: rain 2s linear infinite 1s;
}

#drop4 {
  -webkit-animation: rain 2s linear infinite 0.8s;
  animation: rain 2s linear infinite 0.8s;
}

@-webkit-keyframes rain {
  0% {
    opacity: 1;
  }
  25% {
    -webkit-transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -webkit-transform: translateY(35px);
    opacity: 0;
  }
}
@keyframes rain {
  0% {
    opacity: 1;
  }
  25% {
    -ms-transform: translateY(5px);
    transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -ms-transform: translateY(15px);
    transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -ms-transform: translateY(25px);
    transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -ms-transform: translateY(35px);
    transform: translateY(35px);
    opacity: 0;
  }
}

#rainDrizzle {
  stroke: lightblue;
  stroke-width: 1;
  stroke-dasharray: 3;
  stroke-dashoffset: 1;
  -webkit-animation: drizzle 5s linear infinite;
  animation: drizzle 5s linear infinite;
}

@-webkit-keyframes drizzle {
  from {
    stroke-dashoffset: 40;
  }
  to {
    stroke-dashoffset: 10;
  }
}
@keyframes drizzle {
  from {
    stroke-dashoffset: 40;
  }
  to {
    stroke-dashoffset: 10;
  }
}

.lighting {
  animation-duration: 2.5s;
}

#snowFlake {
  fill: none;
  stroke: white;
  stroke-width: 0.6;
}

#snowFlake1 {
  -webkit-animation: snow 4s linear infinite;
  animation: snow 4s linear infinite;
}

#snowFlake2 {
  -webkit-animation: snow 3s linear infinite 0.8s;
  animation: snow 3s linear infinite 0.8s;
}

#snowFlake3 {
  -webkit-animation: snow 5s linear infinite 0.5s;
  animation: snow 5s linear infinite 0.5s;
}

#snowFlake4 {
  -webkit-animation: snow 6s linear infinite 1s;
  animation: snow 6s linear infinite 1s;
}

#snowFlake5 {
  -webkit-animation: snow 4s linear infinite 0.6s;
  animation: snow 4s linear infinite 0.6s;
}

@-webkit-keyframes snow {
  0% {
    -webkit-transform: translate(5px, 0px);
    opacity: 1;
  }
  25% {
    -webkit-transform: translate(0px, 10px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translate(7px, 20px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translate(0px, 30px);
    opacity: 0.75;
  }
  100% {
    -webkit-transform: translate(10px, 40px);
    opacity: 0.5;
  }
}
@keyframes snow {
  0% {
    -ms-transform: translate(5px, 0px);
    transform: translate(5px, 0px);
    opacity: 1;
  }
  25% {
    -ms-transform: translate(0px, 10px);
    transform: translate(0px, 10px);
    opacity: 1;
  }
  50% {
    -ms-transform: translate(7px, 20px);
    transform: translate(7px, 20px);
    opacity: 1;
  }
  75% {
    -ms-transform: translate(0px, 30px);
    transform: translate(0px, 30px);
    opacity: 0.75;
  }
  100% {
    -ms-transform: translate(10px, 40px);
    transform: translate(10px, 40px);
    opacity: 0.5;
  }
}

#ice1 {
  -webkit-animation: ice 1s linear infinite;
  animation: ice 1s linear infinite;
}

#ice3 {
  -webkit-animation: ice 1s linear infinite 0.5s;
  animation: ice 1s linear infinite 0.5s;
}

#ice2 {
  -webkit-animation: ice 2s linear infinite 1s;
  animation: ice 2s linear infinite 1s;
}

#ice4 {
  -webkit-animation: ice 2s linear infinite 0.8s;
  animation: ice 2s linear infinite 0.8s;
}

@-webkit-keyframes ice {
  0% {
    opacity: 1;
  }
  25% {
    -webkit-transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -webkit-transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -webkit-transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -webkit-transform: translateY(35px);
    opacity: 0;
  }
}
@keyframes ice {
  0% {
    opacity: 1;
  }
  25% {
    -ms-transform: translateY(5px);
    transform: translateY(5px);
    opacity: 1;
  }
  50% {
    -ms-transform: translateY(15px);
    transform: translateY(15px);
    opacity: 1;
  }
  75% {
    -ms-transform: translateY(25px);
    transform: translateY(25px);
    opacity: 0.75;
  }
  100% {
    -ms-transform: translateY(35px);
    transform: translateY(35px);
    opacity: 0;
  }
}

#mist {
  fill: none;
  stroke: #333333;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: misty 5s linear infinite alternate;
}

@-webkit-keyframes misty {
 from {
   x: -10px;
  }
  to {
    x: 17px;
  }
}
@keyframes misty {
 from {
   x: -10px;
  }
  to {
    x: 17px;
  }
}

.stars {
  animation-duration: 3s;
}

.wind {
  fill: none;
  stroke: #333333;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

#wind1 {
  -webkit-animation: windy 2.5s linear forwards infinite 0.5s;
  animation: windy 2.5s linear forwards infinite 0.5s;
}
#wind2 {
  -webkit-animation: windy 2.8s linear forwards infinite 0.55s;
  animation: windy 2.8s linear forwards infinite 0.55s ;
}
#wind3 {
  -webkit-animation: windy 3.5s linear forwards infinite 2s;
  animation: windy 3.5s linear forwards infinite 2s;
}
#wind4 {
  -webkit-animation: windy 3.5s linear forwards infinite 0.5s;
  animation: windy 3.5s linear forwards infinite 0.5s;
}
#wind5 {
  -webkit-animation: windy 4s linear forwards infinite 0.5s;
  animation: windy 4s linear forwards infinite 0.5s;
}

@-webkit-keyframes windy {
to {
    stroke-dashoffset: 0;
  }
}
@keyframes windy {
  to {
    stroke-dashoffset: 0;
  }
}

#tornado {
  -webkit-animation: skewX 0.85s infinite linear alternate;
  animation: skewX 0.85s infinite linear alternate;
}

@-webkit-keyframes skewX {
0% {
    -webkit-transform: skewX(20deg);
  }
  100% {
    -webkit-transform: skewX(-20deg);
  }
}
@keyframes skewX {
0% {
    -ms-transform: skewX(20deg);
    transform: skewX(20deg);
  }
  100% {
    -ms-transform: skewX(-20deg);
    transform: skewX(-20deg);
  }
}

footer {
  text-align: right;
  margin-top: 20px;
  margin-right: 20px;
  font-size: 0.95em;
 }

 #drop1 {
  -webkit-animation: rain 1s linear infinite;
  animation: rain 1s linear infinite;
}

#drop3 {
  -webkit-animation: rain 1s linear infinite 0.5s;
  animation: rain 1s linear infinite 0.5s;
}

#drop2 {
  -webkit-animation: rain 2s linear infinite 1s;
  animation: rain 2s linear infinite 1s;
}

#drop4 {
  -webkit-animation: rain 2s linear infinite 0.8s;
  animation: rain 2s linear infinite 0.8s;
}

@-webkit-keyframes rain {
  0% { opacity: 1; }
  25% { -webkit-transform: translateY(5px); opacity: 1; }
  50% { -webkit-transform: translateY(15px); opacity: 1; }
  75% { -webkit-transform: translateY(25px); opacity: 0.75; }
  100% { -webkit-transform: translateY(35px); opacity: 0; }
}
@keyframes rain {
  0% { opacity: 1; }
  25% { transform: translateY(5px); opacity: 1; }
  50% { transform: translateY(15px); opacity: 1; }
  75% { transform: translateY(25px); opacity: 0.75; }
  100% { transform: translateY(35px); opacity: 0; }
}
