.board {
    display: grid;
    grid-template-columns: repeat(8, 4vw);
    grid-template-rows: repeat(8, 4vw);
    border: 8px solid black;
    margin-top: 20px;
}

.cell {
    width: 4vw;
    height: 4vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.black-cell {
    background-color: #4d3319;
}

.white-cell {
    background-color: #d9b38c;
}

.piece {
    width: 3vw;
    height: 3vw;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2;
    position: relative;
    box-sizing: border-box;
}

.red-piece {
    background: radial-gradient(circle, #ff4d4d, #990000);
    border: 2px solid #600;
}

.black-piece {
    background: radial-gradient(circle, #444, #000);
    border: 2px solid #111;
}

.king::after {
    content: '👑';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
}

.selected {
    outline: 4px solid #f1c40f;
    z-index: 3;
}

.hint {
    width: 2vw;
    height: 2vw;
    background: rgba(46, 204, 113, 0.7);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
}

.status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: white;
    font-weight: bold;
    display: none;
}


.must {
    box-shadow: 0 0 1vw #f1c40f;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes piece-blink {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px gold;
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px gold;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 5px gold;
    }
}

.blink {
    animation: piece-blink 1s infinite;
    border: 2px solid gold !important;
}

.piece {
    transition: transform 0.2s;
}

/* Estilo del menú inicial */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.menu-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.btn-menu,
.btn-restart {
    display: block;
    width: 200px;
    margin: 10px auto;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-menu:hover {
    background: #2563eb;
}

.btn-restart {
    background: #10b981;
    margin-top: 20px;
}