@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&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: #222;
}
a
{
    position: relative;
    width: 160px;
    height: 50px;
    background: #333;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-decoration: none;
}
a.active
{
    background: #2196f3;
}
a span
{
    position: absolute;
    left: 40px;
    width: 18px;
    height: 20px;
    display: inline-block;
    background: #fff;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    transition: 0.5s;
}
a:hover span
{
    transform: scale(1.5) rotate(60deg) translateY(10px);
}
a.active span
{
    left: 50%;
    transform: translateX(-50%) rotate(-45deg);
    border-radius: 0;
    width: 20px;
    height: 10px;
    background: transparent;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
}
a span::before
{
    content: '';
    position: absolute;
    top: -3px;
    width: 100%;
    height: 2px;
    background: #fff;
    box-shadow: 12px -2px 0 #333,
    12px -3px 0 #333,
    15px -1px 0 #333,
    6px -2px 0 #fff;
    transition: 0.5s;
}
a.active:hover span::before,
a.active span::before
{
    transition: 0s;
    transform: scale(0);
}
a:hover span::before
{
    transform: rotate(-90deg) translateX(50%) translateY(-10px);
}
a text
{
    position: absolute;
    right: 40px;
    color: #fff;
    transition: 0.5s;
}
a:hover text,
a.active text
{
    transform: translateX(-50px) translateY(-5px) scale(0);
}