*{
  margin: 0;
  padding: 0;
}

body{
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
 }


nav{
  position: fixed;
  bottom: 0px;
  height: 70px;
  width: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #404040;
  border-radius: 10px 10px 0 0;
}

nav ul{
  display: flex;
  width: 350px;
}

nav ul li{
  list-style: none;
  width: 20%;
  height: 70px;
  z-index: 1;
}

nav ul li a{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  text-align: center;
  font-weight: 700;
  color: #D5D3D3;
  text-decoration: none;
}


nav ul li a .icon{
  position: relative;
  display: block;
  line-height: 75px;
  font-size: 1.5em;
  text-align: center;
  transition: 0.5s;
}

nav ul li.active a .icon{
  transform: translateY(-35px)
}

nav ul li a .text{
  position: relative;
  display: block;
  font-weight: 700;
  font size: 0.75em;
  letter-spacing: 0.7px;
  Transition: 0.5s;
  opacity: 0;
}

nav ul li.active a .text{
  opacity: 1;
  transform: translateY(-35px);
}

.indicator{
  position: absolute;
  top: -50%;
  height: 70px;
  width: 70px;
  background-color: #639842; 
  border-radius: 50px;
  transition: 0.5s;
}

nav ul li:nth-child(2).active ~ .indicator{
  transform: translateX(calc(20%*5))
}
nav ul li:nth-child(3).active ~ .indicator{
  transform: translatex(calc(20%*10))
}
nav ul li:nth-child(4).active ~ .indicator{
  transform: translatex(calc(20%*15))
}

nav ul li:nth-child(5).active ~ .indicator{
  transform: translatex(calc(20%*20))
}