main {
    display: flex;
    flex-direction: row-reverse;
    height: auto;
}

.tab-container {
    height: 100%;
    width: 220px;
    z-index: 0;
    overflow-x: hidden;
    padding-bottom: 30px;
}

.tab-container h1 {
    text-align: right;
    margin-top: 0;
}

ul {
    list-style: none;
    overflow-y: visible;
}


#tab-content-container {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 350px;
}


.tab {
    font-size: 26px;
    line-height: 10px;
    color: #000;
    font-weight: bold;
    text-align: right;
}

.tab:hover {
    animation: text-animation 1s linear infinite;
    color: rgb(147, 147, 147, 0.7);
    cursor: default;
}

.tab:hover::before,
.tab:hover::after {
    content: attr(title);
    position: absolute;
    right: 0;
}

.tab:hover::before {
    animation: text-animation-top 1s linear infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.tab:hover::after {
    animation: text-animation-bottom 1.5s linear infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes text-animation {

    2%,
    64% {
        transform: translate(2px, 0) skew(0deg);
    }

    4%,
    60% {
        transform: translate(-2px, 0) skew(0deg);
    }

    62% {
        transform: translate(0, 0) skew(5deg);
    }
}

@keyframes text-animation-top {

    2%,
    64% {
        transform: translate(2px, -2px);
    }

    4%,
    60% {
        transform: translate(-2px, 2px);
    }

    62% {
        transform: translate(13px, -1px) skew(-13deg);
    }
}

@keyframes text-animation-bottom {

    2%,
    64% {
        transform: translate(-2px, 0);
    }

    4%,
    60% {
        transform: translate(-2px, 0);
    }

    62% {
        transform: translate(-22px, 5px) skew(21deg);
    }
}