/* html, body */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #1a2980;
  background: -webkit-linear-gradient(to left, #26d0ce, #1a2980);
  background: linear-gradient(to left, #26d0ce, #1a2980);
  overflow-x: hidden;
}

/* header */

header {
  margin: 2%;
  text-align: center;
}

header span {
  position: relative;
  color: white;
  font-family: "Satisfy", cursive;
  font-size: 3em;
}

header img:nth-child(1) {
  position: absolute;
  width: 30px;
  height: 30px;
  top: 36%;
  left: -17%;
}

header img:nth-child(2) {
  position: absolute;
  width: 30px;
  height: 30px;
}

/* main container */

#mainContainer {
  position: relative;
  width: 100%;
  height: 100%;
}

/* status message */

#homeContainer p {
  color: white;
  font-size: 2em;
  text-align: center;
  font-family: "Caveat", cursive;
}

/* user input content */

#inputContainer {
  display: none;
  height: 20%;
  width: 50%;
  margin: auto;

  position: absolute;
  text-align: center;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

#inputContainer input {
  width: 100%;
  height: 40%;
  font-size: 1.8em;
  color: #456;
  padding: 5px 30px 0px;
  border: none;
}

::placeholder {
  font-size: 1em;
}

#inputContainer button {
  margin: 5%;
  background-color: skyblue;
  color: white;
  border: none;
  border-radius: 10px;
  box-shadow: 2px;
  font-family: "Caveat", cursive;
  font-size: 2em;
  font-weight: 500;
  padding: 15px;
  cursor: pointer;
}

/* results container */

#results {
  text-align: center;
  display: none;
  height: 50%;
  width: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

#animationCanvas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#details {
  margin-top: 10%;
  margin-left: auto;
  margin-right: auto;
  color: white;
  text-align: center;
  width: 30%;
  font-size: 2em;
  font-family: "Caveat", cursive;
}

#location,
#weather {
  font-size: 2em;
  display: block;
}

/* footer */

footer {
  position: absolute;
  padding: 15px;
  bottom: 0;
  color: white;
  width: 100%;
  box-sizing: border-box;
}

footer a {
  float: right;
  text-align: left;
  color: white;
}

footer div {
  margin: 1%;
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
}

/* floating clouds animation in home page */

#clouds {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  bottom: 0;
}

.cloud {
  width: 200px;
  height: 60px;
  background: #fff;
  border-radius: 200px;
  -moz-border-radius: 200px;
  -webkit-border-radius: 200px;
  position: relative;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  width: 100px;
  height: 80px;
  top: -15px;
  left: 10px;

  border-radius: 100px;
  -moz-border-radius: 100px;
  -webkit-border-radius: 100px;

  -webkit-transform: rotate(30deg);
  transform: rotate(30deg);
  -moz-transform: rotate(30deg);
}

.cloud::after {
  width: 120px;
  height: 120px;
  top: -55px;
  left: auto;
  right: 15px;
}

.x1 {
  -webkit-animation: moveclouds 15s linear infinite;
  -moz-animation: moveclouds 15s linear infinite;
  -o-animation: moveclouds 15s linear infinite;
}

.x2 {
  left: 200px;
  -webkit-transform: scale(0.6);
  -moz-transform: scale(0.6);
  transform: scale(0.6);
  opacity: 0.6;
  -webkit-animation: moveclouds 25s linear infinite;
  -moz-animation: moveclouds 25s linear infinite;
  -o-animation: moveclouds 25s linear infinite;
}

.x3 {
  left: -250px;
  top: -200px;

  -webkit-transform: scale(0.8);
  -moz-transform: scale(0.8);
  transform: scale(0.8);
  opacity: 0.8;

  -webkit-animation: moveclouds 20s linear infinite;
  -moz-animation: moveclouds 20s linear infinite;
  -o-animation: moveclouds 20s linear infinite;
}

.x4 {
  left: 470px;
  top: -250px;
  -webkit-transform: scale(0.75);
  -moz-transform: scale(0.75);
  transform: scale(0.75);
  opacity: 0.75;

  -webkit-animation: moveclouds 18s linear infinite;
  -moz-animation: moveclouds 18s linear infinite;
  -o-animation: moveclouds 18s linear infinite;
}

.x5 {
  left: -150px;
  top: -150px;

  -webkit-transform: scale(0.8);
  -moz-transform: scale(0.8);
  transform: scale(0.8);
  opacity: 0.8;

  -webkit-animation: moveclouds 20s linear infinite;
  -moz-animation: moveclouds 20s linear infinite;
  -o-animation: moveclouds 20s linear infinite;
}

@-webkit-keyframes moveclouds {
  0% {
    margin-left: 1000px;
  }
  100% {
    margin-left: -1000px;
  }
}
@-moz-keyframes moveclouds {
  0% {
    margin-left: 1000px;
  }
  100% {
    margin-left: -1000px;
  }
}
@-o-keyframes moveclouds {
  0% {
    margin-left: 1000px;
  }
  100% {
    margin-left: -1000px;
  }
}

/* raining cloud animation */

#rainy {
  display: none;
  position: absolute;
  top: 0;
  left: 51%;
  transform: translate(-50%, -30%);
  height: 200px;
}

.raincloud {
  overflow: hidden;
  padding: 5px;
  height: 50px;
}

.cloud_left {
  position: relative;
  float: left;
  background-color: lightgrey;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 1px 1px 1px 1px rgba(1, 1, 1, 0.1);
}

.cloud_right {
  position: relative;
  float: left;
  background-color: lightgrey;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  top: 15px;
  left: -30px;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.rain {
  width: 180px;
  height: 140px;
}

.drop {
  position: relative;
  float: left;
  width: 2px;
  margin: 10px;
  left: 20px;
  background: #789;
  box-shadow: 1px 0.5px 1px 0.5px rgba(0, 0, 0, 0.75);
  animation: rain 0.8s infinite ease-out;
}

.drop:nth-child(1) {
  height: 15px;
  top: 5px;
  animation-delay: -1s;
}

.drop:nth-child(2) {
  height: 20px;
  animation-delay: -1.4s;
}

.drop:nth-child(3) {
  height: 15px;
  top: 5px;
  animation-delay: -1.6s;
}

.drop:nth-child(4) {
  height: 10px;
  top: 10px;
  animation-delay: -1.2s;
}

.drop:nth-child(5) {
  height: 5px;
  top: 15px;
  animation-delay: -1.6s;
}

@keyframes rain {
  0% {
    opacity: 1;
    transform: translate(0, 0);
  }
  100% {
    opacity: 0.2;
    transform: translate(0, 100px);
  }
}

.surface {
  position: relative;
  width: 180px;
  height: 140px;
  top: -140px;
}

.hit {
  position: absolute;
  width: 3px;
  height: 1px;
  margin: 10px;
  bottom: -5px;
  border: 1px solid #456;
  border-radius: 50%;
  animation: hit 0.8s infinite ease;
}

.hit:nth-child(1) {
  left: 19px;
  animation-delay: -0.3s;
}

.hit:nth-child(2) {
  left: 41px;
  animation-delay: -0.7s;
}

.hit:nth-child(3) {
  left: 63px;
  animation-delay: -0.9s;
}

.hit:nth-child(4) {
  left: 85px;
  animation-delay: -0.5s;
}

.hit:nth-child(5) {
  left: 107px;
  animation-delay: -0.9s;
}

@keyframes hit {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(2.5);
  }
}

/* clear sunny animation */

#clear {
  display: none;
  position: absolute;
  top: 0;
  left: 48%;
  height: 200px;
}

.ray_box {
  position: absolute;
  margin: auto;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 70px;
  animation: ray_anim 40s linear infinite;
}

.ray {
  background: -webkit-linear-gradient(
    top,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background: linear-gradient(
    top,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  margin-left: 10px;
  border-radius: 80% 80% 0 0;
  position: absolute;
  opacity: 0.1;
}

.ray1 {
  height: 170px;
  width: 30px;
  transform: rotate(180deg);
  top: -175px;
  left: 15px;
}

.ray2 {
  height: 100px;
  width: 8px;
  transform: rotate(220deg);
  top: -90px;
  left: 75px;
}

.ray3 {
  height: 170px;
  width: 50px;
  transform: rotate(250deg);
  top: -80px;
  left: 100px;
}

.ray4 {
  height: 120px;
  width: 14px;
  transform: rotate(305deg);
  top: 30px;
  left: 100px;
}

.ray5 {
  height: 140px;
  width: 30px;
  transform: rotate(-15deg);
  top: 60px;
  left: 40px;
}

.ray6 {
  height: 90px;
  width: 50px;
  transform: rotate(30deg);
  top: 60px;
  left: -40px;
}

.ray7 {
  height: 180px;
  width: 10px;
  transform: rotate(70deg);
  top: -35px;
  left: -40px;
}

.ray8 {
  height: 120px;
  width: 30px;
  transform: rotate(100deg);
  top: -45px;
  left: -90px;
}

.ray9 {
  height: 80px;
  width: 10px;
  transform: rotate(120deg);
  top: -65px;
  left: -60px;
}

.ray10 {
  height: 190px;
  width: 23px;
  transform: rotate(150deg);
  top: -185px;
  left: -60px;
}

@keyframes ray_anim {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.theSun {
  opacity: 1;
  box-shadow: 0px 0px 15px 3px yellow;
  width: 100px;
  height: 100px;
  position: absolute;
  animation: sunpulse 2s alternate infinite;
  border-radius: 50%;
  background-image: radial-gradient(circle, #ffd200 90%, #f7971e);
}

@keyframes sunpulse {
  from {
    box-shadow: 0 0 100px #ff0, 0 0 100px #ff0;
  }
  to {
    box-shadow: 0 0 25px #ff0, 0 0 75px #ff0;
  }
}

/* bouncing clouds animation */

#cloudy {
  display: none;
  position: absolute;
  left: 48%;
}

.container-animation--flexbox {
  height: 100%;
  padding: 0;
  margin: 0;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animationItem {
  position: absolute;
  margin-right: 35px;
}

#animationItem-image--bigCloud {
  animation: bobble 2s infinite;
  font-size: 150px;
  color: #7ec0ee;
}

#animationItem-image--smallCloud {
  animation: bobble 4s infinite;
  margin-top: 65px;
  margin-left: 130px;
  font-size: 130px;
  color: #e9e9e9;
}

@keyframes bobble {
  0% {
    transform: translate3d(0px, -25px, 0px);
    animation-timing-function: ease-in;
  }
  50% {
    transform: translate3d(0px, -33px, 0px);
    animation-timing-function: ease-out;
  }
  100% {
    transform: translate3d(0px, -25px, 0px);
  }
}

/* snowing cloud animation */

#snow {
  display: none;
  position: absolute;
  left: 44%;
  top: -30%;
}
#snowfall {
  z-index: 1;
}

ul {
  margin: 0 auto;
  width: 200px;
}
#snowfall li {
  margin: 0 auto;
  font-size: 100px;
  display: inline-block;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  bottom: 0;
}

#one {
  animation: fall 4s infinite;
}
#two {
  animation: fall 2s infinite;
}
#three {
  animation: fall 3s infinite;
}
#four {
  animation: fall 2.5s infinite;
  position: relative;
}

#snowcloud {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  width: 200px;
}

#five {
  width: 100px;
  height: 100px;
  border-radius: 50px;
  background-color: #bdbdbd;
  position: relative;
  left: 70px;
  top: 90px;
}
#six {
  width: 50px;
  height: 50px;
  border-radius: 30px;
  background-color: #bdbdbd;
  position: relative;
  top: 10px;
  left: 30px;
}

#seven {
  width: 200px;
  height: 50px;
  border-radius: 30px;
  background-color: #bdbdbd;
  position: relative;
}

@keyframes fall {
  0% {
    bottom: 125px;
    left: 0;
    color: rgba(255, 255, 255, 1);
  }
  25% {
    left: 12px;
  }
  50% {
    left: 0px;
  }
  75% {
    left: 12px;
  }
  100% {
    left: 0px;
  }
}

/* media queries for responsiveness */

@media (max-width: 1440px) {
  header {
    margin-top: 3%;
  }

  #snow {
    top: -40%;
    left: 41%;
  }

  #details {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  header {
    margin-top: 6%;
  }
  #results {
    height: 20%;
  }
  #details {
    margin-top: 12%;
    width: 100%;
  }

  #inputContainer input {
    padding: 4%;
    width: 100%;
    height: 25%;
    font-size: 1.5em;
  }

  ::placeholder {
    font-size: 1.2em;
  }

  #inputContainer button {
    font-size: 2.1em;
  }

  #clear {
    top: -40%;
    left: 48%;
  }

  #rainy {
    top: -30%;
    left: 53%;
  }

  #snow {
    top: -80%;
    left: 39%;
  }
}

@media (max-width: 768px) {
  footer a {
    display: block;
    float: none;
    text-align: center;
  }

  footer span {
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-bottom: 1%;
  }

  #snow {
    top: -120%;
    left: 37%;
  }
}

@media (max-width: 576px) {
  #inputContainer input {
    padding: 4%;
    width: 120%;
    height: 20%;
    font-size: 1.2em;
    margin-bottom: 5%;
    transform: translate3d(-10%, 0, 0);
  }

  #results {
    transform: scale(0.7);
  }

  ::placeholder {
    font-size: 1em;
  }

  #inputContainer button {
    font-size: 1.5em;
    padding: 8px;
  }

  #clear {
    top: -130%;
    left: 40%;
  }

  #rainy {
    top: -100%;
    left: 55%;
  }

  #snow {
    top: -250%;
    left: 20%;
  }

  #cloudy {
    top: -70%;
    left: 34%;
  }

  #clouds {
    transform: scale(0.6);
  }

  #details {
    font-size: 1.5em;
  }
}

@media (max-width: 320px) {
  #clouds {
    transform: scale(0.5);
  }
  #results {
    transform: scale(0.65);
  }

  ::placeholder {
    font-size: 0.8em;
  }
  footer {
    font-size: 0.8em;
  }

  #details {
    font-size: 2em;
  }

  #inputContainer input {
    padding: 4%;
    font-size: 1em;
  }

  #inputContainer button {
    font-size: 1.1em;
    padding: 8px;
  }

  #rainy {
    top: -150%;
    left: 55%;
  }

  #cloudy {
    top: -70%;
    left: 26%;
  }

  header span {
    font-size: 2.2em;
  }

  #location,
  #weather {
    font-size: 1em;
    display: block;
  }

  #snow {
    top: -280%;
    left: 13%;
  }

  #clear {
    top: -120%;
    left: 36%;
  }

  header img:nth-child(1) {
    left: -20%;
  }
}
