/**
 * Derived from CSS3 Hyperspace Demo by Noah Blon:
 * http://codepen.io/noahblon/pen/GKflw
 */
#trip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    height: 100%;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #000;
    text-align: center;

    -moz-animation: trip-fadeIn 16s 1 linear;
    -webkit-animation: trip-fadeIn 16s 1 linear;
    animation: trip-fadeIn 16s 1 linear;
}
#trip:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}
#trip .scene {
    display: inline-block;
    vertical-align: middle;
    opacity: 0;

    -moz-perspective: 5px;
    -webkit-perspective: 5px;
    perspective: 5px;

    -moz-perspective-origin: 50% 50%;
    -webkit-perspective-origin: 50% 50%;
    perspective-origin: 50% 50%;

    -moz-animation: trip-fadeIn 10s 1 linear;
    -webkit-animation: trip-fadeIn 10s 1 linear;
    animation: trip-fadeIn 10s 1 linear;

    -moz-animation-fill-mode: forwards;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;

    position: relative;
}
#trip .wrap {
    position: absolute;
    width: 1000px;
    height: 1000px;
    left: -500px;
    top: -500px;
    opacity: 0;

    -moz-transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;

    -moz-animation: trip-move 12s infinite linear;
    -webkit-animation: trip-move 12s infinite linear;
    animation: trip-move 12s infinite linear;

    -moz-animation-fill-mode: forwards;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}
#trip .wrap:nth-child(2) {
    -moz-animation: trip-move 12s infinite linear;
    -webkit-animation: trip-move 12s infinite linear;
    animation: trip-move 12s infinite linear;

    -moz-animation-delay: 6s;
    -webkit-animation-delay: 6s;
    animation-delay: 6s;
}
#trip .wall {
    width: 100%;
    height: 100%;
    position: absolute;

    background: url(wall.jpg);
    background-size: cover;
}
#trip .wall-right {
    -moz-transform: rotateY(90deg) translateZ(500px);
    -webkit-transform: rotateY(90deg) translateZ(500px);
    transform: rotateY(90deg) translateZ(500px);
}
#trip .wall-left {
    -moz-transform: rotateY(-90deg) translateZ(500px);
    -webkit-transform: rotateY(-90deg) translateZ(500px);
    transform: rotateY(-90deg) translateZ(500px);
}
#trip .wall-top {
    -moz-transform: rotateX(90deg) translateZ(500px);
    -webkit-transform: rotateX(90deg) translateZ(500px);
    transform: rotateX(90deg) translateZ(500px);
}
#trip .wall-bottom {
    -moz-transform: rotateX(-90deg) translateZ(500px);
    -webkit-transform: rotateX(-90deg) translateZ(500px);
    transform: rotateX(-90deg) translateZ(500px);
}
#trip .wall-back {
    -moz-transform: rotateX(180deg) translateZ(500px);
    -webkit-transform: rotateX(180deg) translateZ(500px);
    transform: rotateX(180deg) translateZ(500px);
}
#trip .larryface {
    position: absolute;
    top: 50%;
    left: 50%;

    height: 200px;
    width: 200px;
    margin-top: -100px;
    margin-left: -100px;

    -moz-animation: trip-larryface 60s infinite linear;
    -webkit-animation: trip-larryface 60s infinite linear;
    animation: trip-larryface 60s infinite linear;
}
#trip .audioplayer {
    position: absolute;
    bottom: 8px;
    left: 8px;

    opacity: 0.5;
}

#trip .stopbutton {
    position: absolute;
    height: 32px;
    width: 32px;
    bottom: 8px;
    right: 8px;

    background-color: rgba(90,90,90,0.25);
    background-image: none !important;
    border: none;
    border-radius: 3px;
    color: white;
}
#trip .stopbutton:hover {
    cursor: pointer;
    background-color: rgba(90,90,90,0.5);
}

/* Move Animation *************************************************************/
@-moz-keyframes trip-move {
    0%{
        -moz-transform: translateZ(-500px) rotate(0deg);
        opacity: 0;
    }
    25%{
        opacity: 1;
    }
    75%{
        opacity: 1;
    }
    100%{
        -moz-transform: translateZ(500px) rotate(0deg);
        opacity: 0;
    }
}
@-webkit-keyframes trip-move {
    0%{
        -webkit-transform: translateZ(-500px) rotate(0deg);
        opacity: 0;
    }
    25%{
        opacity: 1;
    }
    75%{
        opacity: 1;
    }
    100%{
        -webkit-transform: translateZ(500px) rotate(0deg);
        opacity: 0;
    }
}
@keyframes trip-move {
    0%{
        transform: translateZ(-500px) rotate(0deg);
        opacity: 0;
    }
    25%{
        opacity: 1;
    }
    75%{
        opacity: 1;
    }
    100%{
        transform: translateZ(500px) rotate(0deg);
        opacity: 0;
    }
}

/* FadeIn Animation ***********************************************************/
@-moz-keyframes trip-fadeIn {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}
@-webkit-keyframes trip-fadeIn {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}
@keyframes trip-fadeIn {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

/* Larry Face Animation *******************************************************/
@-moz-keyframes trip-larryface {
    0%{
        -moz-transform: scale(1,1) rotate(45deg);
        opacity: 0;
    }
    50%{
        -moz-transform: scale(4,4) rotate(0deg);
        opacity: 0.6;
    }
    100%{
        -moz-transform: scale(8,8) rotate(-45deg);
        opacity: 0;
    }
}
@-webkit-keyframes trip-larryface {
    0%{
        -webkit-transform: scale(1,1) rotate(45deg);
        opacity: 0;
    }
    50%{
        -webkit-transform: scale(4,4) rotate(0deg);
        opacity: 0.6;
    }
    100%{
        -webkit-transform: scale(8,8) rotate(-45deg);
        opacity: 0;
    }
}
@keyframes trip-larryface {
    0%{
        transform: scale(1,1) rotate(45deg);
        opacity: 0;
    }
    50%{
        transform: scale(4,4) rotate(0deg);
        opacity: 0.6;
    }
    100%{
        transform: scale(8,8) rotate(-45deg);
        opacity: 0;
    }
}