* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body > div {
    width: 100%;
    flex: 1 1;
    min-height: 0;
}

#idle {
    background-color: #5500b7;

}

#playarea {
    flex: 1 1;
    position: relative;
}

canvas {
    height: 100%;
    width: 100%;
    min-width: 0;
}

@media only screen and (max-width:800px) {
    body > div {
        display: flex;
        flex-direction: column;
    }

    #playarea {
        min-height: 50vh;
    }

    #idle {
        border-top: 10px solid black;
        flex: 1 0;
        overflow-y: scroll;
        padding: 10px;
    }

    h2 {
        display: none;
    }

    footer {
        display: none;
    }

    .info {
        float: right;
        clear: right;
    }

    .maxed {
        display: none !important;
    }

    .show-footer:hover {
        opacity: 0;
    }
    .show-footer:hover + footer {
        display: block;
    }

    .show-footer {
        position: absolute;
        right: 20px;
        background: #8e66bd;
        bottom: 20px;
        padding: 7px;
        border-radius: 20px;
    }
}

@media only screen and (min-width:800px) {
    body > div {
        display: flex;
        flex-direction: row;
    }
    #idle {
        border-left: 10px solid black;

        min-width: 20vw;
        padding: 20px;
        flex: 0 1;
    }

    .show-footer {
        display: none;
    }
}

/* ============================== */

.topMessage, .ballMessage, button {
    user-select: none;
}

.topMessage {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    text-align: center;
    animation-name: fadeUp;
    animation-duration: 4s;
    font-size: 25px;
    font-family: sans-serif;
    font-weight: bold;
    opacity: 0;
}

.ballMessage {
    position: absolute;
    width: 20rem;
    text-align: center;
    margin-left: -10rem;
    animation-name: fadeUp;
    animation-duration: 4s;
    font-size: 12px;
    font-family: sans-serif;
    font-weight: bold;
    opacity: 0;
}

@keyframes fadeUp {
    from { 
        opacity: 1; 
        transform: translate(0, -1em);
    }
    to {
        opacity: 0;
        transform: translate(0, -80px);
    }
}


.info {
    font-size: 16pt;
}

footer {
    flex-shrink: 1;
    height: fit-content;
    width: 100%;
    padding: 1rem;
    background-color: white;
    border-top: 1px lightgrey solid;
}

label::after {
    content: ":";
}

.info {
    width: calc(min(12em, 30vw));
    display: flex;
    flex-direction: row;
}

.info label {
    display: inline-block;
    flex: 1 1;
}

button {
    display: block;
}

button:not(.disabled) {
    color: green;
}

.debug {
    display: none;
}
