*,
*::after,
*::before {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: "Cairo", sans-serif;
    background-color: #f2f2f2;
    color: #222222;
}
/* 
* Text Shadow https://codepen.io/fielding/pen/wYPRjj
*/
h1 {
    text-align: center;
    font-size: 3.5rem;
    color: #ffffff;
    margin: 0;
    word-spacing: 7px;
    text-shadow: 0px -6px 0 #212121, 0px -6px 0 #212121, 0px 6px 0 #212121,
        0px 6px 0 #212121, -6px 0px 0 #212121, 6px 0px 0 #212121,
        -6px 0px 0 #212121, 6px 0px 0 #212121, -6px -6px 0 #212121,
        6px -6px 0 #212121, -6px 6px 0 #212121, 6px 6px 0 #212121,
        -6px 18px 0 #212121, 0px 18px 0 #212121, 6px 18px 0 #212121,
        0 19px 1px rgba(0, 0, 0, 0.1), 0 0 6px rgba(0, 0, 0, 0.1),
        0 6px 3px rgba(0, 0, 0, 0.3), 0 12px 6px rgba(0, 0, 0, 0.2),
        0 18px 18px rgba(0, 0, 0, 0.25), 0 24px 24px rgba(0, 0, 0, 0.2),
        0 36px 36px rgba(0, 0, 0, 0.15);
}
h1 a {
    color: inherit;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 20px;
    list-style: none;
    max-width: 400px;
    margin: 0 auto;
}
ul li {
    padding: 5px;
}
ul a {
    display: block;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 3px;
    text-decoration: none;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: white;
    transition: 0.3s all;
}

ul a:hover {
    background-color: #222222;
    color: white;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
        0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.game-container {
    padding: 20px;
}

.game-container .wrap {
    margin: 0 auto;
    max-width: 400px;
    display: grid;
    grid-template-columns: repeat(3, 90px);
    grid-template-rows: repeat(3, 90px);
    justify-content: center;
    border-radius: 3px;
}

.box {
    border: 3px solid #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    font-weight: 800;
    font-family: "Monoton", cursive;
}

.box:nth-child(3n) {
    border-right: none;
}

.box:nth-child(-n + 3) {
    border-top: none;
}

.box:nth-child(3n - 2) {
    border-left: none;
}

.box:nth-child(n + 7) {
    border-bottom: none;
}

.cross::before {
    content: "X";
    color: #222222;
}
.zero::before {
    content: "O";
    color: #3393ff;
}

.box:hover {
    background-color: #f9f9f9;
    cursor: pointer;
}

.state {
    text-align: center;
    margin-top: 20px;
}

.blink::before {
    animation: blink 1s linear infinite;
}
@keyframes blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.state button {
    all: unset;
    background: #f7f7f7;
    border: 1px solid rgb(0 0 0 / 0.3);
    color: black;
    padding: 5px 15px;
    font-size: 18px;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.state button:hover {
    background: white;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
        0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.state button:active {
    box-shadow: none;
}

#result {
    font-size: 22px;
    font-weight: bold;
}
#result::first-letter {
    color: yellow;
    font-family: "Monoton", cursive;
    background-color: #333333;
    padding: 3px 10px;
    display: inline-block;
    border-radius: 2px;
}

/* Game Instruction Text */
#ins {
    text-align: center;
    font-family: Verdana,Geneva, 
                    Tahoma, sans-serif;
    color: rgb(0, 0, 0);
}
