.tech-tree-layout { display: flex; gap: 30px; min-height: calc(100vh - 180px); padding: 0 20px; background: linear-gradient(135deg, #1a1f2c 0%, #2c3e50 100%); } .tech-tree-container { flex: 1; background: rgba(26, 32, 44, 0.9); color: #fff; padding: 30px; margin: 20px 0; border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); min-width: 0; } /* 标题和控制按钮区域 */ .tech-tree-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .tech-tree-header h1 { font-size: 24px; font-weight: 600; color: #fff; margin: 0; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } .tech-tree-controls { display: flex; gap: 12px; } .tech-tree-controls button { background: rgba(52, 152, 219, 0.1); color: #3498db; border: 1px solid rgba(52, 152, 219, 0.3); padding: 8px 16px; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; display: flex; align-items: center; gap: 6px; } .tech-tree-controls button:hover { background: rgba(52, 152, 219, 0.2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2); } /* 树形图容器 */ .tech-tree { width: 100%; height: calc(100vh - 300px); position: relative; overflow: hidden; } .tech-tree svg { width: 100%; height: 100%; } /* 节点样式 */ .node { cursor: pointer; transition: all 0.3s ease; } .node rect { fill: rgba(44, 62, 80, 0.9); stroke: #3498db; stroke-width: 2px; rx: 8px; ry: 8px; transition: all 0.3s ease; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)); } .node:hover rect { fill: rgba(52, 152, 219, 0.2); stroke: #2ecc71; transform: scale(1.05); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2)); } .node text { fill: #fff; font-size: 14px; font-weight: 500; pointer-events: none; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } /* 连接线样式 */ .link { fill: none; stroke: rgba(52, 152, 219, 0.4); stroke-width: 2px; transition: all 0.3s ease; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); } .node:hover + .link, .link:hover { stroke: rgba(46, 204, 113, 0.8); stroke-width: 3px; filter: drop-shadow(0 4px 8px rgba(46, 204, 113, 0.2)); } /* 右侧详情面板 */ .detail-panel { width: 400px; margin: 20px 0; background: rgba(26, 32, 44, 0.9); border-radius: 16px; color: #fff; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); flex-shrink: 0; transition: all 0.3s ease; } .detail-content { position: sticky; top: 20px; padding: 30px; } .detail-header { padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 20px; } .detail-header h2 { margin: 0; color: #3498db; font-size: 1.5em; font-weight: 600; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } .detail-body { overflow-y: auto; max-height: calc(100vh - 300px); padding-right: 10px; } .detail-body::-webkit-scrollbar { width: 6px; } .detail-body::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 3px; } .detail-body::-webkit-scrollbar-thumb { background: rgba(52, 152, 219, 0.5); border-radius: 3px; } .info-section { margin-bottom: 25px; animation: fadeIn 0.3s ease; } .info-section h3 { color: #3498db; margin-bottom: 15px; font-size: 1.2em; font-weight: 600; display: flex; align-items: center; gap: 8px; } .info-section h3::before { content: ''; display: inline-block; width: 4px; height: 16px; background: #3498db; border-radius: 2px; } .info-section p { line-height: 1.6; color: rgba(255, 255, 255, 0.9); margin-bottom: 15px; } .info-section ul { list-style-type: none; padding: 0; } .info-section li { margin-bottom: 12px; padding-left: 24px; position: relative; color: rgba(255, 255, 255, 0.9); transition: all 0.3s ease; } .info-section li:before { content: "•"; color: #3498db; position: absolute; left: 8px; font-size: 1.2em; } .info-section li:hover { transform: translateX(5px); color: #fff; } /* 动画效果 */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* 节点状态样式 */ .node.active rect { fill: rgba(46, 204, 113, 0.2); stroke: #2ecc71; stroke-width: 3px; filter: drop-shadow(0 8px 16px rgba(46, 204, 113, 0.3)); } .node.completed rect { stroke: #2ecc71; } .node.locked rect { stroke: #e74c3c; fill: rgba(231, 76, 60, 0.1); } /* 响应式布局 */ @media (max-width: 1200px) { .tech-tree-layout { flex-direction: column; } .detail-panel { width: 100%; } } /* 主内容区域 */ .main-content { min-height: calc(100vh - 140px); /* 减去header和footer的高度 */ padding: 20px 0; background: linear-gradient(135deg, #1a1f2c 0%, #2c3e50 100%); } /* 确保container样式正确 */ .container { max-width: 1600px; margin: 0 auto; padding: 0 20px; } /* 提示框样式 */ .tooltip { position: absolute; background-color: rgba(44, 62, 80, 0.9); color: #fff; padding: 10px; border-radius: 4px; font-size: 14px; pointer-events: none; z-index: 1000; } /* 模态框样式 */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); z-index: 1000; } .modal-content { position: relative; background-color: #2c3e50; margin: 5% auto; padding: 0; width: 70%; max-width: 800px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); color: #fff; } .modal-header { padding: 20px; border-bottom: 1px solid #34495e; display: flex; justify-content: space-between; align-items: center; } .modal-header h2 { margin: 0; color: #3498db; } .close { color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.3s ease; } .close:hover { color: #fff; } .modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }