* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

.turn-indicator {
    font-weight: bold;
    font-size: 1.2em;
    color: #667eea;
}

.status {
    color: #666;
    font-size: 1em;
}

#reset-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

#reset-btn:hover {
    background: #5568d3;
}

#chessboard {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0;
    width: 100%;
    max-width: 512px;
    margin: 0 auto;
    border: 3px solid #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.square {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.square.light {
    background: #f0d9b5;
}

.square.dark {
    background: #b58863;
}

.square.selected {
    background: #baca44 !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.square.valid-move {
    background: #646f40 !important;
}

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

.square.valid-move.has-piece::after {
    width: 90%;
    height: 90%;
    border: 4px solid rgba(0, 0, 0, 0.3);
    background: transparent;
    border-radius: 50%;
}

.square:hover {
    opacity: 0.8;
}

.captured {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.captured-pieces {
    flex: 1;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
}

.captured-pieces h3 {
    font-size: 1em;
    margin-bottom: 10px;
    color: #666;
}

.captured-pieces div {
    font-size: 1.5em;
    min-height: 40px;
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .game-info {
        flex-direction: column;
        gap: 10px;
    }

    .square {
        font-size: 2em;
    }
}
