/* Othello Game Styles */

.game-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 0;
}

.game-controls {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: bold;
    color: #333;
}

.control-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.game-info {
    margin-bottom: 20px;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 15px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.score-item.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stone {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stone.black {
    background-color: #000;
    background: radial-gradient(circle at 30% 30%, #444, #000);
}

.stone.white {
    background-color: #fff;
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    border: 1px solid #ccc;
}

.player-name {
    font-weight: bold;
}

.score {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: monospace;
}

.message-area {
    height: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

/* Board Styles */
.board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    background-color: #222;
    padding: 4px;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cell {
    background-color: #2e8b57;
    /* SeaGreen */
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cell:hover {
    background-color: #3cb371;
    /* MediumSeaGreen */
}

.cell.valid-move::after {
    content: '';
    width: 20%;
    height: 20%;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: block;
}

.cell .stone {
    width: 80%;
    height: 80%;
    position: absolute;
    transition: transform 0.3s ease-in-out;
}

/* Animation for flipping */
@keyframes flip {
    0% {
        transform: rotateY(0);
    }

    50% {
        transform: rotateY(90deg);
    }

    100% {
        transform: rotateY(0);
    }
}

.stone.flipping {
    animation: flip 0.3s ease-in-out;
}

.game-footer {
    margin-top: 20px;
}

@media (max-width: 480px) {
    .score-board {
        gap: 20px;
    }

    .score-item {
        padding: 8px 15px;
    }

    .score {
        font-size: 1.2rem;
    }
}