body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

h1 {
    font-size: 2.5em;
    margin: 0;
    color: #2c3e50;
}

#board-container {
    display: inline-block;
    padding: 15px;
    background: #8B4513;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    margin: 20px 0;
}

#board {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    gap: 0;
    border: 2px solid #5D4037;
    width: 480px;
    position: relative;
    overflow: hidden;
}

.square {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.square:hover {
    transform: scale(1.05);
    z-index: 10;
}

.light {
    background-color: #f0d9b5;
}

.dark {
    background-color: #b58863;
}

.highlight {
    background-color: rgba(46, 204, 113, 0.5);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.highlight.capture {
    background-color: rgba(231, 76, 60, 0.5);
}

.selected {
    background-color: rgba(52, 152, 219, 0.5);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
}

.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

#status {
    font-size: 1.3em;
    font-weight: bold;
    margin: 15px 0;
    min-height: 30px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255,255,255,0.7);
    display: inline-block;
}

#turn-indicator {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

select, button {
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background: #3498db;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

select:hover, button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#new-game {
    background: #e74c3c;
}

#new-game:hover {
    background: #c0392b;
}

.coordinates {
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    color: rgba(0,0,0,0.5);
}

.rank {
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
}

.file {
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
}

.check {
    background-color: rgba(255, 0, 0, 0.3) !important;
}

.game-over {
    animation: pulse 1.5s infinite;
}

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

.piece {
    transition: transform 0.2s;
    z-index: 5;
}

.piece:hover {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    #board {
        grid-template-columns: repeat(8, 40px);
        grid-template-rows: repeat(8, 40px);
        width: 320px;
    }
    
    .square {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    header {
        flex-direction: column;
        align-items: center;
    }
    
    .controls {
        justify-content: center;
    }
}