body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

h1 {
    color: #333;
}

.game-container {
    display: flex;
    gap: 20px;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 50px);
    grid-template-rows: repeat(8, 50px);
    border: 2px solid #666;
    background-color: #008000; /* 濃いめの緑 */
}

.cell {
    width: 50px;
    height: 50px;
    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: 40px;
    height: 40px;
    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: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
}

.status-message {
    font-size: 1.2em;
    font-weight: bold;
}

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

button {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: #fff;
}
/* 既存のCSSに追記 */

/* 石が消えるアニメーション */
@keyframes fadeOutAndShrink {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5); /* 半分くらいの大きさに縮む */
    }
}
/* 石が現れるアニメーション */
@keyframes fadeInAndGrow {
    0% {
        opacity: 0;
        transform: scale(0.5); /* 半分くらいの大きさから現れる */
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* アニメーション適用時のクラス */
.stone.flipping-out {
    animation: fadeOutAndShrink 0.3s forwards; /* 0.3秒で消える */
}

.stone.flipping-in {
    animation: fadeInAndGrow 0.3s forwards; /* 0.3秒で現れる */
}