body {
    margin: 0;
    font-family: Arial, sans-serif;
    user-select: none;
    background-color: dodgerblue;
    color: white;
}
* {
    -webkit-tap-highlight-color: transparent;
}
p {
    margin: 0;
}
.main {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.heading-div {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}
.heading-div p:nth-child(1) {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 5px;
}
.cells-div {
    padding: 50px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    position: relative;
}
.animation {
    animation: shake 0.2s;
}
@keyframes shake {
    25% {transform: translateX(4px);}
    50% {transform: translateX(-4px);}
    75% {transform: translateX(4px);}
}
.cell {
    position: relative;
    height: 120px;
    border: 3px solid white;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cells-div .cell:nth-of-type(1),
.cells-div .cell:nth-of-type(2),
.cells-div .cell:nth-of-type(3) {
    border-top: none;
}
.cells-div .cell:nth-of-type(3n + 1) {
    border-bottom: none;
    border-left: none;
}
.cells-div .cell:nth-of-type(3n + 2) {
    border-bottom: none;
    border-left: none;
}
.cells-div .cell:nth-of-type(3n + 3) {
    border-bottom: none;
    border-left: none;
    border-right: none;
}
.restart-div {
    display: flex;
    justify-content: center;
}
.restart-div button {
    font-size: 1.2em;
    background-color: white;
    color: dodgerblue;
    border: 1px solid white;
    padding: 5px 15px;
    text-align: center;
    border-radius: 5px;
    transition: 0.5s;
    cursor: pointer;
}
.stats-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}
.result {
    font-size: 2em;
    font-weight: bold;
}
.stats {
    display: none
}
span {
    color: red;
}

.red-line-1 {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: red;
    transform: rotate(35deg);
    transition: 0.2s;
}
.red-line-2 {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: red;
    transform: rotate(-35deg);
    transition: 0.2s;
}
.red-line-3 {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: red;
    transition: 0.2s;
}
.red-line-4 {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: red;
    transform: rotate(90deg);
    transition: 0.2s;
}
@media (hover: hover) {
    .restart-div button:hover {
        background-color: transparent;
        color: white;
    }
    .cell:hover {
        background-color: #efefef;
        color: #676767;
    }
}
@media (max-width: 576px) {
    .cell {
        height: 80px;
    }
    .cells-div {
        padding-bottom: 20px;
    }
    body {
        font-size: 0.9em;
    }
}