body {
    font-family: Arial, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #2b2b2b;
}

.container {
    display: flex;
    flex-direction: row;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none;
}

.player {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    color: white;
}

.blue {
    background-color: #007bff;
}

.red {
    background-color: #dc3545;
}

h2, h3 {
    font-size: 2em;
    margin: 10px 0;
}

input[type="text"], input[type="number"] {
    font-size: 1.5em;
    margin-bottom: 10px;
    padding: 10px;
    text-align: center;
    border: none;
    border-radius: 5px;
    width: 80%;
    box-sizing: border-box;
}

button {
    font-size: 1.5em;
    padding: 10px 20px;
    margin-top: 20px;
    background-color: #ffc107;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: black;
}

button:hover {
    opacity: 0.8;
}

.button-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px; /* Ensure consistent vertical spacing */
}

.circles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.circle {
    width: 50px;
    height: 50px;
    border: 2px solid black;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
    cursor: pointer;
    font-size: 1.5em;
    color: black; /* Ensure text color is black */
    position: relative;
    overflow: hidden;
}

.circle.gray, .circle.cross {
    opacity: 0.1; /* Reduce opacity to achieve gray-out effect */
    cursor: default;
}

.circle.cross::after {
    content: 'X';
    position: absolute;
    font-size: 1.5em;
    color: red;
    z-index: 4; /* Ensure crosses are on top */
}

.circle[data-number="1"] { background-color: yellow; }
.circle[data-number="2"] { background-color: blue; }
.circle[data-number="3"] { background-color: red; }
.circle[data-number="4"] { background-color: purple; }
.circle[data-number="5"] { background-color: orange; }
.circle[data-number="6"] { background-color: green; }
.circle[data-number="7"] { background-color: brown; }
.circle[data-number="8"] { background-color: black; }
.circle[data-number="9"] {
    background-color: white;
    position: relative;
}

.circle[data-number="9"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 100%; /* Adjust the height to cover the entire circle */
    background-color: yellow;
    transform: translateY(-50%);
    z-index: 1;
}

.circle[data-number="9"] span {
    position: relative;
    z-index: 2;
    color: black;
}

.circle span {
    background-color: white;
    border-radius: 50%;
    width: 1.5em;
    height: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1; /* Ensure text is vertically centered */
    position: relative;
    z-index: 3;
}

.match-entry {
    margin-top: 10px;
    padding: 10px;
    background-color: #444;
    color: white;
    border-radius: 5px;
    width: 80%;
    text-align: center;
}

#match-history {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

#history-entries {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .player {
        width: 100%;
        padding: 10px;
    }

    h2, h3 {
        font-size: 1.5em;
    }

    input[type="text"], input[type="number"] {
        font-size: 1.2em;
    }

    .circle {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    button {
        width: 80%;
        font-size: 1.2em;
    }

    .button-row {
        margin-top: 10px;
    }
}
