body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
}

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

.game-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.chessboard {
    display: flex;
    flex-wrap: wrap;
    width: 480px;
    height: 480px;
    border: 2px solid #5a3921;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.white {
    background-color: #f0d9b5;
}

.black {
    background-color: #b58863;
    color: white;
}

.square:hover:not(.has-piece) {
    background-color: #f2e6b1;
    box-shadow: inset 0 0 10px rgba(210, 180, 140, 0.8);
    cursor: pointer;
}

.black:hover:not(.has-piece) {
    background-color: #c8a075;
    box-shadow: inset 0 0 10px rgba(165, 110, 70, 0.8);
    cursor: pointer;
}

.square.has-piece:hover {
    background-color: #8bb451;
    box-shadow: inset 0 0 15px rgba(70, 100, 50, 0.6);
    transform: scale(1.03);
    z-index: 1;
    cursor: pointer;
}

.square.has-piece:hover i {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

.square.selected {
    background-color: #baca44;
    box-shadow: inset 0 0 15px rgba(100, 120, 40, 0.8);
}

.square.possible-move::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(139, 180, 81, 0.5);
    border-radius: 50%;
}

.square.possible-capture {
    background-color: rgba(200, 50, 50, 0.3);
    box-shadow: inset 0 0 10px rgba(200, 50, 50, 0.5);
}

.square i {
    transition: all 0.2s ease;
    z-index: 2;
}

.game-info {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 250px;
}

.status {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.white-turn {
    background-color: #f0d9b5;
}

.black-turn {
    background-color: #b58863;
    color: white;
}

.move-history {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
}

.move-entry {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background-color: #5a3921;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #7a5a3a;
}

.coordinates {
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    pointer-events: none;
}

.file-coordinate {
    bottom: 2px;
    right: 4px;
}

.rank-coordinate {
    top: 2px;
    left: 4px;
}

.check {
    box-shadow: inset 0 0 20px rgba(255, 0, 0, 0.5);
}