* , *::after , *::before {
    box-sizing: border-box;
}
:root{
    --cellSize: 100px;
    --itemSize: calc(var(--cellSize) * 0.9);
}
body{
    margin: 0;
}
.board {
    width: 100vw;
    height: 100vh;
    display: grid;
    justify-content: center;
    align-content: center;
    justify-items: center;
    align-items: center;
    grid-template-columns: repeat(3 , auto);
}
.cell{
    width: var(--cellSize);
    height: var(--cellSize);
    border: solid 2px black;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}
.cell.x , .cell.o {
    cursor: not-allowed;
}

.cell:first-child , 
.cell:nth-child(2),
.cell:nth-child(3){
    border-top: none;
}
.cell:last-child , 
.cell:nth-child(7),
.cell:nth-child(8){
    border-bottom: none;
}
.cell:nth-child(3n+1){
    border-left: none;
}
.cell:nth-child(3n+3){
    border-right: none;
}

.cell.x::before , .cell.x::after,
.board.x .cell:not(.x):not(.o):hover::before,
.board.x .cell:not(.x):not(.o):hover::after {
    content: "";
    position: absolute;
    background-color: black;
    height: var(--itemSize);
    width: calc(var(--itemSize)*0.12);
}
.cell.x::before , 
.board.x .cell:not(.x):not(.o):hover::before{
    transform: rotate(45deg);
}
.cell.x::after, 
.board.x .cell:not(.x):not(.o):hover::after{
    transform: rotate(-45deg);
}
.board.x .cell:not(.x):not(.o):hover::before,
.board.x .cell:not(.x):not(.o):hover::after{
    background-color: lightgray;
}

.cell.o::before , .cell.o::after,
.board.o .cell:not(.x):not(.o):hover::before,
.board.o .cell:not(.x):not(.o):hover::after{
    content: "";
    position: absolute;
    border-radius: 50%;
}
.cell.o::before,
.board.o .cell:not(.x):not(.o):hover::before{
    height: var(--itemSize);
    width: var(--itemSize);
    background-color: black;
}
.cell.o::after, 
.board.o .cell:not(.x):not(.o):hover::after{
    height: calc(var(--itemSize)*0.8);
    width: calc(var(--itemSize)*0.8);
    background-color: white;
}
.board.o .cell:not(.x):not(.o):hover::before
{
    background-color: lightgray;
}
.winningMessage{
    display: none;
    position: absolute;
    top:0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.winningMessage.show{
    display: flex;
}
.winningText{
    font-size: 50px;
    color: white;
}
.restartButton{
    font-size: 30px;
    padding: 5px 10px;
    border: 2px solid black
}
.restartButton:hover{
    color: white;
    border-color: white;
    background-color: black;
}


