body {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: center;
    background-color:#b0e0e6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#board {
    /* limit the max dimensions based on viewport while keeping it responsive */
    width: min(80vw, 500px);
    height: min(80vw, 500px);
    border: 10px solid darkgray;
    background-color: lightgray;
    margin: 0 auto;
    display: grid;
    box-sizing: border-box;
    
    /* enable "Container Queries" so fonts and emojis scale with tile size */
    container-type: size;
}

#board div {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: 1px solid whitesmoke;
    overflow: hidden;
    line-height: 1;

    /* font size calculated based on grid dimensions */
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

#reset-button {
    width: 120px;
    height: 50px;
    font-size: 20px;
    background-color: lightgray;
    /* this is the outer border */
    border: 10px solid darkgray; 
    /* thin inner border */
    outline: 1px solid whitesmoke; 
    outline-offset: -10px; 
    cursor: pointer;
}

#reset-button:active {
    background-color: darkgray;
}

#setup-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 16px;
}

.input-group input {
    width: 100px;
    height: 35px;
    font-size: 14px;
    color: black;
    text-align: center;
    border: 3px solid darkgray;
    box-sizing: border-box;

    /* Remove previous padding-left offset so numbers remain centered relative to the box */
    padding: 0; 
    cursor: pointer;
}

.input-group input::placeholder {
    text-align: center;
}

/* Force WebKit (Chrome, Safari, Edge) spinners to remain opaque and visible */
.input-group input[type="number"]::-webkit-inner-spin-button,
.input-group input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Force Firefox to display spinner controls */
.input-group input[type="number"] {
    appearance: none;
    -moz-appearance: number-input;
}

#start-button {
    width: 160px;
    height: 60px;
    font-size: 24px;
    background-color: lightgray;
    border: 10px solid darkgray;
    outline: 1px solid whitesmoke;
    outline-offset: -10px;
    cursor: pointer;

    display: flex;
    justify-content: center;
    align-items: center;
}

#start-button:active {
    background-color: darkgray;
}

.tile-clicked {
    background: darkgray;
}

.x1 {
    color: blue;
}

.x2 {
    color: green;
}

.x3 {
    color: red;
}

.x4 {
    color: navy;
}

.x5 {
    color: brown;
}

.x6 {
    color: teal;
}

.x7 {
    color: black;
}

.x8 {
    color: gray;
}

#flag-button {
    width: 100px;
    height: 50px;
    font-size: 30px;
    background-color: lightgray;
    border: none;
}