/* ========================================================================
   REVERSI (Othello) - Classic Board Game
   ======================================================================== */

/* --- Background --- */
.rv-bg {
    background: radial-gradient(ellipse at center, #0f2e0f 0%, #0a2a0a 100%);
}

/* --- Content Container --- */
.rv-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* --- Turn Indicator --- */
.rv-turn-indicator {
    text-align: center;
    padding: 6px 20px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-turn-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #a5d6a7;
}

.rv-win-text {
    color: #81c784;
    text-shadow: 0 0 10px rgba(129, 199, 132, 0.4);
}

.rv-lose-text {
    color: #e57373;
    text-shadow: 0 0 10px rgba(229, 115, 115, 0.4);
}

.rv-draw-text {
    color: #90caf9;
}

/* --- Disc Icon in Toolbar --- */
.rv-disc-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

.rv-disc-icon-black {
    background: radial-gradient(circle at 35% 35%, #444, #1a1a1a 60%, #000);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rv-disc-icon-white {
    background: radial-gradient(circle at 35% 35%, #fff, #f5f5f5 60%, #ddd);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.rv-stat-black strong {
    color: #b0bec5;
}

.rv-stat-white strong {
    color: #f5f5f5;
}

/* --- Board --- */
.rv-board {
    display: grid;
    grid-template-columns: repeat(8, 64px);
    grid-template-rows: repeat(8, 64px);
    background: #2e7d32;
    border-radius: 6px;
    padding: 2px;
    gap: 1px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.08),
        0 2px 0 #1b5e20;
    border: 3px solid #1b5e20;
}

/* --- Cell --- */
.rv-cell {
    width: 64px;
    height: 64px;
    background: #388e3c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    position: relative;
    transition: background 0.15s;
}

.rv-cell.rv-valid {
    cursor: pointer;
}

.rv-cell.rv-valid:hover {
    background: #43a047;
}

/* Last move indicator */
.rv-cell.rv-last-move::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d4af37;
    opacity: 0.7;
}

/* --- Valid Move Dot --- */
.rv-valid-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    transition: transform 0.15s, background 0.15s;
}

.rv-cell.rv-valid:hover .rv-valid-dot {
    transform: scale(1.3);
    background: rgba(0, 0, 0, 0.4);
}

/* --- Discs --- */
.rv-disc {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

/* Black disc */
.rv-disc-black {
    background: radial-gradient(circle at 35% 35%, #555, #1a1a1a 50%, #000);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.08);
}

/* White disc */
.rv-disc-white {
    background: radial-gradient(circle at 35% 35%, #fff, #f5f5f5 50%, #ddd);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Flipped disc animation */
.rv-flipped {
    animation: rv-flip 0.4s ease-out;
}

@keyframes rv-flip {
    0% {
        transform: scale(0.3);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .rv-board {
        grid-template-columns: repeat(8, 48px);
        grid-template-rows: repeat(8, 48px);
    }

    .rv-cell {
        width: 48px;
        height: 48px;
    }

    .rv-disc {
        width: 38px;
        height: 38px;
    }

    .rv-valid-dot {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 420px) {
    .rv-board {
        grid-template-columns: repeat(8, 40px);
        grid-template-rows: repeat(8, 40px);
    }

    .rv-cell {
        width: 40px;
        height: 40px;
    }

    .rv-disc {
        width: 32px;
        height: 32px;
    }

    .rv-valid-dot {
        width: 10px;
        height: 10px;
    }
}
