:root {
    --bg-0: #020617;
    --bg-1: #334155;
    --font-0: #f8fafc;
    --color: #4d7c0f
}

html {
    font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
}

body {
    height: 100vh;
    background-color: var(--bg-0);
    color: var(--font-0);
    margin: 0 !important;
    font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
    font-size: .75rem;
    overflow-x: hidden;
}

main {
    width: 100%;
    height: 100%;
    margin-left: auto;
    margin-right: auto;

}

dialog {
    background-color: var(--bg-0);
}

input {
    background-color: var(--bg-0);
    border: 2px solid var(--font-0);
    font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
    color: var(--font-0);
    outline: none;
    padding: .5rem;
    box-sizing: border-box;
    font-size: 1.25rem;
}

button {
    cursor: pointer;
    background-color: var(--bg-0);
    color: var(--font-0);
    font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
    font-size: 1.25rem !important;
    outline: none;
    border: none;
    text-decoration: underline;
}

button:hover {
    color: var(--color);
}

.board-container {
    max-width: 500px;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-board {
    justify-content: center;
    max-width: 100vh;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-gap: 5px;
    width: 100%;
    background-color: var(--font-0);
    aspect-ratio: 1/1 !important;
}

.field {
    background-color: var(--bg-0);
    width: 100%;
    aspect-ratio: 1/1 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    user-select: none;
}

.field:hover {
    background-color: var(--bg-1);
}

.a-field {
    color: var(--font-0);
    font-size: .75rem;
}

.logs {
    width: auto;
    height: 100%;
    background-color: var(--bg-1);
    overflow-y: scroll;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.flex-between {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.flex-center {
    display: flex;
    justify-content: center;
    line-height: 0;
}

.flex-center>*+* {
    margin-left: 1rem;
}

#message-container {
    display: none;
}

#logs {
    margin: 0 !important;
    width: 100%;
    height: 100%;
    /* background-color: var(--bg-1); */
    border: 2px solid var(--font-0);
    overflow-y: scroll;
    padding: .5rem;
    box-sizing: border-box;
    font-size: .75rem;
}

.disabled {
    cursor: default;
}

.disabled:hover {
    background-color: var(--bg-0);
}

.win {
    background-color: var(--color);
}

.win:hover {
    background-color: var(--color) !important;
}


@media (min-width: 640px) {

    body {
        font-size: .95em;
    }

    .a-field {
        font-size: 1.25rem;
    }

    .board {
        grid-gap: 10px;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-1);
}

::-webkit-scrollbar-thumb {
    background: var(--color);
}

#play-again-btn {
    background-color: inherit;
    font-size: .75rem !important;
}

#invite-url {
    position: absolute;
    top: 0;
    left: 0;
    font-size: .75rem !important;
    margin: 1rem;
}