/* board.css - 棋盘样式 */
.board-scroll-container {
    width: 100%;
    max-height: 60vh;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}
.board-wrapper { display: flex; justify-content: flex-start; width: 100%; height: 100%; touch-action: none; }
.board-canvas { display: block; background: #fff; border-radius: 4px; touch-action: none; }

.num-pad-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}
.num-grid { display: grid; gap: 4px; width: fit-content; margin: 0 auto; }

.num-btn, .action-btn, .zoom-btn {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid #d1d5db; background: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.15s; color: #374151;
}
.num-btn, .action-btn { font-size: 0.8rem; padding: 0; }
.num-btn:hover, .action-btn:hover, .zoom-btn:hover { background: #eef2ff; border-color: #6366f1; }
.num-btn.clear-btn { font-size: 1rem; line-height: 1; }

.action-row { display: flex; justify-content: center; gap: 6px; width: 100%; }
.action-btn:disabled, .zoom-btn:disabled { opacity: 0.3; cursor: not-allowed; background: #f9fafb; }

.history-steps-container {
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; width: 100%; padding: 4px 0;
}
.step-block {
    flex: 0 0 auto; min-width: 32px; height: 32px; border-radius: 6px;
    border: 1px solid #e2e8f0; background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: #475569; cursor: pointer; transition: all 0.15s; padding: 0 6px;
}
.step-block:hover { background: #eef2ff; border-color: #a5b4fc; }
.step-block.active { background: #6366f1; border-color: #4f46e5; color: #fff; font-weight: 600; }

.zoom-controls { display: flex; align-items: center; gap: 10px; }
.zoom-btn { border-color: #d1d5db; background: #f9fafb; font-size: 1.2rem; }
.zoom-text { font-size: 0.9rem; font-weight: 600; color: #374151; min-width: 40px; text-align: center; }

.overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center; z-index: 100;
}
.victory-overlay { background: rgba(0,0,0,0.5); }
.loading-overlay {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6); z-index: 9999;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.victory-dialog {
    background: #fff; padding: 28px 24px; border-radius: 16px;
    text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.victory-dialog h3 { color: #16a34a; margin-bottom: 10px; }
.victory-dialog button {
    margin-top: 14px; padding: 10px 26px; border-radius: 20px; border: none;
    background: #16a34a; color: #fff; font-size: 1rem; cursor: pointer;
}

.loading-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loading-spinner {
    width: 60px; height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #6366f1; border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text { color: #fff; font-size: 1.1rem; font-weight: 500; text-shadow: 0 2px 4px rgba(0,0,0,0.3); letter-spacing: 1px; }