:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
}

body {
    font-family: "Tilt Warp", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    --bg-color: #262626;
    --text-color: #f5f5f5;
}

#theme-switch .light {
    display: none;
}

#theme-switch .dark {
    display: inline;
}

body.dark-mode #theme-switch .dark {
    display: none;
}

body.dark-mode #theme-switch .light {
    display: inline;
}


header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px;
    padding: 10px;
    background-color: #020aa6;
    color: #fff;
    font-size: 20px;
}

footer {
    display: block;
    justify-content: center;
    align-items: center;
    margin: 10px;
    padding: 15px;
    background-color: #020aa6;
    color: #fff;
    font-size: 15px;
}

.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    overflow-x: hidden;
    background-color: #323ca8;
    transition: 0.7s;
    padding-top: 25px;
    text-align: center;
}

.sidenav a {
    padding-top: 25px;
    text-decoration: none;
    font-size: 15px;
    color: #fff;
    display: block;
    transition: 0.7s;
}

.sidenav .closebtn {
    position: absolute;
    top: 2px;
    font-size: 25px;
    right: 25px;
}

button {
    font-family: "Tilt Warp", sans-serif;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 0;
    background-color: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #808080;
    border-right: 2px solid #808080;
}

button:active {
    font-family: "Tilt Warp", sans-serif;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
}

button a {
    font-family: "Tilt Warp", sans-serif;
    color: #000;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

*:focus {
    outline: none !important;
    box-shadow: none !important;
}

button a, a {
    text-decoration: none;
}

a {
    color: #0069FF;
    text-decoration: underline;
}

a:visited {
    font-family: "Tilt Warp", sans-serif;
    text-decoration: none;
}

a:hover, a:active {
    font-family: "Tilt Warp", sans-serif;
    color: #000;
    text-decoration: underline;
}

button:focus-visible,
a:focus-visible {
    font-family: "Tilt Warp", sans-serif;
    outline: 2px dotted;
    outline-offset: -4px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    font-family: "Tilt Warp", sans-serif;
    outline: none;
}

@media screen and (max-height: 450px) {
    .sidenav {
        padding-top: 25px;
    }
    .sidenav a {
        font-size: 15px;
    }
}
#gameBoard {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 1px;
    width: 90vw;
    max-width: 400px;
    margin: 20px auto;
    box-sizing: border-box;
    padding: 2px;
    background-color: #bdbdbd;
    border-top: 3px solid #808080;
    border-left: 3px solid #808080;
    border-bottom: 3px solid #ffffff;
    border-right: 3px solid #ffffff;
    overflow: hidden;
}

.cell {
    aspect-ratio: 1 / 1;
    width: 100%;
    background-color: #bbb;
    border: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    font-size: 4vw;
}

@media screen and (min-width: 600px) {
    .cell {
        font-size: 18px;
    }
}


.cell.revealed {
    background-color: #eee;
    border: 1px solid #ccc;
}

.cell.mine {
    background-color: #ff3333;
}

.cell.flagged {
    color: #ff0000;
    font-weight: bold;
    background-color: #d1d1d1;
}

.cell[data-count="1"] {
    color: blue;
}
.cell[data-count="2"] {
    color: green;
}
.cell[data-count="3"] {
    color: red;
}
.cell[data-count="4"] {
    color: darkblue;
}
.cell[data-count="5"] {
    color: darkred;
}
.cell[data-count="6"] {
    color: teal;
}
.cell[data-count="7"] {
    color: black;
}
.cell[data-count="8"] {
    color: gray;
}

#board {
    font-family: "Tilt Warp", sans-serif;
    max-width: 95vw;
    max-height: auto;
    border: 5px solid #020aa6;
    display: block;
    margin: 0 auto;
    touch-action: none;
}

.privacy-notice {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 15px;
    margin: 20px auto;
    max-width: 500px;
    font-size: 13px;
    text-align: left;
}

.privacy-notice b {
    color: #0069FF;
    display: block;
    margin-bottom: 5px;
}