*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'sans-serif';
}

.wrapper {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 0%, rgba(0,212,255,1) 100%);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.game-info {
    color: white;
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.5rem 3rem;
    text-align: center;
    z-index: 1;
    width: calc(100% - 2rem);
    max-width: 20rem;
}

.tic-tac-toe {
    width: 90%;
    max-width: 20rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    aspect-ratio: 1 / 1;
}

.box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    font-size: 3rem;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.box1, .box2, .box4, .box5 {
    border-right: 2px solid white;
    border-bottom: 2px solid white;
}

.box3, .box6 {
    border-bottom: 2px solid white;
}

.box7, .box8 {
    border-right: 2px solid white;
}

.btn {
    color: white;
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.5rem 2rem;
    cursor: pointer;
    display: none;
}

.btn.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.win {
    background-color: rgba(0, 255, 0, 0.3);
}

@media only screen and (min-width: 320px) and (max-width:426px){
    .btn.active {
        margin-bottom: 70px;
    }
    .game-info {
        margin-top: 50px;
    }
    p.game-info{
        width: 100px;
    }
}

@media only screen and (max-width: 480px) {
    .game-info {
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.5rem 1rem;
        width: calc(100% - 2rem);
        max-width: none;
        font-size: 0.8rem; /* Adjust font size for smaller screens */
    }

    .tic-tac-toe {
        width: 100%;
        max-width: 12rem; /* Further reduce max-width */
        padding: 0.5rem; /* Reduce padding */
    }

    .box {
        font-size: 1.5rem; /* Adjust font size for smaller screens */
    }

    .btn {
        bottom: 1rem;
        padding: 0.5rem 1rem;
    }
}

