/* AI生图弹窗样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: transparent; } /* 遮罩层 */ .ai-generate-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 10000; backdrop-filter: blur(4px); } /* 弹窗主体 */ .ai-generate-modal { background: white; border-radius: 20px; width: 90%; max-width: 1100px; max-height: 85vh; overflow: visible; box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3); position: relative; display: flex; flex-direction: column; margin: 20px; } /* 关闭按钮 */ .modal-close-btn { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, 0.05); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #6b7280; transition: all 0.2s; z-index: 100; } .modal-close-btn:hover { background: rgba(0, 0, 0, 0.1); color: #374151; transform: scale(1.1); } /* 预览区域容器 */ .ai-generate-preview-container { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px; padding-top: 56px; flex: 1; min-height: 0; overflow: auto; } /* 预览区块 */ .ai-generate-reference-section, .ai-generate-spritesheet-section { display: flex; flex-direction: column; } /* 预览框通用样式 */ .ai-generate-preview-box { border-radius: 16px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; min-height: 320px; max-height: 420px; flex: 1; box-sizing: border-box; transition: all 0.3s ease; } /* 左侧参考图区域 */ .ai-generate-reference-box { background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%); border: 2px dashed #a5b4fc; overflow: visible; box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08); } .ai-generate-reference-box:hover { border-color: #667eea; box-shadow: 0 6px 24px rgba(102, 126, 234, 0.15); } /* 右侧预览区域 */ .ai-generate-spritesheet-box { background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f3f4f6 75%), linear-gradient(-45deg, transparent 75%, #f3f4f6 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0px; background-color: #ffffff; border: 1px solid #e5e7eb; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); } /* 预览图 */ .ai-generate-preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: none; } .ai-generate-preview-box img.show { display: block; } /* 上传区域 */ .reference-upload-area { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 40px; width: 100%; height: 100%; transition: all 0.3s ease; border-radius: 14px; } .reference-upload-area:hover { background: rgba(102, 126, 234, 0.08); } .reference-upload-area:hover .upload-icon { transform: scale(1.1); } .reference-upload-area.hide { display: none; } .upload-icon { color: #9ca3af; font-size: 48px; font-weight: 200; line-height: 1; transition: color 0.2s ease; } .reference-upload-area:hover .upload-icon { color: #6b7280; } /* 参考图容器 */ .reference-image-wrapper { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; z-index: 1; padding: 16px; box-sizing: border-box; } .reference-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block !important; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); } /* 删除参考图按钮 */ .reference-remove-btn { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(8px); border: 2px solid rgba(255, 255, 255, 0.2); cursor: pointer; display: flex; align-items: center; justify-content: center; color: white; transition: all 0.25s ease; z-index: 100; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } .reference-remove-btn:hover { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); border-color: rgba(255, 255, 255, 0.3); transform: scale(1.1) rotate(90deg); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4); } /* 加载状态 */ .preview-placeholder { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #9ca3af; } .preview-placeholder.hide { display: none; } .loading-spinner { width: 40px; height: 40px; border: 4px solid #e5e7eb; border-top-color: #667eea; border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .loading-text { font-size: 14px; color: #6b7280; } /* AI生图队列区域 */ .ai-queue-section { padding: 0 20px 16px; } .ai-queue-title { font-size: 13px; font-weight: 600; color: #667eea; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; } .ai-queue-title::before { content: ''; width: 3px; height: 14px; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 2px; } .ai-queue-list { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; } .ai-queue-list::-webkit-scrollbar { height: 6px; } .ai-queue-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; } .ai-queue-list::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 3px; } .ai-queue-item { flex-shrink: 0; width: 100px; height: 100px; border-radius: 12px; overflow: hidden; position: relative; background: #f8fafc; border: 2px solid #e5e7eb; cursor: pointer; transition: all 0.3s; } .ai-queue-item:hover { border-color: #667eea; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2); } .ai-queue-item.rendering { border-color: #667eea; } .ai-queue-item.completed { border-color: #10b981; } .ai-queue-item.failed { border-color: #ef4444; } .ai-queue-item-preview { width: 100%; height: 100%; object-fit: cover; filter: blur(4px) brightness(0.8); } .ai-queue-item.completed .ai-queue-item-preview { filter: none; } .ai-queue-item-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.3); } .ai-queue-item.completed .ai-queue-item-overlay { background: transparent; opacity: 0; transition: opacity 0.2s; } .ai-queue-item.completed:hover .ai-queue-item-overlay { opacity: 1; background: rgba(0, 0, 0, 0.5); } .ai-queue-item-spinner { width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: white; border-radius: 50%; animation: spin 1s linear infinite; } .ai-queue-item-status { font-size: 10px; color: white; margin-top: 6px; font-weight: 500; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } .ai-queue-item-icon { font-size: 20px; } .ai-queue-item-actions { display: flex; gap: 4px; } .ai-queue-item-action { width: 28px; height: 28px; border-radius: 50%; border: none; background: white; color: #667eea; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; } .ai-queue-item-action:hover { background: #667eea; color: white; transform: scale(1.1); } /* 提示词配置区域 */ .prompt-config-section { padding: 0 28px 24px; display: flex; flex-direction: column; gap: 16px; background: linear-gradient(180deg, transparent 0%, rgba(248, 250, 252, 0.5) 100%); } .config-row { display: flex; gap: 16px; align-items: flex-start; } .config-textarea { flex: 1; min-height: 72px; max-height: 120px; padding: 14px 16px; border: 2px solid #e5e7eb; border-radius: 14px; font-size: 14px; line-height: 1.5; resize: none; transition: all 0.25s ease; font-family: inherit; background: white; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } .config-textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06); } .config-textarea::placeholder { color: #9ca3af; } /* 操作按钮区域 */ .prompt-actions { display: flex; justify-content: flex-end; gap: 12px; } .action-btn { display: flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 14px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.25s ease; border: none; } .generate-action-btn { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35); position: relative; overflow: hidden; } .generate-action-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.5s ease; } .generate-action-btn:hover:not(:disabled)::before { left: 100%; } .generate-action-btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(16, 185, 129, 0.45); } .generate-action-btn:active:not(:disabled) { transform: translateY(-1px); } .generate-action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; } .btn-price { background: rgba(255, 255, 255, 0.2); padding: 4px 10px; border-radius: 8px; font-size: 13px; } /* 飞走动画 */ .ai-task-fly-animation { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 20px; border-radius: 12px; box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4); display: flex; align-items: center; gap: 8px; } /* 图片预览弹窗 */ .image-preview-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; } .image-preview-modal.show { opacity: 1; } .image-preview-modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); } .image-preview-modal-content { position: relative; max-width: 90vw; max-height: 90vh; transform: scale(0.9); transition: transform 0.3s ease; } .image-preview-modal.show .image-preview-modal-content { transform: scale(1); } .image-preview-modal-content img { max-width: 100%; max-height: 85vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); } .image-preview-modal-close { position: absolute; top: -40px; right: 0; width: 36px; height: 36px; border: none; background: rgba(255, 255, 255, 0.2); color: white; font-size: 24px; border-radius: 50%; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; line-height: 1; } .image-preview-modal-close:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.1); } .image-preview-modal-download { position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 10px 24px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; text-decoration: none; border-radius: 25px; font-size: 14px; font-weight: 600; transition: all 0.2s; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); } .image-preview-modal-download:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5); } /* 响应式设计 */ @media (max-width: 768px) { .ai-generate-preview-container { grid-template-columns: 1fr; padding: 20px; padding-top: 48px; gap: 20px; } .ai-generate-preview-box { min-height: 220px; max-height: 300px; } .prompt-config-section { padding: 0 20px 20px; } .config-textarea { min-height: 60px; } .action-btn { padding: 12px 20px; font-size: 14px; } }