* {
  box-sizing: border-box;
}

body {
  background-color: lightblue;
  background-image: linear-gradient(
    to bottom,
    lightblue 0%,
    lightblue 50%,
    rgb(35, 137, 205) 50%,
    rgb(35, 137, 205) 100%
  );
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}

nav {
  background-color: white;
  padding: 20px;
  display: flex; 
  width:80px;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition:width 0.6s linear; 
  overflow: hidden;
}

nav.active{
  width: 350px; 
  transition:width 0.6s linear;
}

nav ul {
  display: flex;
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 0;
  transition:width 0.6s linear;
}

nav.active ul {
  width: 100%;
}

nav ul li {
  /* transform: rotateY(0deg); */
  opacity: 0;
  transition: transform 0.6s linear, opacity 0.6s linear;
}

nav.active ul li {
  opacity: 1;
  transform: rotateY(360deg);
  transition: transform 0.6s linear, opacity 0.6s linear;
}

nav ul a {
  position: relative;
  text-decoration: none;
  color: #000;
  margin: 0 10px;
}

.icon{
  background-color: #fff; 
  border:0; 
  cursor: pointer;
  padding:0;
  position:relative; 
  height:30px; 
  width:30px;
}

.icon:focus{
  outline:0; 
}

.icon .line{
  background-color:#5290f9; 
  height:2px; 
  width:20px;
  position:absolute; 
  top:10px; 
  left:5px; 
  transition: transform 0.6s linear;
}

.icon .line2{
  top:auto;
  bottom:10px;
}

nav.active .icon .line1{
  transform:rotate(-765deg) translateY(5.5px); 
}

nav.active .icon .line2{
  transform:rotate(765deg) translateY(-5.5px); 
}