* {
    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: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.mode-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: #f0f0f0;
}

.mode-btn.active {
    background: #667eea;
    color: white;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.turn-indicator {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

#currentTurn {
    color: #667eea;
}

#resetBtn {
    padding: 8px 16px;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#resetBtn:hover {
    background: #5a3a7f;
}

.captured-pieces {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.captured-section {
    flex: 1;
    background: #f8f8f8;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.captured-label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.captured-display {
    font-size: 24px;
    min-height: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

#chessboard {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    border: 3px solid #333;
    margin: 0 auto;
    width: fit-content;
}

.square {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
}

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

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

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

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

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

.square.valid-move.has-piece::after {
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 3px solid rgba(255, 0, 0, 0.6);
    border-radius: 50%;
}

#message {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #764ba2;
    min-height: 25px;
}
