body {
    margin: 2.5%;
    margin-bottom: 0;
    margin-top: 1%;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    background-color: white;
    font-size: 1.5vh;
    /* margin-left: solid 10px #acd454;
    margin-right: solid 10px #acd454; */
}

#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 10vh;
    width: 75vh;
    margin: auto;
    background-color: #4b742c;
    /* border: 10px solid #4b742c; */
    border-top: none;
    border-bottom: none;
    margin-top: 10px;
}

h1 {
    margin: 30px;
    margin-right: 0px;
    padding: 5px;
    color: white;
}

#flag-counter {
    margin: 10px;
    margin-left: auto;
    margin-right: auto;
    padding: 5px;
    color: white;
    font-size: 2vh;
    font-weight: 600;
}

/* drop down grid select */
#difficulty {
    padding: 5px;
    margin: 30px;
    margin-left: 18%;
    border: 3px solid white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.5vh;
}

.grid {
    display: grid;
    aspect-ratio: 1;
    height: 75vh;
    margin-left: auto;
    margin-right: auto;
    /* border: 10px solid #acd454; */
    border-top: none;
    border-bottom: none;
}

.s-grid {
    grid-template-columns: repeat(10, 10%);
    grid-template-rows: repeat(10, 10%);
}

.m-grid {
    grid-template-columns: repeat(13, 7.69%);
    grid-template-rows: repeat(13, 7.69%);
}

.l-grid {
    grid-template-columns: repeat(15, 6.67%);
    grid-template-rows: repeat(15, 6.67%);
}

.box {
    display: flex;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.s-grid .box {
    font-size: 140%;
}

.m-grid .box {
    font-size: 125%;
}

.l-grid .box {
    font-size: 90%;
}

.light {
    background-color: #acd454;
}

.dark {
    background-color: #a2d149;
}

.dug.light {
    background-color: #e5c29f;
}

.dug.dark {
    background-color: #d7b899;
}

.flag {
    color: #f23607;
}

.one {
    color: #1976d2;
}

.two {
    color: #388e3c;
}

.three {
    color: #d32f2f;
}

.four {
    color: #7b1fa2;
}

.five {
    color: #ff8f00;
}

.six {
    color: #e612ad;
}

.seven {
    color: #000d6e;
}

.eight {
    color: #bb0000;
}

#endgame-popup.hidden {
    display: none;
}

#endgame-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1em;
    z-index: 1000;
}

#popup-grouper {
    padding: 10%;
    margin-left: auto;
    margin-right: auto;
    height: 25vh;
    background-color: #a2d149;
    border-radius: 15px;
    color: white;
    max-width: 30%;
    animation: fadeIn 0.3s ease-in-out;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#endgame-text {
    text-align: center;
    font-size: 3vh;
    font-weight: 800;
    text-transform: uppercase;
    margin: 15px;
}

#play-again {
    padding: 15px;
    margin: 10px;
    margin-top: 40px;
    display: inline-block;
    border: 2px solid white;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 2vh;
    font-weight: 800;
}

#play-again:hover {
    cursor: pointer;
    transition: top ease 0.5s;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    background-color: white;
}

#footer {
    margin-top: 10px;
    margin: auto;
    height: 10vh;
    width: 75vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #4b742c;
    /* border: 10px solid #4b742c; */
    border-top: none;
    border-bottom: none;
}

#footer button {
    margin: 10px;
    margin-bottom: none;
    padding: 10px;
    border: 0.2em solid black;
    border-radius: 10px;
    font-weight: 700;
    font-size: 2vh;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    background-color: #acd454;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18);
}

#footer button:hover {
    cursor: pointer;
    transition: top ease 0.5s;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    background-color: white;
    color: black;
}

#footer button:active {
    cursor: pointer;
    transform: translateY(2px);
}