*, *::after, *::before {
    box-sizing: border-box;
    font-family: 'Marcellus SC', serif;
    font-weight: 200;
    margin: 0;
    padding:  0;
    text-align: center;
}

:root {
    --cell-size: min(20vh, 30vw);
    --mark-size: calc(var(--cell-size) * .9);
}

body {
    margin: 0;
}

.game-container {
    padding: 40px;
}

.title-row {
    padding: 0px;
    margin-bottom: -1em;
}

.reset-container {
    text-align: center;
    padding-top: 0px;

}

#resetButton {
    margin-top: 5%;
    margin-bottom: 5%;
    padding: 10px;
    border-radius: 15px;
    width: 50%;
    background-color:darkolivegreen;
    color:aliceblue;
}

#resetButton:hover {
    background-color:black;
}

.game-title {
    padding-top: 20px;
    align-items: center;
}

h1 {
    border-style: inset;
    border-radius: 30px;
}

.ai-setting {
    margin: 20px;
    padding-top: 40px;
    padding-bottom: 20px;
    font-size: 1.1em;
    color: darkolivegreen;
}

.score {
    margin: 10px;
    padding: 20px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bolder;
    background-color: gainsboro;
    border-radius: 30px;
}

#humanScore, #aiScore, #tieCount {
    text-decoration: underline;
}

.board {
    margin: 50px;
    display: grid;
    justify-content: center;
    align-content: center;
    justify-items: center;
    align-items: center;
    grid-template-columns: repeat(3, auto);
}

.cell {
    border: 1px solid black;
    width: var(--cell-size);
    height: var(--cell-size);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.cell:nth-child(-n + 3) {
    border-top: none;
}

.cell:nth-child(3n + 1) {
    border-left: none;
}

.cell:nth-child(3n + 3) {
    border-right: none;
}

.cell:nth-last-of-type(-n + 3) {
    border-bottom: none;
}

.cell.x, .cell.circle {
    cursor: not-allowed;
}

.board.x .cell:not(.x):not(.circle):hover::before,
.board.x .cell:not(.x):not(.circle):hover::after,
.board.circle .cell:not(.x):not(.circle):hover::before {
    background-color: lightgrey;
}

.cell.x::before,
.cell.x::after,
.cell.circle::before {
    background-color: black;
}

.cell.circle::before,
.cell.circle::after {
    background-color: black;
}

.cell.x::before,
.cell.x::after,
.board.x .cell:not(.x):not(.circle):hover::before,
.board.x .cell:not(.x):not(.circle):hover::after {
    content: '';
    position: absolute;
    width: calc(var(--mark-size) * .15);
    height: var(--mark-size);
}

.cell.x::before,
.board.x .cell:not(.x):not(.circle):hover::before {
    transform: rotate(45deg)
}

.cell.x::after,
.board.x .cell:not(.x):not(.circle):hover::after {
    transform: rotate(-45deg)
}

.cell.circle::before,
.cell.circle::after,
.board.circle .cell:not(.x):not(.circle):hover::before,
.board.circle .cell:not(.x):not(.circle):hover::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.cell.circle::before,
.board.circle .cell:not(.x):not(.circle):hover::before {
    width: var(--mark-size);
    height: var(--mark-size);
}

.cell.circle::after,
.board.circle .cell:not(.x):not(.circle):hover::after {
    width: calc(var(--mark-size) * .7);
    height: calc(var(--mark-size) * .7);
    background-color: white;
}

.winning-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .9);
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 5rem;
    flex-direction: column;
}

.winning-message button {
    font-size: 3rem;
    background-color: white;
    border: 1px solid black;
    padding: .25em .5em;
    cursor: pointer;
}

.winning-message button:hover {
    background-color: black;
    color: white;
    border-color: white;
}

.winning-message.show {
    display: flex;
}
