:root {
    --base-color: rgba(255, 255, 255, 1);
    --hover-color: rgba(220, 120, 150, 1);
}

html,
body {
    height: 100%;
    width: 100%;
    background: #12c2e9;
    /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #f64f59, #c471ed, #12c2e9);
    /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #f64f59, #c471ed, #12c2e9);
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    margin: 0;
    padding: 0;
    font-family: 'VT323', serif;
}

h1 {
    color: var(--base-color);
    font-size: 5rem;
    margin: 1rem;
}

img {
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    display: block;
}

.imgholder {
    width: auto;
    height: 70%;
    border: 10px solid var(--base-color);
    border-radius: 5px;
}

.horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 400px;
    height: 120px;
    margin: 20px;
    border: 10px solid var(--base-color);
    font-size: 5rem;
    cursor: pointer;
}

.horizontal>.text {
    position: relative;
    color: transparent;
    background-image: linear-gradient(90deg, var(--hover-color) 0%, var(--hover-color) 50%, var(--base-color) 50%, var(--base-color) 100%);
    background-repeat: repeat;
    background-size: 200%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    transition: background-position 300ms;
}

.horizontal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--base-color);
    transform-origin: 100% 0;
    transform: scale3d(0, 1, 1);
    transition: transform 300ms;
}

.horizontal:hover .text {
    background-position: 0 0;
}

.horizontal:hover::before {
    transform-origin: 0 0;
    transform: scale3d(1, 1, 1);
}

.center {
    height: 100%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

canvas {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
}


@media (max-width: 780px) {
    .horizontal {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        width: 280px;
        border: 10px solid var(--base-color);
        font-size: 5rem;
        cursor: pointer;
        margin: 0;
    }

    
    .imgholder {
        width: 80%;
        height: auto;
        border: 10px solid var(--base-color);
        border-radius: 5px;
    }
    h1 {
        color: var(--base-color);
        font-size: 4rem;
    }

}

@media (max-width: 480px) {
    .horizontal {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        width: 280px;
        border: 10px solid var(--base-color);
        font-size: 5rem;
        cursor: pointer;
        margin: 0;
    }

    
    .imgholder {
        width: 80%;
        height: auto;
        border: 10px solid var(--base-color);
        border-radius: 5px;
    }
    h1 {
        color: var(--base-color);
        font-size: 3rem;
    }

}