.game-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    margin: 20px auto;
    max-width: 520px;
    width: 95%;
}
.nav-back { color: var(--text-secondary); text-decoration: none; font-weight: 600; transition: color 0.3s; }
.nav-back:hover { color: var(--text-primary); }
.nav-title { font-size: 1.25rem; font-weight: 800; }

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 40px;
    padding: 0 20px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 420px;
    padding: 14px 20px;
    margin-bottom: 20px;
    gap: 8px;
}

.score-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.white-panel { justify-content: flex-end; }

.piece-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}
.piece-preview.black { background: #1e1e1e; border: 2px solid #666; }
.piece-preview.white { background: #f0f0f0; border: 2px solid #aaa; }

.player-label { font-size: 0.75rem; color: var(--text-secondary); }
.piece-count { font-size: 1.8rem; font-weight: 800; }

.turn-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.turn-msg {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}
.turn-msg.black { color: #cbd5e1; }
.turn-msg.white { color: #f1f5f9; }

.board-wrapper {
    position: relative;
    padding: 16px;
    display: inline-flex;
}

#game-canvas {
    display: block;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.overlay {
    position: absolute;
    inset: 16px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
    text-align: center;
    padding: 24px;
}
.overlay.hidden { display: none; }

.key-hint {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
}
