body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

#game-container {
    text-align: center;
}

#chess-board {
    display: grid;
    grid-template-columns: repeat(8, 60px); /* 8 列，每列 60px */
    grid-template-rows: repeat(8, 60px);    /* 8 行，每行 60px */
    width: 480px;  /* 8 * 60px */
    height: 480px; /* 8 * 60px */
    border: 2px solid #333;
    margin: 20px auto; /* 置中 */
}

.square {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px; /* 棋子大小 */
    cursor: pointer;
    user-select: none; /* 防止文字被選中 */
    box-sizing: border-box; /* 包含邊框在寬高內 */
}

.light {
    background-color: #f0d9b5; /* 淺色格子 */
}

.dark {
    background-color: #b58863; /* 深色格子 */
}

.selected {
    background-color: #6495ED !important; /* 選中時的顏色 (淡藍色) */
    border: 2px solid yellow;
}

/* 可選：為不同顏色的棋子設定顏色 */
.white-piece {
    color: #ffffff; /* 白色棋子 */
    text-shadow: 1px 1px 2px black; /* 加點陰影讓白色棋子更明顯 */
}

.black-piece {
    color: #000000; /* 黑色棋子 */
}

#status-message {
    margin-top: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

#reset-button {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
}