html,
body {
  margin: 0px;
  height: 100%;
  background: linear-gradient(to right, #98c2f3, #d1f4ff);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

header {
  background-color: rgb(15, 100, 197);
  color: white;
  text-align: center;
  padding: 5px;
  width: 100%;
}
footer {
  background-color: rgb(30, 177, 226);
  color: white;
  text-align: center;
  padding: 10px;
}
#nav_bar li{
  display: inline-block;
  margin-right: 20px;
}
#nav_bar li a{
  text-decoration:none ;
    font-weight: bold;
    color: black;
}

.sky {
  background: rgb(22, 152, 196);
  height: 35%;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.theSun {
  width: 100px;
  animation-name: sun;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.grass {
  height: 30%;
  background: green;
  width: 100%;
}

.grass img {
  width: 300px;
  position: relative;
  top: -150px
}

.road {
  height: 35%;
  width: 100%;
  background: grey;
}

.inner_road {
  position: relative;
  top: 5%;
  background-color: rgb(23, 24, 36);
  height: 90%;
}

#nightOrDay {
  position: relative;
  top: -250px;
  padding: 10px 20px;
  width: 250px;
  font-size: 16px;
  background-color: blue;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  text-align: center;
}

#moon {
  width: 130px;
}

.moonDiv {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.buttons {
  display: flex;
  flex-direction: column;
}

#car {
  position: absolute;
  width: 150px;
  top: -45px;
}

#carFast {
  width: 250px;
  position: relative;
  top: -250px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: blue;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  text-align: center;
}

.moveUp {
  animation: moveMoon 2s forwards;
  animation-timing-function: linear;
}



.move {
  animation-name: drive;
  animation-duration: 5s;
  animation-fill-mode: both;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.lines {
  position: absolute;
  background-color: white;
  border: 5px dashed rgb(23, 24, 36);
  box-sizing: border-box;
  top: 48%;
  width: 100%;
  height: 0px;
}

@media (max-width: 767px) {

@keyframes moveMoon {
  0% {
    opacity: 0;
    transform: translateY(0px);
  }
  65% {
    opacity: 0;
  }
  75% {
    opacity: 1;
  }


  100% {
    transform: translateY(-460px)
  }
}
}

@media (min-width: 992px) {
@keyframes moveMoon {
  0% {
    opacity: 0;
    transform: translateY(0px);
  }
  65% {
    opacity: 0;
  }
  75% {
    opacity: 1;
  }

  100% {
    transform: translateY(-470px)
  }
}
}


@keyframes sun {
  from {
    rotateZ: 45deg;
  }

  to {
    rotate: 360deg;
  }
}

@media (max-width: 767px) {
  @keyframes drive {
    from {
      transform: translateX(-100px)
    }

    to {
      transform: translateX(767px)
    }
  }
}

@media (min-width: 992px) {
  @keyframes drive {
    from {
      transform: translateX(-100px)
    }

    to {
      transform: translateX(1350px)
    }
  }
}
.fade img{
  animation: fadeAnimation 3s infinite alternate;
}
.image-container{
  text-align: center;
  width: 300px;
  margin: 20px;
  perspective: 400px;
  border: 1px solid rgb(216, 209, 209);
  border-radius: 3px;
}

@keyframes fadeAnimation {
  0% {
      opacity: 0;
  }
  100% {
      opacity: 1;
  }
}

.slideIn img{
  position: relative;
  animation: slideInAnimation 2s ease-out forwards;
  animation-iteration-count: infinite;
}

@keyframes slideInAnimation {
  0% {
      left: -150px;
  }
  100% {
      left: 0;
  }
}

.bounce img{
  animation: bounceAnimation 1s infinite;
}

@keyframes bounceAnimation {
  0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
  }
  40% {
      transform: translateY(-30px);
  }
  60% {
      transform: translateY(-15px);
  }
}

.rotate img{
  border-radius: 50%;
  animation: rotateAnimation 4s linear infinite;
}

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

.pulse img{
  border-radius: 50%;
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% {
      transform: scale(1);
  }
  50% {
      transform: scale(1.2);
  }
  100% {
      transform: scale(1); 
  }
}

.colorChange {
  height: 300px;
  animation: colorAnimation 5s infinite;
}

@keyframes colorAnimation {
  0% {
      background-color: #ff6347;
  }
  50% {
      background-color: #3498db; 
  }
  100% {
      background-color: #2ecc71; 
  }
}

.shake img{
  animation: shakeAnimation 0.5s infinite;
}

@keyframes shakeAnimation {
  0% {
      transform: translateX(0);
  }
  25% {
      transform: translateX(-10px);
  }
  50% {
      transform: translateX(10px);
  }
  75% {
      transform: translateX(-10px);
  }
  100% {
      transform: translateX(0);
  }
}

.zoom img{
  animation: zoomInAnimation 2s ease-in-out infinite;
}

@keyframes zoomInAnimation {
  0% {
      transform: scale(0.5);
      opacity: 0;
  }
  100% {
      transform: scale(1);
      opacity: 1;
  }
}

.typing {
  font-size: 30px;
  font-family: 'Courier', monospace;
  width: 20ch;
  white-space: nowrap;
  overflow: hidden;
  border-right: 4px solid black;
  animation: typing 2s steps(20) 2s infinite normal both, blinkCaret 0.75s step-end infinite;
}

@keyframes typing {
  from {
      width: 0;
  }
  to {
      width: 20ch;
  }
}

@keyframes blinkCaret {
  50% {
      border-color: transparent;
  }
  100% {
      border-color: black;
  }
}

.flip-container {
  perspective: 1000px;
  width: 300px;
  height: 150px;
}

.flip-card {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

.flip-container:hover .flip-card {
  transform: rotateY(180deg);
}

.flip-card .flip-front,
.flip-card .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-front {
  background-color: #f39c12;
}

.flip-back {
  background-color: #1abc9c;
  transform: rotateY(180deg);
}

.wave img{
  display: inline-block;
  font-size: 30px;
  font-weight: bold;
  color: #3498db;
  animation: wave 1s infinite;
}

@keyframes wave {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(10px);
  }
  75% {
    transform: translateY(-10px);
  }
}
.cube_container{
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60vh;
  margin: 0;
}

.cube {
  position: relative;
  width: 200px;
  height: 200px;
  transform-style: preserve-3d;
  animation: rotateCube 5s infinite linear;
}

.cube div {
  position: absolute;
  width: 200px;
  height: 200px;
  background-color: rgb(88, 87, 87);
  border: 2px solid #fff;
}

.front  { transform: translateZ(100px); background-color: #3498db; }
.back   { transform: rotateY(180deg) translateZ(100px); background-color: #e74c3c; }
.left   { transform: rotateY(-90deg) translateZ(100px); background-color: #2ecc71; }
.right  { transform: rotateY(90deg) translateZ(100px); background-color: #f39c12; }
.top    { transform: rotateX(90deg) translateZ(100px); background-color: #9b59b6; }
.bottom { transform: rotateX(-90deg) translateZ(100px); background-color: #1abc9c; }

@keyframes rotateCube {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

#contact{
  margin: 5% 8% 0% 8%;

}
.icon_set{
  display: flex;/* to align block items in a line */
  align-items: center;/* to vertically centre an item */
  justify-content: center;/* to align items horizontally centre */
  margin-top: 2rem;
}
.icon, .up_arrow{
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 15px;
}
.icon i{
  font-size: 2rem;
  color: black;
}
footer p{
  text-align: center;
  font-weight: bolder;
  margin-top: 50px;
}
.icon:hover{
  background-image: linear-gradient(to bottom right, yellow, red );
}
.icon:hover i{
  color: white;
  animation: shake 0.75s;
}

@keyframes shake{
  10% {
    transform: rotate(15deg);
  }
  20% {
    transform: rotate(-15deg);
  }
  30% {
    transform: rotate(15deg);
  }
  40% {
    transform: rotate(-15deg);
  }
}
.up_arrow{

  background-image: linear-gradient(to bottom right, yellow, rgb(0, 255, 170));
  
}
html{
  scroll-behavior: smooth;
}


@media (max-width: 767px) {
  .animationExamples{
    display: flex;
  flex-direction: column;
  align-items: center;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .animationExamples{
      display: grid;
      grid-template-columns: 1fr 1fr;
      justify-items: center;

      
  }
  @keyframes moveMoon {
    0% {
      opacity: 0;
      transform: translateY(0px);
    }
    65% {
      opacity: 0;
    }
    75% {
      opacity: 1;
    }
  
    100% {
      transform: translateY(-570px)
    }
  }

  @keyframes drive {
    from {
      transform: translateX(-100px)
    }

    to {
      transform: translateX(767px)
    }
  }

}

@media (min-width: 992px) {
  .animationExamples{
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      justify-items: center;
  }
}

