* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #333;
}

.navbar {
    justify-content: center;
    display: flex;
    align-items: center;
    position: relative;
    width: 350px;
    height: 70px;
    color: cornsilk;
}

.navbar ul {
    display: flex;
}

.navbar ul li {
    position: relative;
    list-style: none;
    width: 70px;
    height: 70px;
    z-index: 1;
}

.navbar ul li a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: rgb(255, 255, 255);
    text-align: center;
}

.navbar ul li a .icon {
    position: relative;
    size: 500px;
    line-height: 75px;
    transition: 0.5s;
    font-size: 30px;
}

.navbar ul li.active a .icon {
    font-size: 20px;
    transform: translateY(-6px);
}

.navbar ul li a .text {
    position: absolute;
    font-size: 12px;
    color: rgb(255, 255, 255);
    bottom: 20px;
    font-weight: 800;
    transition: 0.25s;
    text-transform: uppercase;
    transform: scale(0);
}

.navbar ul li.active a .text  {
    transform: scale(1);
}

.indicator {
    position: absolute;
    left: 0;
    width: 70px;
    height: 70px;
    /* background: rgb(255, 5, 55); */
    border-radius: 10px;
    transition: 0.5s;
}

.navbar ul li:nth-child(1).active ~ .indicator {
    background:red;
    box-shadow: red 0 15px 25px;
    transform: translateX(calc(70px * 0));
}
.navbar ul li:nth-child(2).active ~ .indicator {
    background:rgba(31, 240, 3, 0.705);
    box-shadow: rgba(31, 240, 3, 0.705) 0 15px 25px;
    transform: translateX(calc(70px * 1));
}
.navbar ul li:nth-child(3).active ~ .indicator {
    background:rgb(255, 174, 0);
    box-shadow: rgb(255, 174, 0) 0 15px 25px;
    transform: translateX(calc(70px * 2));
}
.navbar ul li:nth-child(4).active ~ .indicator {
    background:rgb(0, 132, 255);
    box-shadow: rgb(0, 132, 255) 0 15px 25px;
    transform: translateX(calc(70px * 3));
}
.navbar ul li:nth-child(5).active ~ .indicator {
    background:rgb(255, 0, 106);
    box-shadow: rgb(255, 0, 106) 0 15px 25px;
    transform: translateX(calc(70px * 4));
}