@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #ddd8d8;
    background: hsla(191, 12%, 36%, 1);

    background: radial-gradient(circle, hsla(191, 12%, 36%, 1) 0%, hsla(240, 3%, 14%, 1) 100%);

    background: -moz-radial-gradient(circle, hsla(191, 12%, 36%, 1) 0%, hsla(240, 3%, 14%, 1) 100%);

    background: -webkit-radial-gradient(circle, hsla(191, 12%, 36%, 1) 0%, hsla(240, 3%, 14%, 1) 100%);
    color: #ede4e4;
    animation: slide 0.5s ease-in-out;
}


input,
button {
    font-family: 'Inter', sans-serif;
}

header {
    padding: 10px;
}


header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

header .logo img {
    max-width: 50px;
    max-height: 50px;
    width: 100%;
    filter: brightness(0) invert(1);
}

header .logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}


.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 20px);
    flex-direction: column;
    gap: 1rem;
}

.game-container #message {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}


.game-container .game-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 10px;
    text-align: center;
    border: 10px ridge;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
    border-radius: 20px;

}

.animation {
    animation: bomb 0.5s ease-in-out;
}

.game-container .game-box .box {
    border: 2px ridge #666666;
    padding: 50px;
    height: 100px;
    width: 100px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    font-size: 2rem;
}

.box.x {
    color: #fff;
    background-color: #3498db;
}

.box.o {
    color: #fff;
    background-color: #e74c3c;
}

.box.winner {
    color: #fff;
    background-color: #2ecc71;
}

.game-container .score {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-top: 10px;
    gap: 15px;
    max-width: 250px;
    width: 100%;
}

.score #current-player-1,
#current-player-2 {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 10px;
}

#current-player-1.current,
#current-player-2.current {
    background: greenyellow;
}

/* Modals */


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
    padding: 10px;
}

.modal {
    position: relative;
    background-color: #ffefef;
    color: black;
    padding: 20px;
    border-radius: 5px;
    max-width: 400px;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.remove {
    display: none;
}

.player-name-modal .modal-content {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
}

.modal-content h1 {
    font-size: 1.8rem;
}

.modal-content input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    outline: none;
    width: 100%;
    font-size: 1rem;
    background-color: rgb(206, 206, 206);
    box-shadow: 0 0 10px #d8d8d8;
    transition: all .3s ease-in-out;
}

.modal-content input:focus-within {
    background-color: #fff;
    box-shadow: 0 0 5px #666666;
}


.modal-content button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    outline: none;
    width: 100%;
    font-size: 1rem;
    cursor: pointer;
    background-color: #3498db;
    color: #fff;
    box-shadow: 0 0 5px #555;
}

/* Restart BTN */

.restart #restart-btn {
    padding: 10px;
    border: none;
    border-radius: 5px;
    outline: none;
    width: 100%;
    font-size: 1rem;
    cursor: pointer;
    background-color: #db3434;
    color: #fff;
    transition: all .3s linear;
}

.restart #restart-btn:focus {
    transform: translateY(5px);
}

@media screen and (max-width: 480px) {
    .modal-content h1 {
        font-size: 1.5rem;
    }

    .game-container #message {
        font-size: 1rem;

    }
}

@keyframes bomb {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }

}