/* GNN 图神经网络 - 特有样式 */

/* ── 图可视化演示区 ── */
.gnn-demo-wrap {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.gnn-graph-box {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

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

.gnn-predict-display {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gnn-node-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    transition: border-color 0.15s, background 0.15s;
}

.gnn-node-result.active {
    border-color: #1a6fe8;
    background: #eff6ff;
}

.gnn-node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gnn-node-name {
    font-weight: 600;
    color: #1e293b;
    min-width: 60px;
}

.gnn-node-class {
    color: #475569;
    flex: 1;
}

.gnn-node-conf {
    font-weight: 600;
    color: #1a6fe8;
    font-size: 0.78rem;
}

#gnn-canvas {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

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

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

/* ── 消息传递动画控制栏 ── */
.gnn-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

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

.gnn-layer-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;
}

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

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

/* ── 操作按钮（复用 CNN 风格） ── */
.gnn-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;
}

/* ── 步骤列表（继承 style.css 的 build-steps） ── */
.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; }

/* ── 消息传递可视化 ── */
#gnn-message-canvas {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: block;
    margin: 0 auto;
}
