        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
            color: white;
        }

        .header h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .header p {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        /* 全局设置区域 */
        .global-settings {
            background: white;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        .global-settings h3 {
            color: #333;
            margin-bottom: 15px;
            font-size: 1.2rem;
        }

        .settings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .setting-item label {
            display: block;
            margin-bottom: 5px;
            color: #555;
            font-size: 13px;
            font-weight: 500;
        }

        .setting-item input,
        .setting-item select {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .setting-item input:focus,
        .setting-item select:focus {
            outline: none;
            border-color: #667eea;
        }

        .setting-item input[type="password"] {
            font-family: monospace;
        }

        .functions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
            gap: 25px;
            margin-bottom: 40px;
        }

        .function-card {
            background: white;
            border-radius: 20px;
            padding: 25px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
        }

        .function-card h3 {
            color: #333;
            font-size: 1.4rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .function-card .icon {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 14px;
        }

        .generate .icon {
            background: #4CAF50;
        }

        .edit .icon {
            background: #FF9800;
        }

        .clone .icon {
            background: #2196F3;
        }

        .input-group {
            margin-bottom: 15px;
        }

        .input-group label {
            display: block;
            margin-bottom: 6px;
            color: #555;
            font-weight: 500;
            font-size: 14px;
        }

        .input-group input[type="text"],
        .input-group textarea {
            width: 100%;
            padding: 10px 14px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 14px;
            transition: border-color 0.3s ease;
        }

        .input-group input[type="text"]:focus,
        .input-group textarea:focus {
            outline: none;
            border-color: #667eea;
        }

        .input-group textarea {
            resize: vertical;
            min-height: 70px;
        }

        /* 行内选项组 */
        .inline-options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 15px;
        }

        .inline-options select {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 13px;
            background: white;
            cursor: pointer;
        }

        .inline-options select:focus {
            outline: none;
            border-color: #667eea;
        }

        .inline-options label {
            font-size: 12px;
            color: #666;
            margin-bottom: 4px;
            display: block;
        }

        .drop-zone {
            border: 3px dashed #ccc;
            border-radius: 15px;
            padding: 30px 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: #f9f9f9;
            position: relative;
            overflow: hidden;
        }

        .drop-zone:hover {
            border-color: #667eea;
            background: #f0f4ff;
        }

        .drop-zone.dragover {
            border-color: #4CAF50;
            background: #e8f5e8;
            transform: scale(1.02);
        }

        .drop-zone input[type="file"] {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
        }

        .drop-zone-content {
            pointer-events: none;
        }

        .drop-zone-content .upload-icon {
            font-size: 2.5rem;
            color: #ccc;
            margin-bottom: 10px;
        }

        .drop-zone.dragover .upload-icon {
            color: #4CAF50;
        }

        .image-preview-container {
            position: relative;
            display: inline-block;
            margin-top: 12px;
        }

        .image-preview {
            max-width: 100%;
            max-height: 180px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .delete-image-btn {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #ff4444;
            color: white;
            border: none;
            cursor: pointer;
            font-size: 14px;
            line-height: 24px;
            text-align: center;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
            transition: all 0.2s;
        }

        .delete-image-btn:hover {
            background: #cc0000;
            transform: scale(1.1);
        }

        /* 多图预览容器 */
        .multi-image-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 12px;
        }

        .multi-image-item {
            position: relative;
            display: inline-block;
        }

        .multi-image-item img {
            width: 80px;
            height: 80px;
            object-fit: cover;
            border-radius: 8px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        }

        .multi-image-item .delete-image-btn {
            width: 20px;
            height: 20px;
            font-size: 12px;
            line-height: 20px;
            top: -6px;
            right: -6px;
        }

        .image-count {
            font-size: 12px;
            color: #666;
            margin-top: 8px;
        }

        .btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 14px 28px;
            border-radius: 25px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            margin-top: 15px;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .loading {
            display: none;
            text-align: center;
            margin-top: 15px;
        }

        .loading.show {
            display: block;
        }

        .spinner {
            border: 3px solid #f3f3f3;
            border-top: 3px solid #667eea;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            animation: spin 1s linear infinite;
            margin: 0 auto 8px;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .result {
            margin-top: 20px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 12px;
            display: none;
        }

        .result.show {
            display: block;
        }

        .result img {
            max-width: 100%;
            border-radius: 10px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .preset-prompts {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 8px;
        }

        .preset-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .preset-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .error,
        .success {
            padding: 12px;
            border-radius: 10px;
            margin-top: 12px;
            display: none;
            font-size: 14px;
        }

        .error {
            background: #ffebee;
            color: #c62828;
        }

        .success {
            background: #e8f5e8;
            color: #2e7d32;
        }

        .error.show,
        .success.show {
            display: block;
        }

        /* 图片放大弹窗 */
        .image-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            cursor: pointer;
            justify-content: center;
            align-items: center;
        }

        .image-modal.show {
            display: flex;
        }

        .image-modal img {
            max-width: 95%;
            max-height: 95%;
            border-radius: 8px;
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
        }

        .image-modal-close {
            position: absolute;
            top: 20px;
            right: 30px;
            color: white;
            font-size: 40px;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .image-modal-close:hover {
            transform: scale(1.2);
        }

        .result img {
            cursor: zoom-in;
        }

        .image-modal img {
            cursor: zoom-out;
        }

        @media (max-width: 768px) {
            .functions-grid {
                grid-template-columns: 1fr;
            }

            .header h1 {
                font-size: 1.8rem;
            }

            .function-card {
                padding: 20px;
            }

            .settings-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        /* 带按钮的输入框组合 */
        .input-with-btn {
            display: flex;
            gap: 10px;
        }

        .input-with-btn input {
            flex: 1;
        }

        .btn-sm {
            padding: 8px 16px;
            font-size: 13px;
            border-radius: 8px;
            white-space: nowrap;
            margin-top: 0;
            width: auto;
            background: #667eea;
            color: white;
            border: none;
            cursor: pointer;
            transition: opacity 0.3s;
        }

        .btn-sm:hover {
            opacity: 0.9;
        }

        .btn-sm:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        /* Toast 提示 */
        .toast {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 10px 20px;
            border-radius: 20px;
            font-size: 14px;
            z-index: 2000;
            opacity: 0;
            transition: opacity 0.3s;
            pointer-events: none;
        }

        .toast.show {
            opacity: 1;
        }

        /* 分组选择模态框 */
        .group-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1500;
            align-items: center;
            justify-content: center;
        }

        .group-modal.show {
            display: flex;
        }

        .group-modal-content {
            background: white;
            padding: 25px;
            border-radius: 15px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .group-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 15px;
            max-height: 300px;
            overflow-y: auto;
        }

        .group-btn {
            padding: 10px;
            text-align: left;
            background: #f5f7fa;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .group-btn:hover {
            background: #eef2f7;
            border-color: #667eea;
            color: #667eea;
        }

        /* 批量结果网格布局 */
        .batch-result-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            margin: 15px 0;
        }

        .batch-result-item {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s;
        }

        .batch-result-item:hover {
            transform: scale(1.05);
        }

        .batch-result-item img {
            width: 100%;
            height: auto;
            display: block;
            cursor: pointer;
        }

        .batch-index {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
        }

        /* 画廊区域样式 */
        .gallery-section {
            margin-top: 40px;
            padding: 30px;
            background: white;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            width: 100%;
            box-sizing: border-box;
            animation: fadeIn 0.5s ease-out;
        }

        .gallery-section h3 {
            margin-bottom: 25px;
            color: #2d3748;
            font-size: 1.5em;
            border-bottom: 2px solid #edf2f7;
            padding-bottom: 15px;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
            margin-bottom: 20px;
        }

        .gallery-item {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s, box-shadow 0.3s;
            background: #f7fafc;
        }

        .gallery-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }

        .gallery-item img {
            width: 100%;
            height: auto;
            display: block;
            cursor: zoom-in;
            object-fit: cover;
        }

        .gallery-index {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 12px;
            backdrop-filter: blur(4px);
        }

        .gallery-delete-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            border: none;
            background: rgba(231, 76, 60, 0.9);
            color: white;
            border-radius: 50%;
            font-size: 14px;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .gallery-item:hover .gallery-delete-btn {
            opacity: 1;
        }

        .gallery-delete-btn:hover {
            background: #c0392b;
        }

        .gallery-actions {
            text-align: right;
            margin-top: 20px;
            border-top: 1px solid #edf2f7;
            padding-top: 20px;
        }

        /* 确认弹窗样式 */
        .confirm-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease-out;
        }

        .confirm-modal.show {
            display: flex;
        }

        .confirm-modal-content {
            background: white;
            padding: 30px;
            border-radius: 20px;
            width: 90%;
            max-width: 450px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.3s ease-out;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .confirm-modal-title {
            font-size: 1.3em;
            font-weight: bold;
            color: #2d3748;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .confirm-modal-message {
            color: #4a5568;
            line-height: 1.6;
            margin-bottom: 25px;
            padding: 15px;
            background: #fff5f5;
            border-left: 4px solid #e74c3c;
            border-radius: 8px;
        }

        .confirm-modal-buttons {
            display: flex;
            gap: 15px;
            justify-content: flex-end;
        }

        .confirm-modal-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            min-width: 100px;
        }

        .confirm-modal-btn-cancel {
            background: #e2e8f0;
            color: #4a5568;
        }

        .confirm-modal-btn-cancel:hover {
            background: #cbd5e0;
        }

        .confirm-modal-btn-confirm {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .confirm-modal-btn-confirm:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
