* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #f06, #4a90e2);
    color: #fff;
}

.container {
    text-align: center;
}

h1 {
    margin-bottom: 20px;
    color: #fff;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    margin: 0 auto;
    width: 320px;
    height: 320px;
}

.cell {
    width: 100px;
    height: 100px;
    background-color: white;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    cursor: pointer;
    color: #333;
    border-radius: 10px;
}

.current-turn {
    margin-top: 20px;
    font-size: 1.5em;
    color: #fff;
}

button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #357ab7;
}

.winning-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding: 20px;
    border: 2px solid #333;
    color: #333;
}

.show {
    display: flex;
}

.result-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 10;
}

.result-screen.show {
    display: flex;
}

@media (max-width: 768px) {
    .board {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
        width: 260px;
        height: 260px;
    }

    .cell {
        width: 80px;
        height: 80px;
        font-size: 1.5em;
    }
}
