*,
*::after,
*::before {
    box-sizing: border-box;
}

:root {
    --cell-size: 100px;
    --mark-size: calc(var(--cell-size) * .9);
}

body {
    margin: 0;
    height: 100vh;
    display: grid;
    align-content: center;
    justify-content: center;
}

.board {
    display: grid;
    align-content: center;
    justify-content: center;
    grid-template-columns: repeat(3, auto);
    grid-gap: 5px;
    background-color: black;
}

.cell {
    width: var(--cell-size);
    height: var(--cell-size);
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.cell.x,
.cell.circle {
    cursor: not-allowed;
}

.cell.x::after,
.cell.x::before,
.board.x .cell:not(.x):not(.circle):hover::before,
.board.x .cell:not(.x):not(.circle):hover::after {
    content: " ";
    width: calc(var(--mark-size)*.15);
    height: var(--mark-size);
    position: absolute;
}

.cell.x::after,
.cell.x::before {
    background-color: black;
}

.board.x .cell:not(.x):not(.circle):hover::before,
.board.x .cell:not(.x):not(.circle):hover::after {
    background-color: lightgray;

}

.cell.x::after,
.board.x .cell:not(.x):not(.circle):hover::after {
    transform: rotate(45deg);
}

.cell.x::before,
.board.x .cell:not(.x):not(.circle):hover::before {
    transform: rotate(-45deg);
}

.cell.circle::before,
.board.circle .cell:not(.x):not(.circle):hover::before {
    content: " ";
    width: calc(var(--mark-size)*.9);
    height: calc(var(--mark-size)*.9);
    border-radius: 50%;
    position: absolute;
}

.cell.circle::before {
    border: calc(var(--mark-size)*.15) solid black;

}

.board.circle .cell:not(.x):not(.circle):hover::before {
    border: calc(var(--mark-size)*.15) solid lightgray;
}