@-webkit-keyframes cubeshake {
    0% {
        transform: translate3d(-75px, -150px, 0) rotateX(55deg) rotateZ(45deg);
    }

    50% {
        transform: translate3d(-75px, -150px, 0) rotateX(45deg) rotateZ(45deg);
        top: 55%;
    }

    100% {
        transform: translate3d(-75px, -150px, 0) rotateX(55deg) rotateZ(45deg);
    }
}

@-webkit-keyframes cubeshakeStart {
    0% {
        transform: translate3d(-75px, -150px, 0) rotateX(55deg) rotateZ(45deg);
    }

    50% {
        transform: translate3d(-75px, -150px, 0) rotateX(55deg) rotateY(10deg) rotateZ(45deg);
        top: 55%;
    }

    100% {
        transform: translate3d(-75px, -150px, 0) rotateX(55deg) rotateZ(45deg);
    }
}

@-webkit-keyframes cubeglow {
    0% {
        box-shadow: none;
    }

    50% {
        box-shadow: inset 0 0 50px 5px rgba(255, 255, 255, 0.3);
    }

    100% {
        box-shadow: none;
    }
}

@-webkit-keyframes cubeglowStart {
    0% {
        box-shadow: none;
    }

    50% {
        box-shadow: inset 0 0 50px 5px rgba(255, 255, 255, 0.3);
    }

    100% {
        box-shadow: none;
    }
}

@-webkit-keyframes fall {
    0% {
        transform: translate3d(100px, 0, 500px);
    }

    100% {
        transform: translate3d(100px, 0, 0);
    }
}

@-webkit-keyframes jump {
    0% {
        transform: translate3d(150px, 50px, -50px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    75% {
        transform: translate3d(75px, 75px, 50px) rotateX(0deg) rotateY(180deg) rotateZ(0deg);
    }

    100% {
        transform: translate3d(75px, 75px, -75px) rotateX(0deg) rotateY(180deg) rotateZ(0deg);
    }
}

#cvs {
    transform: scale(2.3);
    position: relative;
    top: -293px;
    left: 60px;
    z-index: 11;
}

#cube {
    position: absolute;
    height: 150px;
    width: 150px;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    transform: translate3d(-75px, -150px, 0) rotateX(55deg) rotateZ(45deg);
    -webkit-animation: cubeshakeStart 0.3s ease-out;
    -webkit-animation-delay: 0.24s;
}

#cube.full {
    -webkit-animation: cubeshake 0.3s ease-out;
    -webkit-animation-delay: 0.42s;
}

#cube.shake {
    -webkit-animation: cubeshake 0.3s;
}

.cubeface {
    position: absolute;
    height: 150px;
    width: 150px;
    transform-style: preserve-3d;
    -webkit-animation: cubeglowStart 0.3s ease-out;
    -webkit-animation-delay: 0.24s;
}

#cube.full .cubeface {
    -webkit-animation: cubeglow 0.3s ease-out;
    -webkit-animation-delay: 0.42s;
}

.cubeface.front {
    top: 150px;
    transform-origin: top;
    transform: rotateX(-90deg);
}

.cubeface.back {
    transform-origin: top;
    transform: rotateX(-90deg);
}

.cubeface.right {
    left: 150px;
    transform-origin: left;
    transform: rotateY(90deg);
}

.cubeface.left {
    transform-origin: left;
    transform: rotateY(90deg);
}

.cubeface.bottom {
    transform: translateZ(-150px);
}

.square {
    opacity: 0;
    position: absolute;
    height: 50px;
    width: 50px;
    background: #6b6b6b;
    border: 1px solid black;
    box-sizing: border-box;
    transition: all 0.18s, opacity 0.06s;
}

.square.visible {
    opacity: 1;
}

#cube.metal .square {
    border: 0;
}

#cube.metal .top .square {
    background: linear-gradient(51deg, rgba(255, 255, 255, 1) 0%, rgb(139 139 139) 100%);
}

#cube.metal .front .square {
    background: linear-gradient(286deg, rgb(169 169 169) 0%, rgb(30 30 30) 100%);
}

#cube.metal .right .square {
    background: linear-gradient(173deg, rgba(255, 255, 255, 1) 0%, rgb(30 30 30) 100%);
}

.top .square:nth-child(1) {
    top: 0;
    left: 50px;
}

.top .square:nth-child(2) {
    top: 0;
    left: 0;
}

.top .square:nth-child(3) {
    top: 50px;
    left: 0;
}

.top .square:nth-child(4) {
    top: 100px;
    left: 0;
}

.front .square:nth-child(1) {
    top: 0;
    left: 0;
}

.front .square:nth-child(2) {
    top: 50px;
    left: 0;
}

.front .square:nth-child(3) {
    top: 100px;
    left: 0;
}

.front .square:nth-child(4) {
    top: 100px;
    left: 50px;
}

.front .square:nth-child(5) {
    top: 100px;
    left: 100px;
}

.right .square:nth-child(1) {
    top: 100px;
    left: 100px;
}

.right .square:nth-child(2) {
    top: 50px;
    left: 100px;
}

.right .square:nth-child(3) {
    top: 0;
    left: 100px;
}

.right .square:nth-child(4) {
    top: 0;
    left: 50px;
}

.right .square:nth-child(5) {
    top: 0;
    left: 0;
}

.right .square:nth-child(6) {
    top: 25px;
    left: -50px;
    transform: rotateY(-90deg);
}

#cube.metal .right .square:nth-child(6) {
    background: linear-gradient(51deg, rgba(255, 255, 255, 1) 0%, rgb(139 139 139) 100%);
}

#minicube {
    position: absolute;
    width: 50px;
    height: 50px;
    transform: translate3d(100px, 0, 0);
    transform-style: preserve-3d;
    transform-origin: 0 0 0;
    -webkit-animation: fall 0.3s ease-in;
}

#minicube.transition {
    transition: all 0.06s;
}

.minicubeface {
    position: absolute;
    width: 50px;
    height: 50px;
    background: radial-gradient(#5e4cba, #7059e5) center;
    background-size: 100px 100px;
    border: 1px solid #4f3fa1;
    transform-style: preserve-3d;
    box-sizing: border-box;
    transition: all 0.48s ease-in, background 0.06s;
}

.minicubeface.top {
    transform: translate3d(0, 0, 50px);
}

.minicubeface.front {
    transform-origin: bottom;
    transform: rotateX(-90deg);
}

.minicubeface.left {
    transform-origin: left;
    transform: rotateY(-90deg);
}

.minicubeface.right {
    transform-origin: right;
    transform: rotateY(90deg);
}

.minicubeface.back {
    transform-origin: top;
    transform: rotateX(90deg);
}

#minicube.grow {
    -webkit-animation: jump 0.48s cubic-bezier(0.5, 1.2, 0, 0.9);
    transform: translate3d(75px, 75px, -75px) rotateY(180deg) !important;
    transform-origin: 75% 75% 37.5px !important;
}

#minicube.grow .minicubeface {
    width: 75px;
    height: 75px;
}

#minicube.grow .minicubeface.top {
    transform: translate3d(0, 0, 75px);
}

#cube.metal .minicubeface {
    border: 0;
}

#cube.metal .minicubeface.bottom {
    background: #e2e6e9;
}

#cube.metal .minicubeface.front {
    background: #898fbf;
}

#cube.metal .minicubeface.left {
    background: #535e8b;
}

#cube.metal .front .square:nth-child(1),
#cube.metal .front .square:nth-child(2),
#cube.metal .front .square:nth-child(3) {
    background: linear-gradient(286deg, rgb(169 169 169) 0%, rgb(30 30 30) 100%);
}