body {
    font-family: sans-serif;
    background-color: #f4f7f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    overscroll-behavior-y: none;
    color-scheme: only light;
}

.back-button {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #5D9CEC;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s;
}
.back-button:hover { background-color: #4A89DC; }

.board-container {
    width: 90vw;
    max-width: 600px;
    margin-top: 10px;
    touch-action: none;
}

#myBoard { width: 100%; }

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.left-buttons {
    display: flex;
    gap: 8px; 
}

.control-button {
    background-color: #5D9CEC;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
.control-button:hover { background-color: #4A89DC; }

.start-button {
    background-color: white;
    color: #5D9CEC;
    border: 2px solid #5D9CEC;
}
.start-button:hover {
    background-color: #e8f0fe;
}

/* Style for Chessboard.js spare piece rows */
.spare-pieces-7492f {
    background-color: #e8f0fe;
    border-radius: 4px;
    padding: 4px;
    margin: 4px 0;
}

@media (max-width: 800px) {
    .back-button {
        position: static;
        margin-bottom: 20px;
    }
}