        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background: #f5f6fa;
            min-height: 100vh;
            padding: 0;
            color: #1a1a2e;
            margin: 0;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .container {
            width: 100%;
            min-height: 100vh;
            margin: 0;
            background: #f5f6fa;
            border-radius: 0;
            box-shadow: none;
            display: flex;
            flex-direction: column;
        }

        .header {
            background: linear-gradient(135deg, #4a3f78 0%, #5b4e8a 30%, #6c63ff 100%);
            color: white;
            padding: 16px 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 20px rgba(108, 99, 255, 0.15);
            position: sticky;
            top: 0;
            z-index: 50;
        }

        .header-left {
            flex: 1;
        }

        .header h1 {
            font-size: 1.6em;
            margin-bottom: 2px;
            font-weight: 700;
            letter-spacing: -0.3px;
        }

        .header p {
            font-size: 0.82em;
            opacity: 0.8;
            font-weight: 400;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 18px;
            backdrop-filter: blur(4px);
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .user-avatar:hover {
            transform: scale(1.08);
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .user-name {
            font-size: 13px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.95);
        }

        .user-points {
            font-size: 11px;
            opacity: 0.9;
            background: rgba(255, 255, 255, 0.15);
            padding: 4px 12px;
            border-radius: 20px;
            backdrop-filter: blur(4px);
            font-weight: 500;
        }

        /* 个人信息模态框 */
        .profile-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .profile-modal.active {
            display: flex;
            animation: fadeIn 0.2s ease;
        }

        .profile-content {
            background: white;
            border-radius: 20px;
            width: 100%;
            max-width: 460px;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
            animation: slideUp 0.3s ease;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .profile-header {
            background: linear-gradient(135deg, #4a3f78 0%, #6c63ff 100%);
            color: white;
            padding: 28px 30px 24px;
            text-align: center;
            border-radius: 20px 20px 0 0;
            position: relative;
        }

        .profile-close {
            position: absolute;
            top: 14px;
            right: 16px;
            background: rgba(255, 255, 255, 0.15);
            border: none;
            color: white;
            font-size: 22px;
            cursor: pointer;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            backdrop-filter: blur(4px);
        }

        .profile-close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .profile-avatar-large {
            width: 90px;
            height: 90px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            margin: 0 auto 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 38px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            border: 3px solid rgba(255, 255, 255, 0.4);
        }

        .profile-name {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .profile-role {
            font-size: 13px;
            opacity: 0.85;
            margin-bottom: 8px;
        }

        .profile-role.admin {
            background: rgba(255, 193, 7, 0.25);
            padding: 3px 12px;
            border-radius: 12px;
            display: inline-block;
            font-weight: 500;
        }

        .profile-body {
            padding: 24px 28px 28px;
        }

        .profile-section {
            margin-bottom: 22px;
        }

        .profile-section h3 {
            font-size: 15px;
            color: #1a1a2e;
            margin-bottom: 14px;
            padding-bottom: 10px;
            border-bottom: 1.5px solid #eaeef2;
            font-weight: 600;
        }

        .profile-info-row {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #f3f4f6;
        }

        .profile-info-label {
            color: #6b7280;
            font-size: 14px;
        }

        .profile-info-value {
            color: #1a1a2e;
            font-weight: 500;
            font-size: 14px;
        }

        .profile-points-display {
            text-align: center;
            padding: 20px;
            background: linear-gradient(135deg, #4a3f78 0%, #6c63ff 100%);
            border-radius: 16px;
            color: white;
            margin-bottom: 22px;
            box-shadow: 0 4px 16px rgba(108, 99, 255, 0.2);
        }

        .profile-points-value {
            font-size: 34px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .profile-points-label {
            font-size: 13px;
            opacity: 0.85;
        }

        .profile-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .profile-btn {
            padding: 12px 20px;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            text-align: center;
            display: block;
        }

        .profile-btn-primary {
            background: linear-gradient(135deg, #6c63ff 0%, #5b4e8a 100%);
            color: white;
        }

        .profile-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(108, 99, 255, 0.35);
        }

        .profile-btn-secondary {
            background: #f3f4f6;
            color: #374151;
            border: 1px solid #e5e7eb;
        }

        .profile-btn-secondary:hover {
            background: #e5e7eb;
        }

        .profile-btn-danger {
            background: #ef4444;
            color: white;
        }

        .profile-btn-danger:hover {
            background: #dc2626;
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
        }

        .profile-btn-full {
            grid-column: 1 / -1;
        }

        .main-content {
            display: flex;
            flex: 1;
            min-height: 0;
            background: #f5f6fa;
        }

        /* 自定义滚动条 */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 3px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

        .history-grid::-webkit-scrollbar {
            width: 4px;
        }

        .sidebar {
            width: 220px;
            background: #ffffff;
            border-right: 1px solid #eaeef2;
            padding: 24px 0 20px;
            flex-shrink: 0;
            display: block;
            overflow-y: auto;
        }

        .nav-title {
            padding: 8px 24px 16px;
            font-size: 0.75em;
            color: #9ca3af;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: 11px 24px;
            color: #6b7280;
            text-decoration: none;
            transition: all 0.2s ease;
            cursor: pointer;
            font-size: 0.88em;
            border-left: 3px solid transparent;
            margin: 2px 0;
            font-weight: 500;
            position: relative;
        }

        .nav-item:hover {
            background: #f8f9ff;
            color: #4a3f78;
            border-left-color: #d0cdf0;
        }

        .nav-item.active {
            background: linear-gradient(90deg, #f0eeff 0%, #ffffff 100%);
            color: #5b4e8a;
            border-left-color: #6c63ff;
            font-weight: 600;
        }

        .nav-item-icon {
            margin-right: 12px;
            font-size: 1.05em;
            width: 22px;
            text-align: center;
        }

        .content {
            flex: 1;
            display: flex;
            flex-direction: row;
            overflow: hidden;
            gap: 0;
        }

        .workspace {
            flex: 1;
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            padding: 16px 16px 16px 12px;
            overflow-x: hidden;
            overflow-y: auto;
            min-width: 0;
            align-content: flex-start;
        }

        .input-section {
            flex: 1;
            min-width: 380px;
            max-width: 100%;
            background: #ffffff;
            border-radius: 14px;
            padding: 28px 28px 24px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
            border: 1px solid #eaeef2;
        }

        .output-section {
            flex: 1;
            min-width: 380px;
            max-width: 100%;
            background: #ffffff;
            border-radius: 14px;
            padding: 28px 28px 24px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
            border: 1px solid #eaeef2;
            display: flex;
            flex-direction: column;
        }

        .form-group {
            margin-bottom: 22px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #374151;
            font-size: 0.88em;
            letter-spacing: 0.2px;
        }

        .form-group textarea,
        .form-group input {
            width: 100%;
            padding: 12px 16px;
            border: 1.5px solid #e2e8f0;
            border-radius: 10px;
            font-size: 0.92em;
            transition: all 0.25s ease;
            font-family: inherit;
            background: #fafbfc;
            color: #1a1a2e;
        }

        .form-group textarea {
            resize: vertical;
            min-height: 140px;
            line-height: 1.6;
        }

        .form-group textarea:focus,
        .form-group input:focus {
            outline: none;
            border-color: #6c63ff;
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.08);
        }

        .size-inputs {
            display: flex;
            gap: 20px;
        }

        .size-inputs .form-group {
            flex: 1;
        }

        .generate-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #6c63ff 0%, #5b4e8a 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1.02em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            letter-spacing: 0.3px;
        }

        .generate-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(108, 99, 255, 0.3);
        }

        .generate-btn:disabled {
            background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 100%);
            cursor: not-allowed;
            opacity: 0.6;
        }

        .output-title {
            font-size: 1.05em;
            font-weight: 600;
            margin-bottom: 16px;
            color: #1a1a2e;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-bottom: 12px;
            border-bottom: 1.5px solid #eaeef2;
        }

        .image-container {
            position: relative;
            background: #fafbfc;
            border: 1.5px dashed #e2e8f0;
            border-radius: 12px;
            min-height: 380px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .image-container:hover {
            border-color: #c7d2fe;
            background: #f8f9ff;
        }

        /* 结果容器仅剩"等待生成"占位符时整体隐藏（任务卡片/缩略图条已承担结果展示） */
        .image-container:has(.placeholder),
        .video-result-container:has(.placeholder) {
            display: none;
        }

        .image-container img {
            max-width: 92%;
            max-height: 440px;
            object-fit: contain;
            border-radius: 10px;
            animation: fadeIn 0.5s ease;
            transition: transform 0.3s ease;
            cursor: pointer;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }

        .image-container img:hover {
            transform: scale(1.02);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        }

        .image-container.enlarged img {
            max-width: 100%;
            max-height: 100%;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: auto;
            width: auto;
            height: auto;
            z-index: 1000;
            border-radius: 0;
        }

        .image-container.enlarged::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.95);
            z-index: 999;
        }

        .sidebar::-webkit-scrollbar {
            width: 0;
            height: 0;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.95); }
            to { opacity: 1; transform: scale(1); }
        }

        .loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            color: #6b7280;
        }

        .spinner {
            width: 44px;
            height: 44px;
            border: 3px solid #e5e7eb;
            border-top-color: #6c63ff;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .loading-text {
            font-size: 1em;
            font-weight: 500;
            color: #374151;
        }

        /* 多图展示样式 */
        .image-count-controls {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .image-count-controls select {
            padding: 8px 12px;
            border: 1.5px solid #e2e8f0;
            border-radius: 10px;
            background: white;
            font-size: 14px;
            width: 120px;
            color: #374151;
            font-weight: 500;
            outline: none;
            transition: border-color 0.2s;
            cursor: pointer;
        }

        .image-count-controls select:focus {
            border-color: #6c63ff;
            box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.08);
        }

        .image-count-controls .help-text {
            font-size: 12px;
            color: #9ca3af;
        }

        /* ZIP文件预览样式 */
        .zip-preview-container {
            background: #fafbfc;
            border: 2px dashed #e2e8f0;
            border-radius: 16px;
            transition: all 0.3s ease;
        }

        .zip-preview-container:hover {
            border-color: #c7d2fe;
            background: #f8f9ff;
        }

        /* 多图结果展示样式 */
        .multi-image-container {
            display: flex;
            flex-wrap: wrap;
            gap: 14px;
            margin-top: 14px;
        }

        .single-image-container {
            flex: 1;
            min-width: 260px;
            max-width: 100%;
        }

        .single-image-container .image-wrapper {
            background: #fafbfc;
            border: 1.5px dashed #e2e8f0;
            border-radius: 12px;
            padding: 14px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            transition: all 0.25s ease;
        }

        .single-image-container .image-wrapper:hover {
            border-color: #c7d2fe;
            background: #f8f9ff;
            transform: translateY(-2px);
        }

        .single-image-container img {
            max-width: 100%;
            max-height: 280px;
            object-fit: contain;
            border-radius: 10px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        }

        .image-index {
            font-size: 13px;
            color: #6b7280;
            font-weight: 500;
        }

        .multi-download-btn {
            margin-top: 14px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }

        .multi-download-btn:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
        }

        /* 单图查看器样式（多图切换显示） */
        .single-image-viewer {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 380px;
            background: #fafbfc;
            border: 1.5px dashed #e2e8f0;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 10px;
        }

        .single-image-viewer img {
            max-width: 100%;
            max-height: 480px;
            object-fit: contain;
            border-radius: 10px;
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
            cursor: zoom-in;
            transition: transform 0.3s ease;
        }

        .single-image-viewer img:hover {
            transform: scale(1.02);
        }

        /* 图像编号选择器 */
        .image-selector {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }

        .image-number {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: #f3f4f6;
            color: #6b7280;
            font-weight: 600;
            font-size: 0.88em;
            cursor: pointer;
            transition: all 0.25s ease;
            border: 1.5px solid transparent;
        }

        .image-number:hover {
            background: #e5e7eb;
            color: #374151;
            transform: translateY(-2px);
        }

        .image-number.active {
            background: linear-gradient(135deg, #6c63ff 0%, #5b4e8a 100%);
            color: white;
            border-color: rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
        }

        .loading-subtext {
            font-size: 0.85em;
            opacity: 0.7;
            color: #9ca3af;
        }

        .placeholder {
            color: #9ca3af;
            font-size: 0.95em;
            text-align: center;
            padding: 50px 40px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .placeholder::before {
            content: '🖼️';
            font-size: 2.8em;
            opacity: 0.4;
        }

        .error-message {
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #dc2626;
            padding: 14px 16px;
            border-radius: 10px;
            margin-top: 14px;
            font-size: 0.9em;
            line-height: 1.5;
        }

        .success-message {
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
            color: #16a34a;
            padding: 14px 16px;
            border-radius: 10px;
            margin-top: 14px;
            font-size: 0.9em;
            line-height: 1.5;
        }

        /* ============ 多任务排队系统样式 ============ */
        .task-stack {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 14px;
        }

        .task-card {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(12px);
            border-radius: 14px;
            border: 1.5px solid #e6e2f7;
            box-shadow: 0 4px 18px rgba(76, 63, 120, 0.08);
            overflow: hidden;
            animation: taskCardIn 0.3s ease;
        }

        @keyframes taskCardIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .task-card.status-queued { border-color: #d8d2f0; }
        .task-card.status-running {
            border-color: #6c63ff;
            animation: taskCardIn 0.3s ease, taskBreath 2s ease-in-out 0.3s infinite;
        }
        @keyframes taskBreath {
            0%, 100% { box-shadow: 0 4px 18px rgba(108, 99, 255, 0.12); }
            50% { box-shadow: 0 4px 26px rgba(108, 99, 255, 0.35); }
        }
        .task-card.status-success { border-color: #bbf7d0; }
        .task-card.status-failed,
        .task-card.status-timeout { border-color: #fecaca; }
        .task-card.status-cancelled { border-color: #e5e7eb; opacity: 0.75; }

        .task-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 16px;
            background: linear-gradient(90deg, rgba(108, 99, 255, 0.08), rgba(74, 63, 120, 0.04));
            font-size: 13px;
        }

        .task-card-title { font-weight: 600; color: #4a3f78; flex: 1; }

        .task-card-status {
            font-size: 12px;
            color: #666;
            padding: 2px 10px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.7);
        }

        .task-card.status-running .task-card-status { color: #3b82f6; }
        .task-card.status-queued .task-card-status { color: #f59e0b; }
        .task-card.status-success .task-card-status { color: #10b981; }
        .task-card.status-failed .task-card-status,
        .task-card.status-timeout .task-card-status { color: #ff4757; }

        .task-cancel-btn {
            border: none;
            background: rgba(255, 71, 87, 0.12);
            color: #ff4757;
            border-radius: 8px;
            padding: 3px 10px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .task-cancel-btn:hover { background: rgba(255, 71, 87, 0.25); }
        .task-cancel-btn.small { padding: 1px 7px; font-size: 11px; }

        .task-card-body {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 60px;
            padding: 12px;
        }

        .task-card-body img { max-width: 100%; border-radius: 8px; cursor: pointer; }
        .task-card-body video { max-width: 100%; border-radius: 8px; }

        .task-card-download { text-align: center; padding: 0 12px 12px; }

        .task-status-block {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #6b7280;
            font-size: 14px;
            padding: 10px;
        }

        .task-status-block .spinner { width: 32px; height: 32px; }

        .task-hourglass { font-size: 24px; animation: hourglassFlip 2s ease-in-out infinite; display: inline-block; }
        @keyframes hourglassFlip {
            0%, 45% { transform: rotate(0deg); }
            55%, 100% { transform: rotate(180deg); }
        }

        .running-text { display: flex; flex-direction: column; gap: 4px; }
        .task-elapsed { font-size: 12px; color: #9ca3af; font-variant-numeric: tabular-nums; }

        .failed-block { flex-direction: column; text-align: center; gap: 6px; }
        .failed-title { font-size: 15px; font-weight: 600; color: #ff4757; }
        .failed-msg { font-size: 12px; color: #999; max-width: 90%; word-break: break-all; }
        .refund-tip { font-size: 12px; color: #2ecc71; }

        .cancelled-block { color: #9ca3af; font-size: 13px; }

        /* 完成卡片折叠动画 */
        .task-card.collapsing {
            animation: taskCardOut 0.3s ease forwards;
            pointer-events: none;
        }
        @keyframes taskCardOut {
            from { opacity: 1; transform: translateY(0); }
            to { opacity: 0; transform: translateY(-8px); }
        }

        /* 结果缩略图条 */
        .task-thumb-strip {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 4px 2px;
        }
        .task-thumb-strip:empty { display: none; }

        .task-thumb {
            position: relative;
            width: 72px;
            height: 72px;
            border-radius: 10px;
            overflow: hidden;
            cursor: pointer;
            border: 1.5px solid #e6e2f7;
            box-shadow: 0 2px 8px rgba(76, 63, 120, 0.10);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            background: #f4f2fb;
            flex-shrink: 0;
        }
        .task-thumb:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 14px rgba(76, 63, 120, 0.18);
        }
        .task-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .task-thumb.thumb-in { animation: thumbPopIn 0.35s ease; }
        @keyframes thumbPopIn {
            from { opacity: 0; transform: scale(0.6); }
            to { opacity: 1; transform: scale(1); }
        }

        .thumb-download {
            position: absolute;
            right: 4px;
            bottom: 4px;
            width: 22px;
            height: 22px;
            border-radius: 6px;
            background: rgba(74, 63, 120, 0.85);
            color: #fff;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .task-thumb:hover .thumb-download { opacity: 1; }

        .thumb-video-badge {
            position: absolute;
            top: 4px;
            left: 4px;
            font-size: 13px;
            background: rgba(0, 0, 0, 0.55);
            border-radius: 6px;
            padding: 1px 5px;
        }

        /* 全局任务浮动面板 */
        #globalTaskPanel {
            position: fixed;
            right: 20px;
            bottom: 20px;
            width: 300px;
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(16px);
            border-radius: 16px;
            border: 1px solid rgba(108, 99, 255, 0.2);
            box-shadow: 0 8px 32px rgba(74, 63, 120, 0.18);
            z-index: 9000;
            overflow: hidden;
            animation: taskCardIn 0.3s ease;
        }

        .task-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: linear-gradient(90deg, #6c63ff, #4a3f78);
            color: #fff;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            user-select: none;
        }

        .panel-toggle { font-size: 11px; opacity: 0.85; }

        .task-panel-body {
            max-height: 320px;
            overflow-y: auto;
            padding: 8px;
        }

        .task-panel-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 10px;
            font-size: 13px;
            transition: background 0.2s ease;
        }
        .task-panel-item:hover { background: rgba(108, 99, 255, 0.06); }
        .task-panel-item.clickable { cursor: pointer; }
        .task-panel-item.clickable:hover { background: rgba(108, 99, 255, 0.14); }

        /* 跳转后卡片高亮闪烁 */
        .task-card.flash { animation: taskCardFlash 1.3s ease; }
        @keyframes taskCardFlash {
            0%, 100% { box-shadow: 0 4px 18px rgba(76, 63, 120, 0.08); }
            30%, 60% { box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.55), 0 4px 26px rgba(108, 99, 255, 0.35); }
        }

        .task-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .dot-running { background: #3b82f6; animation: dotPulse 1.2s ease-in-out infinite; }
        .dot-queued { background: #f59e0b; }
        .dot-success { background: #10b981; }
        .dot-failed { background: #ff4757; }
        .dot-cancelled { background: #9ca3af; }

        @keyframes dotPulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.3); }
        }

        .panel-item-name {
            flex: 1;
            color: #333;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .panel-item-status { font-size: 12px; color: #888; font-variant-numeric: tabular-nums; }

        /* 任务完成 Toast 通知 */
        #taskToastWrap {
            position: fixed;
            top: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 9500;
        }

        .task-toast {
            padding: 12px 20px;
            border-radius: 12px;
            font-size: 14px;
            color: #fff;
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
            opacity: 0;
            transform: translateX(40px);
            transition: all 0.3s ease;
            max-width: 320px;
        }
        .task-toast.show { opacity: 1; transform: translateX(0); }
        .task-toast.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
        .task-toast.toast-error { background: linear-gradient(135deg, #ff4757, #e84118); }
        .task-toast.toast-info { background: linear-gradient(135deg, #6c63ff, #4a3f78); }

        @media (max-width: 768px) {
            #globalTaskPanel { width: 240px; right: 12px; bottom: 12px; }
        }

        .download-btn {
            margin-top: 14px;
            padding: 12px 24px;
            background: #10b981;
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 0.92em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
            width: 100%;
            text-align: center;
            letter-spacing: 0.3px;
        }

        .download-btn:hover {
            background: #059669;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        }

        .history-section {
            width: 340px;
            min-width: 340px;
            border-left: 1px solid #eaeef2;
            padding: 20px 16px;
            background: #ffffff;
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

        .history-title {
            font-size: 0.95em;
            font-weight: 600;
            margin-bottom: 14px;
            color: #1a1a2e;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-bottom: 10px;
            border-bottom: 1px solid #eaeef2;
        }

        .clear-history {
            font-size: 0.78em;
            color: #ef4444;
            cursor: pointer;
            text-decoration: none;
            padding: 4px 10px;
            border-radius: 6px;
            transition: all 0.2s ease;
            background: #fef2f2;
            font-weight: 500;
        }

        .clear-history:hover {
            color: #fff;
            background: #ef4444;
            transform: translateY(-1px);
        }

        .history-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            flex: 1;
            overflow-y: auto;
            padding-right: 4px;
            max-height: calc(100vh - 120px);
            align-content: flex-start;
            justify-content: flex-start;
        }

        .history-item {
            position: relative;
            width: 72px;
            height: 72px;
            background: #f3f4f6;
            border-radius: 10px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
            flex-shrink: 0;
            border: 1px solid #e5e7eb;
        }

        .history-item:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            border-color: #6c63ff;
        }

        .history-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .history-item-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
            padding: 4px 2px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .history-item:hover .history-item-overlay {
            opacity: 1;
        }

        .history-item-date {
            color: white;
            font-size: 0.6em;
            text-align: center;
            line-height: 1.2;
        }

        /* 放大遮罩层 */
        .enlarge-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.95);
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
        }

        .enlarge-overlay.active {
            display: flex;
            animation: fadeIn 0.2s ease;
        }

        .enlarge-overlay img {
            max-width: 92%;
            max-height: 92%;
            object-fit: contain;
            border-radius: 6px;
            box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
        }

        /* 图像上传区域 */
        .image-upload-area {
            border: 1.5px dashed #e2e8f0;
            border-radius: 12px;
            min-height: 180px;
            position: relative;
            transition: all 0.3s ease;
            background: #fafbfc;
            cursor: pointer;
        }

        .image-upload-area:hover {
            border-color: #c7d2fe;
            background: #f8f9ff;
        }

        .image-upload-area.drag-over {
            border-color: #6c63ff;
            background: #eeedff;
            border-style: dashed;
            border-width: 2px;
        }

        .upload-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 36px 20px;
            color: #9ca3af;
        }

        .upload-icon {
            font-size: 2.8em;
            margin-bottom: 12px;
            opacity: 0.7;
        }

        .upload-text {
            font-size: 0.98em;
            font-weight: 500;
            color: #6b7280;
            margin-bottom: 4px;
        }

        .upload-subtext {
            font-size: 0.82em;
            color: #9ca3af;
        }

        .upload-preview {
            position: relative;
            width: 100%;
            height: 180px;
            overflow: hidden;
            border-radius: 10px;
        }

        .upload-preview img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #f3f4f6;
        }

        .remove-image-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: all 0.3s ease;
            backdrop-filter: blur(4px);
        }

        .remove-image-btn:hover {
            background: rgba(239, 68, 68, 0.9);
            transform: scale(1.1);
        }

        /* 历史记录拖拽样式 */
        .history-item.dragging {
            opacity: 0.5;
            cursor: grabbing;
        }

        .image-upload-area.drag-over,
        .image-upload-area.drop-active {
            border-color: #6c63ff;
            background: #eeedff;
            border-width: 2px;
            border-style: dashed;
            transform: scale(1.01);
            transition: all 0.2s ease;
            box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.08);
        }

        .image-upload-area.drag-over .upload-placeholder,
        .image-upload-area.drop-active .upload-placeholder {
            color: #6c63ff;
        }

        .image-upload-area.drag-over .upload-icon,
        .image-upload-area.drop-active .upload-icon {
            transform: scale(1.15);
            opacity: 0.9;
        }

        .empty-history {
            text-align: center;
            color: #9ca3af;
            padding: 24px;
            font-size: 0.9em;
        }

        .tips {
            background: #f8f9ff;
            border: 1px solid #e0e7ff;
            border-left: 4px solid #6c63ff;
            padding: 14px 18px;
            border-radius: 10px;
            margin-top: 20px;
            font-size: 0.85em;
            color: #6b7280;
        }

        .tips h4 {
            color: #4a3f78;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .tips ul {
            padding-left: 18px;
            margin-top: 8px;
        }

        .tips li {
            margin: 6px 0;
            line-height: 1.6;
        }

        .slider-container {
            margin-top: 10px;
        }

        .slider-container input[type="range"] {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #e5e7eb;
            outline: none;
            -webkit-appearance: none;
            margin: 8px 0;
        }

        .slider-container input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #6c63ff;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 2px 6px rgba(108, 99, 255, 0.3);
        }

        .slider-container input[type="range"]::-webkit-slider-thumb:hover {
            background: #5b4e8a;
            transform: scale(1.15);
        }

        .slider-container input[type="range"]::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #6c63ff;
            cursor: pointer;
            border: none;
            transition: all 0.25s ease;
            box-shadow: 0 2px 6px rgba(108, 99, 255, 0.3);
        }

        .slider-container input[type="range"]::-moz-range-thumb:hover {
            background: #5b4e8a;
            transform: scale(1.15);
        }

        .slider-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 4px;
            font-size: 0.82em;
            color: #9ca3af;
        }

        .slider-hint {
            margin-top: 8px;
            font-size: 0.82em;
            color: #9ca3af;
            line-height: 1.5;
        }

        .page {
            display: none;
            width: 100%;
            height: 100%;
        }

        .page.active {
            display: flex;
            flex-direction: column;
        }

        .coming-soon {
            text-align: center;
            padding: 60px 40px;
            color: #666;
        }

        .coming-soon h2 {
            font-size: 2em;
            margin-bottom: 15px;
            color: #444;
        }

        .coming-soon p {
            font-size: 1.1em;
            opacity: 0.8;
        }

        /* 生成视频页面样式 */
        .video-upload-area {
            min-height: 140px;
            border: 1.5px dashed #e2e8f0;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            background: #fafbfc;
            transition: all 0.3s ease;
        }

        .video-upload-area:hover {
            border-color: #c7d2fe;
            background: #f8f9ff;
        }

        .video-upload-area.drag-over {
            border-color: #6c63ff;
            background: #eeedff;
        }

        .video-upload-area .upload-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .video-upload-area .upload-icon {
            font-size: 2.6em;
            margin-bottom: 10px;
            opacity: 0.7;
        }

        .video-upload-area .upload-text {
            font-size: 1em;
            color: #6b7280;
            margin-bottom: 4px;
            font-weight: 500;
        }

        .video-upload-area .upload-subtext {
            font-size: 0.85em;
            color: #9ca3af;
        }

        .video-upload-area .upload-preview {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .video-upload-area video {
            max-width: 100%;
            max-height: 280px;
            border-radius: 10px;
        }

        .video-result-container {
            padding: 14px;
            min-height: 280px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .video-result-container video {
            max-width: 100%;
            max-height: 480px;
            border-radius: 12px;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
        }

        .video-result-container .placeholder {
            color: #9ca3af;
            font-size: 1em;
        }

        .video-result-container .loading-container {
            text-align: center;
        }

        .video-result-container .loading-text {
            margin-top: 14px;
            font-size: 1em;
            color: #6b7280;
        }

        .video-result-container .loading-subtext {
            margin-top: 8px;
            font-size: 0.85em;
            color: #9ca3af;
        }

        /* ZIP 解压加载样式 */
        .loading-container {
            text-align: center;
            padding: 50px 20px;
        }

        .loading-container .loading-spinner {
            width: 44px;
            height: 44px;
            margin: 0 auto 18px;
            border: 3px solid #e5e7eb;
            border-top: 3px solid #6c63ff;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .loading-container p {
            color: #6b7280;
            font-size: 1em;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @media (max-width: 968px) {
            .main-content {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid #eaeef2;
                display: flex;
                flex-wrap: nowrap;
                overflow-x: auto;
                overflow-y: hidden;
                padding: 12px 16px;
                gap: 2px;
                -webkit-overflow-scrolling: touch;
            }

            .nav-title {
                display: none;
            }

            .nav-item {
                display: inline-flex;
                white-space: nowrap;
                padding: 10px 16px;
                border-left: none;
                border-bottom: 3px solid transparent;
                font-size: 0.84em;
                border-radius: 0;
                flex-shrink: 0;
            }

            .nav-item.active {
                background: transparent;
                border-left: none;
                border-bottom: 3px solid #6c63ff;
                color: #6c63ff;
                font-weight: 600;
            }

            .content {
                flex-direction: column;
            }

            .workspace {
                padding: 12px;
                gap: 12px;
            }

            .input-section, .output-section {
                min-width: 100%;
                max-width: 100%;
                padding: 20px;
                margin: 0;
            }

            .history-section {
                width: 100%;
                min-width: 100%;
                border-left: none;
                border-top: 1px solid #eaeef2;
                max-height: 300px;
                padding: 16px;
            }
        }

        @media (max-width: 1024px) {
            .sidebar {
                width: 200px;
            }
            
            .input-section,
            .output-section {
                min-width: 300px;
                max-width: 100%;
            }

            .history-section {
                width: 260px;
                min-width: 260px;
            }
        }

        @media (max-width: 768px) {
            .header {
                padding: 12px 16px;
            }

            .header h1 {
                font-size: 1.3em;
            }
            
            .header p {
                font-size: 0.75em;
            }
            
            .user-name {
                font-size: 12px;
            }
            
            .user-points {
                font-size: 10px;
                padding: 2px 8px;
            }
            
            .user-avatar {
                width: 34px;
                height: 34px;
                font-size: 15px;
            }
            
            .workspace {
                padding: 10px;
                flex-direction: column;
            }
            
            .size-inputs {
                flex-direction: column;
                gap: 10px;
            }
            
            .input-section,
            .output-section {
                min-width: 100%;
                max-width: 100%;
                padding: 16px;
            }
            
            .form-group {
                margin-bottom: 16px;
            }
            
            .form-group textarea,
            .form-group input {
                padding: 10px 14px;
                font-size: 0.9em;
            }
            
            .form-group textarea {
                min-height: 100px;
            }
            
            .generate-btn {
                padding: 12px;
                font-size: 0.96em;
            }
            
            .image-container {
                min-height: 280px;
            }

            .single-image-viewer {
                min-height: 280px;
            }
            
            .sidebar {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid #eaeef2;
                padding: 10px 12px;
                overflow-x: auto;
                white-space: nowrap;
                display: flex;
                flex-wrap: nowrap;
                gap: 0;
            }

            .nav-title {
                display: none;
            }
            
            .nav-item {
                padding: 10px 14px;
                font-size: 0.84em;
                white-space: nowrap;
                flex-shrink: 0;
                border-left: none;
                border-bottom: 3px solid transparent;
            }

            .nav-item.active {
                border-left: none;
                border-bottom: 3px solid #6c63ff;
            }
            
            .main-content {
                flex-direction: column;
            }
            
            .content {
                flex-direction: column;
            }

            .history-section {
                width: 100%;
                min-width: 100%;
                max-height: 250px;
            }
        }

        @media (max-width: 480px) {
            .header {
                padding: 10px 12px;
                flex-direction: column;
                gap: 8px;
            }
            
            .header-left {
                text-align: center;
            }
            
            .header-right {
                width: 100%;
                justify-content: center;
            }
            
            .header h1 {
                font-size: 1.2em;
                line-height: 1.2;
            }
            
            .workspace {
                padding: 8px;
                gap: 12px;
            }
            
            .input-section,
            .output-section {
                padding: 12px;
                border-radius: 12px;
            }
            
            .form-group textarea {
                min-height: 80px;
                font-size: 14px;
            }
            
            .form-group input {
                font-size: 14px;
            }
            
            .image-container {
                min-height: 220px;
            }

            .single-image-viewer {
                min-height: 220px;
            }
            
            .sidebar {
                padding: 8px 10px;
            }

            .nav-item {
                padding: 8px 12px;
                font-size: 0.82em;
            }
            
            .nav-item-icon {
                font-size: 0.95em;
                margin-right: 6px;
            }
        }
        
        /* iOS Safari 输入框优化 */
        @supports (-webkit-touch-callout: none) {
            .form-group textarea,
            .form-group input {
                font-size: 16px; /* iOS上禁止字体自动缩放 */
            }
            
            .generate-btn {
                cursor: pointer;
            }
        }
        
        /* 移动端触摸优化 */
        @media (hover: none) and (pointer: coarse) {
            .nav-item:hover {
                background: none;
            }
            
            .generate-btn:hover:not(:disabled) {
                transform: none;
            }
            
            .user-avatar:hover {
                transform: none;
            }
        }
        
        /* 防止移动端点击输入框时页面缩放 */
        @media screen and (max-width: 768px) {
            .form-group textarea,
            .form-group input,
            select {
                touch-action: manipulation;
            }
        }

        /* 局部替换页面样式 */
        .mask-canvas-container {
            position: relative;
            width: 100%;
            max-width: 512px;
            margin-bottom: 10px;
            display: none;
        }

        #maskCanvas {
            border: 2px dashed #667eea;
            border-radius: 10px;
            background-color: #f5f5f5;
            cursor: crosshair;
            max-width: 100%;
        }

        .mask-controls {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
            flex-wrap: wrap;
        }

        .mask-btn {
            padding: 8px 12px;
            border: none;
            border-radius: 6px;
            background-color: #e0e0e0;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .mask-btn:hover {
            background-color: #d0d0d0;
        }

        .mask-btn.active {
            background-color: #667eea;
            color: white;
        }

        .brush-size-label {
            font-size: 14px;
            color: #666;
        }

        #brushSize {
            width: 100px;
        }

        .prompt-input {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 14px;
            resize: vertical;
            min-height: 80px;
            font-family: inherit;
            transition: border-color 0.3s;
        }

        .prompt-input:focus {
            outline: none;
            border-color: #667eea;
        }

        .prompt-input::placeholder {
            color: #999;
        }

        /* 画笔叠加按钮 */
        .brush-overlay-btn {
            position: absolute;
            top: 8px;
            right: 30px;
            padding: 6px 12px;
            background: rgba(102, 126, 234, 0.9);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 5;
        }

        .upload-preview:hover .brush-overlay-btn {
            opacity: 1;
        }

        .brush-overlay-btn:hover {
            background: rgba(102, 126, 234, 1);
        }

        /* 遮罩编辑器 */
        .mask-editor-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 10000;
            display: none;
            flex-direction: column;
        }

        .mask-editor-container {
            display: flex;
            flex-direction: column;
            height: 100%;
            padding: 20px;
        }

        .mask-editor-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 20px;
            background: #2a2a3e;
            border-radius: 12px 12px 0 0;
            gap: 20px;
            flex-wrap: wrap;
        }

        .mask-editor-title {
            font-size: 20px;
            font-weight: bold;
            color: white;
        }

        .mask-editor-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .mask-tool-btn {
            padding: 10px 18px;
            border: none;
            border-radius: 8px;
            background: #3a3a50;
            color: white;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .mask-tool-btn:hover {
            background: #4a4a65;
        }

        .mask-tool-btn.active {
            background: #667eea;
        }

        .brush-size-control {
            display: flex;
            align-items: center;
            gap: 8px;
            color: white;
            font-size: 14px;
        }

        #maskEditorBrushSize {
            width: 120px;
            cursor: pointer;
        }

        .mask-editor-actions {
            display: flex;
            gap: 12px;
        }

        .mask-cancel-btn {
            padding: 10px 24px;
            border: 2px solid #666;
            border-radius: 8px;
            background: transparent;
            color: #aaa;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .mask-cancel-btn:hover {
            border-color: #888;
            color: #fff;
        }

        .mask-save-btn {
            padding: 10px 24px;
            border: none;
            border-radius: 8px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .mask-save-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .mask-editor-body {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: auto;
            background: #1a1a2e;
            padding: 20px;
        }

        #maskEditorCanvas {
            border: 3px solid #667eea;
            border-radius: 8px;
            cursor: crosshair;
            max-width: 100%;
            max-height: 100%;
        }

        .mask-editor-hint {
            padding: 12px 20px;
            background: #2a2a3e;
            border-radius: 0 0 12px 12px;
            color: #888;
            font-size: 13px;
            text-align: center;
        }
