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

a {
    text-decoration: none;
    color: #FFF;
    /* background: #111; */
    font-family: roboto;
    font-size: 40px;
    /* border: 1px solid #5500FF; */
    font-weight: bold;
    letter-spacing: 0;
    padding: 10px 40px;
    position: relative;
    /* overflow: hidden; */
    border-radius: 1px;
    transition: all 0.4s;
}

a::before,
a::after {
    content: '';
    position: absolute;
    z-index: -1;
    transition: all 0.4s;
}

a::before {
    left: -20%;
    top:-6%;
    width: 140%;
    height: 100%;
    border-top: 4px solid #5500FF;
    border-bottom: 4px solid #771100;
}
a::after {
    left: 0;
    top:-20%;
    width: 100%;
    height: 140%;
    border-left: 4px solid #5500FF;
    border-right: 4px solid #771100;
}

a:hover:before{
    transform:  rotateX(180deg);
}
a:hover:after{
    transform:  rotateY(180deg);
}