/* ai-workflow-pro/css/style.css - 完全体样�?*/

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121218;
  --bg-card: #1e2128;
  --border: #3a3e48;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a8b0;
  --accent: #5b9bd5;
  --accent-hover: #6aade0;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --grid-color: rgba(40, 40, 40, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100%;
  width: 100%;
}

#workflow-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 3px);
  overflow: hidden;
  pointer-events: auto;
}

/* 网格背景 */
.workflow-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 1px 1px, var(--grid-color) 1px, transparent 1px),
    radial-gradient(circle at 10px 10px, rgba(40, 40, 40, 0.2) 1px, transparent 1px);
  background-size: 20px 20px, 100px 100px;
  z-index: 0;
}

/* 世界容器 - 所有节点和连接线的父级，CSS Transform 驱动缩放平移 */
.world-container {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  z-index: 2;
}

/* 框选矩形 */
.selection-rect {
  pointer-events: none;
}

/* 新式左侧工具�?- 垂直圆形按钮菜单 */
.new-toolbar {
  position: fixed;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  background: var(--bg-card);
  border-radius: 24px;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.new-toolbar-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* 第一个按钮（添加节点）更亮一�?*/
.new-toolbar-item:first-child {
  background: rgba(91, 155, 213, 0.2);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.5), 0 4px 12px rgba(91, 155, 213, 0.3);
  transform: scale(1.05);
}

.new-toolbar-item:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  transform: scale(1.1);
}

.new-toolbar-item.active {
  background: rgba(91, 155, 213, 0.3);
  color: var(--accent);
  transform: scale(1.15);
}

.new-toolbar-item i {
  font-size: 20px;
}

/* 连接线剪刀图标 */
.connection-scissors {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 2000;
  transform: translate(-50%, -50%);
  box-shadow: none;
  transition: all 0.2s ease;
  opacity: 1;
  padding: 4px;
}

.connection-scissors:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.connection-scissors i {
  color: var(--accent);
  font-size: 18px;
  font-weight: bold;
}

.connection-scissors:hover i {
  color: #ff4757;
}

/* 连接线悬停对话框 */
.connection-hover-dialog {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  min-width: 220px;
  z-index: 1001;
  font-size: 13px;
  overflow: hidden;
}

.connection-hover-dialog .dialog-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(91, 155, 213, 0.15);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
}

.connection-hover-dialog .dialog-header i {
  color: var(--accent);
}

.connection-hover-dialog .dialog-content {
  padding: 12px 14px;
}

.connection-hover-dialog .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.connection-hover-dialog .info-row:last-child {
  border-bottom: none;
}

.connection-hover-dialog .info-row label {
  color: var(--text-secondary);
  font-size: 12px;
}

.connection-hover-dialog .info-row span {
  color: var(--text-primary);
  font-size: 12px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-hover-dialog .dialog-actions {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.connection-hover-dialog .btn-cut {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 6px;
  color: #dc3545;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.connection-hover-dialog .btn-cut:hover {
  background: rgba(220, 53, 69, 0.25);
  border-color: rgba(220, 53, 69, 0.5);
}

.connection-hover-dialog .btn-cut i {
  font-size: 11px;
}

/* 工具�?*/
.toolbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  z-index: 100;
}

.toolbar-item {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.toolbar-item:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

.toolbar-item.active {
  background: rgba(91, 155, 213, 0.3);
  color: var(--accent);
  border-color: var(--accent);
}

.toolbar-divider {
  width: 24px;
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* 节点样式 */
.node {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  user-select: none;
  transition: box-shadow 0.2s ease;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  z-index: 100; /* 提高层级确保在连接线上方 */
}

/* 节点选中状态 */
.node.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* 节点标题区域 */
.node-header {
  cursor: move;
}

/* 节点大小调整手柄 */
.node-resizer {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  cursor: nwse-resize;
  z-index: 10;
  opacity: 0;
  transition: all 0.2s ease;
  background: url('/css/resizer.png') no-repeat center;
  background-size: contain;
}

.node:hover .node-resizer {
  opacity: 1;
}

.node.selected .node-resizer,
.node:hover .node-resizer {
  opacity: 1;
}

.node-resizer:hover {
  opacity: 0.85;
  transform: scale(1.15);
}

.node.resizing {
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(91, 155, 213, 0.4);
}

/* 连接点样�?*/
.connection-point {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid white;
  border-radius: 50%;
  cursor: crosshair;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node:hover .connection-point {
  opacity: 1;
}

.connection-point:hover {
  opacity: 1;
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.5);
}

/* 连接点内容 */
.connection-point::before {
  content: '+';
  font-size: 8px;
  font-weight: bold;
  color: white;
  line-height: 1;
}

/* 电商节点左侧连接点隐藏 */
.node[data-type="ecommerce"] .connection-point[data-position="left"] {
  display: none;
}

/* 电商模块项样式 */
.ecommerce-module-item {
  margin-bottom: 5px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: visible;
}

.ecommerce-module-item:last-child {
  margin-bottom: 0;
}

.ecommerce-module-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(91, 155, 213, 0.3);
}

.ecommerce-module-item > * {
  flex: 1;
  min-width: 0;
}

/* 模块左侧接收锚点 */
.module-receiver-anchor {
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: #4caf50;
  border: 2px solid white;
  border-radius: 50%;
  cursor: crosshair;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.module-receiver-anchor::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 4px solid white;
  display: block;
}

.ecommerce-module-item:hover .module-receiver-anchor {
  opacity: 1;
}

.module-receiver-anchor:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.3);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5);
}

/* 电商模块内的接收锚点样式 */
.ecommerce-module-item .module-receiver-anchor {
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: #4caf50;
  border: 2px solid white;
  border-radius: 50%;
  cursor: crosshair;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.ecommerce-module-item:hover .module-receiver-anchor {
  opacity: 1;
}

.ecommerce-module-item .module-receiver-anchor:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.3);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5);
}

/* 拖动中的连接点 */
.dragging-connection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99; /* 临时连接线层级低于节�?*/
}

.dragging-connection path {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 5, 5;
  animation: dash 1s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -10;
  }
}

.node:hover {
  box-shadow: 0 6px 16px rgba(91, 155, 213, 0.3);
}

.node.dragging {
  opacity: 0.8;
  box-shadow: 0 8px 20px rgba(91, 155, 213, 0.4);
}

.node-header {
  padding: 8px 12px;
  background: rgba(30, 33, 40, 0.5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}

.node-actions {
  display: flex;
  gap: 4px;
}

.node-action {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.node-action:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

.node-content {
  padding: 8px 16px 16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.text-node .node-content {
  display: flex;
  padding: 0;
  overflow: hidden;
}

.node[data-type="text"] .node-content {
  display: flex;
  padding: 0;
  overflow: hidden;
}

.image-node .node-content,
.image-editor-node .node-content,
.video-node .node-content,
.node[data-type="image"] .node-content,
.node[data-type="text2image"] .node-content,
.node[data-type="image-editor"] .node-content,
.node[data-type="video"] .node-content {
  display: flex;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

.node-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(20, 20, 30, 0.6);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}

.toolbar-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.toolbar-btn:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

.toolbar-btn.active {
  background: rgba(91, 155, 213, 0.3);
  color: var(--accent);
}

.ai-generate-btn {
  color: #ff9800;
}

.ai-generate-btn:hover {
  background: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.ai-generate-btn.loading {
  pointer-events: none;
  opacity: 0.6;
}

.ai-generate-btn.loading i {
  animation: spin 1s linear infinite;
}

/* 美化滚动条 */
.node-input::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.node-input::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.node-input::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 213, 0.4);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.node-input::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 155, 213, 0.6);
}

.node-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.node-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.node-content::-webkit-scrollbar-thumb {
  background: rgba(91, 155, 213, 0.4);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.node-content::-webkit-scrollbar-thumb:hover {
  background: rgba(91, 155, 213, 0.6);
}

/* Firefox 滚动条美化 */
.node-input {
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 155, 213, 0.4) rgba(255, 255, 255, 0.05);
}

.node-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 155, 213, 0.4) rgba(255, 255, 255, 0.05);
}

.node-input {
  width: 100%;
  min-height: 0;
  max-height: none;
  height: 100%;
  flex: 1;
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  overflow-y: auto;
  outline: none;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.node-input:focus {
  outline: none;
  background: rgba(91, 155, 213, 0.1);
}

/* 图片节点提示词容器样�?*/
.image-prompt-container {
  width: 100%;
}

/* 图片上传按钮样式 */
.image-upload-btn {
  position: absolute;
  top: 46px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(91, 155, 213, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.image-upload-btn:hover {
  background: rgba(91, 155, 213, 0.4);
  color: var(--accent);
}

.image-upload-btn i {
  font-size: 14px;
}

/* 视频节点预览容器样式 */
.video-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.9);
  overflow: hidden;
  border: none;
  border-radius: 0;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  height: 100%;
}

.video-placeholder:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--accent);
}

.video-placeholder i {
  font-size: 32px;
  margin-bottom: 12px;
}

.video-placeholder span {
  font-size: 14px;
  text-align: center;
}

.video-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 视频加载动画 */
.video-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.9);
}

.video-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(91, 155, 213, 0.3);
  border-top-color: #5b9bd5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.video-loading-bar {
  width: 180px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.video-loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5b9bd5, #6aade0, #5b9bd5);
  background-size: 200% 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
  min-width: 0%;
}

.video-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

.video-loading-dots {
  display: inline-flex;
  margin-left: 4px;
}

.video-loading-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 2px;
  animation: dotPulse 1.5s ease-in-out infinite;
}

.video-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.video-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loadingBar {
  0% { width: 0%; background-position: 200% 0; }
  50% { background-position: -200% 0; }
  100% { width: 100%; background-position: 200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.8); opacity: 0.5; }
}

.video-loading-ripple-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
}

.video-loading-ripple {
  position: absolute;
  border: 3px solid rgba(91, 155, 213, 0.3);
  border-radius: 50%;
  animation: ripple 2s ease-out infinite;
}

.video-loading-ripple:nth-child(1) {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  animation-delay: 0s;
}

.video-loading-ripple:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  animation-delay: 0.67s;
}

.video-loading-ripple:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  animation-delay: 1.34s;
}

@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 1;
    border-color: rgba(91, 155, 213, 0.8);
  }
  100% {
    transform: scale(2);
    opacity: 0;
    border-color: rgba(91, 155, 213, 0.2);
  }
}

/* 视频播放器 */
.video-player {
  width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
}

/* 视频播放器容器 */
.video-player-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.9);
  padding: 8px;
  box-sizing: border-box;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: #000;
}

.video-info {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-top: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 视频参数面板样式 */
.video-params-panel {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  width: 680px;
  min-width: 680px;
  max-width: 680px;
  z-index: 1000;
  overflow: visible;
}

.video-mode-params.hidden {
  display: none;
}

.video-params-panel .modern-params-header {
  padding: 12px 16px;
  background: rgba(30, 33, 40, 0.8);
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-params-panel .modern-params-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-params-panel .mode-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(91, 155, 213, 0.2);
  color: #5b9bd5;
  font-weight: 500;
}

.video-mode-selector.mode-auto-selected {
  pointer-events: none;
}

.video-mode-option .mode-auto-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  font-weight: 500;
}

.video-params-panel .modern-params-content {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

.video-params-panel .modern-param-section {
  margin-bottom: 16px;
}

.video-params-panel .modern-param-section h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.video-params-panel .modern-param-field {
  margin-bottom: 10px;
}

.video-params-panel .modern-param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.video-params-panel .modern-param-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.video-params-panel .modern-param-item label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-params-panel .modern-panel-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.video-params-panel .modern-panel-close:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

/* 视频模式选择�?*/
.video-mode-selector {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  background: rgba(20, 20, 30, 0.5);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.video-mode-option {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.video-mode-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.video-mode-option:hover {
  background: rgba(91, 155, 213, 0.15);
  border-color: rgba(91, 155, 213, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(91, 155, 213, 0.2);
}

.video-mode-option.active {
  background: rgba(91, 155, 213, 0.25);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(91, 155, 213, 0.3);
}

.video-mode-option.active::before {
  transform: scaleX(1);
}

.video-mode-option i {
  font-size: 28px;
  color: var(--accent);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.video-mode-option.active i {
  color: #fff;
  text-shadow: 0 0 8px rgba(91, 155, 213, 0.5);
}

.mode-info {
  flex: 1;
}

.mode-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 15px;
  transition: color 0.3s ease;
}

.video-mode-option.active .mode-title {
  color: var(--accent);
}

.mode-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: color 0.3s ease;
}

.video-mode-option.active .mode-desc {
  color: rgba(91, 155, 213, 0.9);
}

/* 视频模式参数容器 */
.video-mode-params {
  transition: all 0.3s ease;
}

/* 图片上传区域 */
.image-upload-area {
  width: 100%;
  height: 180px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: rgba(20, 20, 30, 0.4);
  overflow: hidden;
}

.image-upload-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(91, 155, 213, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-upload-area:hover {
  border-color: var(--accent);
  background: rgba(91, 155, 213, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 155, 213, 0.2);
}

.image-upload-area:hover::before {
  opacity: 1;
}

.image-upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(91, 155, 213, 0.25);
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 12px 32px rgba(91, 155, 213, 0.3);
}

.image-upload-area.drag-over .upload-placeholder i {
  color: #fff;
  text-shadow: 0 0 12px rgba(91, 155, 213, 0.6);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.upload-placeholder {
  text-align: center;
  color: var(--text-secondary);
  z-index: 1;
  transition: all 0.3s ease;
}

.image-upload-area:hover .upload-placeholder {
  color: var(--accent);
}

.upload-placeholder i {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
  color: var(--accent);
  transition: all 0.3s ease;
}

.upload-placeholder div {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
}

.upload-hint {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.8;
  font-weight: 400;
}

.hidden-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.image-prompt-input {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.generate-button-container {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.generate-button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
}

.generate-button .points-cost {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
}

.modern-generate-btn .points-cost {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
}

/* 图片预览容器样式 */
.image-preview-container {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  border-radius: 0;
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
  padding: 0;
}

.image-placeholder i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.image-placeholder span {
  font-size: 14px;
  line-height: 1.4;
}

.image-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.image-content img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* 图片参数设置面板样式 */
.image-params-panel {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  width: 700px;
  min-width: 700px;
  max-width: 700px;
  z-index: 1000;
  overflow: hidden;
}

.image-prompt-area {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.prompt-actions {
  display: flex;
  gap: 6px;
}

.prompt-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
}

.prompt-action-btn:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

.prompt-action-btn.prompt-optimize-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
  color: #f59e0b;
}

.prompt-action-btn.prompt-optimize-btn.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  color: var(--text-secondary);
  background: rgba(20, 20, 30, 0.35);
  border-color: var(--border);
}

.prompt-action-btn.prompt-optimize-btn.disabled:hover {
  color: var(--text-secondary);
  background: rgba(20, 20, 30, 0.35);
  border-color: var(--border);
}

.upload-btn-wrapper,
.reference-btn-wrapper {
  position: relative;
}

.upload-btn,
.reference-btn {
  position: relative;
  overflow: hidden;
}

.upload-preview,
.reference-preview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.upload-btn.has-image .upload-preview,
.reference-btn.has-image .reference-preview {
  opacity: 1;
}

.upload-btn.has-image i,
.reference-btn.has-image i {
  opacity: 0;
}

.reference-images {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px dashed var(--border);
  border-radius: 8px;
  min-height: 60px;
}

.reference-image-item {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.remove-ref-btn {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: rgba(255, 77, 77, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.reference-image-item:hover .remove-ref-btn {
  opacity: 1;
}

.prompt-expand-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
}

.prompt-expand-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.image-prompt-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.image-prompt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.image-prompt-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.image-params-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  gap: 12px;
}

.params-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
}

.params-left::-webkit-scrollbar {
  display: none;
}

.param-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.param-tag:hover {
  background: rgba(91, 155, 213, 0.15);
  border-color: rgba(91, 155, 213, 0.3);
  color: var(--text-primary);
}

.param-tag i {
  font-size: 11px;
}

.style-tag {
  color: var(--accent);
}

.params-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upscale-display {
  padding: 6px 10px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

/* 已移除旧的详情面板，改用弹出面板 */

.param-tag.selectable {
  position: relative;
}

.param-tag.selectable:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
}

.param-tag.active {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.popup-panels {
  position: relative;
}

.popup-panel {
  background: rgba(20, 20, 30, 0.95);
  border-top: 1px solid var(--border);
  padding: 12px;
  display: none;
  z-index: 10;
}

.popup-panel.active {
  display: block;
}

.panel-title {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
  padding-left: 4px;
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-item {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.model-item:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: rgba(91, 155, 213, 0.3);
  color: var(--text-primary);
}

.model-item.active {
  background: rgba(91, 155, 213, 0.3);
  border-color: var(--accent);
  color: var(--accent);
}

.quality-grid {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.quality-item {
  flex: 1;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.quality-item:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: rgba(91, 155, 213, 0.3);
}

.quality-item.active {
  background: rgba(91, 155, 213, 0.3);
  border-color: var(--accent);
  color: var(--accent);
}

.aspect-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.aspect-item {
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.aspect-item:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: rgba(91, 155, 213, 0.3);
}

.aspect-item.active {
  background: rgba(91, 155, 213, 0.3);
  border-color: var(--accent);
  color: var(--accent);
}

.style-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.style-item {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.style-item:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: rgba(91, 155, 213, 0.3);
}

.style-item.active {
  background: rgba(91, 155, 213, 0.3);
  border-color: var(--accent);
  color: var(--accent);
}

.count-grid {
  display: flex;
  gap: 6px;
}

.count-item {
  flex: 1;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.count-item:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: rgba(91, 155, 213, 0.3);
}

.count-item.active {
  background: rgba(91, 155, 213, 0.3);
  border-color: var(--accent);
  color: var(--accent);
}

/* 文本参数设置面板 */
.text-params-panel {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 600px;
  max-width: 800px;
  z-index: 1000;
}

.text-prompt-area {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.text-prompt-input {
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.text-prompt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.text-prompt-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.text-params-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 16px;
}

.model-select-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.image-model-select-wrapper {
  flex: 1 1 auto;
  min-width: 50px;
  max-width: 120px;
}

.image-model-select-wrapper .model-arrow {
  left: 8px;
}

.image-model-select {
  width: 100%;
  padding: 4px 6px 4px 20px;
  background: rgba(20, 20, 30, 0.9);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  appearance: auto;
  -webkit-appearance: auto;
  flex-shrink: 0;
}

.image-model-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.image-model-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.image-model-select optgroup {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
}

.ecom-image-model-select {
  width: 100%;
  padding: 4px 6px 4px 18px;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-image-model-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.ecom-image-model-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.ecom-image-model-select optgroup {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
}

.ecom-text-model-select {
  width: 100%;
  padding: 4px 8px;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.ecom-text-model-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.ecom-text-model-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.ecom-text-model-select optgroup {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
}

.model-select-wrapper .model-arrow {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 12px;
  pointer-events: none;
}

.text-model-select {
  width: 100%;
  padding: 10px 12px 10px 32px;
  background: rgba(20, 20, 30, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.text-model-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.text-model-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.text-model-select optgroup {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
}

.params-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

.temperature-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.temp-value {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}

.temp-slider {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.temp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(91, 155, 213, 0.4);
}

.generate-group {
  display: flex;
  align-items: center;
  background: rgba(20, 20, 30, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding-right: 4px;
}

.points-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-right: 1px solid var(--border);
  color: #ffc107;
  font-size: 13px;
}

.points-display i {
  font-size: 14px;
}

.ai-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 10% 0%, rgba(91, 155, 213, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
}

.ai-settings-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ai-settings-title i {
  color: var(--accent);
}

.ai-settings-meta {
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

.ai-settings-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(20, 20, 30, 0.54);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-model-main {
  min-width: 0;
}

.ai-model-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-model-subline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  min-width: 0;
}

.ai-provider-pill,
.ai-model-id,
.ai-config-state,
.ai-capability-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.ai-provider-pill {
  padding: 4px 7px;
  color: #8ec5ff;
  background: rgba(91, 155, 213, 0.14);
  border: 1px solid rgba(91, 155, 213, 0.24);
}

.ai-model-id {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 7px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.ai-config-state {
  padding: 4px 7px;
}

.ai-config-state.is-ready {
  color: #8df0b4;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.22);
}

.ai-model-price {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 11px;
  color: #f0c040;
  font-weight: 500;
}

.ai-model-price i {
  font-size: 10px;
  color: #f0c040;
}

.ai-config-state.is-missing {
  color: #ffbd7a;
  background: rgba(255, 159, 67, 0.12);
  border: 1px solid rgba(255, 159, 67, 0.22);
}

.ai-config-state.is-pending {
  color: #d7c78f;
  background: rgba(230, 190, 90, 0.12);
  border: 1px solid rgba(230, 190, 90, 0.22);
}

.ai-capability-tags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-capability-tags span {
  padding: 4px 7px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-settings-note {
  flex-basis: 100%;
  color: var(--text-secondary);
  font-size: 11px;
}

.ai-input-strip {
  margin-top: 10px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-input-strip-label {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 6px;
}

.ai-input-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.ai-input-thumbs::-webkit-scrollbar {
  display: none;
}

.ai-input-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-input-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-input-thumb span {
  position: absolute;
  right: 0;
  top: 0;
  padding: 2px 5px;
  border-bottom-left-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 10px;
  font-weight: 700;
}

.quality-item.disabled,
.aspect-item.disabled,
.count-item.disabled {
  opacity: 0.34;
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.025);
  border-color: transparent;
}

.quality-item.disabled:hover,
.aspect-item.disabled:hover,
.count-item.disabled:hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: transparent;
}

/* AI 设置窗口统一布局修正：避免被旧面板样式或画布缩放挤压成裸文本 */
.ai-settings-panel {
  position: fixed !important;
  transform-origin: top left !important;
  font-size: 14px !important;
  line-height: 1.4;
  contain: layout style;
  will-change: transform, left, top;
}

.text-params-panel,
.image-params-panel,
.video-params-panel {
  box-sizing: border-box;
  color: var(--text-primary);
}

.text-params-panel {
  width: 540px !important;
  min-width: 540px !important;
  max-width: 540px !important;
  overflow: hidden;
}

.image-params-panel {
  width: 700px !important;
  min-width: 700px !important;
}

.video-params-panel {
  width: 680px !important;
  min-width: 680px !important;
  max-width: 680px !important;
}

.ecommerce-module-params-panel.ai-settings-panel {
  width: 680px !important;
  min-width: 680px !important;
  max-width: 680px !important;
  box-sizing: border-box;
  color: var(--text-primary);
}

.ai-settings-panel *,
.ai-settings-panel *::before,
.ai-settings-panel *::after {
  box-sizing: border-box;
}

.text-node .node-input {
  display: block;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.node[data-type="text"] .node-input {
  display: block;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.ai-settings-panel select,
.ai-settings-panel textarea,
.ai-settings-panel button,
.ai-settings-panel input {
  font-family: inherit;
}

.ai-settings-panel .ai-model-select {
  zoom: 1 !important;
}

.text-params-panel .ai-settings-header,
.image-params-panel .ai-settings-header,
.video-params-panel .ai-settings-header,
.ecommerce-module-params-panel .ai-settings-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  box-sizing: border-box;
  cursor: move;
}

.ai-settings-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  padding: 4px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
  cursor: grab;
}

.ai-settings-drag-handle:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
}

.ai-settings-drag-handle:active {
  cursor: grabbing;
}

.ecommerce-module-params-panel .ai-settings-title {
  flex: 1;
}

.text-params-panel .ai-settings-title,
.image-params-panel .ai-settings-title,
.video-params-panel .ai-settings-title,
.ecommerce-module-params-panel .ai-settings-title {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.text-params-panel .ai-settings-title span,
.image-params-panel .ai-settings-title span,
.video-params-panel .ai-settings-title span,
.ecommerce-module-params-panel .ai-settings-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-params-panel .ai-settings-meta,
.image-params-panel .ai-settings-meta,
.video-params-panel .ai-settings-meta,
.ecommerce-module-params-panel .ai-settings-meta {
  flex: 0 0 auto;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-params-panel .ai-settings-summary,
.image-params-panel .ai-settings-summary,
.video-params-panel .ai-settings-summary,
.ecommerce-module-params-panel .ai-settings-summary {
  display: grid !important;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr);
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}

.text-params-panel .ai-model-main,
.image-params-panel .ai-model-main,
.video-params-panel .ai-model-main,
.ecommerce-module-params-panel .ai-model-main {
  min-width: 0;
  overflow: hidden;
}

.text-params-panel .ai-model-subline,
.image-params-panel .ai-model-subline,
.video-params-panel .ai-model-subline,
.ecommerce-module-params-panel .ai-model-subline {
  display: flex !important;
  flex-wrap: wrap;
}

.text-params-panel .ai-capability-tags,
.image-params-panel .ai-capability-tags,
.video-params-panel .ai-capability-tags,
.ecommerce-module-params-panel .ai-capability-tags {
  display: flex !important;
  justify-content: flex-end;
  min-width: 0;
}

.text-params-panel .ai-input-strip,
.image-params-panel .ai-input-strip,
.video-params-panel .ai-input-strip {
  display: block !important;
  max-width: 100%;
}

.text-params-panel .ai-input-thumbs,
.image-params-panel .ai-input-thumbs,
.video-params-panel .ai-input-thumbs {
  display: flex !important;
  flex-wrap: nowrap;
  max-width: 100%;
}

.text-params-panel .ai-input-thumb,
.image-params-panel .ai-input-thumb,
.video-params-panel .ai-input-thumb {
  width: 56px !important;
  height: 56px !important;
  flex: 0 0 56px !important;
}

.text-params-panel .ai-input-thumb img,
.image-params-panel .ai-input-thumb img,
.video-params-panel .ai-input-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
}

.text-params-panel .text-prompt-input,
.image-params-panel .image-prompt-input,
.video-params-panel .image-prompt-input {
  box-sizing: border-box;
}

@media (max-width: 760px) {
  .text-params-panel,
  .image-params-panel,
  .video-params-panel,
  .webhook-params-panel {
    left: 10px !important;
    right: 10px;
    width: calc(100vw - 20px) !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .text-params-panel .ai-settings-summary,
  .image-params-panel .ai-settings-summary,
  .video-params-panel .ai-settings-summary,
  .webhook-params-panel .ai-settings-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .text-params-panel .ai-capability-tags,
  .image-params-panel .ai-capability-tags,
  .video-params-panel .ai-capability-tags,
  .webhook-params-panel .ai-capability-tags {
    justify-content: flex-start;
  }
}

.generate-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 6px;
}

.generate-btn:hover {
  background: var(--accent-hover);
}

.generate-btn:active {
  transform: scale(0.95);
}

/* AI 设置窗底部工具栏：给右侧生成按钮预留完整空间，避免缩放后被裁切 */
.ai-settings-panel .text-params-footer {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-width: 0;
}

.ai-settings-panel .text-params-footer .model-select-wrapper {
  min-width: 0;
  max-width: none;
}

.ai-settings-panel .text-params-footer .text-model-select {
  min-width: 0;
  height: 34px;
  padding: 8px 28px 8px 12px;
  text-overflow: ellipsis;
}

.ai-settings-panel .text-params-footer .params-controls {
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}

.ai-settings-panel .text-params-footer .control-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.ai-settings-panel .text-params-footer .temperature-display {
  gap: 6px;
  flex: 0 0 auto;
}

.ai-settings-panel .text-params-footer .temp-value {
  min-width: 24px;
  font-size: 12px;
}

.ai-settings-panel .text-params-footer .temp-slider {
  width: 50px;
}

.ai-settings-panel .params-right,
.ai-settings-panel .ecom-params-footer .params-right {
  flex: 0 0 auto;
  min-width: max-content;
}

.ai-settings-panel .points-display,
.ai-settings-panel .ecom-points-display {
  min-width: 50px;
  justify-content: center;
  flex: 0 0 auto;
}

.ai-settings-panel .generate-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin-left: 0;
}

.ai-settings-panel .image-params-footer,
.ai-settings-panel .ecom-params-footer {
  min-width: 0;
  overflow: hidden;
}

.ai-settings-panel .image-params-footer .params-left,
.ai-settings-panel .ecom-params-footer .params-left,
.ai-settings-panel .ecom-params-footer .ecom-ai-params {
  min-width: 0;
}

/* 图片快捷操作�?*/
.image-quick-actions {
  position: fixed;
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(91, 155, 213, 0.1);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}

.quick-action-btn:hover {
  background: rgba(91, 155, 213, 0.3);
  border-color: var(--accent);
}

.quick-action-btn i {
  font-size: 18px;
  margin-bottom: 4px;
}

.quick-action-btn span {
  font-size: 10px;
}

/* ========== 电商模块 AI 参数设置面板 ========== */
.ecommerce-module-params-panel {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  overflow: hidden;
  /* 移除所有动画和过渡效果，避免打开时有大小变化的动画 */
  animation: none !important;
  transition: none !important;
}

.ecommerce-module-params-panel .ecom-model-summaries {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 16, 24, 0.28);
}

.ecommerce-module-params-panel .ecom-model-summaries > div {
  min-width: 0;
}

.ecommerce-module-params-panel .ecom-params-content-area {
  overscroll-behavior: contain;
}

.ecommerce-module-params-panel .ecom-group-prompt-input,
.ecommerce-module-params-panel .ecom-preview-text {
  overscroll-behavior: contain;
}

.ecom-params-prompt-area {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.ecom-params-prompt-area .ecom-prompt-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ecom-params-prompt-input {
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.ecom-params-prompt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.ecom-params-prompt-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.ecom-params-footer {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 8px;
  flex-wrap: nowrap;
  position: relative;
}

.ecom-params-footer .ecom-ai-params {
  flex: 1;
  overflow-x: auto;
  min-width: 0;
}

.ecom-params-footer .params-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  min-width: 0;
}

.ecom-params-footer .params-left::-webkit-scrollbar {
  display: none;
}

.ecom-param-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(20, 20, 30, 0.7);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 1;
  min-width: 0;
}

.ecom-param-tag:hover {
  background: rgba(91, 155, 213, 0.15);
  border-color: rgba(91, 155, 213, 0.3);
  color: var(--text-primary);
}

.ecom-param-tag.active {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.ecom-param-tag i {
  font-size: 10px;
}

.ecom-param-tag input[type="range"] {
  width: 30px;
  min-width: 20px;
  height: 3px;
  margin: 0 4px;
  flex-shrink: 1;
}

.ecom-param-tag .ecom-temperature-value {
  min-width: 18px;
  text-align: right;
  font-size: 10px;
  flex-shrink: 0;
}

.ecom-params-footer .params-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.ecom-points-display {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  background: rgba(20, 20, 30, 0.8);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ecom-points-display i {
  color: #ffc107;
  font-size: 11px;
}

.ecom-generate-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 4px;
  flex-shrink: 0;
  flex-grow: 0;
}

.ecom-generate-btn:hover {
  background: var(--accent-hover);
}

.ecom-generate-btn:active {
  transform: scale(0.95);
}

.ecom-temperature-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(91, 155, 213, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.ecom-temperature-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
}

.ecom-temperature-value {
  font-size: 11px;
  color: var(--text-primary);
  width: 28px;
  text-align: center;
}

/* 图片放大模态框 */
.image-zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
}

.image-zoom-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-zoom-content img {
  max-width: 100%;
  max-height: calc(100vh - 100px);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-zoom-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.zoom-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.zoom-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.modern-params-panel {
  position: fixed;
  background: #2d2d3d;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modern-params-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(30, 33, 40, 0.8);
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}

.modern-params-header h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.modern-panel-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.modern-panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modern-params-content {
  padding: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.modern-param-section {
  margin-bottom: 12px;
}

.modern-param-section h4 {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.modern-param-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.modern-param-field {
  margin-bottom: 8px;
}

.modern-param-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  color: var(--text-secondary);
}

.modern-param-input {
  width: 100%;
  padding: 6px 8px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  resize: vertical;
  box-sizing: border-box;
  max-height: 60px;
}

.modern-param-input:focus {
  outline: none;
  border-color: var(--accent);
}

.modern-param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modern-param-item {
  margin-bottom: 8px;
}

.modern-param-item label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  color: var(--text-secondary);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modern-slider {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.slider-value {
  width: 40px;
  font-size: 10px;
  color: var(--text-secondary);
  text-align: right;
}

.editor-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.editor-mode-option {
  padding: 6px 4px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.editor-mode-option:hover {
  border-color: var(--accent);
}

.editor-mode-option.active {
  background: rgba(91, 155, 213, 0.1);
  border-color: var(--accent);
}

.editor-mode-option i {
  font-size: 12px;
  margin-bottom: 2px;
  color: var(--text-secondary);
}

.editor-mode-option.active i {
  color: var(--accent);
}

.mode-info {
  text-align: center;
}

.mode-title {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1px;
}

.mode-desc {
  font-size: 7px;
  color: var(--text-secondary);
}

.modern-param-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.modern-cancel-btn {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.modern-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modern-generate-btn {
  padding: 5px 12px;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modern-generate-btn:hover:not(:disabled) {
  background: #4a8ac4;
}

.modern-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.image-preview-wrapper {
  margin-top: 6px;
}

.editor-preview-image {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  border-radius: 4px;
}

.upload-placeholder {
  padding: 20px;
  text-align: center;
  background: #252525;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-placeholder:hover {
  background: #2a2a2a;
}

.upload-placeholder i {
  font-size: 20px;
  color: #666;
  margin-bottom: 6px;
}

.upload-placeholder div {
  color: #888;
  font-size: 11px;
}

.modern-param-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid var(--border);
}

.modern-param-button:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

.modern-param-button.active {
  background: rgba(91, 155, 213, 0.3);
  color: var(--accent);
  border-color: var(--accent);
}

.modern-param-input {
  width: 100%;
  min-height: 60px;
  padding: 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  outline: none;
  margin-bottom: 16px;
}

.modern-param-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.modern-param-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modern-param-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-param-select {
  min-width: 120px;
  padding: 6px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.modern-param-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.modern-param-number {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}

.modern-param-number input {
  width: 50px;
  padding: 6px 8px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
  outline: none;
}

.modern-param-number .number-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  font-size: 12px;
}

.modern-param-number .number-btn:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

.modern-param-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* 滑块控件样式 */
.slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.modern-slider {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  min-width: 120px;
}

.modern-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(91, 155, 213, 0.4);
  transition: all 0.2s ease;
}

.modern-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(91, 155, 213, 0.6);
}

.modern-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(91, 155, 213, 0.4);
}

.slider-value {
  min-width: 40px;
  text-align: right;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0 4px;
}

/* 数字输入控件样式 */
.number-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-param-number {
  flex: 1;
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  text-align: center;
  min-width: 60px;
}

.modern-param-number:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.unit {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 20px;
}

.number-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.number-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  font-size: 12px;
  transition: all 0.2s ease;
}

.number-btn:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

.modern-param-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.modern-generate-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-generate-btn:hover {
  background: var(--accent-hover);
}

.modern-cancel-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-cancel-btn:hover {
  background: rgba(91, 155, 213, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* 现代化文本生成面�?*/
.modern-text-generation-panel {
  position: fixed;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 700px;
  max-width: 800px;
}

.modern-text-generation-panel .modern-params-header {
  padding: 16px 20px;
  background: rgba(30, 33, 40, 0.8);
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-text-generation-panel .modern-params-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modern-text-generation-panel .modern-params-content {
  padding: 20px;
}

.modern-text-generation-panel .modern-param-section {
  margin-bottom: 20px;
}

.modern-text-generation-panel .modern-param-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.modern-text-generation-panel .modern-param-field {
  margin-bottom: 16px;
}

.modern-text-generation-panel .modern-param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modern-text-generation-panel .modern-param-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modern-text-generation-panel .modern-param-item label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.modern-text-generation-panel .modern-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.modern-text-generation-panel .modern-panel-close:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

.modern-param-textarea {
  min-width: 200px;
  min-height: 60px;
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.modern-param-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.params-panel-header {
  padding: 12px 16px;
  background: rgba(30, 33, 40, 0.8);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.params-panel-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.params-panel-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.params-panel-close:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

.params-panel-content {
  padding: 16px;
}

.params-panel-content .form-row {
  margin-bottom: 12px;
}

.params-panel-content .form-group {
  margin-bottom: 12px;
}

.params-panel-content .form-label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
}

.params-panel-content .form-control {
  padding: 6px 10px;
  font-size: 13px;
}

.params-panel-content .image-prompt-input {
  min-height: 60px;
}

.params-panel-content .generate-button {
  padding: 8px 16px;
  font-size: 13px;
}

/* 连接线层 */
.connection-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10; /* 降低层级确保在节点下�?*/
}

.connection-line {
  fill: none;
  opacity: 1;
  cursor: pointer;
  pointer-events: auto; /* SVG容器接收连接线命中事件 */
  /* 保持较低z-index确保在节点下�?*/
  z-index: 10;
}

/* 连接线路径基础样式 */
.connection-path {
  stroke: #64748b;
  stroke-width: 2;
  fill: none;
  opacity: 0.45;
  transition: opacity 0.16s ease, stroke 0.16s ease, stroke-width 0.16s ease;
  pointer-events: none; /* 路径本身不接收事�?*/
}

.connection-hover-glow {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.connection-hit-area {
  stroke: transparent;
  stroke-width: 20;
  fill: none;
  pointer-events: stroke; /* 只有描边区域接收事件 */
  cursor: pointer;
}

.connection-line:hover {
  cursor: pointer;
}

/* 确保SVG路径也能响应悬停 */
.connection-line:hover .connection-path,
.connection-line.hover .connection-path {
  stroke-width: 3;
  opacity: 1;
  stroke: #3b82f6;
}

.connection-line:hover .connection-hover-glow,
.connection-line.hover .connection-hover-glow {
  opacity: 0.22;
}

.connection-delete-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.connection-line:hover .connection-delete-button,
.connection-line.hover .connection-delete-button {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.connection-delete-button circle {
  fill: #18181b;
  stroke: #52525b;
  stroke-width: 1;
}

.connection-delete-button line {
  stroke: #ef4444;
  stroke-width: 2;
}

.connection-line.selected {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.45));
}

/* 金色粒子动画 */
.current-animation {
  stroke: #FFD700;
  stroke-width: 3;
  animation: current-flow 1s linear infinite;
}

@keyframes current-flow {
  0% {
    stroke-dasharray: 14, 20, 14, 20, 14, 20, 14, 1000;
    stroke-dashoffset: 0;
    stroke: #FFD700;
    opacity: 0.7;
  }
  50% {
    stroke-dasharray: 14, 20, 14, 20, 14, 20, 14, 1000;
    stroke-dashoffset: -500;
    stroke: #FFA500;
    opacity: 1;
  }
  100% {
    stroke-dasharray: 14, 20, 14, 20, 14, 20, 14, 1000;
    stroke-dashoffset: -1000;
    stroke: #FFD700;
    opacity: 0.7;
  }
}

/* Connection stream animation while upstream content is being generated */
g.connection-flow-active .connection-path {
  filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.45));
}

.current-animation {
  stroke: #22d3ee;
  stroke-width: 3;
  stroke-dasharray: 18 24;
  stroke-dashoffset: 0;
  opacity: 0.95;
  animation: current-flow 0.9s linear infinite, current-pulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.9)) drop-shadow(0 0 12px rgba(245, 158, 11, 0.5));
  pointer-events: none;
}

.connection-current-glow {
  stroke-width: 4;
  stroke-linecap: round;
  mix-blend-mode: screen;
}

@keyframes current-flow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -84;
  }
}

@keyframes current-pulse {
  0%, 100% {
    stroke: #22d3ee;
    opacity: 0.75;
  }
  50% {
    stroke: #fbbf24;
    opacity: 1;
  }
}

.connection-control-point {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  cursor: grab;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.5);
}

/* 缩放指示�?*/
.zoom-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(20, 20, 30, 0.8);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  backdrop-filter: blur(4px);
}

/* 右键菜单 */
.context-menu {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: 200px;
  z-index: 1000;
  display: none;
}

.context-menu-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  transition: all 0.2s;
}

.context-menu-item:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--accent);
}

/* 节点类型菜单样式 */
.node-type-menu {
  min-width: 240px;
}

.menu-header {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.menu-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.menu-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.node-type-menu .context-menu-item {
  padding: 12px 16px;
  gap: 12px;
}

.node-type-menu .context-menu-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.context-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* 现代化文本创建面�?*/
.modern-text-create-panel {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  min-width: 320px;
  max-width: 400px;
  padding: 20px;
  z-index: 1000;
  display: none;
}

.modern-text-panel-header {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modern-text-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modern-text-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.modern-text-option:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--accent);
}

.modern-text-option i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.modern-text-option:hover i {
  color: var(--accent);
}

.modern-text-option-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.modern-text-option-title {
  font-weight: 600;
  color: var(--text-primary);
}

.modern-text-option-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 添加节点对话�?*/
.add-node-dialog {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  min-width: 240px;
  padding: 16px;
  z-index: 1000;
  display: none;
}

.add-node-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.add-node-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-node-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.add-node-option:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--accent);
}

.add-node-option i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.add-node-option:hover i {
  color: var(--accent);
}

.add-node-option-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

/* 添加节点菜单 */
.add-node-menu {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  min-width: 240px;
  padding: 16px;
  z-index: 1000;
  display: none;
}

.add-node-menu-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.add-node-menu-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-node-menu-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.add-node-menu-option:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--accent);
}

.add-node-menu-option i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.add-node-menu-option:hover i {
  color: var(--accent);
}

.add-node-menu-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

/* 工作流菜�?*/
.workflow-menu {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  min-width: 240px;
  padding: 16px;
  z-index: 1000;
  display: none;
}

.workflow-menu-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.workflow-menu-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workflow-menu-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.workflow-menu-option:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--accent);
}

.workflow-menu-option i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.workflow-menu-option:hover i {
  color: var(--accent);
}

.workflow-menu-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

/* 状态栏 */
.status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--text-secondary);
  font-size: 12px;
  z-index: 100;
}

.status-bar-item {
  margin-right: 24px;
}

.status-bar-item:last-child {
  margin-right: 0;
}

/* 生成参数面板 */
.generate-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  min-width: 400px;
  max-width: 600px;
  z-index: 1000;
  display: none;
}

.generate-panel-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.generate-panel-title {
  font-weight: 600;
  font-size: 16px;
}

.generate-panel-close {
  cursor: pointer;
  color: var(--text-secondary);
}

.generate-panel-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(91, 155, 213, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* 加载状�?*/
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  display: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(91, 155, 213, 0.3);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 响应�?*/
@media (max-width: 768px) {
  .toolbar {
    width: 50px;
  }
  
  .node {
    min-width: 160px;
    min-height: 100px;
  }
  
  .generate-panel {
    min-width: 90%;
    max-width: 90%;
  }
}

/* 文本生成节点样式 */
.text-generation-node {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.text-gen-preview-container {
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.text-gen-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
}

.text-gen-placeholder i {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.7;
  color: var(--accent);
}

.text-gen-placeholder span {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

.text-gen-content {
  width: 100%;
  padding: 12px;
}

.generated-text-display {
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  min-height: 60px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.text-gen-params {
  padding: 0 16px 16px;
}

.param-section {
  margin-bottom: 16px;
}

.param-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.param-select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.param-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.param-textarea {
  width: 100%;
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  outline: none;
  font-family: inherit;
  min-height: 60px;
}

.param-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.param-input-container {
  position: relative;
}

.param-input-container .modern-param-input {
  min-height: 80px;
  padding: 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}

.param-input-container .modern-param-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.param-input-container .modern-param-input:empty:before {
  content: attr(placeholder);
  color: var(--text-secondary);
  opacity: 0.7;
}

.text-gen-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(30, 33, 40, 0.5);
  border-radius: 0 0 8px 8px;
}

.text-gen-actions .btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.text-gen-actions .btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.text-gen-actions .btn-outline:hover {
  background: rgba(91, 155, 213, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.text-gen-actions .btn-primary {
  background: var(--accent);
  border: none;
  color: white;
}

.text-gen-actions .btn-primary:hover {
  background: var(--accent-hover);
}

.text-gen-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 平移功能相关样式 */

/* 平移提示 */
.pan-hint {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(91, 155, 213, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(91, 155, 213, 0.3);
}

.pan-hint.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(10px);
}

/* 画布鼠标指针样式 */
#workflow-canvas {
  cursor: default;
}

#workflow-canvas.grab {
  cursor: grab;
}

#workflow-canvas.grabbing {
  cursor: grabbing;
}

/* 无限画布网格背景 */
.workflow-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

/* Webhook节点样式 */
.webhook-node {
  background: linear-gradient(135deg, #5b9bd5 0%, #4a8bc8 100%);
  border: 2px solid #4a8bc8;
}

.webhook-node .node-header {
  background: rgba(0, 0, 0, 0.2);
}

.webhook-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.webhook-placeholder:hover {
  background: rgba(255, 255, 255, 0.1);
}

.webhook-placeholder i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #fff;
}

.webhook-placeholder span {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.webhook-info {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* Webhook参数面板 */
.webhook-params-panel {
  position: fixed !important;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  width: 540px;
  min-width: 540px;
  max-width: 540px;
  overflow: hidden;
  box-sizing: border-box;
  color: var(--text-primary);
}

.webhook-params-panel .params-panel-header {
  padding: 12px 16px;
  background: rgba(30, 33, 40, 0.8);
  border-bottom: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
}

.webhook-params-panel .params-panel-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.webhook-params-panel .params-panel-content {
  padding: 12px;
  max-height: calc(80vh - 64px);
  overflow-y: auto;
}

.webhook-params-panel .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.webhook-params-panel .form-row .form-group {
  flex: 1;
}

.webhook-params-panel .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

.webhook-params-panel .form-control {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.webhook-params-panel .form-control:focus {
  outline: none;
  border-color: var(--accent);
}

.webhook-params-panel textarea.form-control {
  min-height: 80px;
  resize: vertical;
  font-family: monospace;
}

/* Webhook配置面板 */
.webhook-panel {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  min-width: 320px;
  z-index: 1000;
}

.webhook-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(91, 155, 213, 0.15);
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}

.webhook-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.webhook-panel-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.webhook-panel-close:hover {
  background: rgba(255, 87, 87, 0.2);
  color: #ff5757;
}

.webhook-panel-content {
  padding: 16px;
}

.webhook-panel-content .form-group {
  margin-bottom: 16px;
}

.webhook-panel-content .form-label {
}

/* Tab组件样式 */
.tab-container {
  width: 100%;
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--accent);
  background: rgba(91, 155, 213, 0.05);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(91, 155, 213, 0.1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 变量管理区域 */
.vars-container {
  width: 100%;
}

.vars-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.var-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.var-input {
  flex: 1;
  padding: 6px 10px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.var-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.var-delete-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.var-delete-btn:hover {
  background: rgba(255, 87, 87, 0.2);
  color: #ff5757;
}

.var-add-btn {
  width: 100%;
  padding: 8px 16px;
  background: rgba(91, 155, 213, 0.1);
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.var-add-btn:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
}

.var-add-btn i {
  margin-right: 6px;
}

/* 输出变量映射区域 */
.output-vars-container {
  width: 100%;
}

.output-var-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.output-var-input {
  flex: 1;
  padding: 6px 10px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.output-var-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

/* JSON编辑器样式 */
.json-editor {
  width: 100%;
  min-height: 120px;
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  resize: vertical;
  outline: none;
  line-height: 1.5;
}

.json-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

/* 可获取变量区域 */
.available-vars-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.available-vars-section h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.available-vars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.available-var-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(91, 155, 213, 0.1);
  border: 1px solid rgba(91, 155, 213, 0.3);
  border-radius: 16px;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.available-var-tag:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
}

.available-var-tag i {
  font-size: 11px;
}

/* 电商模块可拖动图片样式 */
.draggable-preview-image {
  cursor: move;
  user-select: none;
  transition: box-shadow 0.2s ease;
}

.draggable-preview-image:hover {
  box-shadow: 0 0 10px rgba(91, 155, 213, 0.5);
}

.draggable-preview-image:active {
  cursor: grabbing;
  box-shadow: 0 0 15px rgba(91, 155, 213, 0.7);
}

.ecom-preview-image {
  overflow: hidden;
  border-radius: inherit;
  position: relative;
}

.ecom-preview-image .drag-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  color: white;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.ecom-preview-image:hover .drag-hint {
  opacity: 1;
}
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.webhook-panel-content .form-control {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color 0.2s;
}

.webhook-panel-content .form-control:focus {
  outline: none;
  border-color: var(--accent);
}

.webhook-panel-content textarea.form-control {
  min-height: 80px;
  resize: vertical;
  font-family: monospace;
}

.webhook-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #4a8bc8;
  transform: translateY(-1px);
}

/* 响应式网格密�?*/
@media (max-width: 768px) {
  .workflow-grid {
    background-size: 15px 15px;
  }
}

/* 顶部导航栏样�?*/
.top-navigation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.nav-brand .project-name {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.nav-brand .project-name-input {
  font-size: 14px;
  color: var(--text-primary);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent);
  border-radius: 6px;
  outline: none;
  min-width: 200px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-item {
  position: relative;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(91, 155, 213, 0.1);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.workflow-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: 200px;
  margin-top: -5px;
  z-index: 1002;
  display: none;
}

.workflow-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 4px;
}

.dropdown-item:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
}

.dropdown-section {
  padding: 8px 0;
}

.dropdown-section-title {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recent-workflows-list {
  max-height: 200px;
  overflow-y: auto;
}

.recent-workflow-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 4px;
  font-size: 13px;
}

.recent-workflow-item:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

.recent-workflow-item .workflow-info {
  flex: 1;
}

.recent-workflow-item .workflow-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.recent-workflow-item .workflow-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* 导航栏下拉菜单 */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-dropdown .dropdown-toggle:hover {
  background: rgba(91, 155, 213, 0.1);
}

.nav-dropdown .dropdown-toggle i {
  font-size: 12px;
  transition: transform 0.2s;
}

.nav-dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}

.nav-dropdown .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: auto !important;
  min-width: 140px !important;
  width: 140px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  display: none !important;
  z-index: 1000 !important;
  overflow: hidden !important;
}

.nav-dropdown:hover .dropdown-menu {
  display: block !important;
}

.nav-dropdown .dropdown-menu a {
  display: block;
  width: 100%;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s;
  font-size: 14px;
  box-sizing: border-box;
  white-space: nowrap;
}

.nav-dropdown .dropdown-menu a:hover {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
}

.nav-status {
  display: flex;
  align-items: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.status-indicator i {
  font-size: 8px;
  color: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

#save-status {
  font-weight: 500;
}

/* App Toast */
.app-toast {
  position: fixed;
  top: 70px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  animation: toastSlideIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.app-toast.toast-success { background: var(--success); color: white; }
.app-toast.toast-error { background: var(--error); color: white; }
.app-toast.toast-warning { background: var(--warning); color: white; }

@keyframes toastSlideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 响应式设�?*/
@media (max-width: 768px) {
  .nav-container {
    padding: 0 16px;
  }
  
  .nav-brand h1 {
    font-size: 16px;
  }
  
  .nav-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ========== 视频生成进度动画 ========== */
.video-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 30, 0.92);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 水平进度条 */
.video-progress-bar-wrap {
  width: 75%;
  max-width: 200px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}

.video-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5b9bd5, #2d8efd, #5b9bd5);
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
  animation: progressBarShimmer 2s linear infinite;
}

@keyframes progressBarShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 垂直填充效果 - 从下到上 */
.video-progress-vertical-wrap {
  width: 80px;
  height: 80px;
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.video-progress-vertical-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, #2d8efd, #5b9bd5, #7ec8f8);
  border-radius: 0 0 7px 7px;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-progress-vertical-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  animation: fillTopGlow 1.5s ease-in-out infinite;
}

@keyframes fillTopGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* 进度信息文字 */
.video-progress-info {
  text-align: center;
}

.video-progress-percent {
  font-size: 22px;
  font-weight: 700;
  color: #5b9bd5;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.video-progress-status {
  font-size: 12px;
  color: #a0a8b0;
  margin-bottom: 2px;
}

.video-progress-message {
  font-size: 11px;
  color: rgba(160, 168, 176, 0.7);
  font-style: italic;
}

/* 进度容器布局：水平条在上，垂直填充在下 */
.video-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 10px 0;
}

/* 图片生成进度效果 */
.image-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.95) 0%, rgba(25, 25, 40, 0.95) 100%);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(8px);
}

/* 背景网格效果 */
.image-progress-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(91, 155, 213, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 155, 213, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* 光晕效果 */
.image-progress-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(91, 155, 213, 0.15) 0%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* 水位动画容器 */
.image-water-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

/* 水位上升效果 */
.image-water-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(
    180deg, 
    rgba(64, 156, 255, 0.25) 0%, 
    rgba(64, 156, 255, 0.4) 30%,
    rgba(45, 142, 253, 0.5) 60%,
    rgba(30, 120, 240, 0.7) 100%
  );
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 水位渐变遮罩 */
.image-water-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, rgba(15, 15, 25, 0.8) 0%, transparent 100%);
  pointer-events: none;
}

/* 水波纹效果 - 主波 */
.image-water-wave {
  position: absolute;
  top: -25px;
  left: -50%;
  width: 200%;
  height: 50px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M0,30L48,34.7C96,39,192,48,288,42.7C384,37,480,18,576,13.3C672,8,768,16,864,29.3C960,43,1056,61,1152,53.3C1248,45,1344,21,1392,10.7L1440,0L1440,60L1392,60C1344,60,1248,60,1152,60C1056,60,960,60,864,60C768,60,672,60,576,60C480,60,384,60,288,60C192,60,96,60,48,60L0,60Z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: repeat-x;
  animation: waveMove 2.5s linear infinite;
}

/* 水波纹效果 - 次波 */
.image-water-wave-secondary {
  position: absolute;
  top: -15px;
  left: -30%;
  width: 150%;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40'%3E%3Cpath fill='rgba(255,255,255,0.2)' d='M0,20L60,24C120,28,240,36,360,32C480,28,600,16,720,12C840,8,960,16,1080,24C1200,32,1320,40,1380,44L1440,48L1440,40L1380,40C1320,40,1200,40,1080,40C960,40,840,40,720,40C600,40,480,40,360,40C240,40,120,40,60,40L0,40Z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: repeat-x;
  animation: waveMove 3s linear infinite 0.5s;
}

@keyframes waveMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(33.33%);
  }
}

/* 进度指示器容器 */
.image-progress-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* 加载图标 */
.image-progress-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  position: relative;
}

.image-progress-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(91, 155, 213, 0.3);
  border-radius: 50%;
}

.image-progress-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border: 2px solid transparent;
  border-top-color: #5b9bd5;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 图片进度条 */
.image-progress-bar-wrap {
  width: 75%;
  max-width: 220px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 0 10px rgba(91, 155, 213, 0.1);
}

.image-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #409cff, #2d8efd, #409cff);
  background-size: 200% 100%;
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: progressBarShimmer 2s linear infinite;
  box-shadow: 0 0 8px rgba(91, 155, 213, 0.5);
}

/* 图片进度信息文字 */
.image-progress-info {
  text-align: center;
}

.image-progress-percent {
  font-size: 22px;
  font-weight: 700;
  color: #5b9bd5;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.image-progress-status {
  font-size: 12px;
  color: #a0a8b0;
  margin-bottom: 2px;
}

.image-progress-message {
  font-size: 11px;
  color: rgba(160, 168, 176, 0.7);
  font-style: italic;
}

/* 图片进度容器布局 */
.image-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 10px 0;
}

/* ========== End 视频生成进度动画 ========== */

/* 视频模式切换按钮样式 */
.video-mode-toggle {
  display: flex;
  gap: 4px;
}

.video-mode-toggle .mode-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.video-mode-toggle .mode-btn:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--text-primary);
}

.video-mode-toggle .mode-btn.active {
  background: rgba(91, 155, 213, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}

/* 视频参数面板popup-panels样式 */
.video-params-panel .popup-panels {
  position: relative;
}

.video-params-panel .popup-panel {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
}

.video-params-panel .popup-panel.active {
  display: block;
}

.video-params-panel .popup-panel .panel-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.video-params-panel .popup-panel .quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.video-params-panel .popup-panel .quality-item {
  padding: 6px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.video-params-panel .popup-panel .quality-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.video-params-panel .popup-panel .quality-item.active {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

/* 视频参数面板的image-prompt-area样式 */
.video-params-panel .image-prompt-area {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.video-params-panel .image-prompt-input {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  outline: none;
  line-height: 1.5;
  box-sizing: border-box;
}

.video-params-panel .image-prompt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

/* 视频参数面板的image-params-footer样式 */
.video-params-panel .image-params-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  gap: 12px;
  position: relative;
}

.video-params-panel .params-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
}

.video-params-panel .params-left::-webkit-scrollbar {
  display: none;
}

.video-params-panel .param-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.video-params-panel .param-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.video-params-panel .params-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========== 电商模板模态框 ========== */
.ecommerce-modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 1000px;
  max-width: calc(100vw - 48px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: ecommerceModalIn 0.3s ease;
}

@keyframes ecommerceModalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ecommerce-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  background: var(--bg-secondary);
}

.ecommerce-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ecommerce-tab:hover {
  color: var(--text-primary);
}

.ecommerce-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.ecommerce-template-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  scrollbar-gutter: stable;
}

.ecommerce-template-list[data-columns="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ecommerce-template-list[data-columns="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ecommerce-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.ecommerce-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.ecommerce-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 23, 30, 0) 0%, rgba(20, 23, 30, 0.92) 28%);
}

.ecommerce-create-template-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(91, 155, 213, 0.35);
  background: linear-gradient(135deg, rgba(91, 155, 213, 0.18), rgba(45, 142, 253, 0.28));
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(45, 142, 253, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ecommerce-create-template-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 155, 213, 0.6);
  box-shadow: 0 14px 30px rgba(45, 142, 253, 0.22);
  color: var(--text-primary);
}

.ecommerce-create-template-btn:active {
  transform: translateY(0);
}

.ecommerce-template-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ecommerce-template-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(91, 155, 213, 0.2);
}

.ecommerce-template-card .template-preview-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.ecommerce-template-card .template-preview-shell,
.ecommerce-template-card .template-preview-empty {
  width: 100%;
  height: 150px;
}

.ecommerce-template-list[data-columns="4"] .ecommerce-template-card .template-preview-img {
  height: 138px;
}

.ecommerce-template-list[data-columns="4"] .ecommerce-template-card .template-preview-shell,
.ecommerce-template-list[data-columns="4"] .ecommerce-template-card .template-preview-empty {
  height: 138px;
}

.ecommerce-template-list[data-columns="5"] .ecommerce-template-card .template-preview-img {
  height: 124px;
}

.ecommerce-template-list[data-columns="5"] .ecommerce-template-card .template-preview-shell,
.ecommerce-template-list[data-columns="5"] .ecommerce-template-card .template-preview-empty {
  height: 124px;
}

.ecommerce-template-card .template-card-info {
  padding: 12px;
}

.ecommerce-template-list[data-columns="5"] .ecommerce-template-card .template-card-info {
  padding: 10px;
}

.ecommerce-template-card .template-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecommerce-template-list[data-columns="5"] .ecommerce-template-card .template-card-name {
  font-size: 13px;
}

.ecommerce-template-card .template-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ecommerce-template-list[data-columns="5"] .ecommerce-template-card .template-card-meta {
  font-size: 11px;
  gap: 6px;
}

.ecommerce-template-card .template-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.ecommerce-template-card .template-card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.ecommerce-template-card .badge-normal {
  background: rgba(91, 155, 213, 0.15);
  color: var(--accent);
}

.ecommerce-template-card .badge-advanced {
  background: rgba(255, 152, 0, 0.15);
  color: var(--warning);
}

/* ========== 电商节点样式 ========== */
.node.ecommerce-node {
  min-width: 300px;
  max-width: none;
}

.ecommerce-node .node-content {
  padding: 0 !important;
}

.ecommerce-module-container {
  height: 100%;
  max-height: none;
  overflow-y: auto;
  padding: 8px 8px 8px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}

.ecommerce-module-container .added-module {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  position: relative;
}

.ecommerce-module-container .added-module h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.ecommerce-module-container .added-module img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.ecommerce-module-item .added-module {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  width: 100%;
}

.ecommerce-browse-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(91, 155, 213, 0.15);
  border: 1px solid rgba(91, 155, 213, 0.3);
  border-radius: 6px;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ecommerce-browse-btn:hover {
  background: rgba(91, 155, 213, 0.25);
}

.ecommerce-browse-btn i {
  font-size: 11px;
}

/* ========== 图片浏览模态框 ========== */
.ecommerce-image-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: ecommerceModalIn 0.3s ease;
}

.ecommerce-image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.image-counter {
  font-size: 13px;
  color: var(--text-secondary);
}

.ecommerce-image-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  min-height: 300px;
  background: var(--bg-primary);
}

.ecommerce-image-body img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 6px;
}

.image-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}

.image-nav-btn:hover {
  background: rgba(91, 155, 213, 0.3);
  border-color: var(--accent);
}

.image-nav-btn.prev { left: 12px; }
.image-nav-btn.next { right: 12px; }

.ecommerce-image-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.image-title {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========== 电商模块参数面板 - TAB结构 ========== */
.ecom-params-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.ecom-group-tabs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ecom-group-tabs::-webkit-scrollbar {
  height: 4px;
}

.ecom-group-tabs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.ecom-group-tab {
  padding: 6px 14px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ecom-group-tab:hover {
  background: rgba(91, 155, 213, 0.15);
  border-color: rgba(91, 155, 213, 0.3);
  color: var(--text-primary);
}

.ecom-group-tab.active {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.ecom-params-content-area {
  max-height: 240px;
  overflow-y: auto;
  padding: 12px;
}

.ecom-group-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ecom-content-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.ecom-content-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ecom-content-tab:hover {
  background: rgba(91, 155, 213, 0.1);
  color: var(--text-primary);
}

.ecom-content-tab.active {
  background: rgba(91, 155, 213, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.ecom-content-tab i {
  font-size: 13px;
}

.ecom-content-area {
  min-height: 120px;
}

.ecom-image-content,
.ecom-text-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ecom-preview-image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ecom-preview-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.ecom-preview-image img.img-landscape {
  width: 100%;
  height: auto;
}

.ecom-preview-image img.img-portrait {
  width: auto;
  height: 100%;
  max-width: 100%;
}

.ecom-preview-title,
.ecom-preview-text {
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.ecom-preview-title {
  font-weight: 600;
  color: var(--text-primary);
}

.ecom-preview-text {
  max-height: 60px;
  overflow-y: auto;
}

.ecom-group-prompt-input {
  width: 100%;
  min-height: 80px;
  padding: 10px 14px;
  background: rgba(20, 20, 30, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.ecom-group-prompt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.ecom-group-prompt-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

/* ========== 电商模块 AI 参数切换 ========== */
.ecom-ai-params {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.ecom-ai-params::-webkit-scrollbar {
  display: none;
}

.ecom-image-ratio-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 11px;
  padding: 4px 20px 4px 6px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  min-width: 50px;
  max-width: 80px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecom-image-ratio-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.ecom-image-ratio-select:hover {
  border-color: var(--accent);
}

.ecom-image-ratio-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.3);
}

.ecom-image-ratio-select option {
  background: #16162a;
  color: #e0e0e0;
  padding: 6px 12px;
  font-size: 12px;
}

.ecom-image-ratio-select option:checked {
  background: rgba(91, 155, 213, 0.3);
  color: #ffffff;
}

.ecom-image-ratio-select-wrapper {
  position: relative;
  display: inline-block;
}

.ecom-image-ratio-select-wrapper::after {
  content: '\f078';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
  font-size: 8px;
}

.ecom-ai-params select {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 0 4px;
  cursor: pointer;
  outline: none;
}

.ecom-ai-params select option {
  background: var(--bg-dropdown);
  color: var(--text-primary);
}

/* ========== AI生成中提示样式 ========== */
.ecom-generating-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 16px;
  background: rgba(91, 155, 213, 0.1);
  border: 1px solid rgba(91, 155, 213, 0.3);
  border-radius: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  animation: generatingPulse 2s ease-in-out infinite;
}

.ecom-generating-hint i {
  font-size: 18px;
  color: var(--accent);
}

@keyframes generatingPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(91, 155, 213, 0.4);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(91, 155, 213, 0);
  }
}

/* 应用按钮样式 */
.ecom-apply-btn {
  width: 28px;
  height: 28px;
  background: var(--success);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: 4px;
}

.ecom-apply-btn:hover {
  background: #28a745;
  transform: scale(1.05);
}

.ecom-apply-btn i {
  font-size: 14px;
}

.ecom-apply-btn:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
}

/* ========== 小地图样式 ========== */
.minimap-container {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 220px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

.minimap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  cursor: move;
  user-select: none;
}

.minimap-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.minimap-close {
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color 0.2s;
}

.minimap-close:hover {
  color: var(--text-primary);
}

.minimap-content {
  position: relative;
  padding: 10px;
}

#minimap-canvas {
  width: 200px;
  height: 150px;
  border-radius: 4px;
  cursor: crosshair;
}

.minimap-viewport {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #5b9dd9;
  border-radius: 3px;
  background: rgba(91, 157, 217, 0.3);
  pointer-events: auto;
  cursor: grab;
  box-shadow: 0 0 10px rgba(91, 157, 217, 0.5);
}

.minimap-viewport:active {
  cursor: grabbing;
}
