/* 我的界面样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } .profile-container { width: 100%; height: 100vh; background: #f5f5f5; overflow: hidden; display: flex; flex-direction: column; } .profile-header { display: flex; align-items: center; padding: 16px 20px; background: white; border-bottom: 1px solid #e5e5e5; position: sticky; top: 0; z-index: 100; } .back-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; color: #667eea; font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px 12px; border-radius: 8px; transition: background 0.2s; } .back-btn:hover { background: rgba(102, 126, 234, 0.1); } .profile-content { padding: 16px 20px; width: 100%; max-width: 1600px; margin: 0 auto; overflow: hidden; height: calc(100vh - 80px); display: flex; flex-direction: column; } .page-title { margin: 0 0 20px 0; font-size: 28px; font-weight: 700; color: #1f2937; padding-bottom: 12px; border-bottom: 3px solid #667eea; display: flex; align-items: center; gap: 10px; } .page-title::before { content: ''; width: 4px; height: 28px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 2px; } .profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; height: calc(100% - 60px); overflow: hidden; } .profile-left { display: flex; flex-direction: column; gap: 12px; height: 100%; } .profile-right { display: flex; flex-direction: column; gap: 16px; height: 100%; overflow-y: auto; } .history-section { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; } .history-section .ai-history-container { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; } .purchase-section { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; } .purchase-container { flex: 1; max-height: 100%; overflow-y: auto; overflow-x: hidden; min-height: 0; } .profile-section { background: white; border-radius: 12px; padding: 16px; margin-bottom: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); flex-shrink: 0; } .section-title { margin: 0 0 16px 0; font-size: 16px; font-weight: 600; color: #1f2937; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; } .profile-info { display: flex; flex-direction: column; gap: 16px; align-items: center; } .avatar-section { display: flex; flex-direction: column; align-items: center; gap: 10px; } .avatar-preview { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; border: 3px solid #e5e5e5; background: #f9fafb; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .avatar-preview img { width: 100%; height: 100%; object-fit: cover; } .avatar-upload-btn { padding: 8px 16px; background: #667eea; color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; } .avatar-upload-btn:hover { background: #5568d3; transform: translateY(-1px); } .info-form { width: 100%; } .form-item { margin-bottom: 14px; } .form-label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; } .form-input { width: 100%; padding: 8px 12px; border: 1px solid #e5e5e5; border-radius: 8px; font-size: 14px; color: #1f2937; transition: border-color 0.2s; box-sizing: border-box; } .form-input:focus { outline: none; border-color: #667eea; } .form-input[readonly] { background: #f9fafb; color: #6b7280; cursor: not-allowed; } .save-btn { padding: 10px 24px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 8px; } .save-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); } .points-section { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 16px; position: relative; overflow: hidden; } .points-section::before { content: ''; position: absolute; top: -50%; right: -20%; width: 200px; height: 200px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; } .points-section::after { content: '💰'; position: absolute; right: 100px; top: 50%; transform: translateY(-50%); font-size: 48px; opacity: 0.15; } .points-card { padding: 0 !important; overflow: hidden; } .points-display { display: flex; flex-direction: column; gap: 6px; } .points-value-row { display: flex; flex-direction: column; gap: 2px; } .points-section .recharge-btn { flex-shrink: 0; z-index: 1; } .points-label { font-size: 13px; color: rgba(255, 255, 255, 0.8); font-weight: 500; } .points-value { font-size: 36px; font-weight: 800; color: white; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); line-height: 1; } .points-unit { font-size: 14px; color: rgba(255, 255, 255, 0.75); font-weight: 500; } .recharge-btn { padding: 12px 28px; background: white; color: #667eea; border: none; border-radius: 25px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); } .recharge-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); } .recharge-btn:active { transform: translateY(0) scale(0.98); } .ai-history-container { min-height: 200px; max-height: 100%; overflow-y: auto; overflow-x: hidden; } .loading-state, .empty-state { text-align: center; padding: 40px; color: #9ca3af; font-size: 14px; } .history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; padding: 8px; overflow: visible; } .history-item { position: relative; border-radius: 16px; overflow: hidden; background: white; aspect-ratio: 1; border: 1px solid #e5e7eb; transition: all 0.25s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } .history-item:hover { border-color: #667eea; box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15); transform: translateY(-4px); } .history-item.completed { cursor: zoom-in; } .history-item.rendering { display: flex; align-items: center; justify-content: center; } .history-item.rendering .rendering-content { display: flex; flex-direction: column; align-items: center; gap: 8px; } /* 模糊预览图 */ .history-item-preview { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(8px) brightness(0.7); transform: scale(1.1); /* 防止模糊边缘漏出 */ } .history-item-preview.failed-preview { filter: blur(8px) brightness(0.5) grayscale(0.5); } /* 加载中蒙层 */ .history-item-loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 2; } .loading-spinner-container { width: 48px; height: 48px; position: relative; } .loading-spinner { width: 100%; height: 100%; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); } .loading-status-text { font-size: 13px; font-weight: 600; color: #fff; } .loading-remaining-text { font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, 0.7); padding: 4px 10px; background: rgba(0, 0, 0, 0.3); border-radius: 10px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); } /* rendering 和 queued 状态共用基础样式 */ .history-item.rendering, .history-item.queued { overflow: hidden; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); } .history-item.failed { overflow: hidden; background: linear-gradient(135deg, #374151 0%, #1f2937 100%); } .history-item.failed .failed-content { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; z-index: 5; background: rgba(0, 0, 0, 0.4); } .history-item.failed .failed-icon { font-size: 32px; } .history-item.failed .failed-text { font-size: 14px; font-weight: 600; color: #fca5a5; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); } /* 删除按钮 */ .history-item.failed .delete-btn { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 16px; background: rgba(239, 68, 68, 0.8); color: white; border: none; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; } .history-item.failed .delete-btn:hover { background: rgba(239, 68, 68, 1); transform: translateY(-2px); } .history-item.failed .delete-btn:active { transform: translateY(0); } .history-item.failed .delete-btn svg { flex-shrink: 0; } .history-item-time { position: absolute; bottom: 0; left: 0; right: 0; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); padding: 20px 10px 8px; text-align: center; font-weight: 500; z-index: 3; } @keyframes spin { to { transform: rotate(360deg); } } .history-item-image { width: 100%; height: 100%; object-fit: contain; background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); padding: 12px; cursor: zoom-in; transition: transform 0.25s ease; } .history-item:hover .history-item-image { transform: scale(1.03); } /* 图片预览弹窗 */ .image-preview-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; } .image-preview-modal.show { opacity: 1; } .image-preview-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); } .image-preview-content { position: relative; max-width: 90vw; max-height: 90vh; transform: scale(0.9); transition: transform 0.3s ease; } .image-preview-modal.show .image-preview-content { transform: scale(1); } .image-preview-content img { max-width: 100%; max-height: 85vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); } .image-preview-close { position: absolute; top: -50px; right: 0; width: 40px; height: 40px; border: none; background: rgba(255, 255, 255, 0.15); color: white; font-size: 28px; border-radius: 50%; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; line-height: 1; } .image-preview-close:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.1); } .image-preview-download-btn { position: absolute; bottom: -60px; right: 50%; transform: translateX(50%); width: 50px; height: 50px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5); } .image-preview-download-btn:hover { transform: translateX(50%) scale(1.1); box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6); } .rendering-text { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.7); color: white; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; } /* 退出登录按钮 */ .logout-btn { width: 100%; padding: 10px 20px; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; } .logout-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); } /* 响应式设计 */ @media (max-width: 1024px) { .profile-layout { grid-template-columns: 1fr; } .history-section { height: auto; min-height: 400px; } } /* 购买记录样式 */ .purchase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; padding: 8px; overflow-y: auto; max-height: 100%; } .purchase-item { position: relative; border-radius: 16px; overflow: hidden; background: white; border: 1px solid #e5e7eb; transition: all 0.25s ease; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } .purchase-item:hover { transform: translateY(-4px); border-color: #667eea; box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15); } .purchase-item.deleted { opacity: 0.5; filter: grayscale(0.5); } .purchase-item-image { width: 100%; height: 140px; object-fit: contain; background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); padding: 20px; transition: transform 0.3s ease; } .purchase-item:hover .purchase-item-image { transform: scale(1.05); } .purchase-item-placeholder { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); color: #9ca3af; font-size: 32px; } .purchase-item-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #f1f5f9; } .purchase-item-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.95) 100%); display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.35s ease; z-index: 10; backdrop-filter: blur(6px); } .purchase-item:hover .purchase-item-overlay { opacity: 1; } .purchase-item-add-btn { padding: 12px 24px; background: white; color: #667eea; border: none; border-radius: 30px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); transform: translateY(10px); opacity: 0; } .purchase-item:hover .purchase-item-add-btn { transform: translateY(0); opacity: 1; } .purchase-item-add-btn:hover { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; transform: scale(1.08) !important; box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5); } .purchase-item-add-btn:active { transform: scale(1) !important; } .purchase-item-add-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; } .purchase-item-name { font-size: 14px; font-weight: 600; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; } .purchase-item-category { font-size: 11px; color: #667eea; display: inline-flex; align-items: center; gap: 4px; background: rgba(102, 126, 234, 0.1); padding: 3px 8px; border-radius: 4px; width: fit-content; } .purchase-item-category::before { content: ''; display: inline-block; width: 4px; height: 4px; background: #667eea; border-radius: 50%; flex-shrink: 0; } .purchase-item-price { font-size: 14px; font-weight: 700; color: #10b981; display: inline-flex; align-items: center; gap: 2px; } .purchase-item-price::before { content: '💰'; font-size: 12px; } .purchase-item-deleted-badge { position: absolute; top: 14px; right: 14px; background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; padding: 6px 12px; border-radius: 20px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); z-index: 5; animation: pulse-badge 2s ease-in-out infinite; } @keyframes pulse-badge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } } .rendering-text { font-size: 14px; font-weight: 600; color: #667eea; } @media (max-width: 768px) { .profile-content { padding: 16px; } .profile-layout { gap: 16px; } .profile-left { gap: 16px; } .profile-section { padding: 16px; } .avatar-preview { width: 100px; height: 100px; } } /* 下载确认对话框 */ .download-confirm-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: none; align-items: center; justify-content: center; z-index: 10000000; backdrop-filter: blur(4px); animation: overlayFadeIn 0.3s ease-out; } @keyframes overlayFadeIn { from { background: rgba(0, 0, 0, 0); backdrop-filter: blur(0); } to { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); } } .download-confirm-modal { background: white; border-radius: 16px; padding: 0; max-width: 600px; width: 90%; max-height: 90vh; overflow: visible; overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: modalSlideIn 0.3s ease-out; /* 确保弹窗内容正确显示 */ display: flex; flex-direction: column; } @keyframes modalSlideIn { from { opacity: 0; transform: translateY(-30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } } .download-confirm-header { display: flex; align-items: center; justify-content: space-between; padding: 24px; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; } .download-confirm-header h3 { margin: 0; font-size: 20px; font-weight: 600; color: #111827; } .download-confirm-close { width: 36px; height: 36px; border-radius: 50%; background: #f3f4f6; border: none; color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; padding: 0; } .download-confirm-close:hover { background: #e5e7eb; color: #374151; } .download-confirm-content { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex-shrink: 0; } .download-option { display: flex; align-items: center; gap: 16px; padding: 20px; border: 2px solid #e5e7eb; border-radius: 12px; cursor: pointer; transition: all 0.2s; background: #f9fafb; } .download-option:hover { border-color: #667eea; background: #f0f4ff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2); } .download-option-icon { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #667eea; } .download-option-icon svg { width: 100%; height: 100%; } .download-option-info { flex: 1; } .download-option-title { font-size: 16px; font-weight: 600; color: #111827; margin-bottom: 4px; } .download-option-desc { font-size: 14px; color: #6b7280; line-height: 1.5; } .download-option-price { margin-top: 8px; font-size: 16px; font-weight: 700; color: #667eea; background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%); padding: 6px 12px; border-radius: 8px; display: inline-block; border: 2px solid rgba(102, 126, 234, 0.3); box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15); transition: all 0.3s ease; } .download-option:hover .download-option-price { background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%); border-color: rgba(102, 126, 234, 0.5); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25); transform: scale(1.05); }