.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.back-btn:hover {
    background: #e0e0e0;
}

h1 {
    flex: 1;
    text-align: center;
    color: #333;
    margin: 0;
}

.game-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-selector label {
    font-weight: bold;
    color: #333;
}

.mode-selector select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.turn-info, .status-info {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-gap: 0;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    aspect-ratio: 1;
    border: 2px solid #333;
}

.square {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 2.5em;
}

.square.light {
    background: #f0d9b5;
}

.square.dark {
    background: #b58863;
}

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

.square.valid-move {
    box-shadow: inset 0 0 8px rgba(0, 255, 0, 0.5);
}

.piece {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

.piece.black {
    color: #333;
}

.piece.white {
    color: #fff;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.moves-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

#moveCount {
    font-weight: bold;
    color: #333;
}
