* {
    box-sizing: border-box;
    user-select: none;
}

body {
    background: #1a472a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    font-family: system-ui;
}

.game-container {
    background: #2d2b26;
    border-radius: 24px;
    padding: 20px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #f9e0a0;
    margin: 0 0 8px;
}

.sub {
    color: #ecd9b4;
    font-size: 0.8rem;
    margin-bottom: 20px;
}

#board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    aspect-ratio: 1 / 1;
    background-color: #e9d6b0;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 8px 20px black;
}

.square {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 1 / 1;
}

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

.square.selected {
    background-color: #f3b33d;
    box-shadow: inset 0 0 0 3px gold;
}

/* Green circle for legal moves */
.square.has-legal-move::after {
    content: '';
    position: absolute;
    width: 30%;
    height: 30%;
    background: #4caf50;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.piece-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    pointer-events: none;
}

.stats-panel {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
    gap: 12px;
}

.info-card {
    background: #1e1a15;
    padding: 6px 12px;
    border-radius: 40px;
    color: #ffecb3;
    font-weight: bold;
    font-size: 0.9rem;
    flex: 1;
}

button {
    background: #5f3b2c;
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 1rem;
    margin: 5px;
    cursor: pointer;
}

.center {
    text-align: center;
}
