[v-cloak] { display: none; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #0f172a; /* slate-900 */
}

/* 画布背景：优化网格点，使其更像设计软件 */
.canvas-container {
    background-color: #0f172a;
    background-image: 
        radial-gradient(circle, #334155 1px, transparent 1px);
    background-size: 24px 24px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
}
.canvas-container:active { cursor: grabbing; }

/* 节点基础样式 */
.flow-node { 
    position: absolute; 
    width: 280px; 
    background: #1e293b; /* slate-800 */
    border: 1px solid #334155;
    border-radius: 12px; 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2); 
    z-index: 10; 
    user-select: none; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    overflow: hidden;
}

/* 选中/Hover 效果 */
.flow-node:hover { 
    box-shadow: 0 0 0 2px #3b82f6; 
    transform: translateY(-1px);
}

/* Ghost 节点样式优化 */
.flow-node.ghost-node { 
    background: rgba(30, 41, 59, 0.6); 
    border: 1px dashed #64748b; 
    backdrop-filter: blur(4px);
    color: #94a3b8; 
    cursor: alias; 
}
.flow-node.ghost-node .node-header { 
    background: transparent; 
    border-bottom: 1px dashed #475569;
    color: #cbd5e1; 
}
.flow-node.ghost-node:hover { 
    border-color: #60a5fa; 
    background: rgba(30, 41, 59, 0.9);
}

/* 节点类型颜色条 - 更加鲜艳但柔和 */
.flow-node.library-node { border-color: #f59e0b; }
.flow-node.library-node .node-header { background: linear-gradient(to right, rgba(245, 158, 11, 0.1), transparent); }

.flow-node.global_faq_node { border-color: #10b981; }
.flow-node.global_faq_node .node-header { background: linear-gradient(to right, rgba(16, 185, 129, 0.1), transparent); }

.flow-node.intent_node { border-color: #8b5cf6; }
.flow-node.intent_node .node-header { background: linear-gradient(to right, rgba(139, 92, 246, 0.1), transparent); }

/* 连线层 */
.connections-layer { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 1; }
path { fill: none; stroke: #475569; stroke-width: 2px; transition: stroke 0.3s; }
path.route { stroke-opacity: 0.8; }
path.ghost { stroke-dasharray: 6,4; opacity: 0.5; } 

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* 标签页样式 */
.tab-item {
    position: relative;
    transition: all 0.2s;
}
.tab-active { 
    background: #1e293b; 
    color: #e2e8f0; 
    border-top: 2px solid #3b82f6; 
}
.tab-inactive { 
    background: #0f172a; 
    color: #64748b; 
    border-right: 1px solid #1e293b;
}
.tab-inactive:hover { 
    background: #1e293b; 
    color: #94a3b8; 
}

/* 模块分组框 */
.module-group { 
    position: absolute; 
    border: 2px dashed; 
    border-radius: 16px; 
    z-index: 2; 
    pointer-events: none; 
    transition: all 0.3s ease;
}
.module-group.is-collapsed { border-style: solid; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3); }

.module-group-header { 
    pointer-events: auto; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    color: #ffffff; 
    font-size: 13px; 
    font-weight: 600;
    padding: 6px 12px; 
    border-radius: 8px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); 
    cursor: pointer; 
    backdrop-filter: blur(4px);
    transition: transform 0.1s;
}
.module-group-header:active { transform: scale(0.98); }

.module-group-title { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.module-group-toggle { font-weight: 700; opacity: 0.8; }
.module-dot { width: 8px; height: 8px; border-radius: 9999px; flex: 0 0 8px; box-shadow: 0 0 0 1px rgba(0,0,0,0.2); }

/* 输入框通用样式 */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}
