.node-editor-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; } .node-editor { background: white; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; padding: 20px; } .editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; } .editor-header h2 { margin: 0; font-size: 18px; color: #333; } .close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #999; padding: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; } .close-btn:hover { color: #333; } .error-box { background: #fee; border: 1px solid #fcc; border-radius: 4px; padding: 12px; margin-bottom: 15px; } .error-message { margin: 5px 0; color: #c33; font-size: 14px; } .form-group { display: flex; flex-direction: column; margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: #333; font-size: 14px; } .form-group input, .form-group textarea { flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; font-family: monospace; } .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1); } .form-group textarea { resize: vertical; font-size: 12px; } .editor-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #eee; } .item-group { display: flex; gap: 10px; } /* 1. 基础通用样式 */ .btn-interect, .btn-save, .btn-cancel { padding: 8px 16px; /* 补充了间距,确保按钮有厚度 */ border: none; border-radius: 4px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.1s ease-in-out; display: flex; align-items: center; justify-content: center; } /* 2. 统一交互反馈:悬停变深,点下缩放 */ .btn-interect:hover, .btn-save:hover, .btn-cancel:hover { filter: brightness(0.9); /* 自动变深,无需指定具体颜色 */ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .btn-interect:active, .btn-save:active, .btn-cancel:active { transform: scale(0.96); } .btn-save, .btn-cancel { flex: 1; } .btn-interect, .btn-save { background: #1677ff; color: white; } .btn-cancel { background: #f5f5f5; color: #333; }