﻿* {
    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;
}

.popup {
    background: url(../image/popup.jpg);
    background-size: 329px 300px;
    position: fixed;
    bottom: 140px;
    right: 552px;
    width: 257px;
    height: 229px;
}

.levelup {
    background: url(../image/levelup.jpg);
    background-size: 258px 157px;
    position: absolute;
    z-index: 2;
    padding: 78px 129px;
    margin-left: 40.7%;
    margin-top: 119px;
}

canvas {
    cursor: move;
    display: block;
    position: absolute;
    max-width: 100%;
    left: 0;
    top: 0;
    background-color: #ffcce6;
}

.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;
    color: crimson;
    font-family: cursive;
}

.button {
    font-family: 'Avenir Next', Avenir, sans-serif;
    font-weight: 500;
    font-size: 20px;
    padding: 5px 15px;
    margin: 10px;
    background: blueviolet;
    color: white;
    border-radius: 22px;
    border: none;
    cursor: pointer;
    margin-left: 631px;
}

    .button:hover {
        /*background: brown;*/
    }

.top-bar {
    position: absolute;
    left: 0;
    top: 0;
}

.level-select-button {
    display: inline-block;
    margin-left:0;
    position: absolute;
    z-index: 2;
    background: url(../image/back.png);
    padding: 33px 46px;
    background-size: 97px 70px;
}

next-level-button {
    font-family: 'Avenir Next', Avenir, sans-serif;
    font-weight: 500;
    font-size: 20px;
    padding: 5px 15px;
    margin: 10px;
    background: blueviolet;
    color: white;
    border-radius: 22px;
    border: none;
    cursor: pointer;
    margin-left: 241px;
    width: 69px;
    height: 42px;
}

.next-level-button:hover {
    /*background: brown;*/
}

.intro2 {
    pointer-events: none;
}

.disabled {
    pointer-events: none;
    opacity: 0.4;
}

.next-level-button.is-open {
    display: inline-block;
    margin-top: -75px;
    position: absolute;
    z-index: 2;
    background: url(../image/next.png);
    padding: 41px 56px;
    background-size: 114px 94px;
}

/* ---- 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: blueviolet;
    margin: 5px;
    padding: 22px;
    width: 80px;
    height: 80px;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

    .level-list__item:hover {
        color: #09F;
        cursor: pointer;
        background: brown;
    }

    .level-list__item.is-playing {
        background: blueviolet;
        color: white;
    }

.level-list__item__number {
    display: block;
    font-size: 30px;
    line-height: 35px;
    color: white;
}

.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;
}

@media screen and (max-width:1000px) {
    .button {
        margin-left: 122px;
    }

    .popup {
        margin-right: -503px;
        top: 296px;
    }

    .next-level-button.is-open {
        margin-top: -8px;
        margin-left: 128px;
    }

    .levelup {
        margin-top: 149px;
        margin-left: 53px;
    }

    .level-select-button{
        margin-left:0;
    }
}
