/**
 * AI Workflow Editor Styles
 * Styling for the browser-based agent workflow system
 */

/* ============================================
   Layout
   ============================================ */

.workflow-editor {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #1a1a2e;
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.workflow-canvas {
    flex: 1;
    position: relative;
}

.workflow-canvas .react-flow {
    height: 100%;
}

/* ============================================
   Toolbar
   ============================================ */

.workflow-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
    flex-wrap: wrap;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-label {
    font-size: 13px;
    color: #888;
    margin-right: 4px;
}

.workflow-toolbar button {
    padding: 8px 16px;
    border: 1px solid #0f3460;
    border-radius: 6px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.workflow-toolbar button:hover {
    background: #0f3460;
    border-color: #e94560;
}

.workflow-toolbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.workflow-toolbar button.run-btn {
    background: #e94560;
    border-color: #e94560;
    color: white;
    font-weight: 500;
}

.workflow-toolbar button.run-btn:hover:not(:disabled) {
    background: #d63850;
}

.workflow-toolbar input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #0f3460;
    border-radius: 6px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 13px;
    width: 150px;
}

.workflow-toolbar input[type="text"]:focus {
    outline: none;
    border-color: #e94560;
}

/* ============================================
   Status Bar
   ============================================ */

.workflow-status {
    padding: 8px 20px;
    background: #0f3460;
    color: #4fc3f7;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.workflow-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4fc3f7;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================
   Tool Palette
   ============================================ */

.tool-palette {
    position: absolute;
    right: 20px;
    top: 80px;
    width: 220px;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 10;
}

.tool-palette h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.tool-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.2s;
}

.tool-item:hover {
    border-color: #e94560;
    transform: translateX(-2px);
}

.tool-item:active {
    cursor: grabbing;
}

.tool-icon {
    font-size: 16px;
    margin-bottom: 4px;
}

.tool-name {
    font-weight: 500;
    font-size: 13px;
    color: #e0e0e0;
}

.tool-desc {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

/* ============================================
   Workflow Nodes - Base
   ============================================ */

.workflow-node {
    min-width: 180px;
    background: #1a1a2e;
    border: 2px solid #0f3460;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.workflow-node.selected {
    border-color: #e94560;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
}

.workflow-node.running {
    border-color: #4fc3f7;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.3);
    animation: node-pulse 1.5s infinite;
}

.workflow-node.completed {
    border-color: #4caf50;
}

.workflow-node.error {
    border-color: #f44336;
}

@keyframes node-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(79, 195, 247, 0.3); }
    50% { box-shadow: 0 0 30px rgba(79, 195, 247, 0.5); }
}

/* ============================================
   Node Header
   ============================================ */

.node-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid #0f3460;
    border-radius: 6px 6px 0 0;
}

.node-icon {
    font-size: 16px;
}

.node-label {
    flex: 1;
    font-weight: 500;
    color: #e0e0e0;
}

.node-run-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #4caf50;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.node-run-btn:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.2);
}

.node-run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Node Body
   ============================================ */

.node-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.node-input,
.node-select,
.node-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #0f3460;
    border-radius: 4px;
    background: #16213e;
    color: #e0e0e0;
    font-size: 12px;
    font-family: inherit;
    box-sizing: border-box;
}

.node-input:focus,
.node-select:focus,
.node-textarea:focus {
    outline: none;
    border-color: #e94560;
}

.node-textarea {
    resize: vertical;
    min-height: 60px;
}

/* Error states for invalid input */
.node-textarea.input-error,
.node-input.input-error {
    border-color: #ff4757 !important;
    background: rgba(255, 71, 87, 0.1);
}

.workflow-node.has-error {
    border-color: #ff4757;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.node-error-message {
    font-size: 11px;
    color: #ff4757;
    padding: 4px 6px;
    margin-top: 4px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-output-display {
    padding: 10px;
    background: #16213e;
    border-radius: 4px;
    font-size: 12px;
    color: #888;
    min-height: 40px;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.node-description {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

/* ============================================
   Tool Node Parameters
   ============================================ */

.node-param {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.param-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-node .node-body {
    min-width: 200px;
}

.tool-node .node-input,
.tool-node .node-select {
    font-size: 11px;
    padding: 6px 8px;
}

/* Drop highlight for agent nodes */
.agent-node.drop-target {
    border-color: #ff9800 !important;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.4) !important;
}

/* ============================================
   Node Type Colors
   ============================================ */

.input-node .node-header {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.05));
}

.output-node .node-header {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.05));
}

.agent-node .node-header {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.05));
}

.tool-node .node-header {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 152, 0, 0.05));
}

.transform-node .node-header {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.2), rgba(0, 188, 212, 0.05));
}

.condition-node .node-header {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.05));
}

/* ============================================
   Handles (Connection Points)
   ============================================ */

.react-flow__handle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #0f3460;
    background: #1a1a2e;
    transition: all 0.2s;
}

.react-flow__handle:hover {
    border-color: #e94560;
    transform: scale(1.2);
}

.handle-input {
    background: #4caf50;
    border-color: #4caf50;
}

.handle-output {
    background: #2196f3;
    border-color: #2196f3;
}

.handle-tools {
    background: #ff9800;
    border-color: #ff9800;
}

.handle-true {
    background: #4caf50;
}

.handle-false {
    background: #f44336;
}

/* ============================================
   React Flow Edges
   ============================================ */

.react-flow__edge-path {
    stroke: #0f3460;
    stroke-width: 2;
}

.react-flow__edge.selected .react-flow__edge-path {
    stroke: #e94560;
}

.react-flow__edge-path.animated {
    stroke-dasharray: 5;
    animation: dash 0.5s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* ============================================
   React Flow Controls & MiniMap
   ============================================ */

.react-flow__controls {
    left: 20px;
    bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.react-flow__controls-button {
    background: #16213e;
    border: 1px solid #0f3460;
    color: #e0e0e0;
}

.react-flow__controls-button:hover {
    background: #0f3460;
}

.react-flow__minimap {
    right: 20px;
    bottom: 20px;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
}

/* ============================================
   Background
   ============================================ */

.react-flow__background {
    background-color: #1a1a2e;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .workflow-toolbar {
        padding: 10px;
        gap: 10px;
    }

    .toolbar-section {
        flex-wrap: wrap;
    }

    .workflow-toolbar button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .tool-palette {
        display: none;
    }

    .workflow-node {
        min-width: 150px;
        font-size: 12px;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .template-gallery-modal {
        width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-header h2 {
        font-size: 18px;
    }

    .template-card {
        padding: 12px;
    }

    .workflow-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-section {
        justify-content: center;
    }
}

/* ============================================
   Disabled & Skipped Node States
   ============================================ */

.workflow-node.disabled {
    opacity: 0.5;
    border-color: #666;
    pointer-events: none;
}

.workflow-node.disabled::after {
    content: 'DISABLED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #888;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.workflow-node.skipped {
    border-style: dashed;
    opacity: 0.7;
    border-color: #666;
}

.workflow-node.skipped .node-header {
    text-decoration: line-through;
    color: #666;
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e94560;
}

/* ============================================
   Template Gallery Modal
   ============================================ */

.template-gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.template-gallery-modal {
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #0f3460;
}

.gallery-header h2 {
    margin: 0;
    font-size: 18px;
    color: #e0e0e0;
}

.gallery-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.gallery-close-btn:hover {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.gallery-search {
    padding: 12px 20px;
    border-bottom: 1px solid #0f3460;
}

.gallery-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #0f3460;
    border-radius: 6px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 14px;
}

.gallery-search input:focus {
    outline: none;
    border-color: #e94560;
}

.gallery-categories {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #0f3460;
    flex-wrap: wrap;
}

.gallery-categories button {
    padding: 6px 14px;
    border: 1px solid #0f3460;
    border-radius: 20px;
    background: transparent;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-categories button:hover {
    border-color: #e94560;
    color: #e0e0e0;
}

.gallery-categories button.active {
    background: #e94560;
    border-color: #e94560;
    color: white;
}

.gallery-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.template-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.template-card:hover {
    border-color: #4fc3f7;
    transform: translateY(-2px);
}

.template-card.selected {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.1);
}

.template-icon {
    font-size: 28px;
    line-height: 1;
}

.template-info {
    flex: 1;
    min-width: 0;
}

.template-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #e0e0e0;
}

.template-info p {
    margin: 0;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.template-meta {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: #666;
}

.template-preview {
    padding: 16px 20px;
    border-top: 1px solid #0f3460;
    background: rgba(0, 0, 0, 0.2);
}

.template-preview h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #e0e0e0;
}

.template-preview p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #888;
}

.preview-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.preview-node {
    padding: 4px 10px;
    background: #0f3460;
    border-radius: 4px;
    font-size: 12px;
    color: #e0e0e0;
}

.import-btn {
    padding: 10px 24px;
    background: #e94560;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.import-btn:hover {
    background: #d63850;
}

/* ============================================
   Node Palette (Categorized)
   ============================================ */

.node-palette {
    position: absolute;
    right: 20px;
    top: 80px;
    width: 220px;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 12px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 10;
}

.node-palette h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.palette-category {
    margin-bottom: 8px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-header:hover {
    border-color: #e94560;
}

.category-header.expanded {
    border-radius: 6px 6px 0 0;
    border-bottom: none;
}

.category-header span:first-child {
    font-size: 14px;
}

.category-header span:nth-child(2) {
    flex: 1;
    font-size: 13px;
    color: #e0e0e0;
}

.category-header .arrow {
    font-size: 10px;
    color: #666;
}

.category-nodes,
.category-tools {
    padding: 8px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-top: none;
    border-radius: 0 0 6px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.node-btn {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #16213e;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.node-btn:hover {
    border-color: #e94560;
    background: #0f3460;
}

/* ============================================
   New Node Type Colors
   ============================================ */

.http-request-node .node-header {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(233, 30, 99, 0.05));
}

.code-node .node-header {
    background: linear-gradient(135deg, rgba(121, 85, 72, 0.2), rgba(121, 85, 72, 0.05));
}

.schedule-node .node-header {
    background: linear-gradient(135deg, rgba(0, 150, 136, 0.2), rgba(0, 150, 136, 0.05));
}

.merge-node .node-header {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.2), rgba(63, 81, 181, 0.05));
}

.split-node .node-header {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.2), rgba(255, 87, 34, 0.05));
}

.switch-node .node-header {
    background: linear-gradient(135deg, rgba(255, 235, 59, 0.2), rgba(255, 235, 59, 0.05));
}

.set-node .node-header {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.2), rgba(139, 195, 74, 0.05));
}

.wait-node .node-header {
    background: linear-gradient(135deg, rgba(96, 125, 139, 0.2), rgba(96, 125, 139, 0.05));
}

.loop-node .node-header {
    background: linear-gradient(135deg, rgba(103, 58, 183, 0.2), rgba(103, 58, 183, 0.05));
}

/* ============================================
   Toolbar Template Button
   ============================================ */

.workflow-toolbar button.template-btn {
    background: linear-gradient(135deg, #e94560, #d63850);
    border-color: #e94560;
    color: white;
}

.workflow-toolbar button.template-btn:hover {
    background: linear-gradient(135deg, #d63850, #c52d40);
}

/* ============================================
   Execution State Indicators
   ============================================ */

.workflow-node::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.workflow-node.running::after {
    opacity: 1;
    background: #4fc3f7;
    animation: state-pulse 1s infinite;
}

.workflow-node.completed::after {
    opacity: 1;
    background: #4caf50;
}

.workflow-node.error::after {
    opacity: 1;
    background: #f44336;
}

@keyframes state-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ============================================
   Code Node Textarea
   ============================================ */

.code-node .node-textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    min-height: 80px;
}

/* ============================================
   HTTP Request Node
   ============================================ */

.http-request-node .node-select {
    width: auto;
    min-width: 80px;
}

/* ============================================
   Switch Node Cases
   ============================================ */

.switch-node .case-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.switch-node .case-tag {
    padding: 2px 8px;
    background: #0f3460;
    border-radius: 10px;
    font-size: 10px;
    color: #888;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Settings Modal
   ============================================ */

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.settings-modal {
    width: 90%;
    max-width: 500px;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    animation: slideUp 0.3s ease;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #0f3460;
}

.settings-header h2 {
    margin: 0;
    font-size: 18px;
    color: #e0e0e0;
}

.settings-header .close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.settings-header .close-btn:hover {
    color: #e94560;
}

.settings-content {
    padding: 20px;
}

.setting-section {
    margin-bottom: 24px;
}

.setting-section:last-child {
    margin-bottom: 0;
}

.setting-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #e94560;
}

.setting-desc {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #888;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.api-key-input {
    flex: 1;
    padding: 10px 14px;
    background: #0f3460;
    border: 1px solid #1a1a2e;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: monospace;
}

.api-key-input:focus {
    outline: none;
    border-color: #e94560;
}

.api-key-input::placeholder {
    color: #666;
}

.toggle-btn {
    padding: 8px 12px;
    background: #0f3460;
    border: 1px solid #1a1a2e;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    font-size: 16px;
}

.toggle-btn:hover {
    background: #1a3a5c;
    color: #e0e0e0;
}

.setting-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.save-btn {
    padding: 10px 20px;
    background: #e94560;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.save-btn:hover {
    background: #d13a54;
}

.get-key-link {
    color: #4fc3f7;
    text-decoration: none;
    font-size: 13px;
}

.get-key-link:hover {
    text-decoration: underline;
}

.save-status {
    color: #4caf50;
    font-size: 13px;
    animation: fadeIn 0.2s ease;
}

/* ============================================
   Research Node
   ============================================ */

.research-node .node-header {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.05));
}

.research-node {
    min-width: 220px;
}

.research-node .node-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #888;
    cursor: pointer;
}

.research-node .node-checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

/* ============================================
   Deep Thinking Node
   ============================================ */

.deep-thinking-node .node-header {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.05));
}

.deep-thinking-node {
    min-width: 200px;
}

/* ============================================
   Secondary and Tertiary Handles
   ============================================ */

.handle-secondary {
    background: #9c27b0;
    border-color: #9c27b0;
}

.handle-tertiary {
    background: #ff9800;
    border-color: #ff9800;
}

/* ============================================
   Handle Labels for Multi-Output Nodes
   ============================================ */

.handle-labels {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
}

.handle-labels span {
    position: absolute;
    transform: translateX(-50%);
    font-size: 9px;
    color: #666;
    white-space: nowrap;
}
