* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.main {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.button {
    margin: 30px;
    width: 160px;
    height: 60px;
    border: 1px solid black;
    position: relative;
}

.button a {
    color: black;
    text-decoration: none;
}

.button p {
    line-height: 60px;
    text-align: center;
    font-size: 25px;
    font-weight: 900;
    position: relative;
    transition: 0.8s;
    z-index: 10;
}

.button span {
    color: transparent;
    position: relative;

}

.button span::before {
    content: '';
    position: absolute;
    width: auto;
    height: 60px;
    color: black;
    transition: 0.2s ease-out;
}

.button:nth-of-type(1) span::before {
    content: 'H';
}

.button:nth-of-type(2) span::before {
    content: 'S';
}

.button:nth-of-type(3) span::before {
    content: 'S';
}

.button:nth-of-type(4) span::before {
    content: 'H';
}
.button:nth-of-type(5) span::before {
    content: 'V';
}

.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: 0.8s;
    z-index: 1;
}

.button:hover::after {
    background-color: rgba(0, 0, 0, 1);
    transform: rotate(10deg);
}

.button:hover p {
    color: white;
}

.button:hover span::before {
    color: white;
    transform: translate(-65%, -10%) rotate(360deg);
    font-size: 80px;
}