/* 
 * Katie James
 * 2048
 * CSIS 304 JavaScript Project
*/

/* full page styling */
body {
    color: #776E65;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    padding: 10px 12px;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* header container */
.container {
    max-width: 450px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.container::after {
    clear: both;
    content: "";
    display: block;
}

/* 2048 title */
h1#title {
    font-size: 80px;
    font-weight: bold;
    margin: 0;
    display: block;
    float: left;
}

/* score container and score title */
div#score-container {
    align-items: center;
    background-color: #776E65;
    color: rgb(205, 192, 180);
    display: flex;
    flex-direction: column;
    float: right;
    height: auto;
    justify-content: center;
    margin-top: 10px;
    min-height: 70px;
    min-width: 112px;
    padding: 10px 16px;
    position: relative;
    text-align: center;
}

div#score-title {
    font-size: 16px;
    line-height: 1.1;
    white-space: nowrap;
}

/*  numeric score */
div#score {
    color: white;
    font-size: 25px;
    font-weight: bold;
    line-height: 1.1;
    margin-top: 3px;
    white-space: nowrap;
}

/* instructions subheader */
p#instructions {
    position: relative;
    float: left;
    margin-bottom: 0;
}

/* bolded 2048 in instructions */
span {
    font-weight: bold;
}

canvas {
    touch-action: none;
}

@media (max-width: 520px) {
    h1#title {
        font-size: 54px;
    }

    div#score-container {
        margin-top: 4px;
        min-height: 62px;
        min-width: 96px;
        padding: 8px 12px;
    }

    div#score-title {
        font-size: 14px;
    }

    div#score {
        font-size: 21px;
    }

    p#instructions {
        clear: both;
        float: none;
        margin: 10px 0 0;
    }
}

@media (max-width: 360px) {
    h1#title {
        font-size: 46px;
    }

    div#score-container {
        min-height: 56px;
        min-width: 88px;
        padding: 6px 10px;
    }

    div#score {
        font-size: 18px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 8px;
    }

    .container {
        margin: 0;
        max-width: 180px;
        position: absolute;
        right: 8px;
        top: 8px;
        width: 180px;
    }

    h1#title {
        float: none;
        font-size: 48px;
        line-height: 1;
    }

    div#score-container {
        float: none;
        margin-top: 6px;
        min-height: 54px;
        width: 100%;
    }

    p#instructions {
        clear: both;
        float: none;
        font-size: 13px;
        margin: 8px 0 0;
    }
}
