html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* CSS Variables*/
:root {
    --cell-size: 100px;
    --mark-size: calc(var(--cell-size) * 0.9);
    --color-violet: violet;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-violet);
    width: 96vw;
    height: 96vh;
}

h1 {
    margin: 2rem auto 0 auto;
    text-align: center;
    opacity: 0.9;
}


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

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

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

/* Remove some cell boarders */
.cell:first-child,
.cell:nth-child(2),
.cell:nth-child(3) {
    border-top: none;
}

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

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

.cell:last-child,
.cell:nth-child(8),
.cell:nth-child(7) {
    border-bottom: none;
}

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

/* Board Hover Effects */
.board.x .cell:not(.x):not(.circle):before,
.board.x .cell:not(.x):not(.circle):hover::after,
.board.circle .cell:not(.x):not(.circle):hover::before {
    background-color: grey;
    opacity: .6;
}

 /* -- Create Xs-- */
.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: "";
    width: calc(var(--mark-size) * .15);
    height: var(--mark-size);
    position: absolute;
}

.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);
}

/* -- Create Circles-- */
.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: "";
    border-radius: 50%;
    position: absolute;
}

.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) * 0.67);
    height: calc(var(--mark-size) * 0.67);
    background-color: var(--color-violet);
}

/* Winning message and backdrop*/
.winningMessage {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: rgba(0,0,0, .9);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 5rem;
}

.winningMessage.show {
    display: flex;
}

.winningMessage button {
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    font-size: 2.5rem;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
}

.winningMessage button:hover {
    background-color: #000;
    color: #fff;
    border: 1px solid #fff;
}

.footer {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
}

p {
    font-size: 1rem; 
}

p i  {
    font-size: 1rem;
    color: red;
}