body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.game-container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-status {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.chessboard {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    gap: 0;
    border: 3px solid #8B4513;
    margin: 0 auto;
}

.square {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.square.light {
    background-color: #f0d9b5;
}

.square.dark {
    background-color: #b58863;
}

.square.selected {
    background-color: #ffeb3b !important;
    box-shadow: inset 0 0 0 4px #ff5722 !important;
    border: 2px solid #ff5722 !important;
}

.square.valid-move {
    position: relative;
}

.square.valid-move::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #4caf50;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

.square.valid-move.has-piece::before {
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 3px solid #f44336;
    border-radius: 50%;
    opacity: 0.9;
}

.square.in-check {
    background-color: #ff6b6b !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.square:hover {
    opacity: 0.8;
}

.controls {
    margin-top: 20px;
}

.btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 5px;
}

.btn:hover {
    background-color: #45a049;
}

.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}