/* JimengCreate Mobile Styles */ /* 自定义动画 */ @keyframes fade-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } @keyframes fade-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-10px); } } @keyframes scale-up { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } .animate-fade-in { animation: fade-in 0.3s ease-out; } .animate-fade-out { animation: fade-out 0.3s ease-out; } .animate-scale-up { animation: scale-up 0.3s ease-out; } /* 文本截断 */ .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* 深色模式适配 */ @media (prefers-color-scheme: dark) { .bg-gray-50 { background-color: #1f2937; } .bg-white { background-color: #374151; } .text-gray-900 { color: #f9fafb; } .text-gray-700 { color: #d1d5db; } .text-gray-600 { color: #9ca3af; } .text-gray-500 { color: #6b7280; } .border-gray-200 { border-color: #4b5563; } .bg-gray-100:hover { background-color: #4b5563; } } /* 即梦创作页面专用样式 */ .jimeng-create { min-height: 100vh; background-color: #f9fafb; /* 页面头部样式 */ &__header { position: sticky; top: 0; z-index: 40; background-color: white; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); &-content { display: flex; align-items: center; padding: 0 1rem; height: 3.5rem; } &-back-btn { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; transition: background-color 0.2s; &:hover { background-color: #f3f4f6; } .iconfont { color: #6b7280; } } &-title { flex: 1; text-align: center; font-size: 1.125rem; font-weight: 600; color: #111827; } &-spacer { width: 2rem; } } /* 主要内容区域 */ &__content { padding: 1rem; .space-y-6 > * + * { margin-top: 1.5rem; } } /* 功能分类选择 */ &__category-section { background-color: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); &-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } &-button { display: flex; flex-direction: column; align-items: center; padding: 0.75rem; border-radius: 0.5rem; border: 2px solid; transition: all 0.2s; &--active { border-color: #3b82f6; background-color: #eff6ff; color: #1d4ed8; } &--inactive { border-color: #e5e7eb; background-color: #f9fafb; color: #6b7280; &:hover { border-color: #d1d5db; background-color: #f3f4f6; } } .iconfont { font-size: 1.5rem; margin-bottom: 0.5rem; } span { font-size: 0.875rem; font-weight: 500; } } } /* 生成模式切换 */ &__mode-section { background-color: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); &-content { display: flex; align-items: center; justify-content: space-between; } &-title { color: #111827; font-weight: 500; } &-description { font-size: 0.875rem; color: #6b7280; margin-top: 0.25rem; } } /* 表单组件样式 */ &__form-section { background-color: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); &-label { display: block; color: #374151; font-weight: 500; margin-bottom: 0.75rem; } &-textarea { width: 100%; padding: 0.75rem 1rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; resize: none; transition: all 0.2s; &:focus { outline: none; ring: 2px solid #3b82f6; border-color: transparent; } } &-counter { text-align: right; margin-top: 0.5rem; font-size: 0.875rem; color: #6b7280; } } /* 图片上传样式 */ &__upload { border: 2px dashed #d1d5db; border-radius: 0.5rem; padding: 1.5rem; text-align: center; cursor: pointer; transition: all 0.2s; &:hover { border-color: #60a5fa; background-color: #eff6ff; } &-content { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; } &-icon { color: #3b82f6; font-size: 1.5rem; } &-text { color: #374151; font-weight: 500; } &-preview { position: relative; .el-image { width: 8rem; height: 8rem; border-radius: 0.5rem; } } &-remove-btn { position: absolute; top: -0.5rem; right: -0.5rem; width: 1.5rem; height: 1.5rem; background-color: #ef4444; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; cursor: pointer; transition: background-color 0.2s; &:hover { background-color: #dc2626; } } /* 多图片上传样式 */ &-multiple { display: flex; gap: 0.75rem; &-item { position: relative; .el-image { width: 6rem; height: 6rem; border-radius: 0.5rem; } } &-add { width: 6rem; height: 6rem; border: 2px dashed #d1d5db; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.2s; &:hover { border-color: #60a5fa; } .iconfont { color: #9ca3af; font-size: 1.25rem; } } } } /* 滑块样式 */ &__slider-section { .space-y-4 > * + * { margin-top: 1rem; } &-header { display: flex; align-items: center; gap: 0.5rem; label { display: block; color: #374151; font-weight: 500; } .el-tooltip { .iconfont { color: #9ca3af; cursor: pointer; } } } } /* 开关样式 */ &__switch-section { display: flex; align-items: center; justify-content: space-between; span { color: #111827; font-weight: 500; } } /* 生成按钮 */ &__submit-btn { position: sticky; bottom: 1rem; background-color: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); button { width: 100%; padding: 1rem; background: linear-gradient(to right, #3b82f6, #8b5cf6); color: white; font-weight: 600; border-radius: 0.75rem; border: none; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; &:hover:not(:disabled) { background: linear-gradient(to right, #2563eb, #7c3aed); } &:disabled { background: linear-gradient(to right, #9ca3af, #9ca3af); cursor: not-allowed; } .iconfont { &.animate-spin { animation: spin 1s linear infinite; } } } } /* 作品列表样式 */ &__works { padding: 1rem; &-title { font-size: 1.125rem; font-weight: 600; color: #111827; margin-bottom: 1rem; } &-list { .space-y-4 > * + * { margin-top: 1rem; } } &-item { background-color: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); &-content { display: flex; gap: 1rem; } &-thumb { flex-shrink: 0; &-container { position: relative; width: 4rem; height: 4rem; border-radius: 0.5rem; overflow: hidden; background-color: #f3f4f6; } .el-image { width: 100%; height: 100%; } &-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background-color: #f3f4f6; .iconfont { color: #9ca3af; font-size: 1.25rem; } } &-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background-color: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.2s; &:hover { opacity: 1; } .iconfont { color: white; font-size: 1.25rem; } } &-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; &--loading { background-color: rgba(59, 130, 246, 0.2); .iconfont { color: #3b82f6; font-size: 1.25rem; animation: spin 1s linear infinite; } } &--failed { background-color: rgba(239, 68, 68, 0.2); .iconfont { color: #ef4444; font-size: 1.25rem; } } } } &-info { flex: 1; min-width: 0; &-header { display: flex; align-items: start; justify-content: space-between; } &-title { color: #111827; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } &-prompt { color: #6b7280; font-size: 0.875rem; margin-top: 0.25rem; } &-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; &--failed { color: #dc2626; } &--processing { color: #2563eb; .loading-spinner { width: 0.75rem; height: 0.75rem; border: 1px solid #2563eb; border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; } } } &-tags { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; &-item { padding: 0.25rem 0.5rem; font-size: 0.75rem; border-radius: 9999px; &--primary { background-color: #dbeafe; color: #2563eb; } &--warning { background-color: #fef3c7; color: #d97706; } &--power { background-color: #fed7aa; color: #ea580c; } } } } &-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; &-left { display: flex; gap: 0.5rem; } &-btn { padding: 0.375rem 0.75rem; font-size: 0.875rem; border-radius: 0.5rem; border: none; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 0.25rem; .iconfont { font-size: 0.75rem !important; } &--primary { background-color: #2563eb; color: white; &:hover { background-color: #1d4ed8; } } &--success { background-color: #16a34a; color: white; &:hover { background-color: #15803d; } } &--warning { background-color: #ea580c; color: white; &:hover { background-color: #dc2626; } } &--danger { background-color: #fef2f2; color: #dc2626; &:hover { background-color: #fecaca; } } &:disabled { background-color: #9ca3af; cursor: not-allowed; } } } } &-loading { display: flex; justify-content: center; padding: 1rem; .iconfont { color: #3b82f6; font-size: 1.25rem; animation: spin 1s linear infinite; } } &-finished { text-align: center; padding: 1rem; color: #6b7280; } } /* 媒体预览弹窗 */ &__media-dialog { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background-color: rgba(0, 0, 0, 0.5); &-content { background-color: white; border-radius: 1rem; width: 100%; max-width: 56rem; max-height: 80vh; } &-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid #e5e7eb; h3 { font-size: 1.125rem; font-weight: 600; color: #111827; } button { padding: 0.5rem; border: none; background: none; border-radius: 50%; cursor: pointer; transition: background-color 0.2s; &:hover { background-color: #f3f4f6; } .iconfont { color: #6b7280; } } } &-body { padding: 1.5rem; img, video { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 0.5rem; } } } /* 快捷操作按钮样式 */ &__works-item-quick-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f3f4f6; } &__works-item-quick-action-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; border-radius: 8px; background: #f9fafb; color: #6b7280; cursor: pointer; transition: all 0.2s ease; font-size: 14px; &:hover { background: #e5e7eb; color: #374151; transform: translateY(-1px); } &:active { transform: translateY(0); } &:disabled { opacity: 0.5; cursor: not-allowed; transform: none; } &--danger { color: #ef4444; &:hover { background: #fef2f2; color: #dc2626; } } i { font-size: 16px; } } /* 错误信息样式 */ &__works-item-error { margin-top: 8px; padding: 8px 12px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; } &__works-item-error-content { display: flex; align-items: center; justify-content: space-between; gap: 8px; } &__works-item-error-text { flex: 1; font-size: 12px; color: #dc2626; line-height: 1.4; word-break: break-all; } &__works-item-error-copy-btn { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: none; border-radius: 4px; background: #fee2e2; color: #dc2626; cursor: pointer; transition: all 0.2s ease; font-size: 12px; &:hover { background: #fecaca; color: #b91c1c; } i { font-size: 12px; } } } /* 旋转动画 */ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Dark 主题样式 - 按照 theme-dark.scss 的模式 */ :root[data-theme='dark'] .jimeng-create { background-color: rgb(13, 20, 53); /* 页面头部样式 */ .sticky { background-color: rgb(31, 41, 55) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); h1 { color: rgb(255, 255, 255) !important; } .iconfont { color: rgb(156, 163, 175) !important; } button:hover { background-color: rgb(75, 85, 99) !important; } } /* 功能分类选择 */ .jimeng-create__content { .bg-white { background-color: rgb(55, 65, 81) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); } .text-gray-700 { color: rgb(209, 213, 219) !important; } .text-gray-900 { color: rgb(255, 255, 255) !important; } .text-gray-600 { color: rgb(156, 163, 175) !important; } .text-gray-500 { color: rgb(156, 163, 175) !important; } .bg-gray-100:hover { background-color: rgb(75, 85, 99) !important; } /* Element Plus 组件样式覆盖 */ :deep(.el-input__wrapper) { background-color: rgb(31, 41, 55) !important; border-color: rgb(75, 85, 99) !important; box-shadow: none !important; } :deep(.el-input__inner) { color: rgb(209, 213, 219) !important; background-color: transparent !important; } :deep(.el-input__inner::placeholder) { color: rgb(156, 163, 175) !important; } :deep(.el-textarea__inner) { color: rgb(209, 213, 219) !important; background-color: transparent !important; } :deep(.el-textarea__inner::placeholder) { color: rgb(156, 163, 175) !important; } :deep(.el-switch__core) { background-color: rgb(75, 85, 99) !important; border-color: rgb(75, 85, 99) !important; } :deep(.el-switch.is-checked .el-switch__core) { background-color: rgb(139, 92, 246) !important; border-color: rgb(139, 92, 246) !important; } :deep(.el-slider__runway) { background-color: rgb(75, 85, 99) !important; } :deep(.el-slider__bar) { background-color: rgb(139, 92, 246) !important; } :deep(.el-slider__button) { border-color: rgb(139, 92, 246) !important; } :deep(.el-tooltip__trigger) { color: rgb(156, 163, 175) !important; } } /* 提交按钮 */ .bg-gradient-to-r { background: linear-gradient(88deg, #af61f0 1.44%, #5b62ce) !important; &:hover { background: linear-gradient(88deg, #9f51e0 1.44%, #4b52be) !important; } &:disabled { background: linear-gradient(88deg, #6b7280 1.44%, #4b5563) !important; } } /* 作品列表 */ .jimeng-create__works { &-title { color: rgb(255, 255, 255) !important; } &-item { background-color: rgb(55, 65, 81) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); &-content { .jimeng-create__works-item-info { &-title { color: rgb(255, 255, 255) !important; } &-prompt { color: rgb(209, 213, 219) !important; } &-tags { &-item { background-color: rgb(75, 85, 99) !important; color: rgb(209, 213, 219) !important; &--warning { background-color: rgb(239, 68, 68) !important; color: rgb(255, 255, 255) !important; } &--primary { background-color: rgb(59, 130, 246) !important; color: rgb(255, 255, 255) !important; } &--power { background-color: rgb(139, 92, 246) !important; color: rgb(255, 255, 255) !important; } } } } } &-quick-actions { button { color: rgb(156, 163, 175) !important; &:hover { color: rgb(209, 213, 219) !important; } } } &-error { &-content { background-color: rgb(31, 41, 55) !important; border-color: rgb(239, 68, 68) !important; .jimeng-create__works-item-error-text { color: rgb(239, 68, 68) !important; } .jimeng-create__works-item-error-copy-btn { color: rgb(156, 163, 175) !important; &:hover { color: rgb(209, 213, 219) !important; } } } } } &-loading { color: rgb(156, 163, 175) !important; } &-finished { color: rgb(156, 163, 175) !important; } } /* 媒体预览弹窗 */ .jimeng-create__media-dialog { background-color: rgba(0, 0, 0, 0.8) !important; &-content { background-color: rgb(55, 65, 81) !important; box-shadow: 0 0 15px rgba(107, 80, 225, 0.8) !important; } &-header { background-color: rgb(31, 41, 55) !important; border-bottom-color: rgb(75, 85, 99) !important; h3 { color: rgb(255, 255, 255) !important; } button { color: rgb(156, 163, 175) !important; &:hover { color: rgb(209, 213, 219) !important; } } } } /* 图片上传组件 */ :deep(.image-upload) { .upload-area { background-color: rgb(31, 41, 55) !important; border-color: rgb(75, 85, 99) !important; &:hover { border-color: rgb(139, 92, 246) !important; background-color: rgb(55, 65, 81) !important; } } .upload-text { color: rgb(209, 213, 219) !important; } .upload-icon { color: rgb(139, 92, 246) !important; } } /* 自定义选择组件 */ :deep(.custom-select) { .select-trigger { background-color: rgb(31, 41, 55) !important; border-color: rgb(75, 85, 99) !important; color: rgb(209, 213, 219) !important; } .select-dropdown { background-color: rgb(55, 65, 81) !important; border-color: rgb(75, 85, 99) !important; box-shadow: 0 0 15px rgba(107, 80, 225, 0.8) !important; } .select-option { color: rgb(209, 213, 219) !important; &:hover { background-color: rgb(75, 85, 99) !important; } &.selected { background-color: rgb(139, 92, 246) !important; color: rgb(255, 255, 255) !important; } } } /* 空状态组件 */ :deep(.van-empty) { .van-empty__description { color: rgb(156, 163, 175) !important; } } }