body {
    margin: 0;
    padding: 0;
    display: flex; 
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    background-color: #f5f5f5;
    font-family: 'Montserrat', sans-serif;
}

h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

#game-container {
    width: 470px; 
    padding: 130px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    border: 2px solid #ccc;
}


#player-inputs {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

#player1, #player2 {
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 5px;
    width: 150px;
}


#startGame, #restartGame {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#startGame:hover, #restartGame:hover {
    background-color: #0056b3;
}

#info {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

#gameboard {
    width: 300px;
    height: 300px;
    background-color: black;
    display: flex;
    flex-wrap: wrap;
    border: solid 1px black;
}

.square {
    width: 100px;
    height: 100px;
    background-color: white;
    border: solid 2px black;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.square:hover {
    background-color: #f1f1f1;
}

.circle {
    height: 90px;
    width: 90px;
    border-radius: 50%;
    border: 15px solid blue;
    box-sizing: border-box;
}

.cross {
    height: 90px;
    width: 90px;
    position: relative;
    transform: rotate(45deg)
}

.cross:before, .cross:after {
    content: "";
    position: absolute;
    background-color: red;
}

.cross:before {
    left: 50%;
    width: 30%;
    height: 100%;
    margin-left: -15%;
}

.cross:after {
    top: 50%;
    height: 30%;
    width: 100%;
    margin-top: -15%;
}


#gameMode {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

#gameMode label {
    font-size: 16px;
    margin-right: 10px;
}

#gameMode input {
    width: 20px;
    height: 20px;
}

#difficulty {
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 5px;
    margin-left: 10px;
}

#restartGame {
    background-color: #28a745;
}

.restartGame:hover {
    background-color: #218838;
}

#modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.close {
    background-color: red;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    margin-top: 10px;
}

/* #result {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 5px;
    display: none;
    text-align: center;
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
}

#result.win {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: green;
}

#result.lose {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: red;
}

#result.draw {
    background-color: #ffeeba;
    border-color: #ffeeba;
    color: orange;
} */


/*  mobile version */

@media screen and (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    #game-container {
        width: 90%;
        padding: 10px;
    }

    #player-inputs {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    #player1, #player2, #difficulty {
        width: 100%;
        font-size: 14px;
    }

    #startGame, #restartGame {
        width: 100%;
        padding: 12px 0;
        font-size: 18px;
    }

    #gameboard {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .square {
        width: 33%;
        height: 33%;
    }

    .circle, .cross {
        height: 80%;
        width: 80%;
    }
}