.menu {
    padding: 0.5rem;
    background-color: #fff;
    position: relative;
    display: flex;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 10px 25px 0 rgba(0, 0, 0, 0.075);
    width: 410px;
}
body.dark-mode .menu {
    background-color: #1e1e1e;
    box-shadow: 0 10px 25px 0 rgba(0, 0, 0, 0.3);
}
.link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 50px;
    border-radius: 8px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transform-origin: center left;
    transition: width 0.2s ease-in;
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    background-image: linear-gradient(to right, #eee 0%, #eee 100%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: right;
    transition: width 0.2s ease-in, background-size 0.2s ease-in, background-position 0.2s ease-in;
}
body.dark-mode .link {
    background-color: #1e1e1e;
    background-image: linear-gradient(to right, #333 0%, #333 100%);
}
.link:hover,
.link:focus {
    outline: 0;
    width: 130px;
    background-size: 100% 100%;
    background-position: left;
}
.link-icon {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
    left: 18px;
    position: absolute;
}
.link-icon svg {
    width: 28px;
    height: 28px;
}
.link-title {
    transform: translateX(100%);
    transition: transform 0.2s ease-in, opacity 0.2s ease-in;
    transform-origin: center right;
    display: block;
    text-align: center;
    text-indent: 28px;
    width: 100%;
    opacity: 0;
    white-space: nowrap;
    font-weight: 500;
}
.link:hover .link-title,
.link:focus .link-title {
    transform: translateX(0);
    opacity: 1;
}
@media (max-width: 480px) {
    .menu {
        width: 340px;
    }
    .link {
        width: 58px;
    }
    .link:hover,
    .link:focus {
        width: 108px;
    }
}