body {
    font-family: sans-serif;
}

#grid {
    position: fixed;
    inset: 0;
    background: #fed7aa;
}

.game-over-menu {
    opacity: 0;
    position: fixed;
    inset: 0;
    background: #262626;
    transition: opacity 200ms ease-in-out;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    text-align: center;
    color: #fff;
    font-weight: 400;
}

.game-over + .game-over-menu {
    opacity: 0.9;
}

.header-bg {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: #262626;
}

header {
    flex-grow: 1;
    max-width: 48rem;
    margin: 0 auto;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    width: 4rem;
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #262626;
    border-radius: 100vmax;
    overflow: hidden;
}

.fa {
    width: 2rem;
    height: 2rem;
    padding: 1.25rem;
    fill: #fff;
    transition: fill 200ms ease-in-out, background 200ms ease-in-out, transform 200ms ease-in-out;
}

[type='checkbox']:checked ~ .fa {
    fill: #262626;
    background: #fed7aa;
}

#menu-checker:checked ~ .fa {
    transform: rotate(180deg);
}

#menu-container {
    display: unset;
    position: fixed;
    top: 5.6rem;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-width: 32rem;
    background: #262626;
    transition: left 200ms ease-in-out;
    overflow: hidden;
    opacity: 0.96;
}

#menu-container.hide {
    left: -100%;
    display: unset !important;
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover > .fa {
        fill: #fff;
        background: #525252;
    }

    .btn:hover > [type='checkbox']:checked + .fa {
        fill: #262626;
        background: #fff;
    }
}

#score {
    margin: 0;
    font-size: 3rem;
    color: #fff;
    font-weight: 400;
    user-select: none;
}

.submenu {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    width: fit-content;
    justify-content: center;
    margin: 0 auto;
    padding: 5rem;
    font-size: 1.3rem;
}

.menu-button {
    font-size: 1.3rem;
    padding: 0;
    text-transform: uppercase;
    background: none;
    border: none;
    color: #fff;
}

.menu-button:hover {
    color: #fed7aa;
}

#main-menu > .menu-button {
    font-size: 1.6rem;
    margin: 0.6em 0;
}

.hide {
    display: none;
}

fieldset {
    margin-bottom: 2em;
    border: solid 2px #fff;
    display: flex;
    flex-direction: column;
}

legend {
    background: #fff;
    padding: 0.25em 0.5em;
}

.submenu label {
    color: #fff;
    padding: 0.2em 0;
}

.submenu > section {
    display: flex;
    justify-content: space-between;
}

#info {
    opacity: 1;
    position: fixed;
    top: 5.6rem;
    right: 0;
    margin: 1.5rem;
    padding: 1rem;
    background: #262626f5;
    width: 8rem;
    color: #fff;
    border-radius: 0.5rem;
    pointer-events: none;
    transition: opacity 200ms ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#info.hide {
    opacity: 0;
}

.info-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

#timer {
    font-size: 2rem;
}

#change-leaderboard {
    display: flex;
    flex-direction: column;
}

#change-leaderboard label {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

#change-leaderboard select {
    margin-left: 2rem;
}

#leaderboard-list {
    flex-grow: 1;
    border: solid 2px #fff;
    list-style-type: none;
    color: #fff;
    display: flex;
    padding: 0.2rem;
    flex-direction: column;
    overflow-y: auto;
}

#leaderboard-list>li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem;
}