@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #d5d0d6;
}

.box {
    position: relative;
    width: 250px;
    height: 250px;
}

.dropdown {
    position: relative;
    width: 100%;
    height: 60px;
    background: #7f0099;
    color: #fff;
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
}

.dropdown .left-icon,
.dropdown .right-icon {
    position: relative;
    top: 2px;
    display: inline-block;
    width: 15px;
    height: 5px;
    background: #fff;
    border-radius: 40px;
    transition: .5s;
}

.dropdown .left-icon {
    left: 7px;
    transform: rotate(45deg);
}

.dropdown.active .left-icon {
    transform: rotate(135deg);
}

.dropdown .right-icon {
    transform: rotate(-45deg);
}

.dropdown.active .right-icon {
    transform: rotate(-135deg);
}

.dropdown .items {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    margin-top: 63px;
    overflow: hidden;
    visibility: hidden;
    transition: .5s;
}

.dropdown.active .items {
    visibility: visible;
}

.dropdown .items a {
    position: relative;
    left: 100%;
    display: flex;
    font-size: 20px;
    background: #fff;
    color: #7f0099;
    text-decoration: none;
    border-radius: 5px;
    padding: 10px 15px;
    margin-top: 2.5px;
    z-index: 1;
    overflow: hidden;
    transition: .5s;
    transition-delay: calc(60ms * var(--i));
}

.dropdown.active .items a {
    left: 0;
}

.dropdown .items a:hover {
    color: #fff;
}

.dropdown .items a span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #bb00e0;
    z-index: -1;
    border-radius: inherit;
    transform: rotate(160deg);
    transform-origin: right;
    transition: .5s;
}

.dropdown .items a:hover span {
    transform: rotate(0deg);
}