@import url(https://fonts.googleapis.com/css?family=Roboto:400,700);

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

body {
    display: flex;
    font-family: Roboto, "Helvetica Neue", sans-serif;
    font-size: 18px;
    perspective: 1000px;
    background-color: #0f0404;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.description {
    margin-top: 50px;
    text-align: center;
    color: #999999;
    transition: opacity 0.3s ease;
}

.description a {
    color: #4A9DF6;
    text-decoration: none;
}

.btn.is-open~.description {
    opacity: 0;
}

.btn {
    display: block;
    position: relative;
    width: 200px;
    height: 80px;
    transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1), height 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    transform-origin: 50% 50%;
    text-align: center;
}

.btn-front {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 80px;
    background-color: #F44336;
    color: #ffffff;
    cursor: pointer;
    backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, line-height 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-front:hover {
    background-color: #f77066;
}

.btn-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #eeeeee;
    color: #222222;
    transform: translateZ(-2px) rotateX(180deg);
    overflow: hidden;
    transition: box-shadow 0.8s ease;
}

.btn-back p {
    margin-top: 27px;
    margin-bottom: 25px;
}

.btn-back button {
    padding: 12px 20px;
    width: 30%;
    margin: 0 5px;
    background-color: transparent;
    border: 0;
    border-radius: 2px;
    font-size: 1em;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

.btn-back button:focus {
    outline: 0;
}

.btn-back button.yes {
    background-color: #2196F3;
    color: #ffffff;
}

.btn-back button.yes:hover {
    background-color: #51adf6;
}

.btn-back button.no {
    color: #2196F3;
}

.btn-back button.no:hover {
    background-color: #dddddd;
}

.btn[data-direction=left] .btn-back,
.btn[data-direction=right] .btn-back {
    transform: translateZ(-2px) rotateY(180deg);
}

.btn.is-open {
    width: 400px;
    height: 160px;
}

.btn.is-open .btn-front {
    pointer-events: none;
    line-height: 160px;
}

.btn.is-open .btn-back {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn[data-direction=top].is-open {
    transform: rotateX(180deg);
}

.btn[data-direction=right].is-open {
    transform: rotateY(180deg);
}

.btn[data-direction=bottom].is-open {
    transform: rotateX(-180deg);
}

.btn[data-direction=left].is-open {
    transform: rotateY(-180deg);
}

.project-title {
    position: absolute;
    left: 25px;
    bottom: 8px;

    font-size: 16px;
    color: #444444;
}

.credits {
    position: absolute;
    right: 20px;
    bottom: 25px;
    font-size: 15px;
    z-index: 20;
    color: #444444;
    vertical-align: middle;
}

.credits *+* {
    margin-left: 15px;
}

.credits a {
    padding: 8px 10px;
    color: #444444;
    border: 2px solid #999999;
    text-decoration: none;
}

.credits a:hover {
    border-color: #555555;
    color: #222222;
}

@media screen and (max-width: 1040px) {
    .project-title {
        display: none;
    }

    .credits {
        width: 100%;
        left: 0;
        right: auto;
        bottom: 0;
        padding: 30px 0;
        background: #dddddd;
        text-align: center;
    }
}