/* 全局样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color: #333; position: relative; } /* 水印样式 */ body::before { content: 'YcGod'; position: fixed; top: 20%; left: 90%; transform: translate(-50%, -50%) rotate(-45deg); font-size: 8rem; font-weight: bold; color: rgba(64, 64, 64, 0.1); z-index: 11; pointer-events: none; user-select: none; } .app-container { min-height: 100vh; display: flex; flex-direction: column; } /* 头部样式 */ .app-header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 20px; text-align: center; box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1); position: relative; z-index: 10; } .app-header h1 { font-size: 2.5rem; color: #4a5568; margin-bottom: 8px; } .app-header p { color: #718096; font-size: 1.1rem; } /* 页面底部样式 */ .app-footer { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 15px 20px; text-align: center; box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1); margin-top: auto; position: relative; z-index: 10; } .app-footer p { color: #718096; font-size: 0.9rem; margin: 0; } /* 主内容区域 */ .main-content { flex: 1; display: flex; gap: 20px; padding: 20px; max-width: 1400px; margin: 0 auto; width: 100%; position: relative; z-index: 10; } /* 左侧参数面板 (20%) */ .params-panel { width: 20%; min-width: 300px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 16px; padding: 20px; height: fit-content; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); } .panel-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #e2e8f0; } .panel-section:last-child { border-bottom: none; margin-bottom: 0; } .panel-section h3 { font-size: 1.1rem; color: #2d3748; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; } /* 表单控件 */ .form-group { margin-bottom: 16px; } .form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #4a5568; } .form-control { width: 100%; padding: 10px 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 14px; transition: all 0.2s ease; background: white; } .form-control:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } textarea.form-control { resize: vertical; min-height: 80px; } .form-range { width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; outline: none; -webkit-appearance: none; appearance: none; } .form-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #667eea; border-radius: 50%; cursor: pointer; } .form-range::-moz-range-thumb { width: 20px; height: 20px; background: #667eea; border-radius: 50%; cursor: pointer; border: none; } /* 复选框样式 */ .checkbox-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; cursor: pointer; padding: 10px 12px; background: #f7fafc; border: 2px solid #e2e8f0; border-radius: 8px; transition: all 0.2s ease; } .checkbox-label:hover { border-color: #667eea; background: #edf2f7; } .checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: #667eea; cursor: pointer; } .checkbox-label input[type="checkbox"]:checked + .checkbox-text { color: #667eea; font-weight: 600; } .checkbox-text { font-weight: 500; color: #4a5568; flex-shrink: 0; } .checkbox-hint { font-size: 12px; color: #a0aec0; width: 100%; margin-top: 4px; } /* 上传区域 */ .upload-area { border: 2px dashed #cbd5e0; border-radius: 8px; padding: 30px; text-align: center; cursor: pointer; transition: all 0.2s ease; background: #f7fafc; } .upload-area:hover { border-color: #667eea; background: #edf2f7; } .upload-area i { font-size: 2rem; color: #a0aec0; margin-bottom: 10px; } .upload-area p { color: #718096; margin: 0; } .upload-hint { font-size: 12px; color: #a0aec0; margin-top: 4px; } .upload-preview-container { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; } .upload-preview-item { position: relative; width: calc(33.33% - 6px); min-width: 80px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .upload-preview-item img { width: 100%; height: 100%; object-fit: cover; } .upload-preview-item .image-index { position: absolute; bottom: 4px; left: 4px; background: rgba(0, 0, 0, 0.7); color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; } .btn-remove { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, 0.7); color: white; border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 10px; transition: background 0.2s ease; } .btn-remove:hover { background: rgba(220, 53, 69, 0.9); } .upload-count { width: 100%; text-align: center; font-size: 12px; color: #718096; margin-top: 8px; } /* 按钮样式 */ .btn { padding: 10px 16px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; } .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); } .btn-secondary { background: #e2e8f0; color: #4a5568; } .btn-secondary:hover { background: #cbd5e0; } .btn-success { background: #48bb78; color: white; } .btn-success:hover { background: #38a169; } .btn-danger { background: #f56565; color: white; } .btn-danger:hover { background: #e53e3e; } .btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; } .button-group { display: flex; gap: 8px; } .button-group.vertical { flex-direction: column; } /* 右侧图片展示区域 (80%) */ .gallery-panel { width: 80%; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 16px; padding: 20px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); } .gallery-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; } .gallery-header h3 { font-size: 1.2rem; color: #2d3748; display: flex; align-items: center; gap: 8px; } .gallery-stats { display: flex; gap: 16px; font-size: 14px; color: #718096; } /* 图片网格 */ .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; min-height: 400px; } /* 图片卡片 */ .image-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); transition: all 0.2s ease; position: relative; } .image-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); } .image-card-content { position: relative; width: 100%; height: 200px; overflow: hidden; } .image-card img { width: 100%; height: 100%; object-fit: cover; } .image-card-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; } .image-card:hover .image-card-overlay { opacity: 1; } .image-card-actions { display: flex; gap: 8px; } .image-card-actions .btn { padding: 8px; font-size: 12px; } /* 图片状态 */ .image-status { position: absolute; top: 8px; right: 8px; padding: 4px 8px; border-radius: 12px; font-size: 12px; font-weight: 500; color: white; } .status-pending { background: #ed8936; } .status-generating { background: #4299e1; } .status-success { background: #48bb78; } .status-error { background: #f56565; } /* 加载状态 */ .image-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; background: #f7fafc; color: #718096; } .loading-spinner { width: 32px; height: 32px; border: 3px solid #e2e8f0; border-top: 3px solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 12px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 错误状态 */ .image-error { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; background: #fed7d7; color: #c53030; text-align: center; padding: 16px; } .image-error i { font-size: 2rem; margin-bottom: 8px; } /* 空状态 */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 400px; color: #a0aec0; text-align: center; } .empty-state i { font-size: 4rem; margin-bottom: 16px; } .empty-state h4 { font-size: 1.2rem; margin-bottom: 8px; } /* 模态框 */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); } .modal-content { position: relative; margin: 2% auto; max-width: 80vw; max-height: 85vh; background: white; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; } .modal-close { position: absolute; top: 16px; right: 20px; font-size: 28px; font-weight: bold; color: white; cursor: pointer; z-index: 1001; background: rgba(0, 0, 0, 0.5); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .modal img { width: 100%; height: auto; max-height: calc(85vh - 120px); object-fit: contain; display: block; } .modal-actions { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; } /* 下载设置对话框 */ .download-modal-content { max-width: 450px; margin: 15% auto; padding: 0; max-height: auto; } .download-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 12px 12px 0 0; } .download-modal-header h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; } .download-modal-header .modal-close { position: static; background: rgba(255, 255, 255, 0.2); color: white; width: 32px; height: 32px; font-size: 20px; } .download-modal-header .modal-close:hover { background: rgba(255, 255, 255, 0.3); } .download-modal-body { padding: 20px; } .download-modal-body .form-group { margin-bottom: 16px; } .download-modal-body .form-group:last-child { margin-bottom: 0; } .download-modal-body .form-hint { font-size: 12px; color: #a0aec0; margin-top: 4px; } .download-modal-body .last-save-path { background: #f7fafc; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: #4a5568; word-break: break-all; margin: 0; } .download-modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid #e2e8f0; background: #f7fafc; border-radius: 0 0 12px 12px; } /* 加载遮罩 */ .loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; z-index: 999; } .loading-content { background: white; padding: 40px; border-radius: 12px; text-align: center; } .spinner { width: 40px; height: 40px; border: 4px solid #e2e8f0; border-top: 4px solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; } /* 消息提示 */ .toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; } .toast { background: white; border-radius: 8px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); border-left: 4px solid #48bb78; animation: slideIn 0.3s ease; max-width: 300px; } .toast.error { border-left-color: #f56565; } .toast.warning { border-left-color: #ed8936; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* 响应式设计 */ @media (max-width: 1200px) { .main-content { flex-direction: column; } .params-panel, .gallery-panel { width: 100%; } .params-panel { min-width: auto; } /* 中等屏幕模态框调整 */ .modal-content { max-width: 85vw; max-height: 88vh; } .modal img { max-height: calc(88vh - 110px); } } @media (max-width: 768px) { .app-header h1 { font-size: 2rem; } .main-content { padding: 10px; gap: 10px; } .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } .gallery-header { flex-direction: column; align-items: flex-start; gap: 12px; } .gallery-stats { flex-wrap: wrap; } /* 移动端模态框调整 */ .modal-content { margin: 1% auto; max-width: 95vw; max-height: 90vh; } .modal img { max-height: calc(90vh - 100px); } .modal-actions { position: relative; bottom: auto; left: auto; transform: none; margin: 16px; justify-content: center; } } /* ======================================== 随机参数管理模态框样式 ======================================== */ /* 信息按钮样式 */ .btn-info { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); color: white; } .btn-info:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4); } /* 小按钮样式 */ .btn-sm { padding: 4px 8px; font-size: 12px; } /* 随机参数模态框内容 */ .random-options-modal-content { max-width: 700px; width: 90%; margin: 3% auto; max-height: 85vh; display: flex; flex-direction: column; } .random-options-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); color: white; border-radius: 12px 12px 0 0; flex-shrink: 0; } .random-options-modal-header h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; } .random-options-modal-header .modal-close { position: static; background: rgba(255, 255, 255, 0.2); color: white; width: 32px; height: 32px; font-size: 20px; } .random-options-modal-header .modal-close:hover { background: rgba(255, 255, 255, 0.3); } .random-options-modal-body { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; } .random-options-modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid #e2e8f0; background: #f7fafc; border-radius: 0 0 12px 12px; flex-shrink: 0; } /* 工具栏 */ .random-options-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; } .toolbar-hint { font-size: 12px; color: #a0aec0; margin: 0; } /* 加载状态 */ .random-options-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #718096; } .random-options-loading .loading-spinner { margin-bottom: 16px; } /* 配置容器 */ .random-options-container { display: flex; flex-direction: column; gap: 16px; } /* 整体全选区域 */ .global-select-all { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; } .select-all-label { display: flex; align-items: center; gap: 10px; cursor: pointer; color: white; font-weight: 600; margin: 0; } .select-all-label .select-text { font-size: 14px; } /* 通用勾选框样式 */ .select-checkbox { width: 18px; height: 18px; accent-color: #667eea; cursor: pointer; flex-shrink: 0; } /* 类别卡片 */ .random-option-category { background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; } .category-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } .category-title-wrapper { flex: 1; } .category-select-label { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; } .category-select-label .select-checkbox { accent-color: white; } .category-title { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .category-title i { font-size: 12px; } .category-actions { display: flex; gap: 6px; } .category-actions .btn { background: rgba(255, 255, 255, 0.2); color: white; border: none; } .category-actions .btn:hover { background: rgba(255, 255, 255, 0.3); } .category-actions .btn-danger:hover { background: rgba(220, 53, 69, 0.8); } /* 类别内容 */ .category-content { padding: 12px 16px; } /* 词条列表 */ .items-list { display: flex; flex-wrap: wrap; gap: 8px; } .option-item { display: inline-flex; align-items: center; gap: 6px; background: white; border: 2px solid #e2e8f0; border-radius: 20px; padding: 6px 12px; font-size: 13px; color: #4a5568; transition: all 0.2s ease; } .option-item:hover { border-color: #667eea; background: #edf2f7; } /* 已选中的词条样式 */ .option-item.selected { border-color: #667eea; background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%); } .option-item.selected .item-text { color: #667eea; font-weight: 500; } /* 词条勾选标签 */ .item-select-label { display: flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; } .item-select-label .select-checkbox { width: 14px; height: 14px; } .option-item .item-text { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .option-item .btn-remove-item { background: transparent; color: #a0aec0; padding: 2px; margin: -2px -4px -2px 0; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; } .option-item .btn-remove-item:hover { background: #f56565; color: white; } /* 空词条提示 */ .empty-items { color: #a0aec0; font-size: 13px; text-align: center; padding: 16px; } /* 文本域样式(用于字符串类型的配置) */ .textarea-wrapper { border: 2px solid transparent; border-radius: 8px; transition: all 0.2s ease; } .textarea-wrapper.selected { border-color: #667eea; background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%); } .category-textarea { min-height: 80px; resize: vertical; font-size: 13px; } /* 响应式调整 */ @media (max-width: 768px) { .random-options-modal-content { width: 95%; max-height: 90vh; margin: 2% auto; } .random-options-toolbar { flex-direction: column; gap: 10px; align-items: flex-start; } .toolbar-hint { width: 100%; } .option-item .item-text { max-width: 100px; } .category-header { flex-wrap: wrap; gap: 10px; } .category-title-wrapper { width: 100%; } .category-actions { width: 100%; justify-content: flex-end; } }