@font-face {
    font-family: 'kindergarten';
    src: url('assets/kindergarten.woff2') format('woff2'),
         url('assets/kindergarten.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Letters for Learners';
    src: url('assets/LettersforLearners.woff2') format('woff2'),
         url('assets/LettersforLearners.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    padding: 0;
    margin: 0;
    font-family: "Letters for Learners";
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    font-size: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FF731D;
    width: 100%;
    padding: 1rem 0;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
    background-color: #FFF7E9;
    position: relative;
}

.buttons {
    display: flex;
    gap: 1rem;
}

#restart, #start-game {
    font-size: 2rem;
    padding: 4px 8px;
    background-color: #F6F6C9;
    border: 1px solid;
}

#restart:hover, #start-game:hover {
    background-color: #dedea8;
    cursor: pointer;
}

#restart {
    display: none;
}

.menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 2rem;
    background-color: rgb(193, 221, 231);
    display: none;
    z-index: 1;
    border: 1px solid;
}

.menu * {
    font-size: 2rem;
}

.menu-header {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.mode-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#mode {
    border: 1px solid;
    padding: 4px 16px;
}

#mode:hover {
    cursor: pointer;
    background-color: lightgray;
}

.field {
    display: flex;
    flex-direction: column;
    font-size: large;
    width: 100%;
}

#player2-field {
    display: none;
}

input[type="submit"], .field input {
    font-size: 2rem;
}

input[type="submit"] {
    padding: 4px 24px;
    border-radius: 8px;
    border: 1px solid;
    background-color: #f9dd6f;
}

input[type="submit"]:hover {
    cursor: pointer;
    background-color: #dedea8;
}

.menu form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

hr {
    border: 1px solid black;
    background-color: black;
    width: 100%;
}

#turn {
    font-size: 2.2rem;
}

.game-container {
    width: 450px;
    height: 450px;
    display: grid;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
}

.cell {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    font-family: "kindergarten";
    transition: 0.5s;
}

.cell:nth-child(3n + 1) {
    border-right: 4px solid rgba(0, 0, 0, 0.502);
}

.cell:nth-child(3n) {
    border-left: 4px solid rgba(0, 0, 0, 0.502);
}

.cell:nth-child(n + 1):nth-child(-n + 6) {
    border-bottom: 4px solid rgba(0, 0, 0, 0.502);
}

.cell:hover {
    background-color: grey;
    cursor: not-allowed;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: #5F9DF7;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.701);
}

.footer i {
    transition: 0.5s;
}

.footer i:hover {
    transform: rotate(360deg);
}

.footer a {
    color: black;
}

.overlay {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    background-color: rgba(108, 107, 107, 0.703);
}

.congrats {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    background-color: #74ea74;
    font-size: 1.5rem;
    width: 30%;
    display: none;
}

.congrats-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    font-size: 2rem;
}

#close {
    position: absolute;
    top: 2%;
    right: 2%;
    color: white;
    font-size: 1.5rem;
}

#close:hover {
    color: grey;
    cursor: pointer;
}

#win, #tie {
    color: yellow;
    display: none;
}

.congrats p {
    color: white;
}