Tz2/scene-step-editor-web/styles.css

819 lines
16 KiB
CSS

/* Unity Editor 风格样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #2c2c2c 0%, #3a3a3a 50%, #2c2c2c 100%);
color: #e0e0e0;
overflow: hidden;
min-height: 100vh;
}
.editor-window {
width: min(95vw, 1400px);
height: min(95vh, 1200px);
margin: 10px auto;
background: linear-gradient(135deg, #383838 0%, #343434 100%);
border: 1px solid #4a4a4a;
border-radius: 12px;
display: flex;
flex-direction: column;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.2);
min-width: 800px;
min-height: 800px;
overflow: hidden;
}
.header {
padding: 10px 15px;
background-color: #2d2d2d;
border-bottom: 1px solid #1e1e1e;
}
.header h1 {
font-size: 16px;
font-weight: bold;
color: #d2d2d2;
}
.file-section {
padding: 10px 15px;
background-color: #383838;
}
.file-section h3 {
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
color: #d2d2d2;
}
/* 目录选择样式 */
.directory-section {
margin-bottom: 12px;
padding: 8px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.directory-info {
margin-bottom: 8px;
}
.directory-help {
color: #a0a0a0;
font-size: 10px;
background: rgba(52, 152, 219, 0.1);
padding: 3px 6px;
border-radius: 3px;
border-left: 2px solid #3498db;
display: inline-block;
line-height: 1.3;
}
.directory-controls {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.current-dir {
font-size: 11px;
color: #a0a0a0;
background: rgba(255, 255, 255, 0.05);
padding: 4px 8px;
border-radius: 4px;
border-left: 3px solid #28a745;
font-family: 'Courier New', monospace;
flex: 1;
min-width: 150px;
transition: all 0.2s ease;
}
/* .current-dir:hover {
background: rgba(255, 255, 255, 0.08);
} */
.file-controls {
display: flex;
gap: 10px;
align-items: center;
}
.file-dropdown {
flex: 1;
padding: 6px 10px;
background-color: #2d2d2d;
border: 1px solid #1e1e1e;
color: #d2d2d2;
border-radius: 2px;
font-size: 12px;
}
.btn {
padding: 8px 14px;
border: none;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
/* .btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
} */
.btn:active {
transform: translateY(0);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.btn-primary {
background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
color: white;
}
/* .btn-primary:hover {
background: linear-gradient(135deg, #357abd 0%, #2968a3 100%);
} */
.btn-secondary {
background: linear-gradient(135deg, #5a5a5a 0%, #4a4a4a 100%);
color: #e0e0e0;
}
/* .btn-secondary:hover {
background: linear-gradient(135deg, #6a6a6a 0%, #5a5a5a 100%);
} */
.btn-save {
background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
color: white;
height: 42px;
flex: 1;
font-weight: 600;
}
/* .btn-save:hover {
background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
} */
.btn-generate {
background: linear-gradient(135deg, #ff9800 0%, #e68900 100%);
color: white;
height: 42px;
flex: 1;
font-weight: 600;
}
/* .btn-generate:hover {
background: linear-gradient(135deg, #e68900 0%, #cc7700 100%);
} */
.separator-line {
height: 5px;
width: 100%;
}
.separator-line.orange {
background-color: #ba8437;
}
.separator-line.green {
background-color: #538437;
}
.separator-line.gray {
background-color: #383838;
}
/* 主布局区域 */
.main-layout {
flex: 1;
display: flex;
overflow: hidden;
}
/* 左侧侧边栏 */
.sidebar {
width: 320px;
min-width: 280px;
max-width: 400px;
background: linear-gradient(135deg, #2d2d2d 0%, #252525 100%);
border-right: 2px solid #4a4a4a;
display: flex;
flex-direction: column;
transition: all 0.3s ease;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}
.sidebar.collapsed {
width: 50px;
min-width: 50px;
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 15px;
background: linear-gradient(135deg, #3a3a3a 0%, #323232 100%);
border-bottom: 1px solid #555;
gap: 10px;
}
.sidebar-header h4 {
font-size: 14px;
font-weight: 600;
color: #e0e0e0;
margin: 0;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
white-space: nowrap;
overflow: hidden;
}
.sidebar.collapsed .sidebar-header h4 {
opacity: 0;
width: 0;
}
.btn-sidebar-toggle {
width: 28px;
height: 28px;
background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
border: none;
border-radius: 6px;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
flex-shrink: 0;
}
/* .btn-sidebar-toggle:hover {
background: linear-gradient(135deg, #357abd 0%, #2968a3 100%);
transform: scale(1.05);
} */
.toggle-icon {
font-size: 12px;
transition: transform 0.3s ease;
}
.sidebar.collapsed .toggle-icon {
transform: rotate(180deg);
}
/* 树状容器 */
.tree-container {
flex: 1;
overflow-y: auto;
padding: 10px;
background: rgba(255, 255, 255, 0.02);
}
.sidebar.collapsed .tree-container {
opacity: 0;
pointer-events: none;
}
/* 树节点样式 */
.tree-node {
margin-bottom: 4px;
}
.tree-node-step {
background: linear-gradient(135deg, #404040 0%, #363636 100%);
border: 1px solid #555;
border-left: 3px solid #4a90e2;
border-radius: 6px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.tree-node-header {
display: flex;
align-items: center;
padding: 8px 10px;
cursor: pointer;
transition: all 0.2s ease;
gap: 6px;
border-radius: 4px;
}
.tree-node-step .tree-node-header {
background: linear-gradient(135deg, #454545 0%, #3d3d3d 100%);
}
/* .tree-node-step .tree-node-header:hover {
background: linear-gradient(135deg, #4a4a4a 0%, #424242 100%);
transform: translateX(3px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
} */
/* .tree-node-action .tree-node-header:hover {
background: linear-gradient(135deg, #525252 0%, #4a4a4a 100%);
transform: translateX(3px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
} */
.tree-node-icon {
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
color: #4a90e2;
flex-shrink: 0;
}
.tree-node-label {
flex: 1;
font-size: 11px;
color: #e0e0e0;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tree-node-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.btn-tree-action {
width: 20px;
height: 20px;
border: none;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
transition: all 0.2s ease;
opacity: 0.7;
}
/* .btn-tree-action:hover {
opacity: 1;
transform: scale(1.1);
} */
.btn-tree-toggle {
background: linear-gradient(135deg, #666 0%, #555 100%);
color: #e0e0e0;
}
.btn-tree-jump {
background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
color: white;
}
/* 子节点容器 */
.tree-children {
background: rgba(0, 0, 0, 0.1);
border-top: 1px solid #555;
}
.tree-children.collapsed {
display: none;
}
/* 动作节点样式 */
.tree-node-action {
background: linear-gradient(135deg, #484848 0%, #404040 100%);
border-left: 3px solid #4caf50;
margin: 2px 0;
margin-left: 15px;
}
.tree-node-action .tree-node-header {
padding: 6px 8px;
background: linear-gradient(135deg, #4d4d4d 0%, #454545 100%);
}
.tree-node-action .tree-node-icon {
color: #4caf50;
}
.tree-node-action .tree-node-label {
font-size: 10px;
font-weight: 400;
}
.content-area {
flex: 1;
overflow: hidden;
background: rgba(255, 255, 255, 0.01);
}
.scroll-container {
height: 100%;
overflow-y: auto;
padding: 15px 20px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
}
.steps-container {
min-height: 100%;
padding: 5px;
}
.step-item {
margin-bottom: 20px;
background: linear-gradient(135deg, #404040 0%, #363636 100%);
border: 1px solid #2a2a2a;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
border-left: 4px solid #4a90e2;
transition: all 0.3s ease;
overflow: hidden;
}
/* .step-item:hover {
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.15);
transform: translateY(-2px);
} */
.step-header {
display: flex;
align-items: center;
padding: 12px 15px;
background: linear-gradient(135deg, #4a4a4a 0%, #404040 100%);
border-bottom: 1px solid #555;
gap: 10px;
position: relative;
}
.step-header::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
}
.step-controls {
display: flex;
gap: 4px;
}
.btn-small {
width: 32px;
height: 28px;
padding: 0;
font-size: 13px;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
/* .btn-small:hover {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
} */
.btn-add {
background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
color: white;
}
/* .btn-add:hover {
background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
} */
.btn-remove {
background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
color: white;
}
/* .btn-remove:hover {
background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
} */
.btn-move {
background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
color: white;
}
/* .btn-move:hover {
background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
} */
.foldout {
flex: 1;
background: none;
border: none;
color: #d2d2d2;
text-align: left;
font-size: 11px;
cursor: pointer;
padding: 4px;
}
.foldout:before {
content: "▶";
margin-right: 6px;
transition: transform 0.2s;
}
.foldout.expanded:before {
transform: rotate(90deg);
}
.step-content {
padding: 15px;
display: none;
background: rgba(255, 255, 255, 0.02);
}
.step-content.expanded {
display: block;
}
.form-group {
margin-bottom: 12px;
}
.form-group label {
display: block;
margin-bottom: 6px;
font-size: 12px;
color: #e0e0e0;
font-weight: bold;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.form-control {
width: 100%;
padding: 8px 10px;
background: linear-gradient(135deg, #2d2d2d 0%, #252525 100%);
border: 1px solid #404040;
color: #e0e0e0;
border-radius: 6px;
font-size: 12px;
transition: all 0.2s ease;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.form-control:focus {
border-color: #4a90e2;
box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.1);
outline: none;
}
.action-item {
margin: 12px 0;
background: linear-gradient(135deg, #4a4a4a 0%, #424242 100%);
border: 1px solid #555;
border-radius: 6px;
border-left: 3px solid #4caf50;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
transition: all 0.2s ease;
}
/* .action-item:hover {
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
transform: translateX(2px);
} */
.action-header {
display: flex;
align-items: center;
padding: 10px 12px;
background: linear-gradient(135deg, #505050 0%, #484848 100%);
border-bottom: 1px solid #666;
gap: 8px;
position: relative;
}
.action-header::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
background: linear-gradient(180deg, #4caf50 0%, #45a049 100%);
}
.action-content {
padding: 8px;
display: none;
}
.action-content.expanded {
display: block;
}
.target-object-item {
margin: 10px 0;
padding: 12px;
background: linear-gradient(135deg, #555555 0%, #4d4d4d 100%);
border: 1px solid #666;
border-left: 3px solid #ff9800;
border-radius: 6px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
}
/* .target-object-item:hover {
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
transform: translateX(2px);
} */
.target-object-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
position: relative;
}
.target-object-header strong {
color: #ff9800;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.question-item {
margin: 10px 0;
padding: 12px;
background: linear-gradient(135deg, #555555 0%, #4d4d4d 100%);
border: 1px solid #666;
border-left: 3px solid #9c27b0;
border-radius: 6px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
}
/* .question-item:hover {
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
transform: translateX(2px);
} */
.question-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
position: relative;
}
.question-header strong {
color: #9c27b0;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.option-item {
display: flex;
align-items: center;
gap: 6px;
margin: 4px 0;
}
.checkbox {
width: 16px;
height: 16px;
}
.bottom-controls {
padding: 10px 15px;
background-color: #2d2d2d;
border-top: 1px solid #1e1e1e;
display: flex;
gap: 10px;
}
/* 模态框样式 */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
background-color: #383838;
margin: 15% auto;
padding: 20px;
border: 1px solid #2a2a2a;
border-radius: 4px;
width: 400px;
color: #d2d2d2;
}
.modal-content.code-modal {
width: 80%;
max-width: 800px;
height: 70%;
display: flex;
flex-direction: column;
}
.modal-content h3 {
margin-bottom: 15px;
font-size: 14px;
}
.modal-content input {
width: 100%;
padding: 8px;
margin-bottom: 15px;
background-color: #2d2d2d;
border: 1px solid #1e1e1e;
color: #d2d2d2;
border-radius: 2px;
}
.modal-content textarea {
flex: 1;
width: 100%;
padding: 8px;
margin-bottom: 15px;
background-color: #2d2d2d;
border: 1px solid #1e1e1e;
color: #d2d2d2;
border-radius: 2px;
font-family: 'Courier New', monospace;
font-size: 12px;
resize: none;
}
.modal-buttons {
display: flex;
gap: 10px;
justify-content: flex-end;
}
/* 滚动条样式 */
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background: #2d2d2d;
}
::-webkit-scrollbar-thumb {
background: #555;
border-radius: 6px;
}
/* ::-webkit-scrollbar-thumb:hover {
background: #666;
} */
/* 空状态样式 */
.empty-state {
text-align: center;
padding: 20px;
color: #888;
font-style: italic;
}
.add-button-container {
text-align: center;
margin: 10px 0;
}
.btn-add-large {
background-color: #4caf50;
color: white;
padding: 8px 16px;
border: none;
border-radius: 3px;
cursor: pointer;
font-size: 12px;
}
/* .btn-add-large:hover {
background-color: #45a049;
} */