body {
    background-color: #f0f4f8;
    color: #333;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.game-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Score Board */
.score-board {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.score-box {
    padding: 10px 20px;
    border-radius: 10px;
    background: #eee;
    min-width: 100px;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.score-box.active-turn {
    border-color: #f1c40f;
    background: #fff;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
    transform: scale(1.05);
}

.label {
    display: block;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.score {
    display: block;
    font-size: 2em;
    font-weight: bold;
}

/* Board */
.board-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    background-color: #27ae60;
    border: 5px solid #222;
    width: 100%;
    max-width: 400px; /* PCでの最大幅 */
    aspect-ratio: 1 / 1; /* 正方形を維持 */
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
}

.cell {
    border: 1px solid #1e8449;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Discs (Chips) */
.disc {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    transition: transform 0.3s ease-in-out;
}

.disc.black {
    background: radial-gradient(circle at 30% 30%, #555, #000);
}

.disc.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
}

/* Highlight legal moves */
.legal-move::after {
    content: '';
    width: 30%;
    height: 30%;
    background-color: rgba(255, 255, 0, 0.4);
    border-radius: 50%;
    display: block;
}

.legal-move:hover::after {
    background-color: rgba(255, 255, 0, 0.8);
    transform: scale(1.2);
}

/* Status Message */
.status-message {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0;
    height: 1.5em; /* Prevent layout shift */
    color: #e74c3c;
}

/* Buttons */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.level-select {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-select select {
    border: none;
    font-size: 1rem;
    background: transparent;
    cursor: pointer;
    outline: none;
    color: #333;
    font-weight: bold;
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
    font-weight: bold;
}

.btn:hover {
    background-color: #2980b9;
}

.btn.secondary {
    background-color: #95a5a6;
}

.btn.secondary:hover {
    background-color: #7f8c8d;
}

/* Record Area */
.record-area {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #ddd;
}

.record-stats {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.8em;
    color: #777;
}

.text-btn {
    background: none;
    border: none;
    color: #999;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8em;
}

.text-btn:hover {
    color: #555;
}

/* Rules */
.rules {
    text-align: left;
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #555;
}

.rules h3 {
    font-size: 1em;
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.rules p {
    margin: 5px 0;
}
