* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Avenir Next', Avenir, sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #555;
}

canvas {
    cursor: move;
    display: block;
    position: absolute;
    max-width: 100%;
    left: 0;
    top: 0;
}

.is-cub-hovered,
.is-cub-hovered canvas {
    cursor: -webkit-grab;
    cursor: grab;
}

.is-cub-dragging,
.is-cub-dragging canvas {
    cursor: -webkit-grabbing;
    cursor: grabbing;
}

.instruction {
    padding: 0 10px;
    text-align: center;
    position: absolute;
    width: 100%;
    padding-bottom: 40px;
}

.button {
    font-family: 'Avenir Next', Avenir, sans-serif;
    font-weight: 500;
    font-size: 20px;
    padding: 5px 15px;
    margin: 10px;
    background: #BBB;
    color: white;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

    .button:hover {
        background: #09F;
    }

.top-bar {
    position: absolute;
    left: 0;
    top: 0;
}

.level-select-button {
    position: relative;
    z-index: 2; /* above canvas */
}

.next-level-button {
    position: absolute;
    left: 50%;
    -webkit-transform: translateX(-110px) scale(0.5);
    transform: translateX(-110px) scale(0.5);
    opacity: 0;
    background: #09F;
    width: 200px;
    height: 80px;
    pointer-events: none;
    -webkit-transition: -webkit-transform 0.2s, opacity 0.2s;
    transition: transform 0.2s, opacity 0.2s;
}

    .next-level-button:hover {
        background: #2BF;
    }

    .next-level-button.is-open {
        display: inline-block;
        pointer-events: auto;
        -webkit-transform: translateX(-110px) scale(1);
        transform: translate(-110px) scale(1);
        opacity: 1;
    }

/* ---- level list ---- */

.level-list {
    position: absolute;
    background: #EEE;
    width: 100%;
    min-height: 100%;
    left: 0;
    top: 0;
    margin: 0;
    list-style: none;
    padding: 10px;
    z-index: 3; /* above canvas, level select button */
    left: -100%;
    transition: left 0.2s;
}

    .level-list.is-open {
        left: 0;
    }

.level-list__item {
    display: inline-block;
    background: #DDD;
    margin: 5px;
    padding: 10px;
    width: 80px;
    height: 80px;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

    .level-list__item:hover {
        color: #09F;
        cursor: pointer;
        background: white;
    }

    .level-list__item.is-playing {
        background: #09F;
        color: white;
    }

.level-list__item__number {
    display: block;
    font-size: 30px;
    line-height: 35px;
}

.level-list__item__blurb {
    display: block;
    font-size: 16px;
}

.level-list__item__check {
    position: absolute;
    right: -10px;
    top: -10px;
    width: 30px;
    line-height: 30px;
    background: #555;
    border-radius: 15px;
    color: white;
    display: none;
}

.level-list__item.did-complete .level-list__item__check {
    display: block;
}

/* ---- level pres ---- */

.levels {
    display: none;
}
