@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaina+2:wght@400..800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Baloo Bhaina 2", sans-serif;
}

body {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.container {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    text-align: center;
}

.game_container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 8px;
    margin: 15px 0;
}

.box {
    aspect-ratio: 1;
    background-color: rgb(255, 237, 237);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.box:hover {
    background-color: #f0f0f5;
    transform: scale(1.02);
}

.box.x {
    color: #6e8efb;
}

.box.o {
    color: #a777e3;
}

.winning-line {
    background-color: rgba(110, 142, 251, 0.2);
}

.game_info {
    margin-top: 15px;
}

#status {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    height: 25px;
    color: #495057;
}

#reset {
    background: linear-gradient(to right, #6e8efb, #a777e3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(110, 142, 251, 0.3);
}

#reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(110, 142, 251, 0.4);
}

/* Responsive styles */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 320px;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .game {
        padding: 15px;
    }

    .box {
        font-size: 1.8rem;
    }

    #status {
        font-size: 1rem;
    }

    #reset {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 350px) {
    .container {
        max-width: 280px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .game {
        padding: 12px;
    }

    .box {
        font-size: 1.6rem;
    }
}