/* 既存のCSSに追記または変更 */

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* 画面全体を使う */
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    padding: 20px; /* 余白を追加 */
    box-sizing: border-box;
}

h1 {
    color: #333;
    font-size: 1.5em; /* フォントサイズを小さく */
}

.game-container {
    display: flex;
    flex-direction: column; /* 縦並びにする */
    align-items: center;
    gap: 20px;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, min(40px, 12vw)); /* 画面幅に応じて調整 */
    grid-template-rows: repeat(8, min(40px, 12vw));
    border: 2px solid #666;
    background-color: #008000;
}

.cell {
    width: 100%; /* 親要素に合わせる */
    height: 100%;
    border: 1px solid #c0c0c0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cell.valid {
    background-color: rgba(255, 255, 255, 0.2);
}

.stone {
    width: 80%; /* 親要素の80%に調整 */
    height: 80%;
    border-radius: 50%;
}

.black {
    background-color: #000;
}

.white {
    background-color: #fff;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px; /* パディングを小さく */
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    width: 100%;
    max-width: 300px;
}

.status-message {
    font-size: 1em; /* フォントサイズを小さく */
    font-weight: bold;
    text-align: center;
}

.score {
    display: flex;
    justify-content: space-around;
    width: 100%;
    font-size: 0.9em;
}

button {
    padding: 10px 15px;
    font-size: 0.9em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: #fff;
    width: 80%;
}