.menu-button > span:nth-of-type(1) {
    top: 0px;
    -webkit-animation: topbar-back 500ms linear 0s;
    -moz-animation: topbar-back 500ms linear 0s;
    animation: topbar-back 500ms 0s;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

.menu-button > span:nth-of-type(2),
.menu-button > span:nth-of-type(3) {
    opacity: 1;
}

.menu-button > span:nth-of-type(4) {
    bottom: 0px;
    -webkit-animation: bottombar-back 500ms linear 0s;
    -moz-animation: bottombar-back 500ms linear 0s;
    animation: bottombar-back 500ms 0s;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

.menu-button.toggled > span:nth-of-type(1) {
    top: 11px;
    -webkit-animation: topbar-x 500ms linear 0s;
    -moz-animation: topbar-x 500ms linear 0s;
    animation: topbar-x 500ms 0s;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

.menu-button.toggled > span:nth-of-type(2),
.menu-button.toggled > span:nth-of-type(3) {
    opacity: 0;
}

.menu-button.toggled > span:nth-of-type(4) {
    bottom: 10px;
    -webkit-animation: bottombar-x 500ms linear 0s;
    -moz-animation: bottombar-x 500ms linear 0s;
    animation: bottombar-x 500ms 0s;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

@keyframes topbar-x {
    0% {
        top: 0px;
        transform: rotate(0deg);
    }
    45% {
        top: 10px;
        transform: rotate(145deg);
    }
    75% {
        transform: rotate(130deg);
    }
    100% {
        transform: rotate(135deg);
    }
}

@-webkit-keyframes topbar-x {
    0% {
        top: 0px;
        -webkit-transform: rotate(0deg);
    }
    45% {
        top: 10px;
        -webkit-transform: rotate(145deg);
    }
    75% {
        -webkit-transform: rotate(130deg);
    }
    100% {
        -webkit-transform: rotate(135deg);
    }
}

@-moz-keyframes topbar-x {
    0% {
        top: 0px;
        -moz-transform: rotate(0deg);
    }
    45% {
        top: 10px;
        -moz-transform: rotate(145deg);
    }
    75% {
        -moz-transform: rotate(130deg);
    }
    100% {
        -moz-transform: rotate(135deg);
    }
}

@keyframes topbar-back {
    0% {
        top: 10px;
        transform: rotate(135deg);
    }
    45% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(5deg);
    }
    100% {
        top: 0px;
        transform: rotate(0);
    }
}

@-webkit-keyframes topbar-back {
    0% {
        top: 10px;
        -webkit-transform: rotate(135deg);
    }
    45% {
        -webkit-transform: rotate(-10deg);
    }
    75% {
        -webkit-transform: rotate(5deg);
    }
    100% {
        top: 0px;
        -webkit-transform: rotate(0);
    }
}

@-moz-keyframes topbar-back {
    0% {
        top: 10px;
        -moz-transform: rotate(135deg);
    }
    45% {
        -moz-transform: rotate(-10deg);
    }
    75% {
        -moz-transform: rotate(5deg);
    }
    100% {
        top: 0px;
        -moz-transform: rotate(0);
    }
}

@keyframes bottombar-x {
    0% {
        bottom: 0px;
        transform: rotate(0deg);
    }
    45% {
        bottom: 10px;
        transform: rotate(-145deg);
    }
    75% {
        transform: rotate(-130deg);
    }
    100% {
        transform: rotate(-135deg);
    }
}

@-webkit-keyframes bottombar-x {
    0% {
        bottom: 0px;
        -webkit-transform: rotate(0deg);
    }
    45% {
        bottom: 10px;
        -webkit-transform: rotate(-145deg);
    }
    75% {
        -webkit-transform: rotate(-130deg);
    }
    100% {
        -webkit-transform: rotate(-135deg);
    }
}

@-moz-keyframes bottombar-x {
    0% {
        bottom: 0px;
        -moz-transform: rotate(0deg);
    }
    45% {
        bottom: 10px;
        -moz-transform: rotate(-145deg);
    }
    75% {
        -moz-transform: rotate(-130deg);
    }
    100% {
        -moz-transform: rotate(-135deg);
    }
}

@keyframes bottombar-back {
    0% {
        bottom: 10px;
        transform: rotate(-135deg);
    }
    45% {
        transform: rotate(10deg);
    }
    75% {
        transform: rotate(-5deg);
    }
    100% {
        bottom: 0px;
        transform: rotate(0);
    }
}

@-webkit-keyframes bottombar-back {
    0% {
        bottom: 10px;
        -webkit-transform: rotate(-135deg);
    }
    45% {
        -webkit-transform: rotate(10deg);
    }
    75% {
        -webkit-transform: rotate(-5deg);
    }
    100% {
        bottom: 0px;
        -webkit-transform: rotate(0);
    }
}

@-moz-keyframes bottombar-back {
    0% {
        bottom: 10px;
        -moz-transform: rotate(-135deg);
    }
    45% {
        -moz-transform: rotate(10deg);
    }
    75% {
        -moz-transform: rotate(-5deg);
    }
    100% {
        bottom: 0px;
        -moz-transform: rotate(0);
    }
}