* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Gill Sans", sans-serif;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(to bottom, #fff 0%, #fff 50%, #5290f9);
  display: grid;
  place-items: center;
}

nav {
  background-color: #fff;
  padding: 20px;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: width 0.6s linear;
  overflow-x: hidden;
}

nav.active {
  width: 350px;
}

nav .container {
  display: flex;
  list-style-type: none;
  width: 0;
  transition: width 0.6s linear;
}

nav.active .container {
  width: 100%;
}

nav .container .item {
  transform: rotateY(0deg);
  opacity: 0;
  transition: transform 0.6s linear, opacity 0.6s linear;
}

nav.active .container .item {
  opacity: 1;
  transform: rotateY(360deg);
}

nav .container .nav_link {
  text-decoration: none;
  position: relative;
  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);
}
