/* Custom styles for the chessboard */

#chessboard {
    width: min(80vw, 600px);
    height: min(80vw, 600px);
}

.square {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    cursor: pointer;
    position: relative;
}

.square.light {
    background-color: #eeeed2;
    color: black;
}

.square.dark {
    background-color: #769656;
    color: black;
}

.square.selected {
    background-color: #baca44 !important;
}

.square.last-move {
    background-color: #f5f682 !important;
}

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

.square.capture-move::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    background-color: transparent;
}

/* Piece styling */
.piece {
    cursor: grab;
    transition: transform 0.1s;
    user-select: none;
    -webkit-user-select: none;
}

.piece:active {
    cursor: grabbing;
    transform: scale(1.1);
}

/* Scrollbar for history */
#move-history::-webkit-scrollbar {
    width: 8px;
}
#move-history::-webkit-scrollbar-track {
    background: #1f2937; 
}
#move-history::-webkit-scrollbar-thumb {
    background: #4b5563; 
    border-radius: 4px;
}
#move-history::-webkit-scrollbar-thumb:hover {
    background: #6b7280; 
}