.container {
    width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.grid {
    height: 400px;
    width: 400px;
    display: flex;
    flex-wrap: wrap;
    background-color: #dcd6bc;
    margin-left: 0;
    margin-top: 20px;
    border: 10px solid #dcdbdc;
    margin-bottom: 10px;
}
.div {
    font-size: 25px;
    text-align: center;
    font-family: "Roboto Mono", monospace;
    width: 40px;
    height: 40px;
    border: solid 1px red;
    box-sizing: border-box;
}

/* Center flags and result text below the grid */
.container > div:not(.grid) {
    width: 100%;
    text-align: center;
    margin-top: 6px;
}

#result {
    margin-top: 4px;
    font-weight: 700;
}

.valid, .bomb {
    width: 40px;
    height: 40px;
    border: 5px solid;
    border-color: #f5f3eb #bab7a9 #bab7a9 #fff9db;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.checked {
width: 40px;
height: 40px;
border: 2px solid #9c998d;  
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
}

.one {
    color: #e76346;
}

.two {
    color: #4199d3;
}

.three {
    color: #57da59;
}

.four {
    color: #bb41d3;
}

.flag,
.flag.one,
.flag.two, 
.flag.three,
.flag.four {
    font-size: 0 !important;
    color: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.flag::before,
.flag.one::before,
.flag.two::before,
.flag.three::before,
.flag.four::before {
    content: '🚩';
    font-size: 25px !important;
    color: red !important;
}