:root {
    --primary: #F39C12;
    --secondary: #F1C40F;
    --accent: #E74C3C;
    --background: #1A1400;
    --board-light: #E8D5B5;
    --board-dark: #7D5B3A;
    --glow: rgba(243, 156, 18, 0.3);
    --glass: rgba(255, 255, 255, 0.05);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    background-color: var(--background);
    color: #FFF;
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 2rem;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.board-container {
    position: relative;
}

canvas {
    border-radius: 8px;
    box-shadow: 0 0 20px var(--glow);
    cursor: pointer;
}

.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.status-panel {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.status-panel h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.move-history {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
    max-height: 400px;
}

.move-history h3 {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.move-list {
    list-style: none;
    font-family: 'Courier New', Courier, monospace;
}

.move-item {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
}

.controls {
    display: flex;
    gap: 1rem;
}

button {
    flex: 1;
    padding: 0.75rem;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: var(--background);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--glow);
}

button:active {
    transform: translateY(0);
}

.captured-area h3 {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.captured-pieces {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    font-size: 1.2rem;
    min-height: 1.5rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
}

@media (max-width: 900px) {
    .game-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 1rem;
        border-radius: 0;
    }
    .sidebar {
        width: 100%;
    }
}
