*{box-sizing:border-box;margin:0;padding:0}:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{margin:0;padding:0;min-width:320px;min-height:100vh;color:#213547;background-color:#fff}html,body,#root{height:100%;width:100%;overflow:hidden}.react-flow__node{border-radius:3px;width:auto;color:#222;text-align:left;border-width:1px}.react-flow__node-custom{padding:0;border-radius:5px;width:auto;max-width:300px}.react-flow__node-collection{border-width:0;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.react-flow__edge-path{stroke:#555;stroke-width:1.5}.react-flow__minimap-mask{fill:#aab4be1a}.react-flow__minimap-node{fill:#d3d3d3;stroke:none}.react-flow__attribution{display:none}.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}:root{--primary-color: #4caf50;--header-bg-color: #1e3a5f;--border-color: #2c4b73;--text-color: #ffffff;--error-color: #ff4d4f;--dark-bg-color: #1e2939;--dark-node-bg: #2c3e50;--parent-header-color: #4caf50;--child-header-color: #2196F3;--edge-color-main: #FF9800}body{margin:0;padding:0;background-color:var(--dark-bg-color);color:var(--text-color)}.app-container{width:100%;height:100vh;display:flex;flex-direction:column;background-color:var(--dark-bg-color)}.app-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;background-color:var(--header-bg-color);border-bottom:1px solid var(--border-color);height:60px;color:#fff}.app-title{font-size:1.5rem;font-weight:700;color:#fff}.connection-status{margin-left:auto;margin-right:1rem;color:#fffc}.main-content{display:flex;flex:1;overflow:hidden}.json-editor-panel{width:40%;min-width:350px;display:flex;flex-direction:column;border-right:1px solid var(--border-color);background-color:#283747}.panel-header{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;border-bottom:1px solid var(--border-color);background-color:#1e2c3b}.panel-header h3{margin:0;color:#fff;font-size:1.1rem;font-weight:600}.panel-actions{display:flex;gap:10px}.action-btn{padding:.35rem .75rem;background-color:#34495e;border:1px solid var(--border-color);border-radius:4px;cursor:pointer;font-size:.85rem;color:#fff}.action-btn:hover{background-color:#2c3e50}.primary-btn{padding:.35rem .75rem;background-color:var(--primary-color);color:#fff;border:none;border-radius:4px;cursor:pointer;font-weight:500;font-size:.85rem}.primary-btn:hover{opacity:.9}.json-editor-container{flex:1;padding:1rem;overflow:hidden;display:flex;flex-direction:column}.json-editor{width:100%;height:100%;padding:1rem;border:1px solid var(--border-color);border-radius:4px;font-family:monospace;font-size:.9rem;resize:none;overflow-y:auto;background-color:#1e2c3b;color:#ecf0f1}.json-editor.invalid{border-color:var(--error-color);background-color:#ff4d4f1a}.json-editor:focus{outline:none;border-color:var(--primary-color)}.error-message{color:var(--error-color);padding:.5rem 0;font-size:.85rem}.diagram-panel{flex:1;background-color:var(--dark-bg-color);position:relative;transition:box-shadow .3s ease}.collection-node{min-width:350px;max-width:500px;border:2px solid var(--primary-color);border-radius:6px;overflow:hidden;background-color:var(--dark-node-bg);box-shadow:0 4px 6px #0000004d}.collection-header{background-color:#2c593b;color:#fff;padding:10px 15px;font-weight:700;font-size:1.1em;text-align:center;border-bottom:2px solid var(--primary-color)}.collection-content{max-height:600px;overflow-y:auto;padding:5px 0}.collection-content::-webkit-scrollbar{width:8px}.collection-content::-webkit-scrollbar-track{background:#0003}.collection-content::-webkit-scrollbar-thumb{background:#ff980080;border-radius:4px}.collection-content::-webkit-scrollbar-thumb:hover{background:#ff9800b3}.parent-collection{background-color:var(--dark-node-bg);border:2px solid var(--primary-color)}.parent-collection .collection-header{background-color:#2c593b;color:#fff;font-weight:700}.child-collection{background-color:var(--dark-node-bg);border:2px solid #2196F3}.child-collection .collection-header{background-color:#1a4971;color:#fff;font-weight:700}.field-row{display:flex;align-items:center;padding:.35rem .75rem;border-bottom:1px solid rgba(255,255,255,.1);position:relative;cursor:default;transition:background-color .2s ease}.field-row:hover{background-color:#ffffff0d}.field-name{flex:1;color:#fff;font-weight:500;text-align:left;padding:2px 5px;border-radius:3px;transition:background-color .2s ease}.field-name.nested-field{color:#ff9800;cursor:pointer}.field-name.nested-field:hover{background-color:#ff98001a}.field-type{color:#fff9;font-size:.9em;padding-left:10px;min-width:100px;text-align:right}.nested-content{background-color:#0003;border-left:2px solid #FF9800;margin-left:20px;margin-bottom:5px}.nested-indicator{color:#ff9800;margin-right:8px;font-size:12px;cursor:pointer;width:15px;display:flex;align-items:center;justify-content:center;transition:transform .2s ease}.nested-indicator:hover{transform:scale(1.2)}.node-handle{position:absolute;width:10px;height:10px;border-radius:50%;background-color:#888;border:2px solid var(--dark-node-bg);z-index:1}.parent-collection .node-handle{background-color:var(--primary-color)}.child-collection .node-handle{background-color:#2196f3}.node-handle.top{top:-5px;left:50%;transform:translate(-50%)}.node-handle.right{right:-5px;top:50%;transform:translateY(-50%)}.node-handle.bottom{bottom:-5px;left:50%;transform:translate(-50%)}.node-handle.left{left:-5px;top:50%;transform:translateY(-50%)}.react-flow__controls{bottom:20px;left:15px;top:auto;right:auto}.react-flow__controls-button{border:1px solid var(--border-color);background-color:#34495e;color:#fff}.react-flow__controls-button svg{fill:#fff}.react-flow__minimap{bottom:20px;right:15px;background-color:#34495ecc;border-radius:4px}.react-flow__handle{width:8px;height:8px;border-radius:50%;background-color:var(--primary-color);border:2px solid var(--dark-node-bg);z-index:5}.react-flow__handle-bottom{bottom:-6px}.react-flow__handle-top{top:-6px}.react-flow__background{background-color:var(--dark-bg-color)!important}.react-flow__background-pattern circle{fill:#ffffff0d}.react-flow__edge-path{stroke-width:2}.react-flow__edge.straight .react-flow__edge-path{stroke:var(--edge-color-main);stroke-width:3;filter:drop-shadow(0 0 5px rgba(255,152,0,.5))}.react-flow__edge.default .react-flow__edge-path{stroke:#fff6;stroke-width:1}.react-flow__edge.animated .react-flow__edge-path{stroke-dasharray:10;animation:flow 1.5s infinite linear}@keyframes flow{0%{stroke-dashoffset:20}to{stroke-dashoffset:0}}.react-flow__edge-text{font-size:12px;fill:#fff;filter:drop-shadow(0 0 2px rgba(0,0,0,.8))}.tools-panel{margin-top:10px;margin-right:10px}.tools-container{display:flex;flex-direction:column;gap:5px;background-color:#34495ecc;border-radius:5px;padding:5px;box-shadow:0 2px 4px #0000004d}.tool-btn{width:32px;height:32px;border-radius:4px;border:none;background-color:#2c3e50;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;box-shadow:0 1px 2px #0000004d;color:#fff}.tool-btn:hover{background-color:#253445}.tool-btn.active{background-color:var(--primary-color);color:#fff}.tool-btn .realtime-icon{font-size:14px}@media screen and (max-width: 992px){.main-content{flex-direction:column}.json-editor-panel{width:100%;height:40%;min-height:200px;border-right:none;border-bottom:1px solid var(--border-color)}.diagram-panel{height:60%}}.loading{display:flex;justify-content:center;align-items:center;height:100%;font-size:1.2rem;color:#fff}@keyframes update-flash{0%{box-shadow:0 0 #4caf5080}70%{box-shadow:0 0 0 10px #4caf5000}to{box-shadow:0 0 #4caf5000}}.diagram-updating{animation:update-flash 1s ease-out;box-shadow:inset 0 0 0 2px var(--primary-color)}.realtime-status{position:absolute;top:10px;left:10px;background-color:#34495ecc;border-radius:4px;padding:5px 10px;font-size:12px;color:#fff;z-index:5}.diagram-legend,.legend-title,.legend-item,.legend-color,.legend-color.parent-child,.legend-color.reference,.collection-types,.parent-legend,.child-legend{display:none}.parent-node{opacity:1;margin-bottom:50px}.child-node{opacity:.9}.react-flow__node.selected{box-shadow:0 0 0 2px var(--primary-color)}.reference-field{color:#ff9800;font-weight:700;text-decoration:underline;cursor:pointer;position:relative}.reference-field:after{content:"↗";font-size:10px;position:absolute;top:-3px;margin-left:2px;color:#ff9800}.reference-field:hover{background-color:#ff98001a;border-radius:3px;padding:0 3px}.collection-name-input{margin-bottom:1rem;display:flex;align-items:center;gap:10px}.collection-name-input label{color:#fff;font-size:.9rem;font-weight:500;min-width:100px}.collection-name-field{flex:1;padding:.5rem;border:1px solid var(--border-color);border-radius:4px;background-color:#1e2c3b;color:#fff;font-size:.9rem;outline:none;transition:border-color .2s ease}.collection-name-field:focus{border-color:var(--primary-color)}.collection-name-field::placeholder{color:#fff6}.share-toast{position:fixed;bottom:20px;right:20px;background-color:var(--primary-color);color:#fff;padding:12px 24px;border-radius:4px;box-shadow:0 2px 8px #0003;z-index:1000;animation:slideIn .3s ease-out}@keyframes slideIn{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.action-btn[title="Share diagram"]{background-color:#2196f3}.action-btn[title="Share diagram"]:hover{background-color:#1976d2}
