@import url("https://fonts.googleapis.com/css2?family=Inconsolata:wght@500&family=Signika:wght@600&display=swap");

:root {
    /* ALL COLORS */
    --primary-color: #fff;
    --off-white: #f6f0ed;
    --white-color: #fff;
    --gray-color: #7e7f83;
    --black-color: #2d2327;

    /* FONT SIZE */
    --box-size: 11rem;
}

*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 10px;
}

body {
    font-size: 1.6rem;
    background-color: var(--off-white);
    font-family: "Inconsolata", monospace;
}

table {
    background-color: var(--off-white);
    border-collapse: collapse;
    border: 0.5px dashed var(--gray-color);
}

td {
    width: var(--box-size);
    height: var(--box-size);
    font-size: calc(var(--box-size) * 0.7);
    text-align: center;
    cursor: pointer;
    user-select: none;
    font-family: "Signika", sans-serif;
    border: 8px solid var(--black-color);
}

tr:first-child td {
    border-top: none;
}
tr:last-child td {
    border-bottom: none;
}
tr td:first-child {
    border-left: none;
}
tr td:last-child {
    border-right: none;
}

nav .nav-container {
    padding: 2rem;
}

nav .nav-heading {
    font-size: 4rem;
}

.footer-text {
    padding: 3rem;
    font-size: 2rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
}

a:link,
a:visited {
    color: var(--black-color);
}
.footer-text a:active {
    color: #f694c1;
}

.game-container {
    padding: 3rem;
    display: flex;
    align-items: center;
    height: 70vh;
}

.game-content {
    display: inline-block;
    margin: auto;
}

td.X,
td.O {
    cursor: not-allowed;
}

.cell {
    position: relative;
}

table.x .cell:not(.X):not(.O):hover::before {
    content: "X";
    color: #b4b5b9;
    width: 100%;
    height: 100%;
    font-size: calc(var(--box-size) * 0.7);
    position: absolute;
    top: 6px;
    left: 0;
}

table.o .cell:not(.X):not(.O):hover::before {
    content: "O";
    color: #b4b5b9;
    width: 100%;
    height: 100%;
    font-size: calc(var(--box-size) * 0.7);
    position: absolute;
    top: 6px;
    left: 0;
}

.gray {
    background-color: #7e7f83;
}

#setting {
    padding: 0.8rem;
    position: fixed;
    top: 0;
    right: 0;
}

#setting button {
    padding: 0.8rem;
}

#turn-display {
    height: 4rem;
    padding: 1rem;
    font-size: 2rem;
    text-align: center;
    text-transform: uppercase;
}

.game-message {
    display: block;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.msg-container {
    height: inherit;
    position: relative;
    background-color: rgba(68, 79, 92, 0.2);
    backdrop-filter: blur(3px);
}

.message-box {
    width: 50rem;
    padding: 3rem;
    color: var(--black-color);
    border-radius: 5px;
    background-image: linear-gradient(to right, #d3f8e2, #e4c1f9, #f694c1);
    box-shadow: -3px 3px 22px 7px rgba(0, 0, 0, 0.4);

    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.start-game .title {
    font-size: 3rem;
}

.select-opponent {
    font-size: 2rem;
    margin: 2rem 0 3rem;
}

.select-opponent samp:first-child {
    font-size: 2.5rem;
}
.select-opponent samp:nth-child(2) {
    font-weight: bold;
}

.select-opponent #opponent {
    font-size: 1.8rem;
    outline: none;
    padding: 6px;
    cursor: pointer;
    border: 1px solid var(--black-color);
}

.msg {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.btn {
    font-size: 2rem;
    padding: 1rem 2.5rem;
}

.hide {
    display: none;
}

.bg-color-animation {
    animation-name: bg-color;
    animation-delay: 0.7s;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-in;
}

.msg-box-animation {
    animation-name: msg-box;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
}

@keyframes bg-color {
    0% {
        background-color: #7e7f83;
        opacity: 1;
    }
    50% {
        background-color: #7e7f83;
        opacity: 0.5;
    }
    100% {
        background-color: #7e7f83;
        opacity: 1;
    }
}

@keyframes msg-box {
    0% {
        transform: translate(-50%, -70%);
        opacity: 0;
    }

    80% {
        transform: translate(-50%, -40%);
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}
