* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #1a1a1a;
    color: #e0d5c1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

h1 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #f0e6d3;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-style: italic;
    color: #8a7e6b;
    font-size: 0.95rem;
}

main {
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
    width: 100%;
}

.game-info {
    background: #252118;
    border: 1px solid #3a332a;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.players {
    display: block;
    font-size: 1.15rem;
    font-weight: 600;
    color: #d4a843;
    margin-bottom: 0.2rem;
}

.details {
    display: block;
    font-size: 0.85rem;
    color: #8a7e6b;
    margin-bottom: 0.5rem;
}

.description {
    font-size: 0.9rem;
    color: #b5a992;
    line-height: 1.4;
}

.board-container {
    margin-bottom: 1rem;
}

.player-label {
    text-align: center;
    padding: 0.4rem;
    font-size: 0.85rem;
    color: #8a7e6b;
}

.player-label.top {
    margin-bottom: 0.25rem;
}

.player-label.bottom {
    margin-top: 0.25rem;
}

.status {
    text-align: center;
    min-height: 1.5rem;
    font-size: 0.95rem;
    color: #d4a843;
    margin-bottom: 1rem;
}

.status.check {
    color: #c0392b;
}

.status.gameover {
    color: #d4a843;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

button {
    background: #2d2820;
    border: 1px solid #4a4035;
    color: #d4c4a8;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s;
}

button:hover {
    background: #3a332a;
    border-color: #6a5d4e;
}

button:active {
    background: #4a4035;
}

.move-history {
    background: #252118;
    border: 1px solid #3a332a;
    border-radius: 6px;
    padding: 1rem 1.25rem;
}

.move-history h3 {
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6a5d4e;
    margin-bottom: 0.75rem;
}

#moves {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #b5a992;
    min-height: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

#moves .move-number {
    color: #6a5d4e;
    margin-right: 0.25rem;
}

#moves .move {
    margin-right: 0.75rem;
}

#moves .move.last {
    color: #d4a843;
}

footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.75rem;
    color: #4a4035;
}

/* Highlight squares */
.highlight-move {
    box-shadow: inset 0 0 3px 3px rgba(212, 168, 67, 0.4);
}

/* Engine thinking indicator */
.thinking::after {
    content: " Thinking...";
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Responsive */
@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    header { padding: 1.5rem 1rem 0.75rem; }
    .controls { flex-wrap: wrap; }
    button { padding: 0.5rem 1rem; }
}
