* { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
            color: #ffffff;
            min-height: 100vh;
            margin: 0;
            padding-top: 0;
            display: block;
            overflow-x: hidden;
            box-sizing: border-box;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            background: rgba(15, 23, 42, 0.95);
            border-bottom: 1px solid rgba(76, 201, 240, 0.2);
            flex-shrink: 0;
            position: relative;
        }
        .logo {
            font-size: 18px;
            font-weight: bold;
            background: linear-gradient(135deg, #4cc9f0, #3b82f6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .nav-buttons {
            display: flex;
            gap: 6px;
        }
        .nav-btn {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        .nav-btn.active {
            background: #059669;
            color: #ffffff;
        }
        .nav-btn.inactive {
            background: #2563eb;
            color: #ffffff;
        }
        .nav-btn.inactive:hover {
            background: #1d4ed8;
            color: #ffffff;
        }
        .nav-btn.gallery-btn {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #1e293b;
            font-weight: 600;
            animation: galleryBreathe 2s ease-in-out infinite;
            position: relative;
        }
        .nav-btn.gallery-btn:hover {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            transform: scale(1.05);
        }
        @keyframes galleryBreathe {
            0%, 100% { box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
            50% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.9); }
        }
        
        .agreement-btn {
            width: 80px;
            height: 32px;
            background: rgba(30, 41, 59, 0.95);
            border: 1px solid rgba(76, 201, 240, 0.3);
            border-radius: 6px;
            color: #4cc9f0;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .agreement-btn:hover {
            background: rgba(76, 201, 240, 0.2);
            border-color: rgba(76, 201, 240, 0.6);
            transform: scale(1.1);
        }
        
        .agreement-dropdown {
            display: none;
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: #1e293b;
            border-radius: 8px;
            padding: 12px;
            width: 180px;
            border: 1px solid rgba(76, 201, 240, 0.3);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            z-index: 1000;
        }
        .agreement-dropdown.show {
            display: block;
        }
        .agreement-links {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .agreement-link {
            padding: 10px 12px;
            background: rgba(71, 85, 105, 0.5);
            border: none;
            border-radius: 6px;
            color: #cbd5e1;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: left;
        }
        .agreement-link:hover {
            background: rgba(76, 201, 240, 0.2);
            color: #ffffff;
        }
        .user-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .user-btn {
            padding: 7px 14px;
            background: rgba(71, 85, 105, 0.6);
            border: none;
            border-radius: 5px;
            color: #cbd5e1;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .user-btn:hover {
            background: rgba(100, 116, 139, 0.8);
            color: #ffffff;
        }

        .main-wrapper {
            display: flex;
            overflow: visible;
        }

        .toolbar-common {
            width: 220px;
            background-color: rgba(15, 52, 96, 0.6);
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex-shrink: 0;
            border-right: 1px solid rgba(76, 201, 240, 0.2);
            overflow-y: auto;
        }

        .feature-panels {
            display: flex;
            gap: 10px;
            padding: 10px;
            background-color: rgba(15, 52, 96, 0.3);
            flex-shrink: 0;
        }

        .panel-character, .panel-scene {
            width: 220px;
        }

        .right-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 10px;
            gap: 10px;
            overflow: visible;
            position: relative;
            margin-left: 50px;
        }

        .prompt-area {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            height: 260px;
            flex-shrink: 0;
        }
        .prompt-input {
            width: 800px;
            height: 260px;
            padding: 10px;
            background: rgba(15, 23, 42, 0.9);
            border: 1px solid rgba(76, 201, 240, 0.3);
            border-radius: 8px;
            color: #e2e8f0;
            font-size: 16px;
            resize: none;
            overflow-y: auto;
            outline: none;
        }
        .generate-btn {
            height: 36px;
            width: 100%;
            max-width: 120px;
            padding: 0 24px;
            background: linear-gradient(135deg, #4cc9f0, #3b82f6);
            border: none;
            border-radius: 8px;
            color: #ffffff;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            margin: 0 auto;
            display: block;
        }
        .generate-btn:disabled {
            background: #94a3b8;
            cursor: not-allowed;
            opacity: 0.6;
        }
        /* 智能识图模式按钮 */
        .vision-mode-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 34px;
            padding: 0 18px;
            font-size: 14px;
            font-weight: 500;
            color: #fff;
            background: #334155;
            border: 1px solid #475569;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
            user-select: none;
        }
        .vision-mode-btn:hover {
            border-color: #64748b;
            color: #94a3b8;
            background: #3b4356;
        }
        .vision-mode-btn.active {
            color: #fff;
            background: #10b981;
            border-color: #059669;
            box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
        }
        .vision-mode-btn.active:hover {
            background: #059669;
            border-color: #047857;
        }
        .import-btn {
            height: 36px;
            width: 100%;
            max-width: 120px;
            padding: 0 24px;
            background: rgba(71, 85, 105, 0.6);
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #ffffff;
            margin: 0 auto;
            display: block;
        }

        .import-btn:hover {
            background: rgba(71, 85, 105, 0.8);
        }

        .import-btn.active {
            background: rgba(34, 197, 94, 0.8);
            box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
        }

        .upload-box {
            width: 120px;
            height: 100px;
            border: 2px dashed rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.2);
            margin: 0 auto;
        }

        .upload-box:hover {
            border-color: rgba(76, 201, 240, 0.6);
        }

        .upload-icon {
            font-size: 24px;
            margin-bottom: 4px;
        }

        .upload-text {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 2px;
        }

        .upload-label {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.5);
        }

        .upload-hint {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.6);
            text-align: center;
            line-height: 1.4;
            white-space: pre-line;
        }

        .upload-box img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .upload-box .delete-btn {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 20px;
            height: 20px;
            background: rgba(239, 68, 68, 0.8);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .upload-box:hover .delete-btn {
            opacity: 1;
        }

        .upload-box.has-image .delete-btn {
            opacity: 1;
        }
            color: #ffffff;
            font-size: 12px;
            cursor: pointer;
        }

        .canvas-container-wrapper {
            background-color: #000000;
            border-radius: 8px;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            position: relative;
        }
        
        .canvas-container {
            display: flex;
            justify-content: flex-start;
            align-items: flex-start;
            overflow: hidden;
            position: relative;
            width: 800px;
            height: 800px;
            z-index: 51;
            /* 隐藏滚动条 */
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        .canvas-container::-webkit-scrollbar {
            display: none;
        }
        #canvas {
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
            position: relative;
            z-index: 0;
            touch-action: none;
        }
        
        /* 全透明全屏遮罩 - 生成时阻止其他按钮点击 */
        .result-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent;
            display: none;
            z-index: 50;
        }

        .result-backdrop.show {
            display: block;
        }

        /* 生成结果覆盖层样式 - 在 wrapper 内部，居中显示 */
        .result-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 800px;
            height: 800px;
            background: rgba(0, 0, 0, 0.95);
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 100;
            backdrop-filter: blur(3px);
            border-radius: 8px;
            overflow: hidden;
            pointer-events: auto;
        }

        .result-overlay.show {
            display: flex;
        }
        
        /* 加载状态样式 */
        .loading-state {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 20px;
            width: 100%;
            height: 100%;
        }
        
        /* 转圈动画 */
        .spinner {
            width: 60px;
            height: 60px;
            border: 4px solid rgba(255, 255, 255, 0.1);
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }
        
        .loading-text {
            color: #f1f5f9;
            font-size: 16px;
            font-weight: 500;
        }
        
        /* 结果内容 */
        .result-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 15px;
            width: 100%;
            height: 100%;
        }
        
        .result-image-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: calc(100% - 60px);
            overflow: hidden;
            border-radius: 8px;
            background: transparent;
        }

        .result-image-wrapper img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 8px;
            margin: auto;
        }
        
        .result-actions {
            display: flex;
            gap: 12px;
            justify-content: center;
        }
        
        .result-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .download-btn {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: white;
        }
        
        .download-btn:hover {
            background: linear-gradient(135deg, #2563eb, #1e40af);
            transform: translateY(-2px);
        }

        .publish-btn {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #1e293b;
        }

        .publish-btn:hover {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            transform: translateY(-2px);
        }

        .publish-btn:disabled {
            background: #475569;
            color: #94a3b8;
            cursor: not-allowed;
            transform: none;
        }

        .insert-canvas-btn {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            color: white;
        }

        .insert-canvas-btn:hover {
            background: linear-gradient(135deg, #4ade80, #22c55e);
            transform: translateY(-2px);
        }

        /* ===== 发布弹窗 ===== */
        .publish-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.75);
            z-index: 10000;
            justify-content: center;
            align-items: center;
        }
        .publish-overlay.show { display: flex; }

        .publish-dialog {
            background: #1e293b;
            border: 1px solid rgba(76, 201, 240, 0.2);
            border-radius: 16px;
            width: 90%;
            max-width: 700px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            animation: pubFadeIn 0.25s ease;
        }
        @keyframes pubFadeIn {
            from { opacity: 0; transform: scale(0.95); }
            to   { opacity: 1; transform: scale(1); }
        }

        .publish-dialog-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 24px 12px;
            border-bottom: 1px solid rgba(76, 201, 240, 0.1);
        }
        .publish-dialog-header h3 {
            margin: 0;
            color: #fbbf24;
            font-size: 18px;
        }
        .publish-dialog-close {
            width: 32px; height: 32px;
            border: none;
            background: rgba(71, 85, 105, 0.4);
            color: #cbd5e1;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .publish-dialog-close:hover {
            background: rgba(239, 68, 68, 0.5);
            color: #fecaca;
        }

        .publish-dialog-body {
            display: flex;
            gap: 20px;
            padding: 20px 24px;
        }
        @media (max-width: 600px) {
            .publish-dialog-body { flex-direction: column; }
        }

        .publish-preview {
            flex: 0 0 240px;
            height: 240px;
            border-radius: 10px;
            overflow: hidden;
            background: #0f172a;
            border: 1px solid rgba(76, 201, 240, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .publish-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .publish-form {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-width: 0;
        }
        .publish-form label {
            font-size: 13px;
            font-weight: 600;
            color: #cbd5e1;
        }
        .publish-form label .required {
            color: #ef4444;
        }
        .publish-form input,
        .publish-form textarea {
            width: 100%;
            background: #0f172a;
            border: 1px solid rgba(76, 201, 240, 0.2);
            border-radius: 8px;
            padding: 10px 12px;
            color: #e2e8f0;
            font-size: 14px;
            outline: none;
            transition: border-color 0.2s;
            box-sizing: border-box;
            font-family: inherit;
            resize: none;
        }
        .publish-form input:focus,
        .publish-form textarea:focus {
            border-color: rgba(76, 201, 240, 0.5);
        }
        .publish-form input::placeholder,
        .publish-form textarea::placeholder {
            color: #475569;
        }
        .publish-form .char-count {
            font-size: 11px;
            color: #64748b;
            text-align: right;
            margin-top: -8px;
        }
        .publish-form .prompt-readonly {
            background: rgba(15, 23, 42, 0.6) !important;
            color: #94a3b8 !important;
            font-size: 12px !important;
            cursor: default;
        }

        .publish-warning {
            margin: 0 24px 12px;
            padding: 10px 16px;
            background: rgba(239, 68, 68, 0.08);
            border: 1px solid rgba(239, 68, 68, 0.2);
            border-radius: 8px;
            color: #fca5a5;
            font-size: 12px;
            text-align: center;
            line-height: 1.6;
        }

        .publish-dialog-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 0 24px 20px;
        }
        .publish-dialog-footer button {
            padding: 10px 28px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .publish-submit-btn {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #1e293b;
        }
        .publish-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
        .publish-submit-btn:disabled {
            background: #475569;
            color: #94a3b8;
            cursor: not-allowed;
            transform: none;
        }
        .publish-cancel-btn {
            background: rgba(71, 85, 105, 0.5);
            color: #cbd5e1;
        }
        .publish-cancel-btn:hover { background: rgba(71, 85, 105, 0.7); }
        
        .regenerate-btn {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
        }
        
        .regenerate-btn:hover {
            background: linear-gradient(135deg, #d97706, #b45309);
            transform: translateY(-2px);
        }



        .footer {
            padding: 20px 20px;
            background: rgba(15, 23, 42, 0.98);
            font-size: 12px;
            color: #94a3b8;
            border-top: 1px solid rgba(100, 116, 139, 0.2);
            flex-shrink: 0;
            text-align: center;
            position: relative;
        }

        .footer .copyright-title {
            font-size: 13px;
            color: #cbd5e1;
            margin-bottom: 10px;
        }

        .footer .copyright-text {
            margin: 0 auto 4px auto;
            line-height: 1.3;
        }

        .panel-section {
            background-color: rgba(15, 52, 96, 0.8);
            border-radius: 6px;
            padding: 10px;
        }
        .panel-title {
            font-size: 13px;
            font-weight: bold;
            margin-bottom: 8px;
            color: #4cc9f0;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .btn {
            background: linear-gradient(135deg, #1e3a5f 0%, #16213e 100%);
            color: #ffffff;
            border: 1px solid rgba(76, 201, 240, 0.2);
            padding: 8px 10px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s ease;
            width: 100%;
            margin-bottom: 5px;
        }
        .btn:hover {
            background: linear-gradient(135deg, #2a4a7c 0%, #1e3a5f 100%);
            border-color: rgba(76, 201, 240, 0.5);
        }
        .toolbar .btn.active {
            background: #059669;
            color: #ffffff;
            border-color: #059669;
            font-weight: bold;
        }
        .button-group {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 5px;
            margin-bottom: 8px;
        }

        .slider-group {
            margin-bottom: 8px;
        }
        .slider-label {
            font-size: 11px;
            margin-bottom: 4px;
            display: flex;
            justify-content: space-between;
            color: #94a3b8;
        }
        .slider {
            width: 100%;
            height: 6px;
            background-color: #1e3a5f;
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
        }
        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: #4cc9f0;
            border-radius: 50%;
            cursor: pointer;
        }
        .layer-buttons {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-bottom: 8px;
        }
        .flip-buttons {
            display: flex;
            gap: 5px;
        }
        .flip-buttons .btn {
            flex: 1;
        }
        .form-input {
            width: 100%;
            padding: 12px 16px;
            background: rgba(22, 33, 62, 0.8);
            border: 1px solid rgba(100, 200, 255, 0.2);
            border-radius: 8px;
            color: #ffffff;
            font-size: 14px;
            margin-bottom: 8px;
            transition: all 0.3s ease;
            outline: none;
        }
        .form-input:focus {
            border-color: rgba(0, 212, 255, 0.6);
            box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
        }
        .form-input::placeholder {
            color: #64748b;
        }

        .zoom-controls {
            position: fixed;
            bottom: 60px;
            right: 250px;
            display: flex;
            gap: 5px;
            background: rgba(30, 41, 59, 0.95);
            padding: 5px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 100;
        }
        .zoom-btn {
            width: 26px;
            height: 26px;
            background: #1e3a5f;
            border: 1px solid rgba(76, 201, 240, 0.3);
            border-radius: 5px;
            color: #ffffff;
            font-size: 11px;
            cursor: pointer;
        }
        .info-panel {
            position: fixed;
            bottom: 100px;
            right: 250px;
            background: rgba(30, 41, 59, 0.95);
            padding: 5px 8px;
            border-radius: 6px;
            color: #e2e8f0;
            font-size: 10px;
            z-index: 100;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            backdrop-filter: blur(4px);
        }
        .login-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            backdrop-filter: blur(4px);
        }
        .modal-overlay.show {
            display: flex;
        }
        .modal {
            background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            border-radius: 16px;
            padding: 32px;
            max-width: 420px;
            width: 90%;
            border: 1px solid rgba(100, 200, 255, 0.2);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(76, 201, 240, 0.1);
        }
        .message-modal {
            width: 280px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }
        .message-icon {
            font-size: 48px;
        }
        .message-text {
            color: #e2e8f0;
            font-size: 14px;
            text-align: center;
        }
        .message-btn {
            margin-top: 8px;
            padding: 8px 24px;
        }
        .modal-title {
            color: #4cc9f0;
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 16px;
            text-align: center;
        }
        .btn-primary {
            background: linear-gradient(135deg, #4cc9f0, #3b82f6);
            color: #ffffff;
            border: none;
            padding: 10px 24px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 600;
        }
        .btn-primary:disabled {
            background: #475569;
            color: #94a3b8;
            cursor: not-allowed;
        }
        .btn-secondary {
            background: rgba(71, 85, 105, 0.6);
            color: #cbd5e1;
            border: none;
            padding: 10px 24px;
            border-radius: 6px;
            cursor: pointer;
        }
        .btn-secondary:not(:disabled):hover {
            background: rgba(100, 116, 139, 0.8);
        }
        .btn-secondary:disabled {
            background: #374151;
            color: #6b7280;
            cursor: not-allowed;
            opacity: 0.7;
        }

        /* 移动端适配 - 等比例缩放模式 */
        @media (max-width: 1024px) {
            html, body {
                overflow-x: auto;  /* 允许横向滚动，以防万一 */
            }
        }
        
        /* 平板端（768px-1024px）- 整体缩小至70% */
        @media (min-width: 769px) and (max-width: 1024px) {
            .header,
            .main-wrapper,
            .footer {
                zoom: 0.7;
            }
        }
        
        /* 手机端（≤768px）- 整体缩小至50% */
        @media (max-width: 768px) {
            .header,
            .main-wrapper,
            .footer {
                zoom: 0.5;
            }
        }
        
        /* 超小手机（≤480px）- 整体缩小至40% */
        @media (max-width: 480px) {
            .header,
            .main-wrapper,
            .footer {
                zoom: 0.4;
            }
        }
        
        /* 移动端弹窗和广告位适配 - 等比例缩放 */
        @media (max-width: 1024px) {
            /* 重要通知栏 - 最上方 */
            #announcementBanner {
                width: 140px !important;      /* 70% of 200px */
                height: 140px !important;     /* 70% of 200px */
                right: 14px !important;       /* 70% of 20px */
                bottom: 380px !important;     /* 增加间距，避免遮挡 */
                padding: 11px 14px !important; /* 70% of 16px 20px */
                overflow: hidden !important;  /* 防止内容溢出 */
            }
            
            /* 用户评论栏 - 中间 */
            #commentBanner {
                width: 140px !important;      /* 70% of 200px */
                height: 182px !important;     /* 70% of 260px */
                right: 14px !important;       /* 70% of 20px */
                bottom: 190px !important;     /* 增加间距，避免遮挡 */
                padding: 11px 14px !important; /* 70% of 16px 20px */
                overflow: hidden !important;  /* 防止内容溢出 */
            }
            
            /* 统计广告牌 - 最下方 */
            #statsBanner {
                width: 140px !important;      /* 70% of 200px */
                right: 14px !important;       /* 70% of 20px */
                bottom: 14px !important;      /* 70% of 20px */
                padding: 8px 11px !important; /* 70% of 12px 16px */
            }
        }
        
        /* 手机端（≤768px）- 弹窗进一步缩小 */
        @media (max-width: 768px) {
            /* 重要通知栏 - 最上方 */
            #announcementBanner {
                width: 100px !important;      /* 50% of 200px */
                height: 100px !important;     /* 50% of 200px */
                right: 10px !important;       /* 50% of 20px */
                bottom: 270px !important;     /* 增加间距，避免遮挡 */
                padding: 8px 10px !important; /* 50% of 16px 20px */
                overflow: hidden !important;  /* 防止内容溢出 */
            }
            
            /* 用户评论栏 - 中间 */
            #commentBanner {
                width: 100px !important;      /* 50% of 200px */
                height: 130px !important;     /* 50% of 260px */
                right: 10px !important;       /* 50% of 20px */
                bottom: 100px !important;     /* 增加间距，避免遮挡 */
                padding: 8px 10px !important; /* 50% of 16px 20px */
                overflow: hidden !important;  /* 防止内容溢出 */
            }
            
            /* 统计广告牌 - 最下方 */
            #statsBanner {
                width: 100px !important;      /* 50% of 200px */
                right: 10px !important;       /* 50% of 20px */
                bottom: 10px !important;      /* 50% of 20px */
                padding: 6px 8px !important;  /* 50% of 12px 16px */
            }
        }
        
        /* 超小手机（≤480px）- 弹窗最小化 */
        @media (max-width: 480px) {
            /* 重要通知栏 - 最上方 */
            #announcementBanner {
                width: 80px !important;       /* 40% of 200px */
                height: 80px !important;      /* 40% of 200px */
                right: 8px !important;        /* 40% of 20px */
                bottom: 220px !important;     /* 增加间距，避免遮挡 */
                padding: 6px 8px !important;  /* 40% of 16px 20px */
                overflow: hidden !important;  /* 防止内容溢出 */
            }
            
            /* 用户评论栏 - 中间 */
            #commentBanner {
                width: 80px !important;       /* 40% of 200px */
                height: 104px !important;     /* 40% of 260px */
                right: 8px !important;        /* 40% of 20px */
                bottom: 80px !important;      /* 增加间距，避免遮挡 */
                padding: 6px 8px !important;  /* 40% of 16px 20px */
                overflow: hidden !important;  /* 防止内容溢出 */
            }
            
            /* 统计广告牌 - 最下方 */
            #statsBanner {
                width: 80px !important;       /* 40% of 200px */
                right: 8px !important;        /* 40% of 20px */
                bottom: 8px !important;       /* 40% of 20px */
                padding: 5px 6px !important;  /* 40% of 12px 16px */
            }
        }

        .feature-modal {
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
            width: 90%;
        }
        
        .feature-content {
            padding: 10px;
            text-align: center;
        }
        
        @media (max-width: 768px) {
            .feature-modal {
                max-width: 95%;
                max-height: 85vh;
                padding: 15px;
            }
            
            .feature-content {
                padding: 5px;
            }
            
            #userGuideContent {
                padding: 12px !important;
                font-size: 12px !important;
            }
        }
        
        .image-modal {
            max-width: 90%;
            max-height: 90vh;
        }
        
        .image-content {
            padding: 20px;
            text-align: center;
        }
        
        .recharge-modal {
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
        }
        
        .recharge-grid {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .recharge-card {
            background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
            border-radius: 12px;
            padding: 20px;
            width: 260px;
            text-align: center;
            border: 1px solid rgba(76, 201, 240, 0.2);
        }
        
        .recharge-card h3 {
            color: #fff;
            margin-bottom: 10px;
            font-size: 16px;
        }
        
        .recharge-price {
            font-size: 28px;
            font-weight: bold;
            color: #4cc9f0;
            margin-bottom: 5px;
        }
        
        .recharge-times {
            font-size: 12px;
            color: white;
            margin-bottom: 5px;
        }
        
        .recharge-card-btn {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            transition: all 0.2s;
        }
        
        .recharge-card-btn:hover {
            transform: scale(1.05);
        }
        
        .recharge-hint {
            color: #94a3b8;
            font-size: 13px;
            text-align: center;
            padding: 15px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
        }
        
        .qr-code-modal {
            max-width: 500px;
        }
        
        .qr-code-container {
            text-align: center;
            padding: 20px;
        }
        
        .contact-modal {
            max-width: 500px;
        }
        
        .contact-content {
            color: #e2e8f0;
            font-size: 14px;
            line-height: 1.8;
        }
        
        .contact-content h3 {
            color: #4cc9f0;
            margin-top: 15px;
        }
        
        .api-modal {
            max-width: 450px;
        }
        
        .api-content {
            color: #e2e8f0;
            font-size: 14px;
            line-height: 1.6;
        }
        
        .profile-modal {
            max-width: 450px;
        }
        
        .user-info {
            color: #e2e8f0;
        }
        
        .form-group {
            margin-bottom: 15px;
        }
        
        .form-group label {
            display: block;
            color: #94a3b8;
            font-size: 13px;
            margin-bottom: 5px;
        }
        
        .form-group p {
            color: #fff;
            font-size: 14px;
        }

.material-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 4px;
            max-height: 500px;
            overflow-y: auto;
            margin-top: 10px;
        }
        .material-grid.collapsed {
            display: none;
        }
        .material-item {
            background-color: #16213e;
            padding: 4px;
            border-radius: 4px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .material-item:hover {
            background-color: #1e3a5f;
            border-color: #4cc9f0;
        }
        .material-item.custom {
            border-color: #a78bfa;
        }
        .material-thumbnail {
            width: 50px;
            height: 50px;
            background-color: #2c3e50;
            margin: 0 auto 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            font-size: 20px;
            overflow: hidden;
        }
        .material-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: transparent;
        }
        .material-name {
            font-size: 9px;
            color: #94a3b8;
            word-break: break-all;
        }
        button.material-category.active {
            background: #059669 !important;
            color: #ffffff !important;
            border-color: #059669 !important;
            font-weight: bold !important;
        }
        .delete-btn {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 18px;
            height: 18px;
            background-color: #ef4444;
            border-radius: 50%;
            border: 2px solid #16213e;
            color: white;
            font-size: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .delete-btn:hover {
            background-color: #dc2626;
        }
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            display: none;
        }
        .modal-overlay.show {
            display: flex;
        }
        .modal-content {
            background: linear-gradient(135deg, #1e3a5f 0%, #16213e 100%);
            padding: 20px;
            border-radius: 12px;
            width: 90%;
            max-width: 400px;
            border: 1px solid rgba(76, 201, 240, 0.3);
        }
        .modal-title {
            font-size: 16px;
            font-weight: bold;
            color: #ffffff;
            margin-bottom: 15px;
            text-align: center;
        }
        .modal-body {
            margin-bottom: 15px;
        }
        .modal-label {
            font-size: 12px;
            color: #94a3b8;
            margin-bottom: 5px;
            display: block;
        }
        .modal-input {
            width: 100%;
            padding: 10px;
            border: 1px solid rgba(76, 201, 240, 0.3);
            border-radius: 6px;
            background-color: #0f172a;
            color: #ffffff;
            font-size: 12px;
            box-sizing: border-box;
            margin-bottom: 10px;
        }
        .modal-select {
            width: 100%;
            padding: 10px;
            border: 1px solid rgba(76, 201, 240, 0.3);
            border-radius: 6px;
            background-color: #0f172a;
            color: #ffffff;
            font-size: 12px;
            box-sizing: border-box;
            margin-bottom: 10px;
        }
        .upload-area {
            border: 2px dashed rgba(76, 201, 240, 0.3);
            border-radius: 6px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            margin-bottom: 10px;
            transition: all 0.2s ease;
        }
        .upload-area:hover {
            border-color: #4cc9f0;
            background-color: rgba(76, 201, 240, 0.1);
        }
        .upload-area.dragover {
            border-color: #4cc9f0;
            background-color: rgba(76, 201, 240, 0.2);
        }
        .upload-icon {
            font-size: 32px;
            margin-bottom: 8px;
        }
        .upload-text {
            font-size: 12px;
            color: #94a3b8;
        }
        .upload-preview {
            margin-top: 10px;
            min-height: 80px;
            border: 1px dashed #4a5568;
            border-radius: 6px;
            padding: 10px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: flex-start;
            align-items: flex-start;
        }
        .preview-item {
            position: relative;
            width: 70px;
            height: 70px;
            border-radius: 4px;
            overflow: hidden;
            background: #2d3748;
        }
        .preview-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .preview-item .remove-btn {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 18px;
            height: 18px;
            background: #e53e3e;
            border-radius: 50%;
            border: 2px solid #1a202c;
            color: white;
            font-size: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .upload-hint {
            font-size: 10px;
            color: #64748b;
            margin-top: 4px;
        }
        .modal-tip {
            background-color: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.3);
            border-radius: 6px;
            padding: 10px;
            font-size: 11px;
            color: #fbbf24;
            text-align: center;
            margin-top: 10px;
            line-height: 1.4;
        }
        .modal-actions {
            display: flex;
            gap: 10px;
        }
        .modal-btn {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: bold;
            transition: all 0.2s ease;
        }
        .modal-btn.primary {
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            color: #ffffff;
        }
        .modal-btn.secondary {
            background-color: #334155;
            color: #ffffff;
        }

.shape-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        margin-bottom: 8px;
    }
    .shape-btn {
        background-color: #16213e;
        color: #ffffff;
        border: 1px solid rgba(76, 201, 240, 0.2);
        padding: 6px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 10px;
        transition: all 0.2s ease;
    }
    .shape-btn:hover {
        background-color: #1e3a5f;
        border-color: rgba(76, 201, 240, 0.4);
    }
    .shape-btn.active {
        background-color: #4cc9f0;
        color: #0f172a;
        border-color: #4cc9f0;
        font-weight: bold;
    }
    .color-picker-container {
        display: flex;
        gap: 4px;
        margin-bottom: 8px;
    }
    .color-picker {
        flex: 1;
        height: 28px;
        padding: 0;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }
    .color-palette {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
    }
    .color-chip {
        width: 20px;
        height: 20px;
        border-radius: 3px;
        cursor: pointer;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .color-chip:hover {
        transform: scale(1.1);
    }
    .upload-note {
        font-size: 9px;
        color: #64748b;
        margin-bottom: 4px;
    }
    .upload-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        margin-top: 8px;
    }
    .upload-box {
        position: relative;
        aspect-ratio: 1;
        background-color: #16213e;
        border: 1px dashed rgba(76, 201, 240, 0.3);
        border-radius: 4px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    .upload-box:hover {
        border-color: rgba(76, 201, 240, 0.6);
    }
    .upload-box.has-image {
        border-style: solid;
        padding: 0;
    }
    .upload-box.has-image div {
        display: none;
    }
    #icon1, #icon2, #icon3, #icon4, #icon5, #icon6 {
        font-size: 18px;
        margin-bottom: 2px;
    }
    #text1, #text2, #text3, #text4, #text5, #text6 {
        font-size: 8px;
        color: #94a3b8;
    }
    .upload-label {
        position: absolute;
        bottom: 2px;
        right: 4px;
        font-size: 10px;
        color: rgba(76, 201, 240, 0.6);
        font-weight: bold;
    }
    .upload-box img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }
    .delete-btn {
        position: absolute;
        top: -8px;
        right: -8px;
        width: 16px;
        height: 16px;
        background-color: #ef4444;
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        z-index: 10;
    }