.node-editor-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1e1e1e;
    user-select: none;
    background-image: radial-gradient(#444 1px, transparent 1px);
}

.node-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
}

.node-item {
    position: absolute;
    background-color: #2d2d2d;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    min-width: 150px;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    cursor: grab;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.node-item:hover {
    border-color: #5e5e5e;
}

.node-item.node-selected {
    border-color: #007acc;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.4), 0 4px 6px rgba(0,0,0,0.3);
}

.node-header {
    padding: 0 8px;
    height: 40px;
    display: flex;
    align-items: center;
    background-color: #3e3e3e;
    border-bottom: 1px solid #4e4e4e;
    font-weight: bold;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    box-sizing: border-box;
}

.node-body {
    padding: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
}

.node-inputs, .node-outputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.node-inputs {
    align-items: flex-start;
}

.node-outputs {
    align-items: flex-end;
}

.node-port {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    position: relative;
    height: 24px;
    box-sizing: border-box;
}

.node-inputs .node-port .port-circle {
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
}

.node-outputs .node-port .port-circle {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
}

.port-circle {
    width: 12px;
    height: 12px;
    background-color: #007acc;
    border-radius: 50%;
    cursor: crosshair;
    flex-shrink: 0;
}

.port-circle:hover {
    background-color: #0098ff;
}

.connections-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.connection-path {
    fill: none;
    stroke: #007acc;
    stroke-width: 2px;
}

/* Context Menu */
.node-context-menu {
    position: absolute;
    background-color: #2d2d2d;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 1000;
    overflow: hidden;
}

.context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.1s ease;
}

.context-menu-item:hover {
    background-color: #007acc;
}

.context-menu-divider {
    height: 1px;
    background-color: #3e3e3e;
    margin: 4px 0;
}

/* Controls */
.node-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.control-btn {
    width: 32px;
    height: 32px;
    background-color: #2d2d2d;
    border: 1px solid #3e3e3e;
    border-radius: 4px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background-color 0.1s, transform 0.1s;
}

.control-btn:hover {
    background-color: #3e3e3e;
}

.control-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.control-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.smooth-transition {
    transition: transform 0.2s ease-out, background-position 0.2s ease-out, background-size 0.2s ease-out;
}
