/* CNN - 复用公共样式 + CNN 特有样式 */

/* ── MNIST 手写识别 Demo ── */
.mnist-demo-wrap {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.mnist-canvas-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mnist-canvas-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.03em;
}

#mnist-canvas {
    width: 280px;
    height: 280px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    cursor: crosshair;
    touch-action: none;
    background: #fff;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#mnist-canvas:hover {
    border-color: #1a6fe8;
}

.mnist-canvas-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mnist-status {
    font-size: 0.78rem;
    color: #64748b;
}

.mnist-result-box {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.mnist-result-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.mnist-predict-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.mnist-predict-num {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: #1a6fe8;
    min-width: 3rem;
    text-align: center;
}

.mnist-predict-num.empty {
    color: #cbd5e1;
}

.mnist-predict-conf {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mnist-predict-conf-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.mnist-predict-conf-hint {
    font-size: 0.75rem;
    color: #64748b;
}

/* ── 步骤列表 ── */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.step-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #1a6fe8;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.step-content strong { display: block; margin-bottom: 0.2rem; color: #1e293b; font-size: 0.85rem; }
.step-content p { margin: 0; color: #475569; font-size: 0.8rem; line-height: 1.5; }

/* ── 卷积可视化控制栏 ── */
.demo-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.kernel-selector {
    display: flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

.kernel-btn {
    padding: 0.3rem 0.9rem;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    margin: 0;
}

.kernel-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.kernel-btn.active {
    background: #1a6fe8;
    color: #fff;
    box-shadow: 0 1px 4px rgba(26, 111, 232, 0.35);
}

/* ── 操作按钮 ── */
.conv-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.32rem 0.85rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    margin: 0;
}

.action-btn.play-btn {
    background: #1a6fe8;
    color: #fff;
    border-color: #1a6fe8;
}

.action-btn.play-btn:hover {
    background: #1558c0;
    border-color: #1558c0;
}

.action-btn.reset-btn {
    background: #fff;
    color: #475569;
    border-color: #e2e8f0;
}

.action-btn.reset-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}
