body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4;
    overflow: hidden;
}

.container {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 300px;
    width: 100%;
    z-index: 1;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.side {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.white-side {
    margin-top: 0;
}

.black-side {
    margin-bottom: 0;
}

label {
    font-weight: bold;
}

.piece-selector {
    padding: 5px;
    font-size: 16px;
}

.placeholder {
    font-size: 16px;
    font-weight: bold;
    color: #dc3545; /* Red color for "Select a piece" */
    margin-bottom: 10px;
}

.placeholder.selected {
    color: #28a745; /* Green color for "Piece Selected" */
}

button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
}

button:hover {
    background-color: #0056b3;
}

#result {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}

/* Confirmation Pop-up */
.popup {
    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: 3;
}

.popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.popup-content p {
    margin: 0 0 15px;
    font-size: 18px;
}

.popup-content button {
    margin: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
}

#confirm-yes {
    background-color: #28a745;
    color: #fff;
}

#confirm-no {
    background-color: #dc3545;
    color: #fff;
}

/* Winning Overlay */
.winner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.winner-overlay.visible {
    display: flex;
}

.white-wins {
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
}

.black-wins {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
}

.draw {
    background-color: rgba(128, 128, 128, 0.9);
    color: white;
}

.overlay-content {
    text-align: center;
}

#refresh-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
}

#refresh-button:hover {
    background-color: #0056b3;
}