﻿@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

@keyframes star {
    0% {
        margin-left: -8px;
        margin-top: -8px;
    }

    25% {
        margin-left: 194px;
        margin-top: -8px;
    }

    50% {
        margin-left: 194px;
        margin-top: 75px;
    }

    75% {
        margin-left: -8px;
        margin-top: 75px;
    }

    100% {
        margin-left: -8px;
        margin-top: -8px;
    }
}

.ab {
    position: relative;
    display: inline-block;
    padding: 10px 30px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    overflow: hidden;
    margin: 0px;
    font-family: "Roboto", sans-serif;
    filter: hue-rotate(0deg);
    transition: all 0.1s linear;
    box-shadow: 3px 7px #000;
}

.ab-success {
    background-color: #00a65a;
}

.ab-warning {
    background-color: #f39c12;
}

.ab-danger {
    background-color: #D73925;
}

.ab-primary {
    background-color: #6699CC;
}

.ab:hover {
    border: 0px solid transparent;
    background-color: #000;
    color: #fff;
    box-shadow: none;
}

    .ab:hover .button-span {
        position: absolute;
        display: block;
    }

        .ab:hover .button-span:nth-child(1) {
            filter: hue-rotate(0deg);
            top: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: linear-gradient(90deg, transparent, #6699cc);
            animation: animate1 2s linear infinite;
        }

@keyframes animate1 {
    0% {
        left: -100%;
    }

    50%, 100% {
        left: 100%;
    }
}

.ab:hover .button-span:nth-child(2) {
    filter: hue-rotate(0deg);
    top: -100%;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #80509f);
    animation: animate2 2s linear infinite;
    animation-delay: 0.5s;
}

@keyframes animate2 {
    0% {
        top: -100%;
    }

    50%, 100% {
        top: 100%;
    }
}

.ab:hover .button-span:nth-child(3) {
    filter: hue-rotate(0deg);
    bottom: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(270deg, transparent, #731d13);
    animation: animate3 2s linear infinite;
    animation-delay: 1s;
}

@keyframes animate3 {
    0% {
        right: -100%;
        height: 3px;
    }

    50%, 100% {
        height: 2px;
        right: 100%;
    }
}

.ab:hover .button-span:nth-child(4) {
    filter: hue-rotate(0deg);
    bottom: -100%;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(360deg, transparent, #fff);
    animation: animate4 2s linear infinite;
    animation-delay: 1.5s;
}

@keyframes animate4 {
    0% {
        bottom: -100%;
    }

    50%, 100% {
        bottom: 100%;
    }
}
