* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* height: 100dvh;
    width: 100dvw; */
    /* box-sizing: border-box; */
}

html,
body {
    /* height: 100%; */
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    /* justify-content: center; */
}

header {
    width: 100%;
    padding: 1em 0;
    text-align: center;
    border-bottom: solid;
}

main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 1.25vh 2vw;
    justify-content: flex-start;
    align-items: center;
    gap: 0.45rem;
    /* justify-items: stretch;
    align-content: space-evenly; */
    /* text-align: center; */
}

#timer {
    padding: 0.7em 0;
}

#grid {
    width: min(96vw, 980px);
    height: min(62vh, 640px);
    /* margin: 2vh 2vw; */
    /* background-color: lightgreen; */
    padding-top: 20px;
    display: grid;
    grid-template-columns: repeat(var(--grid-size), minmax(0, 1fr));
    grid-template-rows: repeat(var(--grid-size), minmax(0, 1fr));
    justify-content: center;
    justify-items: center;
    align-items: center;
    align-content: center;

    .cell {
        height: 100%;
        width: 100%;
        border: 0.5px solid black;
        background-color: white;
        place-items: center;
        line-height: 1;
        font-weight: bolder;
        font-size: clamp(0.62rem, calc(14rem / var(--grid-size)), 1rem);
        text-align: center;
        align-content: center;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        touch-action: manipulation;
    }

    #result {
        grid-column-start: 1;
        grid-column-end: var(--grid-size);  
        text-align: center;
    }

    .flagged.unmined {
        background-color: red;
    }

    .unmined {
        background-color: grey;
    }

    .unmined:hover:not(.flagged) {
        background-color: darkgray;
    }

    /* For bot play */
    .unmined.hover {
        background-color: darkgray;
    }
}

select {
    margin: 0.5em;
    height: 2em;
}

#flags {
    background-color: lightcoral;
}

section {
    display: flex;
    width: 60%;
    place-content: center;
    place-items: center;
}

button {
    margin: 0.3em;
    padding: 0.2em 0.5em;
    height: 3em;
    width: 50%;
    font-size: 14px;
    /* align-self: stretch; */
}

/* #bot-speed-label {
    width: 50%;
} */

#bot-speed-slider {
    width: 50%;
}
