* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    color: #fff;
    min-height: 100vh;
    overflow: hidden;
    padding: 20px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding: 12px 20px;
    background: rgba(30, 35, 48, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 100;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toolbar-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4a9ff5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.toolbar-center {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: rgba(74, 159, 245, 0.15);
    border: 1px solid rgba(74, 159, 245, 0.3);
    color: #4a9ff5;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: rgba(74, 159, 245, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toolbar-btn:disabled {
    background: rgba(100, 100, 100, 0.15);
    border-color: rgba(100, 100, 100, 0.3);
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.toolbar-btn .icon {
    font-size: 1.1rem;
}

.toolbar-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.history-info {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #aaa;
    font-size: 0.85rem;
}

.history-dropdown {
    position: relative;
}

.history-list {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: rgba(30, 35, 48, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 280px;
    max-width: 350px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    display: none;
}

.history-list.show {
    display: block;
}

.history-item {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: rgba(74, 159, 245, 0.15);
}

.history-item.current {
    background: rgba(86, 204, 157, 0.2);
    border-left: 3px solid #56cc9d;
}

.history-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.3;
}

.history-item-title {
    font-weight: 500;
    color: #fff;
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.history-item-meta {
    font-size: 0.75rem;
    color: #aaa;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.container {
    display: flex;
    height: calc(100vh - 160px);
    gap: 20px;
}

.panel {
    background: rgba(30, 35, 48, 0.85);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.left-panel {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.left-panel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.right-panel {
    width: 320px;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.right-panel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: rgba(20, 25, 35, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 4000px;
    height: 4000px;
    transform-origin: 0 0;
    cursor: grab;
    z-index: 1;
}

.canvas:active {
    cursor: grabbing;
}

.panel-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a9ff5;
    color: #4a9ff5;
}

.node-types {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.node-type {
    padding: 15px;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.node-type[data-type="SEQUENCE"] {
    background: rgba(74, 159, 245, 0.15);
    border: 1px solid rgba(74, 159, 245, 0.4);
}

.node-type[data-type="SEQUENCE"]:hover {
    background: rgba(74, 159, 245, 0.25);
}

.node-type[data-type="SEQUENCE"]::before {
    background: #4a9ff5;
}

.node-type[data-type="FALLBACK"] {
    background: rgba(255, 159, 74, 0.15);
    border: 1px solid rgba(255, 159, 74, 0.4);
}

.node-type[data-type="FALLBACK"]:hover {
    background: rgba(255, 159, 74, 0.25);
}

.node-type[data-type="FALLBACK"]::before {
    background: #ff9f4a;
}

.node-type[data-type="PARALLEL"] {
    background: rgba(155, 89, 182, 0.15);
    border: 1px solid rgba(155, 89, 182, 0.4);
}

.node-type[data-type="PARALLEL"]:hover {
    background: rgba(155, 89, 182, 0.25);
}

.node-type[data-type="PARALLEL"]::before {
    background: #9b59b6;
}

.node-type[data-type="CONDITION"] {
    background: rgba(86, 204, 157, 0.15);
    border: 1px solid rgba(86, 204, 157, 0.4);
}

.node-type[data-type="CONDITION"]:hover {
    background: rgba(86, 204, 157, 0.25);
}

.node-type[data-type="CONDITION"]::before {
    background: #56cc9d;
}

.node-type[data-type="ACTION"] {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.node-type[data-type="ACTION"]:hover {
    background: rgba(231, 76, 60, 0.25);
}

.node-type[data-type="ACTION"]::before {
    background: #e74c3c;
}

.node-type[data-type="DECORATOR"] {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.4);
}

.node-type[data-type="DECORATOR"]:hover {
    background: rgba(241, 196, 15, 0.25);
}

.node-type[data-type="DECORATOR"]::before {
    background: #f1c40f;
}

.node-type[data-type="BLACKBOARD"] {
    background: rgba(96, 104, 120, 0.15);
    border: 1px solid rgba(96, 104, 120, 0.4);
}

.node-type[data-type="BLACKBOARD"]:hover {
    background: rgba(96, 104, 120, 0.25);
}

.node-type[data-type="BLACKBOARD"]::before {
    background: #606878;
}

.node-type[data-type="SUBTREE"] {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.node-type[data-type="SUBTREE"]:hover {
    background: rgba(255, 255, 255, 0.25);
}

.node-type[data-type="SUBTREE"]::before {
    background: #ffffff;
}

.node-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.node-type:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.node-type.dragging {
    opacity: 0.7;
    transform: rotate(5deg);
}

.node-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.node-type h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    pointer-events: none;
}

.node-type p {
    font-size: 0.9rem;
    color: #a0c6f7;
    pointer-events: none;
}

.toolbox {
    margin-top: 20px;
}

.tool {
    background: rgba(86, 204, 157, 0.15);
    border: 1px solid rgba(86, 204, 157, 0.4);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tool:hover {
    background: rgba(86, 204, 157, 0.25);
}

.tool h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool h3::before {
    content: '✏️';
}

.tool .shortcut {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: normal;
}

.tool.active {
    background: rgba(86, 204, 157, 0.4);
    box-shadow: 0 0 0 2px rgba(86, 204, 157, 0.6);
}

.node {
    position: absolute;
    width: 180px;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    cursor: move;
    z-index: 10;
}

.node.selected {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 5px 15px rgba(0, 0, 0, 0.4);
}

.node:not(.dragging):hover {
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.node[data-type="SEQUENCE"] {
    background: rgba(74, 159, 245, 0.9);
    border-color: #4a9ff5;
    color: #fff;
}

.node[data-type="FALLBACK"] {
    background: rgba(255, 159, 74, 0.9);
    border-color: #ff9f4a;
    color: #fff;
}

.node[data-type="PARALLEL"] {
    background: rgba(155, 89, 182, 0.9);
    border-color: #9b59b6;
    color: #fff;
}

.node[data-type="CONDITION"] {
    background: rgba(86, 204, 157, 0.9);
    border-color: #56cc9d;
    color: #fff;
}

.node[data-type="ACTION"] {
    background: rgba(231, 76, 60, 0.9);
    border-color: #e74c3c;
    color: #fff;
}

.node[data-type="DECORATOR"] {
    background: rgba(241, 196, 15, 0.9);
    border-color: #f1c40f;
    color: #2c3e50;
}

.node[data-type="BLACKBOARD"] {
    background: rgba(96, 104, 120, 0.15);
    border-color: rgba(96, 104, 120, 1);
    width: 500px;
    color: #fff;
}

.node[data-type="SUBTREE"] {
    background: rgba(255, 255, 255, 0.95);
    border-color: #ffffff;
    color: #2c3e50;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
}

.node[data-type="SUBTREE"] .node-header {
    flex-direction: column;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: none;
    align-items: center;
    gap: 3px;
}

.node[data-type="SUBTREE"] .node-title {
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.2;
    margin: 0;
    text-align: center;
}

.node[data-type="SUBTREE"] .node-type-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    margin: 0;
    background: rgba(0, 0, 0, 0.1);
}

.node[data-type="SUBTREE"] .node-content {
    font-size: 0.8rem;
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

.node[data-type="SUBTREE"] .node-content p {
    margin: 2px 0;
    white-space: normal;
    word-break: break-word;
}

.node.connecting {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.8), 0 5px 15px rgba(0, 0, 0, 0.4);
    animation: pulse 1.5s infinite;
}

/* 错误标记：在节点下方显示ERROR文字 */
.node.error::after {
    content: '⭕ERROR';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 5px;
    white-space: nowrap;
    z-index: 20;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.node.dragging {
    opacity: 0.9;
    z-index: 1000;
    transform: none !important;
    transition: none !important;
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.node-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.node-type-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.node-content {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
    pointer-events: none;
}

.node-content p {
    margin: 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #56cc9d;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 35, 45, 0.8);
    color: #fff;
    font-size: 0.95rem;
    user-select: text;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:disabled {
    background: rgba(50, 55, 65, 0.6);
    color: #aaa;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(to right, #4a9ff5, #3a7bd5);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.export-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 4000px;
    height: 4000px;
    pointer-events: none;
    z-index: 1;
    transform-origin: 0 0;
}

.connection {
    stroke: rgba(86, 204, 157, 0.8);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 临时连线样式 - 统一样式但保持虚线效果 */
.temp-connection {
    stroke: rgba(86, 204, 157, 0.8);
    stroke-width: 3;
    stroke-dasharray: 8,4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.connection:hover {
    stroke: rgba(86, 204, 157, 1);
    stroke-width: 4;
}

/* 连接点样式 */
.connection-point {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.8);
    border: 2px solid rgba(255, 193, 7, 1);
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 20;
    pointer-events: none;
}

.connection-point.show {
    opacity: 1;
    pointer-events: auto;
}

.connection-point:hover {
    background: rgba(255, 193, 7, 1);
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.6);
}

.connection-point.active {
    background: rgba(86, 204, 157, 0.9);
    border-color: rgba(86, 204, 157, 1);
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 15px rgba(86, 204, 157, 0.8);
    animation: connectionPointPulse 1.5s ease-in-out infinite;
}

@keyframes connectionPointPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(86, 204, 157, 0.8);
    }
    50% {
        box-shadow: 0 0 25px rgba(86, 204, 157, 1), 0 0 35px rgba(86, 204, 157, 0.6);
    }
}

.connection-point.selected {
    background: rgba(231, 76, 60, 0.9);
    border-color: rgba(231, 76, 60, 1);
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 0 18px rgba(231, 76, 60, 0.8);
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 35, 48, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.zoom-btn:hover {
    background: rgba(74, 159, 245, 0.8);
}

.status-bar {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 100;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    background: rgba(86, 204, 157, 0.9);
    color: #0a2e1d;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 9999999;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: rgba(231, 76, 60, 0.9);
    color: white;
}

.hidden-file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.auto-save-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: rgba(86, 204, 157, 0.8);
    z-index: 100;
}

.canvas-toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.tool-item {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(30, 35, 48, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    font-size: 16px;
}

.tool-item:hover {
    background: rgba(74, 159, 245, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tool-item.active {
    background: rgba(86, 204, 157, 0.9);
    border-color: rgba(86, 204, 157, 0.6);
    box-shadow: 0 0 0 2px rgba(86, 204, 157, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.drag-ghost {
    position: fixed;
    width: 180px;
    padding: 15px;
    border-radius: 8px;
    background: rgba(40, 50, 70, 0.9);
    border: 2px solid #4a9ff5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
}

.canvas-container.drag-over {
    background: rgba(74, 159, 245, 0.1);
    border-color: #4a9ff5;
}

.shortcuts-info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    z-index: 100;
    opacity: 0.8;
}

.child-list {
    font-size: 0.85rem;
}

.child-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 0;
    padding: 2px 0;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.child-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.child-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.child-order:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.child-order:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.child-order.dragging {
    opacity: 0.7;
    z-index: 1000;
}

.child-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.child-item.drag-over {
    background: rgba(255, 193, 7, 0.2);
    border: 1px dashed rgba(255, 193, 7, 0.6);
}

.node-order-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    cursor: grab;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.node-order-badge:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.node-order-badge:active {
    cursor: grabbing;
    transform: scale(0.9);
}

.node-order-badge.dragging {
    opacity: 0.7;
    z-index: 1000;
    transform: rotate(15deg) scale(1.1);
}

/* 垃圾桶删除区域样式 */
.trash-zone {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    background: rgba(231, 76, 60, 0.2);
    border: 3px dashed rgba(231, 76, 60, 0.6);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #e74c3c;
    z-index: 150;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.trash-zone.show {
    display: flex;
    animation: trashZoneAppear 0.3s ease-out;
}

.trash-zone:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.8);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.trash-zone.drag-over {
    background: rgba(231, 76, 60, 0.5);
    border-color: #e74c3c;
    border-style: solid;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(231, 76, 60, 0.6);
}

.trash-zone .trash-icon {
    font-size: 2.5rem;
    animation: trashBounce 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.trash-zone:hover .trash-icon {
    font-size: 2.8rem;
    animation: trashPulse 1s ease-in-out infinite;
}

.trash-zone.drag-over .trash-icon {
    font-size: 3rem;
    animation: trashGlow 0.8s ease-in-out infinite;
    color: #fff;
}

.trash-zone .trash-text {
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    font-weight: bold;
    color: #e74c3c;
}

.trash-zone:hover .trash-text,
.trash-zone.drag-over .trash-text {
    opacity: 1;
}

.trash-zone.drag-over .trash-text {
    color: #fff;
    animation: textBlink 0.5s ease-in-out infinite;
}

@keyframes trashZoneAppear {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes trashBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes trashPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes trashGlow {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.3);
    }
}

@keyframes trashShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes textBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

/* 设置模态框样式 */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.settings-modal.show {
    display: flex;
}

.settings-content {
    background: rgba(30, 35, 48, 0.95);
    border-radius: 15px;
    padding: 0;
    min-width: 450px;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(74, 159, 245, 0.1);
}

.settings-header h2 {
    margin: 0;
    color: #4a9ff5;
    font-size: 1.5rem;
    font-weight: 600;
}

.settings-close {
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.settings-close:hover {
    color: #e74c3c;
}

.settings-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #56cc9d;
    font-size: 1rem;
}

.setting-group input,
.setting-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 25, 35, 0.8);
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: #4a9ff5;
    box-shadow: 0 0 0 3px rgba(74, 159, 245, 0.2);
}

.setting-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23ffffff' d='m0,1 1,2 1,-2'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.setting-group select option {
    background: rgba(30, 35, 48, 0.95);
    color: #fff;
    padding: 8px;
}

.setting-description {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
}

.settings-footer {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 25, 35, 0.3);
}

.settings-footer .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.settings-footer .btn-primary {
    background: linear-gradient(135deg, #4a9ff5, #3a7bd5);
    color: white;
}

.settings-footer .btn-primary:hover {
    background: linear-gradient(135deg, #3a7bd5, #2a5bb5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 159, 245, 0.4);
}

.settings-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 文件管理模态框样式 */
.file-manager-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.file-manager-modal.show {
    display: flex;
}

.file-manager-content {
    background: rgba(30, 35, 48, 0.95);
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

.file-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(74, 159, 245, 0.1);
}

.file-manager-header h2 {
    margin: 0;
    color: #4a9ff5;
    font-size: 1.5rem;
    font-weight: 600;
}

.file-manager-close {
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.file-manager-close:hover {
    color: #e74c3c;
}

.file-manager-body {
    padding: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.file-manager-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.current-file-info {
    color: #56cc9d;
    font-weight: 600;
}

.current-file-info span {
    color: #4a9ff5;
    font-weight: 700;
}

.file-list-container {
    background: rgba(20, 25, 35, 0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    padding: 15px 20px;
    background: rgba(74, 159, 245, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: #4a9ff5;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: rgba(74, 159, 245, 0.1);
}

.file-item.current {
    background: rgba(86, 204, 157, 0.2);
    border-left: 4px solid #56cc9d;
}

.file-item.selected {
    background: rgba(74, 159, 245, 0.3) !important;
    border-left: 4px solid #4a9ff5;
}

.file-item.current.selected {
    background: rgba(86, 204, 157, 0.4) !important;
    border-left: 4px solid #56cc9d;
}

.file-name {
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name .icon {
    font-size: 1.1rem;
}

.file-time {
    color: #aaa;
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-action-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.file-action-btn.switch {
    background: rgba(74, 159, 245, 0.8);
    color: white;
}

.file-action-btn.switch:hover {
    background: rgba(74, 159, 245, 1);
}

.file-action-btn.delete {
    background: rgba(231, 76, 60, 0.8);
    color: white;
}

.file-action-btn.delete:hover {
    background: rgba(231, 76, 60, 1);
}

.file-action-btn:disabled {
    background: rgba(100, 100, 100, 0.3);
    color: #666;
    cursor: not-allowed;
}

/* 文件管理footer样式 */
.file-manager-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 25, 35, 0.3);
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-actions .toolbar-btn.delete-btn {
    background: rgba(231, 76, 60, 0.8);
    border-color: rgba(231, 76, 60, 0.6);
    color: white;
}

.footer-actions .toolbar-btn.delete-btn:hover:not(:disabled) {
    background: rgba(231, 76, 60, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.footer-actions .toolbar-btn:disabled {
    background: rgba(100, 100, 100, 0.3);
    border-color: rgba(100, 100, 100, 0.2);
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 文件项选中状态 */
.file-item.selected {
    background: rgba(74, 159, 245, 0.3) !important;
    border-left: 3px solid #4a9ff5;
}

.file-item.current.selected {
    background: rgba(86, 204, 157, 0.4) !important;
    border-left: 3px solid #56cc9d;
}

/* 重命名输入框样式 */
.file-rename-input {
    background: rgba(30, 35, 48, 0.9);
    border: 2px solid #4a9ff5;
    border-radius: 4px;
    padding: 4px 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 159, 245, 0.3);
}

.file-rename-input:focus {
    border-color: #56cc9d;
    box-shadow: 0 0 0 2px rgba(86, 204, 157, 0.3);
}

.file-name.renaming {
    position: relative;
}

.file-name.renaming .file-display-name {
    display: none;
}

.file-name.renaming .file-rename-input {
    display: block;
}

.file-name .file-rename-input {
    display: none;
}

/* 新建文件模态框样式 */
.new-file-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.new-file-modal.show {
    display: flex;
}

.new-file-content {
    background: rgba(30, 35, 48, 0.95);
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

.new-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(74, 159, 245, 0.1);
}

.new-file-header h3 {
    margin: 0;
    color: #4a9ff5;
    font-size: 1.3rem;
    font-weight: 600;
}

.new-file-close {
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.new-file-close:hover {
    color: #e74c3c;
}

.new-file-body {
    padding: 25px;
}

.file-name-hint {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
}

.new-file-footer {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 25, 35, 0.3);
}

.new-file-footer .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

/* 黑板节点特殊样式 */
.blackboard-content {
    width: 100%;
    max-width: 100%;
    pointer-events: auto;
}

.blackboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.blackboard-header span {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.add-field-btn {
    background: rgba(86, 204, 157, 0.8);
    border: 1px solid rgba(86, 204, 157, 1);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
    pointer-events: auto;
}

.add-field-btn:hover {
    background: rgba(86, 204, 157, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(86, 204, 157, 0.4);
}

.add-field-btn:active {
    transform: scale(0.95);
}

.blackboard-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    pointer-events: auto;
}

.field-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.field-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.field-key {
    max-width: 100px;
}

.field-value {
    max-width: 100px;
}

.field-key, .field-value, .field-comment {
    flex: 1;
    background: rgba(30, 35, 48, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 6px;
    color: #fff;
    font-size: 0.8rem;
    outline: none;
    transition: all 0.2s ease;
    pointer-events: auto;
    user-select: text;
}

.field-key:focus, .field-value:focus, .field-comment:focus {
    background: rgba(30, 35, 48, 0.8);
    border-color: rgba(86, 204, 157, 0.6);
    box-shadow: 0 0 0 2px rgba(86, 204, 157, 0.2);
}

.field-key::placeholder, .field-value::placeholder, .field-comment::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

/* 重复键名的错误样式 */
.field-key.error {
    border-color: #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3) !important;
}

.field-key.duplicate-key {
    animation: shake 0.5s;
}

/* 黑板引用样式 */
.blackboard-reference {
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5) !important;
    border: 2px solid #2196f3 !important;
    color: #1976d2 !important;
    font-weight: 500 !important;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2) !important;
}

.blackboard-reference:focus {
    border-color: #1976d2 !important;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.3) !important;
}

.blackboard-reference-invalid {
    background: linear-gradient(45deg, #ffebee, #fce4ec) !important;
    border: 2px solid #f44336 !important;
    color: #d32f2f !important;
    font-weight: 500 !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2) !important;
}

.blackboard-reference-invalid:focus {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.3) !important;
}

/* 数字验证错误样式 */
.number-validation-error {
    background: linear-gradient(45deg, #fff3e0, #ffe0b2) !important;
    border: 2px solid #ff9800 !important;
    color: #f57c00 !important;
    font-weight: 500 !important;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2) !important;
}

.number-validation-error:focus {
    border-color: #f57c00 !important;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.3) !important;
}

/* 子树引用错误样式 */
.subtree-reference-invalid {
    background: linear-gradient(45deg, #fce4ec, #f3e5f5) !important;
    border: 2px solid #e91e63 !important;
    color: #c2185b !important;
    font-weight: 500 !important;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.2) !important;
    animation: validationPulse 2s ease-in-out infinite;
}

.subtree-reference-invalid:focus {
    border-color: #c2185b !important;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.3) !important;
    animation: none;
}

/* 子树引用验证成功样式 */
.subtree-reference-valid {
    background: linear-gradient(45deg, #e8f5e8, #f1f8e9) !important;
    border: 2px solid #4caf50 !important;
    color: #2e7d32 !important;
    font-weight: 500 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
}

.subtree-reference-valid:focus {
    border-color: #2e7d32 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3) !important;
}

/* 验证脉冲动画 */
@keyframes validationPulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.2);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.4), 0 0 0 4px rgba(233, 30, 99, 0.1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.remove-field-btn {
    background: rgba(231, 76, 60, 0.8);
    border: 1px solid rgba(231, 76, 60, 1);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
    pointer-events: auto;
}

.remove-field-btn:hover {
    background: rgba(231, 76, 60, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.remove-field-btn:active {
    transform: scale(0.9);
}

/* 黑板节点字段滚动条样式 */
.blackboard-fields::-webkit-scrollbar {
    width: 4px;
}

.blackboard-fields::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.blackboard-fields::-webkit-scrollbar-thumb {
    background: rgba(96, 104, 120, 0.6);
    border-radius: 2px;
}

.blackboard-fields::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 104, 120, 0.8);
}

/* 参数配置样式 */
.params-container {
    width: 100%;
    max-width: 100%;
    background: rgba(20, 25, 35, 0.3);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.params-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(74, 159, 245, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.params-header span {
    font-weight: 600;
    color: #4a9ff5;
    font-size: 0.9rem;
}

.add-param-btn {
    background: rgba(86, 204, 157, 0.8);
    border: 1px solid rgba(86, 204, 157, 1);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
    user-select: none;
}

.add-param-btn:hover {
    background: rgba(86, 204, 157, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(86, 204, 157, 0.4);
}

.add-param-btn:active {
    transform: scale(0.95);
}

.params-list {
    max-height: 200px;
    overflow-y: auto;
}

.no-params-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    padding: 20px 10px;
    font-style: italic;
}

.param-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    margin: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.param-item input {
    padding: 5px;
}

.param-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.param-name-input, .param-value-input {
    background: rgba(30, 35, 48, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
    user-select: text;
    padding: 5px;
    box-sizing: border-box;
}

.param-name-input:focus, .param-value-input:focus {
    background: rgba(30, 35, 48, 0.8);
    border-color: rgba(74, 159, 245, 0.6);
    box-shadow: 0 0 0 2px rgba(74, 159, 245, 0.2);
}

.param-name-input::placeholder, .param-value-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

/* 参数名称重复错误样式 */
.param-name-input.error {
    border-color: #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3) !important;
}

.param-name-input.duplicate-name {
    animation: shake 0.5s;
}

.remove-param-btn {
    background: rgba(231, 76, 60, 0.8);
    border: 1px solid rgba(231, 76, 60, 1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s ease;
    width: 28px;  /* 固定宽度 */
    height: 28px; /* 固定高度，与输入框高度匹配 */
    border-radius: 4px;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
    text-align: center;
}

.remove-param-btn:hover {
    background: rgba(231, 76, 60, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.remove-param-btn:active {
    transform: scale(0.9);
}

/* 参数类型指示器样式 */
.param-type-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-type-indicator.string {
    background: rgba(74, 159, 245, 0.2);
    color: #4a9ff5;
    border: 1px solid rgba(74, 159, 245, 0.4);
}

.param-type-indicator.number {
    background: rgba(86, 204, 157, 0.2);
    color: #56cc9d;
    border: 1px solid rgba(86, 204, 157, 0.4);
}

.param-type-indicator.boolean {
    background: rgba(255, 159, 74, 0.2);
    color: #ff9f4a;
    border: 1px solid rgba(255, 159, 74, 0.4);
}

/* 参数列表滚动条样式 */
.params-list::-webkit-scrollbar {
    width: 4px;
}

.params-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.params-list::-webkit-scrollbar-thumb {
    background: rgba(74, 159, 245, 0.6);
    border-radius: 2px;
}

.params-list::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 159, 245, 0.8);
}

/* 参数项拖拽排序样式 */
.param-item.dragging {
    opacity: 0.7;
    transform: rotate(2deg);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.param-item.drag-over {
    border-color: rgba(255, 193, 7, 0.8);
    background: rgba(255, 193, 7, 0.1);
    transform: translateY(-2px);
}

/* 参数统计信息样式 */
.params-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(86, 204, 157, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #56cc9d;
}

.params-count {
    font-weight: 600;
}

.params-types {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
}

/* 确保黑板节点内容不影响拖动 */
.node[data-type="BLACKBOARD"] .node-content {
    pointer-events: none;
}

.node[data-type="BLACKBOARD"] .blackboard-content {
    pointer-events: auto;
}

.node[data-type="BLACKBOARD"] .blackboard-content * {
    pointer-events: auto;
}

/* 帮助模态框样式 */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.help-modal.show {
    display: flex;
}

.help-container {
    background: rgba(30, 35, 48, 0.95);
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

.help-content {
    background: rgba(30, 35, 48, 0.95);
    padding: 10px;
    width: 100%;
    min-height: 500px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(74, 159, 245, 0.1);
}

.help-header h2 {
    margin: 0;
    color: #4a9ff5;
    font-size: 1.5rem;
    font-weight: 600;
}

.help-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.help-btn {
    background: rgba(86, 204, 157, 0.8);
    border: 1px solid rgba(86, 204, 157, 1);
    color: white;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    padding: 0;
}

.help-btn:hover {
    background: rgba(86, 204, 157, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(86, 204, 157, 0.4);
}

.help-close {
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.help-close:hover {
    color: #e74c3c;
}

.help-body {
    max-height: 70vh;
    overflow-y: auto;
}

.help-view {
    padding: 25px;
    line-height: 1.6;
    color: #fff;
    user-select: text;
}

.help-edit {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.help-edit-info {
    background: rgba(74, 159, 245, 0.1);
    border: 1px solid rgba(74, 159, 245, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
}

.help-edit-info p {
    margin: 0;
    color: #4a9ff5;
    font-size: 0.9rem;
    line-height: 1.4;
}

.help-edit-info code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #56cc9d;
    font-size: 0.85rem;
}

#help-markdown {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 25, 35, 0.8);
    color: #fff;
    font-size: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
    user-select: text;
}

#help-markdown:focus {
    border-color: #4a9ff5;
    box-shadow: 0 0 0 3px rgba(74, 159, 245, 0.2);
}

.help-edit-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.help-edit-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-width: 80px;
}

/* 帮助内容样式 - Markdown渲染 */
.help-view h1 {
    color: #4a9ff5;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(74, 159, 245, 0.3);
}

.help-view h2 {
    color: #56cc9d;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(86, 204, 157, 0.3);
}

.help-view h3 {
    color: #ff9f4a;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.help-view h4 {
    color: #9b59b6;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 15px 0 8px 0;
}

.help-view p {
    margin: 0 0 15px 0;
    color: #e6e6e6;
    line-height: 1.7;
}

.help-view ul, .help-view ol {
    margin: 0 0 15px 0;
    padding-left: 25px;
    color: #e6e6e6;
}

.help-view li {
    margin: 5px 0;
    line-height: 1.6;
}

.help-view code {
    background: rgba(74, 159, 245, 0.15);
    border: 1px solid rgba(74, 159, 245, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #4a9ff5;
    font-size: 0.9rem;
}

.help-view pre {
    background: rgba(20, 25, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
    line-height: 1.4;
}

.help-view pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e6e6e6;
    font-size: 0.9rem;
}

.help-view blockquote {
    border-left: 4px solid rgba(86, 204, 157, 0.6);
    background: rgba(86, 204, 157, 0.1);
    margin: 15px 0;
    padding: 10px 15px;
    border-radius: 0 6px 6px 0;
    color: #a6e0c4;
    font-style: italic;
}

.help-view table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: rgba(20, 25, 35, 0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-view th {
    background: rgba(74, 159, 245, 0.2);
    color: #4a9ff5;
    font-weight: 600;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-view td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e6e6e6;
}

.help-view tr:last-child td {
    border-bottom: none;
}

.help-view tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.help-view hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 25px 0;
}

/* 按键样式 */
.help-view .key {
    display: inline-block;
    background: linear-gradient(135deg, #606878, #4a525f);
    border: 2px solid #8a92a0;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    margin: 0 2px;
    position: relative;
    top: -1px;
    user-select: none;
    white-space: nowrap;
}

.help-view .key:hover {
    background: linear-gradient(135deg, #6a7485, #525a67);
    transform: translateY(1px);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* 滚动条样式 */
.help-body::-webkit-scrollbar {
    width: 8px;
}

.help-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.help-body::-webkit-scrollbar-thumb {
    background: rgba(74, 159, 245, 0.6);
    border-radius: 4px;
}

.help-body::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 159, 245, 0.8);
}

#help-markdown::-webkit-scrollbar {
    width: 8px;
}

#help-markdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#help-markdown::-webkit-scrollbar-thumb {
    background: rgba(86, 204, 157, 0.6);
    border-radius: 4px;
}

#help-markdown::-webkit-scrollbar-thumb:hover {
    background: rgba(86, 204, 157, 0.8);
}

/* 键盘按键样式 */
.keyboard-key {
    display: inline-block;
    background: linear-gradient(135deg, #606878, #4a525f);
    border: 2px solid #8a92a0;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    margin: 0 2px;
    position: relative;
    top: -1px;
    user-select: none;
    white-space: nowrap;
}

.keyboard-key:hover {
    background: linear-gradient(135deg, #6a7485, #525a67);
    transform: translateY(1px);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
