        
        :root {
            
            --spacing-xs: 0.25vw;
            --spacing-sm: 0.5vw;
            --spacing-md: 1vw;
            --spacing-lg: 2vw;

            
            --radius-xs: 4px;
            --radius-sm: 6px;
            --radius-md: 8px;
            --radius-lg: 0.5vw;
            --radius-xl: 1vw;
            --radius-full: 999px;

            
            --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
            --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.25);
            --shadow-primary: 0 8px 20px rgba(4, 145, 232, 0.3);

            
            --color-primary: #0491e8;
            --color-primary-dark: #1c1fd8;
            --color-primary-light: #e3f2fd;
            --color-success: #28a745;
            --color-warning: #ff8c00;
            --color-error: #dc3545;
            --color-text: #333;
            --color-text-secondary: #666;
            --color-text-muted: #999;
            --color-border: #dee2e6;
            --color-bg: #f8f9fa;
            --color-bg-hover: #f0f8ff;

            
            --btn-height: max(2.5vw, 30px);
            --btn-padding: 0.6vw 1.2vw;

            
            --sidebar-width: 20vw;
            --sidebar-min-width: 384px;
            --content-gap: 2vw;

            
            --action-right-w: auto;
            --reserve-right: 0px;
        }

        .layui-layer-transparent .layui-layer-content {
            background: white !important;
            border-radius: 16px !important;
            overflow: hidden !important;
        }
        
        .layui-layer-transparent .layui-layer-content > div {
            background: white !important;
            border-radius: 16px !important;
        }
        
        .layui-layer-transparent {
            background: white !important;
            border-radius: 16px !important;
            overflow: hidden !important;
        }
        
        .layui-layer {
            border-radius: 16px !important;
            overflow: hidden !important;
        }
        
        .layui-layer-title {
            border-radius: 16px 16px 0 0 !important;
        }
        
        .layui-layer-setwin {
            border-radius: 0 16px 0 0 !important;
        }
        
        .layui-layer-content {
            border-radius: 0 0 16px 16px !important;
        }
        
        .layui-layer[type="1"] .layui-layer-content {
            border-radius: 0 0 16px 16px !important;
        }
        
        .layui-layer:not(.layui-layer-title) .layui-layer-content {
            border-radius: 16px !important;
        }
        
        .layui-layer.layui-layer-msg {
            background-color: rgba(50, 50, 50, 0.9) !important;
            color: white !important;
            border-radius: 999px !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
            overflow: visible !important;
            min-height: auto !important;
        }

        .layui-layer-msg .layui-layer-content {
            color: white !important;
            text-align: center !important;
            background-color: transparent !important;
            padding: 12px 24px 12px 16px !important;
            line-height: 1.5 !important;
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 10px !important;
            overflow: visible !important;
            min-height: auto !important;
            border-radius: 999px !important;
        }

        .layui-layer.layui-layer-msg .layui-layer-ico,
        .layui-layer-msg .layui-layer-content .layui-layer-ico,
        .layui-layer-msg .layui-layer-ico,
        .layui-layer-msg i.layui-layer-ico {
            position: static !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 24px !important;
            height: 24px !important;
            min-width: 24px !important;
            min-height: 24px !important;
            visibility: visible !important;
            opacity: 1 !important;
            flex-shrink: 0 !important;
            margin: 0 !important;
            top: 0 !important;
            left: 0 !important;
            transform: none !important;
        }
        
        .feature-icon {
            width: 100%;
            height: 100%;
            padding: 0.5rem;
            object-fit: contain;
        }

        .title-star {
            color: #1256e0;
            font-size: .8vw;
            font-weight: bold;
            margin-right: 4px;
        }

        .title-help {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.32em;
            height: 1.32em;
            border-radius: 50%;
            border: 1px solid #999;
            color: #999;
            font-size: 0.6em;
            font-weight: bold;
            margin-left: 1px;
            cursor: default;
            font-family: "Helvetica", "Helvetica Neue", Arial, sans-serif;
            position: relative;
            top: -0.18em;
        }

        html,body{
            overflow-x: hidden;
            font-family: "Noto Sans Simplified Chinese", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        .container {
            padding-top: 2rem;
        }

        .web-ai-container {
            margin-top: 90px;
            padding: 0;
            width: 100%;
            height: 100%;
            display: inline-block;
            background-color: #dddddd;
        }

        .web-ai-main {
            display: inline-flex;
            flex-direction: row;
            height: 100%;
            width: 100vw;
            justify-content: center;
            gap: 1vw;
            align-items: stretch;
        }

        .wam-op {
            width: 20vw;
            min-width: 384px;
            margin-top: 2vw;
            margin-bottom: 2vw;
            margin-right: 0;
            background-color: white;
            border-radius: 1vw;
            padding: 2vw;
            display: flex;
            flex-direction: column;
            height: calc(100vh - 4vw - 90px);
            padding-top: .5vw;
            flex-shrink: 0;
        }

        .wamo-1 {
            display: flex;
            flex-direction: column;
            height: 100%; 
            gap: 0.3vw;
        }

        .upload-section {
            flex-shrink: 0;
        }

        .functions-section {
            flex: 1;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .functions-title {
            flex-shrink: 0;
            background: white;
            z-index: 100;
        }

        .functions-content {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 7px;
        }
        
        .functions-content::-webkit-scrollbar {
            width: 6px;
        }

        .functions-content::-webkit-scrollbar-track {
            background: #f5f5f5;
            border-radius: 3px;
        }

        .functions-content::-webkit-scrollbar-thumb {
            background: #e5e5e5;
            border-radius: 3px;
        }

        .functions-content::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #666666, #999999);
        }

        .wamo-2 {
            height: 0;
            flex-shrink: 0;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .wam-right-container {
            width: 50vw;
            margin-top: 2vw;
            margin-bottom: 2vw;
            display: flex;
            flex-direction: column;
            gap: 1vw;
            height: calc(100vh - 4vw - 90px);
        }

        .wam-result {
            background-color: white;
            border-radius: 1vw;
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
        }

        .wam-prompt {
            background-color: white;
            border-radius: 1vw;
            padding: 12px;
            display: flex;
            flex-direction: column;
            flex: none;
            height: max(16vh, 200px);
            min-height: 200px;
            max-height: 260px;
        }

        .prompt-window-title {
            font-size: max(0.55vw, 11px);
            color: #666;
            margin-bottom: 0.5vw;
            line-height: 1.3;
            text-align: left;
            flex-shrink: 0;
        }

        .prompt-input-container {
            position: relative;
            display: flex;
            flex: 1;
            min-height: 0;
            --prompt-btn-size: max(2.5vw, 30px);
            overflow: visible;
        }

        .prompt-buttons-container {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: calc(1.2vw + 0.5vw + max(15vw, 188px));
            display: flex;
            gap: 0.7vw;
            z-index: 10;
            max-width: calc(100% - 1.2vw - 0.5vw - max(15vw, 188px));
        }
        .prompt-buttons-container.inpaint-balanced {
            right: calc(1.2vw + 0.5vw + max(15vw, 188px));
            gap: 0.65vw;
        }
        .prompt-buttons-container.inpaint-balanced #button4 {
            margin-left: 0.1vw;
        }

        .prompt-buttons-container.material-compact {
            gap: 0.35vw;
        }
        .prompt-buttons-container.ai-rotate-spacing {
            gap: calc(0.7vw * 4 / 3);
        }
       
        .prompt-buttons-container.inpaint-compact { right: calc(1.2vw + 0.25vw + max(15vw, 188px)); }

        @media (min-width: 1800px) and (max-width: 1999px) {
            .prompt-buttons-container {
                right: calc(1.2vw + 0.5vw + max(15vw, 188px));
                max-width: calc(100% - 1.2vw - 0.5vw - max(15vw, 188px));
            }
            .prompt-buttons-container.inpaint-compact { right: calc(1.2vw + 0.25vw + max(15vw, 188px)); }
            .action-right {
                gap: 0.2vw;
            }
        }

        @media (min-width: 2000px) {
            .prompt-buttons-container {
                right: calc(1.2vw + 0.75vw + max(15vw, 188px));
                max-width: calc(100% - 1.2vw - 0.75vw - max(15vw, 188px));
            }
            .prompt-buttons-container.inpaint-compact { right: calc(1.2vw + 0.375vw + max(15vw, 188px)); }
            .action-right {
                gap: 0.2vw;
            }
        }

        #aspectRatioContainer {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: calc(1.2vw + max(15vw, 188px));
            z-index: 11;
        }

        .action-right {
            position: absolute;
            right: 1.2vw;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            align-items: center;
            gap: 0.5vw;
            z-index: 11;
        }
        .action-right .generate-button,
        .action-right #aspectRatioContainer,
        .action-right #moreFunctionsRatioContainer {
            position: static;
            right: auto;
            top: auto;
            transform: none;
        }
        .action-right #aspectRatioContainer { position: relative; }
        .action-right #moreFunctionsRatioContainer { position: relative; }

        .generate-button {
            position: absolute;
            right: 1.2vw;
            top: 50%;
            transform: translateY(-50%);
            width: auto;
            min-width: max(15vw, 188px);
            max-width: calc(100vw - 2.4vw - 0.5vw - 4 * max(2.5vw, 30px) - 1.5vw);
            height: var(--prompt-btn-size, max(2.5vw, 30px));
            padding: 0 max(1.75vw, 20px);
            background: linear-gradient(to right, #0491e8, #1c1fd8);
            color: white;
            border: none;
            border-radius: 0.5vw;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 0.5em;
            text-align: center;
            white-space: nowrap;
            box-shadow: 0 2px 8px rgba(4, 145, 232, 0.3);
        }

        .generate-button .button-text {
            margin-bottom: 0;
            margin-right: 0.2em;
            white-space: nowrap;
        }
        .generate-button .button-credits {
            white-space: nowrap;
        }

        .draw-mask-btn {
            background: #007bff;
            color: white;
            border: none;
            border-radius: 0.5vw;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
            font-size: 0.9em;
        }

        .draw-mask-btn:hover {
            background: #0056b3;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
            transform: translateY(-1px);
        }

        .draw-mask-btn:disabled {
            background: #6c757d;
            cursor: not-allowed;
            opacity: 0.6;
            transform: none;
        }

        .draw-mask-btn:disabled:hover {
            background: #6c757d;
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
            transform: none;
        }

        .draw-mask-btn.active {
            background: #ff8c00 !important;
            color: white !important;
            border-color: #ff8c00 !important;
            box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
        }

        .draw-mask-btn.active:hover {
            background: #e07800 !important;
            color: white !important;
            border-color: #e07800 !important;
            box-shadow: 0 6px 16px rgba(255, 140, 0, 0.5);
        }

        .draw-mask-hint {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.9);
            color: white;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 15px;
            white-space: nowrap;
            z-index: 99999;
            margin-bottom: 8px;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            pointer-events: none;
            max-width: 350px;
            text-align: center;
            line-height: 1.2;
            min-width: 280px;
        }

        .draw-mask-hint::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 5px solid transparent;
            border-top-color: rgba(0, 0, 0, 0.9);
        }

        .draw-mask-hint.show {
            opacity: 1 !important;
            visibility: visible !important;
            display: block !important;
            background: rgba(0, 0, 0, 0.9) !important;
            color: white !important;
            font-size: 15px !important;
            padding: 10px 20px !important;
            z-index: 99999 !important;
            line-height: 1.2 !important;
            white-space: nowrap !important;
            min-width: 280px !important;
        }

        .draw-tools-container {
            display: contents;
        }
        
        .draw-tools-container.hidden {
            display: none;
        }

        .draw-tool-btn {
            background: white !important;
            color: #000 !important;
            border: 1px solid #ddd !important;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            font-size: 0.467vw;
            padding: 8px 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.2vw;
            min-width: 60px;
            text-align: center;
            white-space: nowrap;
            line-height: 1;
            height: auto;
            box-sizing: border-box;
            flex-shrink: 0;
        }
        
        .brush-icon, .eraser-icon {
            width: 1em;
            height: 1em;
            object-fit: contain;
            transition: all 0.3s ease;
        }

        .draw-tool-btn:hover {
            background: #f8f9fa !important;
            color: #000 !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transform: translateY(-2px);
        }

        .draw-tool-btn.active {
            background: #007bff !important;
            color: white !important;
            border-color: #007bff !important;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
        }

        .draw-tool-btn.active:hover {
            background: #0056b3 !important;
            color: white !important;
            box-shadow: 0 6px 16px rgba(0, 123, 255, 0.5);
        }

        .brush-radius-control {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            background: white;
            border: 1px solid #ddd;
            padding: 0 12px;
            border-radius: 6px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            white-space: nowrap;
            line-height: 1;
            height: 32px;
            overflow: hidden;
            box-sizing: border-box;
            min-width: 220px;
        }

        .brush-radius-control label {
            font-size: 0.7em;
            color: #666;
            white-space: nowrap;
        }

        .radius-slider { display:none; }

        .radius-slider::-webkit-slider-thumb { display:none; }

        .radius-slider::-moz-range-thumb { display:none; }

        #brushRadiusValue { display:none; }

        .floating-btn.clear-mask-btn {
            background: #fff;
            color: #000;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 8px 12px;
            font-size: 0.467vw;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
            line-height: 1;
            height: auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            min-width: 60px;
            flex-shrink: 0;
        }

        .clear-mask-btn.active {
            background: #fff;
            color: #007bff;
            border-color: #007bff;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
        }

        .clear-mask-btn:active {
            background: #f2f2f2;
            transform: scale(0.95);
        }

        .clear-mask-btn .clear-icon {
            width: 1em;
            height: 1em;
            margin-right: 0;
        }
        .clear-mask-btn .clear-icon.blue { display: none; }
        .clear-mask-btn .clear-icon.white { display: inline; }
        .clear-mask-btn.active .clear-icon.white { display: none; }
        .clear-mask-btn.active .clear-icon.blue { display: inline; }

        .draw-closure-tip {
            position: fixed;
            pointer-events: none;
            background: rgba(0,0,0,0.7);
            color: #fff;
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 12px;
            line-height: 1;
            transform: translate(12px, 12px);
            z-index: 9999;
            display: none;
            white-space: nowrap;
        }
        @media (max-width: 1200px) {
            .prompt-buttons-container {
                right: calc(1.2vw + 0.5vw + 188px);
                max-width: calc(100% - 1.2vw - 0.5vw - 188px);
            }
            .prompt-buttons-container.inpaint-compact { right: calc(1.2vw + 0.25vw + 188px); }
            .prompt-buttons-container.ai-rotate-spacing {
                gap: calc(0.35vw * 2);
            }
            .generate-button {
                min-width: 188px;
                max-width: calc(100vw - 2.4vw - 0.5vw - 3 * 30px - 1.5vw);
            }
            .prompt-textarea {
                padding-right: calc(1.2vw + 0.5vw + 188px + 3 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-rotate-mode {
                padding-right: calc(0.33vw + 188px + 4 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-edit-mode {
                padding-right: calc(0.33vw + 188px + 4 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-ecommerce-mode {
                padding-right: calc(0.33vw + 188px + 3 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-product-mode {
                padding-right: calc(1.2vw + 0.5vw + 188px + 4 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-object-replace-mode {
                padding-right: calc(0.33vw + 188px + 3 * 30px + 2 * 0.5vw);
            }
        }

        .prompt-button.material-mode {
            border: none !important;
            box-shadow: none !important;
        }
        .prompt-button.material-mode.selected,
        .prompt-button.material-mode.selected:hover {
            border: none !important;
            box-shadow: none !important;
        }

        .cursor-brush {
            cursor: url('/images/editimage/icons/pen-blue.png') 8 8, crosshair !important;
        }

        .cursor-eraser {
            cursor: url('/images/editimage/icons/erase-blue.png') 8 8, crosshair !important;
        }

        @media (max-width: 800px) {
            .prompt-buttons-container {
                right: calc(1.2vw + 0.5vw + 150px);
                max-width: calc(100% - 1.2vw - 0.5vw - 150px);
                gap: 0.5vw;
            }
            .prompt-buttons-container.inpaint-compact { right: calc(1.2vw + 0.25vw + 150px); }
            .prompt-buttons-container.ai-rotate-spacing {
                gap: 1vw;
            }
            .action-right {
                gap: 0.5vw;
            }
            .generate-button {
                min-width: 150px;
                max-width: calc(100vw - 2.4vw - 0.5vw - 4 * 30px - 1.5vw);
            }
            .prompt-textarea {
                padding-right: calc(1.2vw + 0.5vw + 150px + 4 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-rotate-mode {
                padding-right: calc(0.33vw + 150px + 4 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-edit-mode {
                padding-right: calc(0.33vw + 150px + 4 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-ecommerce-mode {
                padding-right: calc(0.33vw + 150px + 3 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-product-mode {
                padding-right: calc(1.2vw + 0.5vw + 150px + 4 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-object-replace-mode {
                padding-right: calc(0.33vw + 150px + 3 * 30px + 2 * 0.5vw);
            }

            .prompt-button {
                width: var(--prompt-btn-size, max(2.3vw, 29px));
                height: var(--prompt-btn-size, max(2.3vw, 29px));
                font-size: max(0.55vw, 11px);
            }
        }

        @media (max-width: 600px) {
            .prompt-buttons-container {
                right: calc(1.2vw + 0.5vw + 120px);
                max-width: calc(100% - 1.2vw - 0.5vw - 120px);
                gap: 0.5vw;
            }
            .prompt-buttons-container.inpaint-compact { right: calc(1.2vw + 0.25vw + 120px); }
            .prompt-buttons-container.ai-rotate-spacing {
                gap: 1vw;
            }
            .action-right {
                gap: 0.5vw;
            }
            .generate-button {
                min-width: 120px;
                max-width: calc(100vw - 2.4vw - 0.5vw - 4 * 30px - 1.5vw);
            }
            .prompt-textarea {
                padding-right: calc(1.2vw + 0.5vw + 120px + 4 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-rotate-mode {
                padding-right: calc(0.33vw + 120px + 4 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-edit-mode {
                padding-right: calc(0.33vw + 120px + 4 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-ecommerce-mode {
                padding-right: calc(0.33vw + 120px + 3 * 30px + 2 * 0.5vw);
            }
            .prompt-textarea.ai-product-mode {
                padding-right: calc(1.2vw + 0.5vw + 120px + 4 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-object-replace-mode {
                padding-right: calc(0.33vw + 120px + 3 * 30px + 2 * 0.5vw);
            }

            .prompt-button {
                width: var(--prompt-btn-size, max(2.2vw, 28px));
                height: var(--prompt-btn-size, max(2.2vw, 28px));
                font-size: max(0.5vw, 10px);
            }
        }
        .prompt-button {
            width: max(2.5vw, 30px);
            height: max(2.5vw, 30px);
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 0.3vw;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: max(0.6vw, 12px);
            color: #495057;
            font-weight: 500;
            flex-shrink: 0;
            position: relative;
        }
        .prompt-button.ai-rotate-bordered {
            border: 1.5px solid #3f3f3f;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
        }
        .prompt-button.ai-rotate-bordered:hover {
            border-color: #2f2f2f;
        }
        #modeButton.ai-rotate-bordered {
            border: 1.5px solid #000000 !important;
            background: #ffffff !important;
        }
        #modeButton.ai-rotate-bordered:hover {
            border-color: #000000 !important;
        }
        #modeButton .button-text {
            font-size: max(0.5vw, 10px);
            font-weight: 500;
            color: #495057;
            line-height: 1;
    white-space: nowrap;
        }
        #productModeButton .button-text {
            font-size: max(0.5vw, 10px);
            font-weight: 500;
            color: #495057;
            line-height: 1;
    white-space: nowrap;
        }
        #productModeButton {
            border: 1.5px solid #000000 !important;
            background: #ffffff !important;
        }
        #productModeButton:hover {
            border-color: #000000 !important;
        }
        #buildingFacadeModeButton .button-text {
            font-size: max(0.5vw, 10px);
            font-weight: 500;
            color: #495057;
            line-height: 1;
            white-space: nowrap;
        }
        #videoResolutionButton .button-text,
        #videoDurationButton .button-text {
            font-size: max(0.5vw, 10px);
            font-weight: 500;
            color: #495057;
            line-height: 1;
        }
        .prompt-button.wide { width: calc(2 * max(2.5vw, 30px)); }

        .prompt-button:hover {
            background: #e9ecef;
            border-color: #adb5bd;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .prompt-button:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }

        #button3.selected, #button4.selected {
            background: #ffffff !important;
            border: 2px solid #495057 !important;
            color: #495057 !important;
        }

        #button3.selected:hover, #button4.selected:hover {
            background: #f8f9fa !important;
            border: 2px solid #495057 !important;
            color: #495057 !important;
        }

        .prompt-textarea.disabled {
            background-color: #f5f5f5;
            color: #6c757d;
            cursor: not-allowed;
            opacity: 0.7;
            font-size: inherit !important;
        }

        .prompt-textarea.disabled::placeholder {
            color: #999;
            font-size: max(0.7vw, 14px) !important;
            opacity: 1;
        }

        .prompt-textarea.disabled[value] {
            font-size: inherit !important;
        }

        .button-container {
            position: relative;
            display: inline-block;
        }

        .quick-command-hint {
            position: absolute;
            bottom: -30px;
            left: 50%;
            transform: translateX(-50%);
            background: #495057;
            color: #ffffff;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 12px;
            white-space: nowrap;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .quick-command-hint.show {
            opacity: 1;
            visibility: visible;
        }

        .button-text-vertical {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        .text-top {
            font-size: max(0.5vw, 10px);
            margin-bottom: 1px;
        }

        .text-bottom {
            font-size: max(0.5vw, 10px);
        }

        .ratio-icon {
            width: 16px;
            height: 16px;
            display: inline-block;
        }
        
        .ratio-icon svg {
            width: 100%;
            height: 100%;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .layui-layer {
            border-radius: 16px !important;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12) !important;
            overflow: hidden !important;
            background: #ffffff !important;
        }
        .layui-layer-shade {
            background: rgba(0, 0, 0, 0.45) !important;
        }
        .layui-layer-title {
            background: #ffffff !important;
            color: #2b2f36 !important;
            font-size: 16px !important;
            font-weight: 600 !important;
            border-bottom: 1px solid #f0f2f5 !important;
            padding: 16px 20px !important;
        }
        .layui-layer-content {
            padding: 18px 20px 6px 20px !important;
            font-size: 14px !important;
            color: #2b2f36 !important;
            line-height: 1.65 !important;
            background: #ffffff !important;
        }
        .layui-layer-dialog .layui-layer-content {
            text-align: center !important;
            overflow: visible !important;
        }
        .layui-layer-dialog .layui-layer-content .layui-layer-ico {
            position: relative !important;
            top: auto !important;
            left: auto !important;
            display: inline-block !important;
            vertical-align: middle !important;
            margin-right: 8px !important;
        }
        .layui-layer-setwin .layui-layer-close {
            width: 32px !important;
            height: 32px !important;
            line-height: 32px !important;
            color: #9aa1a9 !important;
            font-size: 18px !important;
            transition: all .2s ease !important;
        }
        .layui-layer-setwin .layui-layer-close:hover {
            color: #2b2f36 !important;
            background: #f5f7fa !important;
            border-radius: 50% !important;
        }
        .layui-layer-btn {
            padding: 16px 0 20px 0 !important;
            text-align: center !important;
            border-top: none !important;
            background: #ffffff !important;
        }
        .layui-layer-btn a {
            display: block !important;
            height: 44px !important;
            line-height: 44px !important;
            padding: 0 !important;
            margin: 0 28px !important;
            border: none !important;
            border-radius: 10px !important;
            font-size: 15px !important;
            font-weight: 600 !important;
            transition: all .2s ease !important;
        }
        .layui-layer-btn .layui-layer-btn0 {
            background: linear-gradient(90deg, #1FA2FF 0%, #0061FF 100%) !important;
            color: #ffffff !important;
            box-shadow: 0 8px 20px rgba(0, 97, 255, 0.25) !important;
        }
        .layui-layer-btn .layui-layer-btn0:hover {
            filter: brightness(1.05);
            transform: translateY(-1px);
            box-shadow: 0 12px 28px rgba(0, 97, 255, 0.32) !important;
        }
        .layui-layer-btn .layui-layer-btn0:active {
            transform: translateY(0);
            box-shadow: 0 6px 16px rgba(0, 97, 255, 0.22) !important;
        }
        .layui-layer-btn .layui-layer-btn1 {
            background: #f5f6f8 !important;
            color: #4a4f57 !important;
            box-shadow: none !important;
        }
        .layui-layer-btn .layui-layer-btn1:hover {
            background: #eceff3 !important;
        }
        .layui-layer-btn .layui-layer-btn0,
        .layui-layer-btn .layui-layer-btn1 {
            min-width: 180px;
        }

        #button3,
        #button4 {
            font-size: max(0.5vw, 10px);
        }

        #button4 {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            line-height: 1.1;
            padding: 2px 4px;
        }

        #button4 .arrow-icon {
            font-size: max(0.47vw, 9px);
            line-height: 1;
            margin-bottom: 1px;
        }

        #button4 .angle-text {
            font-size: max(0.45vw, 9px);
            line-height: 1;
        }

        #button4 .camera-icon {
            width: max(0.8vw, 16px);
            height: max(0.8vw, 16px);
            display: inline-block;
            line-height: 1;
        }
        
        #button4 .camera-icon svg {
            width: 100%;
            height: 100%;
            display: block;
        }

        #button4.preset-selected {
            border: 2px solid #000000 !important;
            background: #ffffff !important;
        }

        .ratio-dropdown-container {
            position: relative;
            display: inline-block;
        }

        .ratio-dropdown {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            border: 1px solid #dee2e6;
            border-radius: 0.3vw;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            min-width: 120px;
            z-index: 10001;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            margin-bottom: 8px;
        }

        .ratio-dropdown.show {
            opacity: 1;
            visibility: visible;
        }
        
        .prompt-buttons-container.text-to-image-mode {
            gap: 0.25vw;
        }
        
        @media (max-width: 800px) {
            .prompt-buttons-container.text-to-image-mode {
                gap: 0.25vw;
            }
        }
        
        @media (max-width: 600px) {
            .prompt-buttons-container.text-to-image-mode {
                gap: 0.25vw;
            }
        }

        .ratio-option {
            padding: 8px 12px;
            cursor: pointer;
            font-size: max(0.6vw, 12px);
            color: #495057;
            border-bottom: 1px solid #f1f3f4;
            transition: background-color 0.2s ease;
    white-space: nowrap;
        }

        .ratio-option:last-child {
            border-bottom: none;
        }
        .ratio-option:hover {
            background-color: #f8f9fa;
        }
        .ratio-option.selected {
            background-color: #e3f2fd;
            color: #1976d2;
            font-weight: 500;
        }

        .ratio-option.disabled {
            color: #ccc;
            cursor: not-allowed;
            background-color: #f8f9fa;
            opacity: 0.6;
        }

        .ratio-option.disabled:hover {
            background-color: #f8f9fa;
            color: #ccc;
        }

        .upload-disabled {
            pointer-events: none;
            opacity: 0.6;
        }
        
        .upload-disabled .new-examples {
            pointer-events: auto;
            opacity: 1;
        }

        #uploadContainer.upload-disabled {
            opacity: 1 !important;
        }
        
        .upload-disabled .new-upload-tip {
            color: #666 !important;
        }

        .multi-edit-upload-btn {
            width: 125% !important;
            max-width: none !important;
        }

        .multi-edit-upload-tip {
            color: #666;
            font-size: max(0.55vw, 10px);
            text-align: center;
            margin-top: 0.5vw;
            line-height: 1.4;
        }

        .multi-images-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5vw;
            margin: 0.5vw 0.8vw 0.8vw 0.8vw;
            width: calc(100% - 1.6vw);
        }

        .multi-image-item {
            position: relative;
            border: none;
            border-radius: 0.4vw;
            overflow: hidden;
            background: #ffffff;
        }

        .multi-image-item.empty {
            border: none;
            background: #ffffff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .multi-image-item.empty:hover {
            background: #f0f8ff;
        }

        #materialReplaceUploadContainer.multi-edit-mode .multi-images-grid {
            margin: 8px 10px 10px 10px;
            width: calc(100% - 20px);
            gap: 6px;
            grid-auto-rows: 70px;
        }
        #materialReplaceUploadContainer.multi-edit-mode .multi-image-item {
            height: 100%;
        }

        .multi-image-upload-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #999;
            font-size: max(0.5vw, 10px);
            text-align: center;
            padding: 0.2vw;
        }

        .multi-image-upload-icon {
            width: max(0.75vw, 10px);
            height: max(0.75vw, 10px);
            margin-bottom: 0.2vw;
            stroke: #999;
        }

        .multi-image-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .multi-image-delete {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 20px;
            height: 20px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            font-size: 12px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
        }

        .multi-image-delete:hover {
            background: rgba(0, 0, 0, 0.8);
        }

        .k4-badge {
            position: absolute;
            top: -2px;
            left: -2px;
            background: linear-gradient(45deg, #3b82f6, #60a5fa);
            color: white;
            font-size: 8px;
            font-weight: bold;
            padding: 2px 6px;
            border-radius: 8px;
            text-transform: uppercase;
            z-index: 10;
            box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
        }

        .ratio-dropdown::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: white;
        }

        .rotation-dropdown {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            border: 1px solid #dee2e6;
            border-radius: 0.3vw;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            min-width: 120px;
            z-index: 10001;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            margin-bottom: 8px;
        }
        .rotation-dropdown.show {
            opacity: 1;
            visibility: visible;
        }

        .rotation-option {
            padding: 6px 12px;
            cursor: pointer;
            font-size: max(0.6vw, 12px);
            color: #495057;
            border-bottom: 1px solid #f1f3f4;
            transition: background-color 0.2s ease;
            white-space: nowrap;
        }

        .rotation-option:last-child {
            border-bottom: none;
        }

        .rotation-option:hover {
            background-color: #f8f9fa;
        }
        .resolution-button-bordered {
            border: 2px solid #222222 !important;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
        }

        .resolution-hidden {
            display: none !important;
        }

        .rotation-option.selected {
            background-color: #e3f2fd;
            color: #1976d2;
            font-weight: 500;
        }

        .rotation-dropdown::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: white;
        }

        .prompt-textarea {
            width: 100%;
            border: 2px solid transparent;

            background:
                linear-gradient(#fff, #fff) padding-box,
                linear-gradient(to right, #0491e8, #1c1fd8) border-box;
            border-radius: 0.5vw;
            padding: 2vw calc(1.2vw + 0.5vw + max(15vw, 188px) + 4 * max(2.5vw, 30px) + 1.5vw) 2.8vw 1.2vw;
            font-size: max(0.7vw, 14px) !important;
            resize: none;
            outline: none;
            transition: border-color 0.3s ease;
            min-height: 80px;
            box-sizing: border-box;
            line-height: 1.4;
            text-align: left;
            scrollbar-width: none;
            -ms-overflow-style: none;
            position: relative;
            z-index: 0;
        }
        
        .prompt-textarea.text2image-gap {
            padding: 1.2vw calc(3vw + max(15vw, 188px) + 4 * max(2.5vw, 30px) + 2vw) 1.2vw 1.2vw;
        }

        
        .unified-prompt-box {
            display: none;
            flex-direction: column;
            width: calc(100% + 16px);
            height: calc(100% + 16px);
            margin: -8px;
            background: #fff;
            border-radius: 12px;
            position: relative;
            z-index: 1;
        }

        .unified-prompt-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border: 1px dashed #b8b8b8;
            border-radius: 12px;
            pointer-events: none;
        }

        .unified-prompt-box.active {
            display: flex;
        }

        .unified-textarea-wrapper {
            flex: 2;
            display: flex;
            padding: 8px 10px 6px 10px;
            min-height: 0;
        }

        .unified-textarea {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            font-size: 15px;
            line-height: 1.6;
            color: #333;
            background: transparent;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .unified-textarea::placeholder {
            color: #999;
        }

        .unified-textarea.disabled {
            color: #999;
            background: transparent;
        }

        .unified-textarea-wrapper.disabled {
            background: #f0f0f0;
            border-radius: 8px 8px 0 0;
        }

        .unified-textarea-wrapper.disabled .unified-textarea {
            color: #999;
            cursor: not-allowed;
        }

        
        #buildingFacadePromptBox {
            background: #f0f0f0;
        }

        #buildingFacadePromptBox .unified-textarea-wrapper {
            background: transparent;
        }

        #buildingFacadePromptBox .unified-tool-btn {
            background: #fff;
        }

        #buildingFacadePromptBox .unified-tool-btn:hover {
            background: #f5f5f5;
        }

        
        #removeWatermarkPromptBox {
            background: #f0f0f0;
        }

        #removeWatermarkPromptBox .unified-textarea-wrapper {
            background: transparent;
        }

        #removeWatermarkPromptBox .unified-tool-btn {
            background: #fff;
        }

        #removeWatermarkPromptBox .unified-tool-btn:hover {
            background: #f5f5f5;
        }

        
        #clearFurniturePromptBox {
            background: #f0f0f0;
        }

        #clearFurniturePromptBox .unified-textarea-wrapper {
            background: transparent;
        }

        #clearFurniturePromptBox .unified-tool-btn {
            background: #fff;
        }

        #clearFurniturePromptBox .unified-tool-btn:hover {
            background: #f5f5f5;
        }

        
        #designGeneratorPromptBox .unified-textarea-wrapper.design-generator-inputs {
            padding: 12px 16px;
            min-height: 50px;
            display: flex;
            align-items: center;
            background: #fff;
        }

        #designGeneratorPromptBox .design-generator-input-row {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            width: 100%;
        }

        #designGeneratorPromptBox .design-generator-label {
            color: #495057;
            font-weight: 500;
            font-size: 14px;
            white-space: nowrap;
        }

        #designGeneratorPromptBox .design-generator-input {
            flex: 1;
            min-width: 80px;
            max-width: 160px;
            padding: 6px 10px;
            border: 1px solid #adb5bd;
            border-radius: 6px;
            font-size: 14px;
            background: #fff;
            color: #333;
        }

        #designGeneratorPromptBox .design-generator-input:focus {
            outline: none;
            border-color: #007bff;
        }

        #designGeneratorPromptBox .design-generator-input::placeholder {
            color: #999;
        }

        #designGeneratorPromptBox #designGenBuildingVolume {
            max-width: 240px;
        }


        #designGeneratorPromptBox .unified-dropdown-item.disabled {
            opacity: 0.4;
            pointer-events: none;
            color: #999;
        }

        
        #objectReplacePromptBox {
            background: #f0f0f0;
        }

        #objectReplacePromptBox .unified-textarea-wrapper {
            background: transparent;
        }

        #objectReplacePromptBox .unified-tool-btn {
            background: #fff;
        }

        #objectReplacePromptBox .unified-tool-btn:hover {
            background: #f5f5f5;
        }

        
        #collageAnalysisPromptBox {
            background: #f0f0f0;
        }

        #collageAnalysisPromptBox .unified-textarea-wrapper {
            background: transparent;
        }

        #collageAnalysisPromptBox .unified-tool-btn {
            background: #fff;
        }

        #collageAnalysisPromptBox .unified-tool-btn:hover {
            background: #f5f5f5;
        }

        
        #objectExtractPromptBox {
            background: #f0f0f0;
        }

        #objectExtractPromptBox .unified-textarea-wrapper {
            background: transparent;
        }

        #objectExtractPromptBox .unified-tool-btn {
            background: #fff;
        }

        #objectExtractPromptBox .unified-tool-btn:hover {
            background: #f5f5f5;
        }

        #objectExtractPromptBox .extract-mode-toggle {
            background: #fff;
        }

        
        .material-mode-toggle {
            display: flex;
            align-items: center;
            border-radius: 8px;
            height: 32px;
            box-sizing: border-box;
            pointer-events: auto;
            position: relative;
            z-index: 10;
            background: #f5f5f5;
            padding: 3px;
            gap: 2px;
        }

        .material-mode-toggle .toggle-option {
            padding: 0 14px;
            height: 26px;
            line-height: 26px;
            font-size: 13px;
            color: #333;
            background: transparent;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            user-select: none;
            border: none;
            pointer-events: auto;
            position: relative;
            z-index: 1;
            border-radius: 5px;
        }

        .material-mode-toggle .toggle-option.active {
            background: #666;
            color: #fff;
        }

        .material-mode-toggle .toggle-option:hover:not(.active) {
            background: rgba(0, 0, 0, 0.08);
        }

        
        .extract-mode-toggle {
            display: flex;
            align-items: center;
            border-radius: 8px;
            height: 32px;
            box-sizing: border-box;
            pointer-events: auto;
            position: relative;
            z-index: 10;
            background: #f5f5f5;
            padding: 3px;
            gap: 2px;
        }

        .extract-mode-toggle .toggle-option {
            padding: 0 14px;
            height: 26px;
            line-height: 26px;
            font-size: 13px;
            color: #333;
            background: transparent;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            user-select: none;
            border: none;
            pointer-events: auto;
            position: relative;
            z-index: 1;
            border-radius: 5px;
        }

        .extract-mode-toggle .toggle-option.active {
            background: #666;
            color: #fff;
        }

        .extract-mode-toggle .toggle-option:hover:not(.active) {
            background: rgba(0, 0, 0, 0.08);
        }

        .unified-toolbar {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px 8px 10px;
            background: transparent;
        }

        .unified-toolbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .unified-toolbar-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .unified-tool-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            background: #f5f5f5;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .unified-tool-btn:hover {
            background: #ebebeb;
        }

        .unified-tool-btn svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .unified-tool-btn .dropdown-arrow {
            width: 10px;
            height: 10px;
            opacity: 0.5;
        }

        .unified-tool-btn .model-icon {
            width: 12px;
            height: 12px;
            fill: none;
            stroke: #333;
            stroke-width: 2;
        }

        .unified-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 8px 24px;
            min-width: 140px;
            background: #007bff;
            border: none;
            border-radius: 6px;
            color: #fff;
            font-size: 13.3px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .unified-generate-btn .bolt-icon {
            width: 13.3px;
            height: 13.3px;
            fill: #fff;
            flex-shrink: 0;
        }

        .unified-generate-btn:hover {
            background: #0069d9;
        }

        .unified-generate-btn:active {
            background: #005cbf;
        }

        .unified-generate-btn .credits {
            font-size: 12px;
            opacity: 0.9;
        }

        .unified-dropdown {
            position: absolute;
            bottom: 100%;
            left: 0;
            margin-bottom: 4px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            min-width: 120px;
            z-index: 10000;
            display: none;
        }

        .unified-dropdown.show {
            display: block;
        }

        .unified-dropdown-item {
            padding: 10px 14px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: background 0.15s;
        }

        .unified-dropdown-item:first-child {
            border-radius: 8px 8px 0 0;
        }

        .unified-dropdown-item:last-child {
            border-radius: 0 0 8px 8px;
        }

        .unified-dropdown-item:hover {
            background: #f5f5f5;
        }

        .unified-dropdown-item.selected {
            background: #e8f4fd;
            color: #0491e8;
        }

        .unified-tool-btn-wrapper {
            position: relative;
        }

        
        .text2image-prompt-box {
            display: none;
            flex-direction: column;
            
            width: calc(100% + 16px);
            height: calc(100% + 16px);
            margin: -8px;
            background: #fff;
            border-radius: 12px;
            border: 1px dashed #b8b8b8;
            position: relative;
        }

        .text2image-prompt-box.active {
            display: flex;
        }

        
        .text2image-textarea-wrapper {
            flex: 2;
            display: flex;
            padding: 8px 10px 6px 10px;
            min-height: 0;
        }

        .text2image-textarea {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            font-size: 15px;
            line-height: 1.6;
            color: #333;
            background: transparent;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .text2image-textarea::placeholder {
            color: #999;
        }

        
        .text2image-toolbar {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px 8px 10px;
            background: transparent;
        }

        .text2image-toolbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .text2image-toolbar-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        
        .text2image-tool-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            background: #f5f5f5;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .text2image-tool-btn:hover {
            background: #ebebeb;
        }

        .text2image-tool-btn svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .text2image-tool-btn .dropdown-arrow {
            width: 10px;
            height: 10px;
            opacity: 0.5;
        }

        .text2image-tool-btn .model-icon {
            width: 12px;
            height: 12px;
            fill: none;
            stroke: #333;
            stroke-width: 2;
        }

        
        .text2image-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 8px 24px;
            min-width: 140px;
            background: #007bff;
            border: none;
            border-radius: 6px;
            color: #fff;
            font-size: 13.3px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .text2image-generate-btn .bolt-icon {
            width: 13.3px;
            height: 13.3px;
            fill: #fff;
            flex-shrink: 0;
        }

        .text2image-generate-btn:hover {
            background: #0069d9;
        }

        .text2image-generate-btn:active {
            background: #005cbf;
        }

        .text2image-generate-btn .credits {
            font-size: 12px;
            opacity: 0.9;
        }

        .text2image-generate-btn svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }

        
        .text2image-dropdown {
            position: absolute;
            bottom: 100%;
            left: 0;
            margin-bottom: 4px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            min-width: 120px;
            z-index: 10000;
            display: none;
        }

        .text2image-dropdown.show {
            display: block;
        }

        .text2image-dropdown-item {
            padding: 10px 14px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: background 0.15s;
        }

        .text2image-dropdown-item:first-child {
            border-radius: 8px 8px 0 0;
        }

        .text2image-dropdown-item:last-child {
            border-radius: 0 0 8px 8px;
        }

        .text2image-dropdown-item:hover {
            background: #f5f5f5;
        }

        .text2image-dropdown-item.selected {
            background: #e8f4fd;
            color: #0491e8;
        }

        .text2image-tool-btn-wrapper {
            position: relative;
        }

        
        .airotate-prompt-box {
            display: none;
            flex-direction: column;
            
            width: calc(100% + 16px);
            height: calc(100% + 16px);
            margin: -8px;
            background: #fff;
            border-radius: 12px;
            border: 1px dashed #b8b8b8;
            position: relative;
        }

        .airotate-prompt-box.active {
            display: flex;
        }

        .airotate-prompt-box.disabled {
            background: #f0f0f0;
        }

        .airotate-prompt-box.disabled .airotate-textarea {
            background: transparent;
            color: #999;
            cursor: not-allowed;
        }

        .airotate-prompt-box.disabled .airotate-toolbar {
            background: transparent;
        }

        .airotate-textarea-wrapper {
            flex: 2;
            display: flex;
            padding: 8px 10px 6px 10px;
            min-height: 0;
        }

        .airotate-textarea {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            font-size: 15px;
            line-height: 1.6;
            color: #333;
            background: transparent;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .airotate-textarea::placeholder {
            color: #999;
        }

        .airotate-toolbar {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px 8px 10px;
            background: transparent;
        }

        .airotate-toolbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .airotate-toolbar-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .airotate-tool-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            background: #f5f5f5;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .airotate-tool-btn:hover {
            background: #ebebeb;
        }

        .airotate-tool-btn.preset-active {
            border: 1.5px solid transparent;
            background: linear-gradient(#f5f5f5, #f5f5f5) padding-box,
                        linear-gradient(90deg, #007bff, #00bfff, #007bff) border-box;
            background-size: 100% 100%, 200% 100%;
            animation: borderGlow 2s linear infinite;
        }

        @keyframes borderGlow {
            0% { background-position: 0 0, 0% 0; }
            100% { background-position: 0 0, 200% 0; }
        }

        .airotate-tool-btn svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .airotate-tool-btn .dropdown-arrow {
            width: 10px;
            height: 10px;
            opacity: 0.5;
        }

        .airotate-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 8px 24px;
            min-width: 140px;
            background: #007bff;
            border: none;
            border-radius: 6px;
            color: #fff;
            font-size: 13.3px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .airotate-generate-btn .bolt-icon {
            width: 13.3px;
            height: 13.3px;
            fill: #fff;
            flex-shrink: 0;
        }

        .airotate-generate-btn:hover {
            background: #0069d9;
        }

        .airotate-generate-btn:active {
            background: #005cbf;
        }

        .airotate-generate-btn .credits {
            font-size: 12px;
            opacity: 0.9;
        }

        .airotate-dropdown {
            position: absolute;
            bottom: 100%;
            left: 0;
            margin-bottom: 4px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            min-width: 120px;
            z-index: 10000;
            display: none;
        }

        .airotate-dropdown.show {
            display: block;
        }

        .airotate-dropdown-item {
            padding: 10px 14px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: background 0.15s;
        }

        .airotate-dropdown-item:first-child {
            border-radius: 8px 8px 0 0;
        }

        .airotate-dropdown-item:last-child {
            border-radius: 0 0 8px 8px;
        }

        .airotate-dropdown-item:hover {
            background: #f5f5f5;
        }

        .airotate-dropdown-item.selected {
            background: #e8f4fd;
            color: #0491e8;
        }

        .airotate-tool-btn-wrapper {
            position: relative;
        }

        
        .inpaint-prompt-box {
            display: none;
            flex-direction: column;
            width: calc(100% + 16px);
            height: calc(100% + 16px);
            margin: -8px;
            background: #fff;
            border-radius: 12px;
            border: 1px dashed #b8b8b8;
            position: relative;
        }

        .inpaint-prompt-box.active {
            display: flex;
        }

        .inpaint-prompt-box.disabled {
            background: #f0f0f0;
        }

        .inpaint-prompt-box.disabled .inpaint-textarea {
            background: transparent;
            color: #999;
            cursor: not-allowed;
        }

        .inpaint-prompt-box.disabled .inpaint-toolbar {
            background: transparent;
        }

        .inpaint-textarea-wrapper {
            flex: 2;
            display: flex;
            padding: 8px 10px 6px 10px;
            min-height: 0;
        }

        .inpaint-textarea {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            font-size: 15px;
            line-height: 1.6;
            color: #333;
            background: transparent;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .inpaint-textarea::placeholder {
            color: #999;
        }

        .inpaint-toolbar {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px 8px 10px;
            background: transparent;
        }

        .inpaint-toolbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .inpaint-toolbar-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .inpaint-tool-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            background: #f5f5f5;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .inpaint-tool-btn:hover {
            background: #ebebeb;
        }

        .inpaint-tool-btn svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .inpaint-tool-btn .dropdown-arrow {
            width: 10px;
            height: 10px;
            opacity: 0.5;
        }

        .inpaint-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 8px 24px;
            min-width: 140px;
            background: #007bff;
            border: none;
            border-radius: 6px;
            color: #fff;
            font-size: 13.3px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .inpaint-generate-btn .bolt-icon {
            width: 13.3px;
            height: 13.3px;
            fill: #fff;
            flex-shrink: 0;
        }

        .inpaint-generate-btn:hover {
            background: #0069d9;
        }

        .inpaint-generate-btn:active {
            background: #005cbf;
        }

        .inpaint-generate-btn .credits {
            font-size: 12px;
            opacity: 0.9;
        }

        .inpaint-dropdown {
            position: absolute;
            bottom: 100%;
            left: 0;
            margin-bottom: 4px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            min-width: 140px;
            z-index: 10000;
            display: none;
        }

        .inpaint-dropdown.show {
            display: block;
        }

        .inpaint-dropdown-item {
            padding: 10px 14px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: background 0.15s;
        }

        .inpaint-dropdown-item:first-child {
            border-radius: 8px 8px 0 0;
        }

        .inpaint-dropdown-item:last-child {
            border-radius: 0 0 8px 8px;
        }

        .inpaint-dropdown-item:hover {
            background: #f5f5f5;
        }

        .inpaint-dropdown-item.selected {
            background: #e8f4fd;
            color: #0491e8;
        }

        .inpaint-tool-btn-wrapper {
            position: relative;
        }

        
        .upscale-prompt-box {
            display: none;
            flex-direction: column;
            width: calc(100% + 16px);
            height: calc(100% + 16px);
            margin: -8px;
            background: #f0f0f0;
            border-radius: 12px;
            border: 1px dashed #b8b8b8;
            position: relative;
        }

        .upscale-prompt-box.active {
            display: flex;
        }

        .upscale-textarea-wrapper {
            flex: 2;
            display: flex;
            padding: 8px 10px 6px 10px;
            min-height: 0;
        }

        .upscale-textarea {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            font-size: 15px;
            line-height: 1.6;
            color: #999;
            background: transparent;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            cursor: not-allowed;
        }

        .upscale-textarea::placeholder {
            color: #999;
        }

        .upscale-toolbar {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px 8px 10px;
            background: transparent;
        }

        .upscale-toolbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .upscale-toolbar-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .upscale-tool-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            background: #fff;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .upscale-tool-btn:hover {
            background: #f5f5f5;
        }

        .upscale-tool-btn svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .upscale-tool-btn .dropdown-arrow {
            width: 10px;
            height: 10px;
            opacity: 0.5;
        }

        .upscale-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 8px 24px;
            min-width: 140px;
            background: #007bff;
            border: none;
            border-radius: 6px;
            color: #fff;
            font-size: 13.3px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .upscale-generate-btn .bolt-icon {
            width: 13.3px;
            height: 13.3px;
            fill: #fff;
            flex-shrink: 0;
        }

        .upscale-generate-btn:hover {
            background: #0069d9;
        }

        .upscale-generate-btn:active {
            background: #005cbf;
        }

        .upscale-generate-btn .credits {
            font-size: 12px;
            opacity: 0.9;
        }

        .upscale-dropdown {
            position: absolute;
            bottom: 100%;
            left: 0;
            margin-bottom: 4px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            min-width: 120px;
            z-index: 10000;
            display: none;
        }

        .upscale-dropdown.show {
            display: block;
        }

        .upscale-dropdown-item {
            padding: 10px 14px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: background 0.15s;
        }

        .upscale-dropdown-item:first-child {
            border-radius: 8px 8px 0 0;
        }

        .upscale-dropdown-item:last-child {
            border-radius: 0 0 8px 8px;
        }

        .upscale-dropdown-item:hover {
            background: #f5f5f5;
        }

        .upscale-dropdown-item.selected {
            background: #e8f4fd;
            color: #0491e8;
        }

        .upscale-tool-btn-wrapper {
            position: relative;
        }

        
        .multiview-prompt-box {
            display: none;
            flex-direction: column;
            width: calc(100% + 16px);
            height: calc(100% + 16px);
            margin: -8px;
            background: #f0f0f0;
            border-radius: 12px;
            border: 1px dashed #b8b8b8;
            position: relative;
        }

        .multiview-prompt-box.active {
            display: flex;
        }

        .multiview-textarea-wrapper {
            flex: 2;
            display: flex;
            padding: 8px 10px 6px 10px;
            min-height: 0;
        }

        .multiview-textarea {
            flex: 1;
            border: none;
            outline: none;
            resize: none;
            font-size: 15px;
            line-height: 1.6;
            color: #999;
            background: transparent;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .multiview-textarea::placeholder {
            color: #999;
        }

        .multiview-toolbar {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px 8px 10px;
            background: transparent;
        }

        .multiview-toolbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .multiview-toolbar-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .multiview-tool-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            background: #fff;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .multiview-tool-btn:hover {
            background: #f5f5f5;
        }

        .multiview-tool-btn svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .multiview-tool-btn .dropdown-arrow {
            width: 10px;
            height: 10px;
            opacity: 0.5;
        }

        .multiview-generate-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 8px 24px;
            min-width: 140px;
            background: #007bff;
            border: none;
            border-radius: 6px;
            color: #fff;
            font-size: 13.3px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .multiview-generate-btn .bolt-icon {
            width: 13.3px;
            height: 13.3px;
            fill: #fff;
            flex-shrink: 0;
        }

        .multiview-generate-btn:hover {
            background: #0069d9;
        }

        .multiview-generate-btn:active {
            background: #005cbf;
        }

        .multiview-generate-btn .credits {
            font-size: 12px;
            opacity: 0.9;
        }

        .multiview-dropdown {
            position: absolute;
            bottom: 100%;
            left: 0;
            margin-bottom: 4px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            min-width: 120px;
            z-index: 10000;
            display: none;
        }

        .multiview-dropdown.show {
            display: block;
        }

        .multiview-dropdown-item {
            padding: 10px 14px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: background 0.15s;
        }

        .multiview-dropdown-item:first-child {
            border-radius: 8px 8px 0 0;
        }

        .multiview-dropdown-item:last-child {
            border-radius: 0 0 8px 8px;
        }

        .multiview-dropdown-item:hover {
            background: #f5f5f5;
        }

        .multiview-dropdown-item.selected {
            background: #e8f4fd;
            color: #0491e8;
        }

        .multiview-tool-btn-wrapper {
            position: relative;
        }

        .prompt-textarea.ai-rotate-mode {
            padding-right: calc(0.33vw + max(15vw, 188px) + 4 * max(2.5vw, 30px) + 2 * 0.5vw);
        }
        .prompt-textarea.ai-edit-mode {
            padding-right: calc(0.33vw + max(15vw, 188px) + 4 * max(2.5vw, 30px) + 2 * 0.5vw);
        }
        .prompt-textarea.ai-ecommerce-mode {
            padding-right: calc(0.33vw + max(15vw, 188px) + 3 * max(2.5vw, 30px) + 2 * 0.5vw);
        }
        .prompt-textarea.ai-product-mode {
            padding-right: calc(1.2vw + 0.5vw + max(15vw, 188px) + 4 * max(2.5vw, 30px) + 1.5vw);
        }
        .prompt-textarea.ai-object-replace-mode {
            padding-right: calc(0.33vw + max(15vw, 188px) + 3 * max(2.5vw, 30px) + 2 * 0.5vw);
        }

        .prompt-textarea::-webkit-scrollbar {
            display: none;
        }

        .prompt-textarea:focus {
            border-color: transparent;
            
            background:
                linear-gradient(#fff, #fff) padding-box,
                linear-gradient(to right, #0491e8, #1c1fd8) border-box;
            text-align: left;
        }

        .prompt-textarea.disabled,
        .prompt-textarea:disabled,
        .prompt-textarea[disabled] {
            background:
                linear-gradient(#f5f5f5, #f5f5f5) padding-box,
                linear-gradient(to right, #0491e8, #1c1fd8) border-box;
            color: #6c757d;
        }

        .prompt-textarea:not(:placeholder-shown) {
            text-align: left;
        }

        .prompt-textarea::placeholder {
            color: #999;
            font-size: max(0.7vw, 14px) !important;
            line-height: 1.4;
        }

        .prompt-textarea[readonly] {
            background-color: #f8f8f8 !important;
            color: #999 !important;
            cursor: not-allowed;
        }

        .prompt-textarea[readonly]::placeholder {
            color: #999 !important;
            opacity: 1;
        }

        .button-text {
            font-size: max(0.75vw, 14px);
            font-weight: 600;
            margin-bottom: 0.1vw;
            line-height: 1.2;
        }

        .button-credits {
            font-size: max(0.6vw, 11px);
            opacity: 0.9;
            line-height: 1;
        }

        .wam-result img{
            max-height: 100%;
        }

        .min-h-screen {
            display: flex;
            flex-direction: column;
            min-height: initial;
        }

        .wo-style-box {
            display: flex;
            flex-direction: row;
            margin-top: .5vw;
            justify-content: space-between;
        }

        .wsb-item {
            width: 30%;
            cursor: pointer;
        }

        .wsb-item img {
            border-radius: .5vw;
        }

        .wsb-item.active > img,
        .wsb-item:hover > img {
            border: .2vw solid #1256e0;
        }

        .wsb-item.active > .wsbi,
        .wsb-item:hover > .wsbi {
            color: #1256e0;
        }

        .wsbi {
            display: flex;
            flex-direction: row;
            width: 100%;
            text-align: center;
            justify-content: center;
            margin-top: .2vw;
        }

        .wsbi > div {
            font-size: .6vw;
            margin-left: .2vw;
        }
        .wo-picture {
            height: 13.25vh;
            font-size: .6vw;
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: center;
            background: #f0f0f0;
            border-radius: .6vw;
            color: #adacac;
            margin-top: .333vw;
            flex-shrink: 0;
        }

        .wo-picture .wopo-btn-add {
            width: 1.5vw;
            height: 1.5vw;
            margin-left: auto;
            margin-right: auto;
        }

        .wo-title {
            margin-top: .5vw;

        }

        .wo-title.head{
            font-weight: bold;
            font-size: .8vw;
        }

        .wo-param {
            margin-top: .5vw;
            display: flex;
            flex-direction: row;
        }

        .wop-title {
            width: 4vw;
            flex-shrink: 0;
            height: 2vw;
            line-height: 2vw;
            font-size: .7vw;
        }

        .wop-param {
            width: 100%;
            text-align: center;
            background: #f0f0f0;
            height: 2vw;
            border-radius: .2vw;
            font-size: .7vw;
        }

        .wo-prompt textarea {
            background: #f0f0f0;
            width: 100%;
            height: 10vh;
            padding: .5vw;
            border-radius: .3vw;
        }

        .wo-prompt {
            margin-top: .222vw;
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 15px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            background-color: #d9d9d9;
            border-radius: 15px;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            transition: background-color 0.3s;
        }
        .slider::before {
            content: "";
            position: absolute;
            width: 30px;
            height: 15px;
            background-color: #1256e0;
            border-radius: 15px;
            transition: transform 0.3s;
            left: 0;
            top: 0;
        }
        .switch input:checked + .slider::before {
            transform: translateX(30px);
        }

        .upload-ref,
        .wo-prompt-container{
            display: flex;
            flex-direction: row;
            height: 2.5vw;
            margin-top: .333vw;
        }

        .upload-ref .wo-title,
        .wo-prompt-container .wo-title{
            width: 8vw;
            flex-shrink: 0;
            font-size: .7vw;
        }
        .wo-switch {

            height: 2vw;
            margin-top: .65vw;
            width: 100%;
            text-align: right;
        }

        .wr-title {
            height: 3vw;
            line-height: 3vw;
            flex-shrink: 0;
            font-weight: bold;
            font-size: .8vw;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .wr-lists {
            border-radius: .5vw;
            padding: 1vw;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .wr-lists.hide{
            display: none !important;
        }

        .wr-lists .img-container {
            width: calc((100% - 40px) / 5);
            aspect-ratio: 1;
            background: #f8f8f8;
            border-radius: 8px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .wr-lists .img-container:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .wr-lists .img-container img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
            transition: all 0.3s ease;
        }

        .wr-lists .img-container:hover img {
            transform: scale(1.05);
        }

        .wr-lists .img-container {
            position: relative;
        }

        .wr-lists .img-container .continue-edit-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.7));
            padding: 20px 8px 8px;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            display: flex;
            justify-content: center;
            align-items: flex-end;
        }

        .wr-lists .img-container:hover .continue-edit-overlay {
            opacity: 1;
            pointer-events: auto;
        }

        .wr-lists .img-container .continue-edit-btn {
            background: rgb(245, 195, 66);
            color: white;
            border: none;
            padding: 3px 8px;
            border-radius: 3px;
            font-size: 10px;
            cursor: pointer;
            text-align: center;
            transition: background-color 0.2s ease;
            font-weight: 500;
            white-space: nowrap;
        }

        .wr-lists .img-container .continue-edit-btn:hover {
            background: rgb(220, 175, 50);
        }

        .wr-lists .img-container .continue-edit-btn:active {
            transform: translateY(1px);
        }

        .wr-lists .img-container .continue-edit-btn:disabled {
            background: #cccccc !important;
            color: #666666 !important;
            cursor: not-allowed !important;
            opacity: 0.6;
        }

        .wr-lists .img-container .continue-edit-btn.loading {
            position: relative;
            color: transparent;
        }

        .wr-lists .img-container .continue-edit-btn.loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 12px;
            height: 12px;
            border: 2px solid #ffffff;
            border-top: 2px solid transparent;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: translate(-50%, -50%) rotate(0deg); }
            100% { transform: translate(-50%, -50%) rotate(360deg); }
        }

        .wr-lists img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
        }

        .wr-lists.result .multi-collage {
            display: grid;
            gap: 0.5vw;
            width: 100%;
            height: 100%;
            grid-auto-rows: 1fr;
            box-sizing: border-box;
            padding: 0.5vw;
        }
        .wr-lists.result .multi-collage.cols-1 { grid-template-columns: 1fr; }
        .wr-lists.result .multi-collage.cols-2 { grid-template-columns: repeat(2, 1fr); }
        .wr-lists.result .multi-collage.cols-3 { grid-template-columns: repeat(3, 1fr); }
        .wr-lists.result .multi-collage.rows-1 { grid-template-rows: 1fr; }
        .wr-lists.result .multi-collage.rows-2 { grid-template-rows: repeat(2, 1fr); }
        .wr-lists.result .multi-collage .multi-collage-item {
            position: relative;
            width: 100%;
            height: 100%;
            background: #fff;
            border-radius: 0.4vw;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .wr-lists.result .multi-collage .multi-collage-item img {
            max-width: 100%;
            max-height: 100%;
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
        }

        .wr-lists-box {
            margin: 16px;
            border: 1px dashed #dddddd;
            height: 100%;
            overflow-y: hidden;
            overflow-x: visible;
            margin-top: 0;
            border-radius: 0.5vw;
            position: relative;
        }

        .fullscreen-btn {
            position: absolute;
            right: 1.5vw;
            top: 1.5vw;
            background: white;
            color: black;
            border: none;
            padding: 0.33vw 0.67vw;
            border-radius: 0.3vw;
            font-size: 0.47vw;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.2vw;
            transition: all 0.2s;
            z-index: 100;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        .fullscreen-btn:hover {
            background: #f0f0f0;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
        }
        .fullscreen-btn svg {
            width: 0.53vw;
            height: 0.53vw;
        }
        @media (max-width: 768px) {
            .fullscreen-btn {
                padding: 0.67vw 1.33vw;
                font-size: 1.33vw;
                right: 2vw;
                top: 2vw;
            }
            .fullscreen-btn svg {
                width: 1.33vw;
                height: 1.33vw;
            }
        }

        .fullscreen-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.95);
            z-index: 99999;
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        .fullscreen-modal.active { display: flex; align-items: center; justify-content: center; }
        .fullscreen-content { position: relative; width: 90vw; height: 90vh; display: flex; align-items: center; justify-content: center; }
        .fullscreen-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(74, 74, 74, 0.9);
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100001;
            transition: all 0.2s;
        }
        .fullscreen-close:hover { background: #333; transform: scale(1.1); }
        .fullscreen-image-wrapper { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: grab; }
        .fullscreen-image-wrapper.dragging { cursor: grabbing; }
        .fullscreen-image-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.1s ease-out; user-select: none; }

        .fullscreen-compare-container { position: relative; width: 90vw; height: 90vh; overflow: hidden; cursor: grab; }
        .fullscreen-compare-container.dragging { cursor: grabbing; }
        .fullscreen-compare-before, .fullscreen-compare-after { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
        .fullscreen-compare-before img, .fullscreen-compare-after img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.1s ease-out; user-select: none; }
        .fullscreen-compare-after { clip-path: inset(0 0 0 50%); }
        .fullscreen-compare-slider { position: absolute; top: 0; left: 50%; width: 4px; height: 100%; background: #fff; cursor: ew-resize; z-index: 100000; transform: translateX(-50%); box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); }
        .fullscreen-compare-slider::before { content: ''; position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; background: #fff; border: 3px solid #007bff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
        .fullscreen-compare-slider::after { content: '⇔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #007bff; font-size: 20px; font-weight: bold; z-index: 1; }

        .fullscreen-toggle-buttons { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 100001; }
        .fullscreen-toggle-btn { background: rgba(74, 74, 74, 0.9); color: white; border: none; padding: 7px 13px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
        .fullscreen-toggle-btn:hover { background: #333; }
        .fullscreen-toggle-btn.active { background: #007bff; }

        .zoom-indicator { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: rgba(74, 74, 74, 0.9); color: white; padding: 8px 16px; border-radius: 20px; font-size: 14px; z-index: 100002; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
        .zoom-indicator.show { opacity: 1; }

        .wr-lists-box.history-active {
            overflow-y: auto !important;
        }

        .wr-lists-box:has(.wr-lists.result:not(.hide)) {
            overflow-y: hidden !important;
        }

        .wr-lists-box:has(.wr-lists.result:not(.hide)) .wr-lists.history {
            display: none !important;
        }
        .wr-lists-box:has(.wr-lists.history:not(.hide)) .wr-lists.result {
            display: none !important;
        }

        #upload-picture {
            display: none;
        }

        .wop-preview {
            display: none;
            height: 13.25vh;
            position: relative;
        }

        .preview {
            height: 100%;
            margin-left: auto;
            margin-right: auto;
        }

        .preview-close-btn {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 20px;
            height: 20px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            z-index: 10;
            transition: all 0.3s ease;
        }

        .preview-close-btn:hover {
            background: rgba(255, 0, 0, 0.8);
            transform: scale(1.1);
        }

        .preview-close-btn:active {
            transform: scale(0.95);
        }

        .hide{
            display: none !important;
        }

        .wamo-1 {
            overflow-y: scroll;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .wamo-1::-webkit-scrollbar {
            display: none;
        }

        .load-more{
            width: 100%;
            text-align: center;
            margin-top: 1vw;
            color: gray;
        }

        .tab-buttons {
            display: flex;
            gap: 0;
            justify-content: center;
            align-items: center;
        }

        .gen-tab {
            background: #e0e0e0;
            color: black;
            border: none;
            padding: 0.28125vw 0.75vw;
            font-size: 0.525vw;
            font-weight: normal;
            cursor: pointer;
            transition: all 0.3s ease;
            border-radius: 0.28125vw;
            height: auto;
            line-height: 1.2;
        }

        .gen-tab:hover {
            background: #d0d0d0;
        }

        .gen-tab.active {
            background: #333333;
            color: white;
            font-weight: bold;
        }

        .progress {
            position: absolute;
            width: 50%;
            height: 2vw;
            background: #383838;
            border-radius: 0.5vw;
            left: 50%;
            top: 50%;
            margin-top: -1.0vw;
            margin-left: -25%;
            display: none;
            z-index: 9999;
        }

        .progress.active {
            display: block;
        }

        .p-mask {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.6);
            z-index: 10001;
            border-radius: 0.5vw;
        }
        .p-title {
            position: relative;
            z-index: 10002;
            font-size: 0.9em;
            height: 2vw;
            line-height: 2vw;
            text-align: center;
            color: #ffffff;
            width: 100%;
        }

        .p-bg-progress {
            position: absolute;
            z-index: 10001;
            height: 2vw;
            background: linear-gradient(to right, #0490e8, #1c21d8);
            border-radius: 0.5vw;
            transition: width 0.3s ease;
            width: 0%;
            left: 0;
            top: 0;
        }

        .wr-lists.result{
            height: 100%;
            padding: 1vw;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            box-sizing: border-box;
        }
        .wr-lists.result img{
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            margin: 0 auto;
            cursor: zoom-in;
            object-fit: contain;
            display: block;
        }
        
        .wr-lists.result.selection-active,
        .wr-lists.result.selection-active img{
            cursor: crosshair !important;
        }

        .floating-buttons {
            position: absolute;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
            z-index: 10003;
            opacity: 0;
            transition: opacity 0.3s ease;
            flex-wrap: nowrap;
            white-space: nowrap;
            max-width: calc(100% - 40px);
            justify-content: center;
            overflow: visible;
            min-height: 40px;
        }
        .wr-lists-box:hover .floating-buttons {
            opacity: 1;
        }

        .wr-lists-box.draw-layout-active .floating-buttons {
            opacity: 1;
        }

        .wr-lists-box.draw-mask-active .floating-buttons {
            opacity: 1;
        }

        .wr-lists-box.object-replace-mode .floating-buttons {
            bottom: -5px;
            opacity: 1 !important;
        }
        
        .wr-lists-box.ai-edit-mode-floating .floating-buttons {
            bottom: -5px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .wr-lists-box.ai-edit-mode-floating:hover .floating-buttons {
            opacity: 1 !important;
        }
        
        .wr-lists-box.ai-edit-wmask .floating-buttons {
            bottom: -5px;
            opacity: 1 !important;
        }
        
        .wr-lists-box.history-active .floating-buttons {
            display: none !important;
        }

        .wr-lists-box.no-upload .floating-buttons {
            display: none !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        .floating-btn {
            padding: 8px 16px;
            border-radius: 4.5px;
            border: none;
            cursor: pointer;
            font-size: 0.467vw;
            color: white;
            font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            min-width: 60px;
            max-width: none;
            text-align: center;
            white-space: nowrap;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .floating-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .compare-btn {
            background: #333333;
        }

        .compare-btn:hover {
            background: #555555;
        }

        .compare-btn.active {
            background: #007bff;
        }

        .compare-btn.active:hover {
            background: #0056b3;
        }

        .download-btn {
            background: #333333;
        }

        .download-btn:hover {
            background: #555555;
        }

        .draw-btn {
            background: #333333;
        }
        .draw-btn:hover {
            background: #555555;
        }
        .draw-btn.active {
            background: #28a745;
        }

        .draw-btn.active:hover {
            background: #218838;
        }

        .draw-btn.hidden {
            display: none;
        }

        .continue-edit-btn {
            background: rgb(245, 195, 66);
        }

        .continue-edit-btn:hover {
            background: rgb(220, 175, 50);
        }

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

        .draw-mask-active .continue-edit-btn,
        .draw-mask-active .compare-btn,
        .draw-mask-active .download-btn {
            background: #999999 !important;
            color: white !important;
            cursor: not-allowed !important;
            opacity: 0.6;
        }
        
        .object-replace-mode .draw-mask-btn {
            background: #007bff !important;
            color: white !important;
            cursor: pointer !important;
            opacity: 1 !important;
        }
        
        .object-replace-mode .draw-mask-btn:hover {
            background: #0056b3 !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
        }

        .draw-mask-active .continue-edit-btn:hover,
        .draw-mask-active .compare-btn:hover,
        .draw-mask-active .download-btn:hover {
            background: #999999 !important;
            color: white !important;
            transform: none !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        }

        .draw-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 20;
        }

        .draw-overlay.active {
            pointer-events: all;
            cursor: crosshair;
        }

        .annotation-box {
            position: absolute;
            background: rgba(0, 0, 0, 0.5);
            border: 2px solid #fff;
            border-radius: 8px;
            cursor: move;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 150px;
            min-height: 75px;
            color: white;
            font-size: 30px;
            font-weight: bold;
            text-align: center;
            padding: 8px;
            box-sizing: border-box;
            z-index: 25;
            pointer-events: all;
        }

        .annotation-box:hover {
            border-color: #007bff;
        }

        .resize-handle {
            position: absolute;
            bottom: -4px;
            right: -4px;
            width: 12px;
            height: 12px;
            background: #007bff;
            border: 2px solid #fff;
            border-radius: 50%;
            cursor: se-resize;
            z-index: 25;
            opacity: 0;
            transition: opacity 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .resize-handle::before {
            content: '';
            width: 6px;
            height: 6px;
            background: linear-gradient(-45deg, transparent 40%, white 40%, white 60%, transparent 60%);
            border-radius: 1px;
        }

        .annotation-box:hover .resize-handle {
            opacity: 1;
        }

        .delete-handle {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 20px;
            height: 20px;
            background: #dc3545;
            border: 2px solid #fff;
            border-radius: 50%;
            cursor: pointer;
            z-index: 25;
            opacity: 0;
            transition: opacity 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            color: white;
            line-height: 1;
        }

        .annotation-box:hover .delete-handle {
            opacity: 1;
        }

        .delete-handle:hover {
            background: #c82333;
            transform: scale(1.1);
        }

        .annotation-input {
            background: transparent;
            border: none;
            color: white;
            font-size: 30px;
            font-weight: bold;
            text-align: center;
            width: 100%;
            outline: none;
            resize: none;
            cursor: text;
            pointer-events: all;
        }
        .annotation-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .draw-hint {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 123, 255, 0.9);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            z-index: 15;
            display: none;
        }

        .draw-hint.show {
            display: block;
        }

        .selection-mode {
            cursor: crosshair !important;
        }

        .selection-rectangle {
            position: absolute;
            
            background: rgba(0, 123, 255, 0.06);
            border: 2px solid rgba(0, 123, 255, 0.95);
            outline: 1px solid rgba(0, 123, 255, 0.18);
            box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.12) inset;
            border-radius: 6px;
            pointer-events: auto;
            z-index: 15;
            box-sizing: border-box;
            backdrop-filter: saturate(110%);
        }

        .selection-rectangle:hover {
            border-color: #0056b3;
            outline-color: rgba(0, 86, 179, 0.25);
            background: rgba(0, 123, 255, 0.08);
        }

        .selection-rectangle.selected {
            border-color: #0056b3;
            outline-color: rgba(0, 86, 179, 0.28);
            box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.2) inset;
        }

        .selection-handle {
            position: absolute;
            width: 10px;
            height: 10px;
            background: #ffffff;
            border: 2px solid #007bff;
            border-radius: 50%;
            box-shadow: 0 1px 2px rgba(0,0,0,0.2);
            cursor: pointer;
            z-index: 16;
        }

        .selection-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
        .selection-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
        .selection-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
        .selection-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }

        .selection-delete-btn {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-top: 6px;
            background: #ff8c1a;
            color: #fff;
            border: none;
            border-radius: 6px;
            padding: 2px 6px;
            font-size: 10px;
            transform-origin: top center;
            cursor: pointer;
            z-index: 17;
        }

        .selection-delete-btn:hover {
            background: #ff7a00;
        }

        .selection-hint {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            color: black;
            padding: 10px 20px;
            border-radius: 5px;
            border: 1px solid #ccc;
            font-size: 14px;
            z-index: 20;
            pointer-events: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .selection-cursor-tip {
            position: absolute;
            background: rgba(0,0,0,0.75);
            color: #fff;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            line-height: 1.4;
            pointer-events: none;
            white-space: nowrap;
            z-index: 21;
        }

        .wr-lists.result {
            position: relative;
        }

        .selection-transform-layer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transform-origin: 0 0;
            pointer-events: auto;
            
            display: flex;
            align-items: center;
            justify-content: center;
        }
        @media (min-width: 1600px) {
            .wam-prompt {
                height: max(12vh, 150px);
                min-height: 150px;
                max-height: 200px;
                padding: 24px;
            }

            .prompt-window-title {
                font-size: min(0.55vw, 14px);
                margin-bottom: min(0.5vw, 10px);
                line-height: 1.2;
            }

            .prompt-input-container {
                min-height: 90px;
                max-height: 140px;
            }

            .prompt-textarea {
                font-size: min(0.9vw, 21px);
                padding: min(2vw, 32px) min(18.75vw, 288px) min(2.8vw, 45px) min(1.2vw, 20px);
                min-height: 90px;
                max-height: 140px;
                border-radius: min(0.5vw, 8px);
                text-align: left;
                line-height: 1.4;
            }
            
            .prompt-textarea.ai-product-mode {
                padding-right: calc(min(2.25vw, 24px) + 0.5vw + min(15vw, 213px) + 4 * min(2.5vw, 30px) + 1.5vw);
            }
            .prompt-textarea.ai-object-replace-mode {
                padding-right: calc(min(0.33vw, 4px) + min(15vw, 213px) + 3 * min(2.5vw, 30px) + 2 * 0.5vw);
            }

            .prompt-textarea::placeholder {
                font-size: min(0.78vw, 18px);
                line-height: 1.4;
            }

            .generate-button {
                right: min(2.25vw, 24px);
                min-width: min(15vw, 213px);
                max-width: 238px;
                padding: 0 min(2.25vw, 33px);
                border-radius: min(0.5vw, 8px);
            }

            .button-text { font-size: min(0.75vw, 16px); }

            .button-credits { font-size: min(0.6vw, 13px); }
            .new-upload-container,
            .object-replace-upload-container {
                max-height: 500px;
                min-height: 313px;
            }

            .new-upload-btn {
                min-width: 90px;
                max-width: 140px;
                font-size: min(0.6vw, 16px);
            }

            .new-upload-btn svg {
                width: min(0.48vw, 13px) !important;
                height: min(0.48vw, 13px) !important;
            }

            .new-upload-tip {
                font-size: min(0.55vw, 14px);
            }

            .example-img {
                width: min(4.2vw, 75px);
                height: min(3vw, 54px);
            }
        }
        @media (max-width: 480px) {
            .wam-prompt {
                height: max(15vh, 140px);
                min-height: 140px;
                max-height: 180px;
                padding: 12px;
            }

            .prompt-window-title {
                font-size: 12px;
                margin-bottom: 6px;
                line-height: 1.2;
            }

            .prompt-input-container {
                min-height: 75px;
            }

            .prompt-textarea {
                font-size: 17px;
                padding: 23px 175px 33px 14px;
                min-height: 75px;
                border: 2px solid transparent;
                background:
                    linear-gradient(#fff, #fff) padding-box,
                    linear-gradient(to right, #0491e8, #1c1fd8) border-box;
                border-radius: 6px;
                text-align: left;
                line-height: 1.4;
            }
            
            .prompt-textarea.ai-product-mode {
                padding-right: calc(1.2vw + 0.5vw + 150px + 4 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-object-replace-mode {
                padding-right: calc(0.33vw + 150px + 3 * 30px + 2 * 0.5vw);
            }

            .prompt-textarea::placeholder {
                font-size: 14px;
                line-height: 1.4;
            }

            .generate-button {
                right: 12px;
                min-width: 150px;
                height: var(--prompt-btn-size, 30px);
                padding: 0 18px;
                border-radius: 5px;
            }

            .button-text { font-size: 11px; }

            .button-credits {
                font-size: 9px;
            }
            .new-upload-container,
            .object-replace-upload-container {
                min-height: 200px;
                max-height: 313px;
                padding: 12px;
            }

            .upload-buttons {
                flex-direction: column;
                gap: 8px;
                align-items: center;
            }

            .new-upload-btn {
                width: 100px;
                max-width: none;
                font-size: 12px;
                padding: 6px 12px;
            }

            .new-upload-tip {
                font-size: 11px;
                margin-bottom: 12px;
            }

            .example-img {
                width: 53px;
                height: 38px;
            }

            .new-examples {
                gap: 6px;
            }
            
            .functions-content {
                max-height: calc(100vh - 400px);
            }
            
            .functions-content::-webkit-scrollbar {
                width: 4px;
            }
        }

        @media (max-width: 1920px) and (min-width: 1080px) {
            .wamo-1 {
                height: 100%;
                gap: 0.25vw;
            }
            
            .wamo-2 {
                height: 0;
                display: none;
            }
            
            .edit-functions-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: max(0.3vw, 4px);
                margin-top: 0.15vw;
            }
            
            .edit-function-item {
                min-height: max(2.33vw, 46px);
                height: max(2.33vw, 46px);
                padding: 0.4vw;
            }
            
            .function-icon {
                width: max(1.53vw, 25.44px);
                height: max(1.53vw, 25.44px);
                margin-right: 0.4vw;
                background: #ffffff;
                padding: 0.26vw;
                border-radius: 0.18vw;
            }
            
            .function-name {
                font-size: max(0.44vw, 7.7px);
                line-height: 1.1;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            
            .function-credits {
                font-size: max(0.33vw, 6.6px);
                color: #666;
                font-weight: 400;
                margin-left: 0.15vw;
                flex-shrink: 0;
            }
            
            .function-desc {
                font-size: max(0.33vw, 6.6px);
            }
        }

        @media (max-width: 1400px) {
            .web-ai-main {
                padding: 0 0.5vw;
                gap: 0.5vw;
            }
            .wam-op {
                width: 25vw;
                min-width: 320px;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
            }
            .wam-right-container {
                width: 50vw;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
                gap: 0.5vw;
            }
            
            .edit-functions-grid {
                gap: 0.7vw;
            }

            .edit-function-item {
                min-height: max(3.48vw, 71px);
                height: max(3.48vw, 71px);
                padding: 0.9vw;
            }

            .function-icon {
                width: max(2.23vw, 38.16px);
                height: max(2.23vw, 38.16px);
                margin-right: 0.5vw;
                background: #ffffff;
                padding: 0.3vw;
                border-radius: 0.22vw;
            }

            .function-name {
                font-size: max(0.66vw, 12.1px);
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .function-credits {
                font-size: max(0.55vw, 9.9px);
                color: #666;
                font-weight: 400;
                margin-left: 0.18vw;
                flex-shrink: 0;
            }

            .function-desc {
                font-size: max(0.55vw, 9.9px);
            }
        }

        @media (max-width: 1200px) {
            .web-ai-main {
                padding: 0 0.5vw;
                gap: 0.5vw;
            }
            .wam-op {
                width: 30vw;
                min-width: 320px;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
            }
            .wam-right-container {
                width: 50vw;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
                gap: 0.5vw;
            }
            
            .edit-functions-grid {
                gap: 0.75vw;
            }

            .edit-function-item {
                min-height: max(3.73vw, 74px);
                height: max(3.73vw, 74px);
                padding: 1vw;
            }

            .function-icon {
                width: max(2.42vw, 42.4px);
                height: max(2.42vw, 42.4px);
                margin-right: 0.5vw;
                background: #ffffff;
                padding: 0.31vw;
                border-radius: 0.23vw;
            }

            .function-name {
                font-size: max(0.715vw, 13.2px);
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .function-credits {
                font-size: max(0.55vw, 9.9px);
                color: #666;
                font-weight: 400;
                margin-left: 0.2vw;
                flex-shrink: 0;
            }

            .function-desc {
                font-size: max(0.55vw, 9.9px);
            }

        }

        @media (max-width: 1000px) {
            .web-ai-main {
                padding: 0 0.5vw;
                gap: 0.5vw;
            }
            .wam-op {
                width: 35vw;
                min-width: 320px;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
            }
            .wam-right-container {
                width: 50vw;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
                gap: 0.5vw;
            }

            .edit-functions-grid {
                gap: 0.8vw;
            }

            .edit-function-item {
                min-height: max(4.14vw, 79px);
                height: max(4.14vw, 79px);
                padding: 1.2vw;
            }

            .function-icon {
                width: max(2.61vw, 44.52px);
                height: max(2.61vw, 44.52px);
                margin-right: 0.6vw;
                background: #ffffff;
                padding: 0.34vw;
                border-radius: 0.24vw;
            }

            .function-name {
                font-size: max(0.77vw, 14.3px);
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .function-credits {
                font-size: max(0.66vw, 12.1px);
                color: #666;
                font-weight: 400;
                margin-left: 0.22vw;
                flex-shrink: 0;
            }

            .function-desc {
                font-size: max(0.66vw, 12.1px);
            }

            .edit-function-item .function-desc {
                display: none;
            }

            .edit-function-item .function-name {
                margin-bottom: 0;
            }
        }

        @media (max-width: 900px) {
            .web-ai-main {
                padding: 0 0.25vw;
                gap: 0.25vw;
            }
            .wam-op {
                width: 38vw;
                min-width: 300px;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
            }
            .wam-right-container {
                width: 50vw;
                margin-top: 1vw;
                margin-bottom: 1vw;
                height: calc(100vh - 2vw - 90px);
                gap: 0.25vw;
            }
            
            .edit-functions-grid {
                gap: 0.9vw;
            }

            .edit-function-item {
                min-height: max(4.56vw, 83px);
                height: max(4.56vw, 83px);
                padding: 1.3vw;
            }

            .function-icon {
                width: max(2.8vw, 48.76px);
                height: max(2.8vw, 48.76px);
                margin-right: 0.6vw;
                background: #ffffff;
                padding: 0.35vw;
                border-radius: 0.26vw;
            }

            .function-name {
                font-size: max(0.825vw, 15.4px);
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .function-credits {
                font-size: max(0.715vw, 13.2px);
                color: #666;
                font-weight: 400;
                margin-left: 0.25vw;
                flex-shrink: 0;
            }

            .function-desc {
                font-size: max(0.715vw, 13.2px);
            }

        }
        @media (max-width: 768px) {
            .web-ai-main {
                flex-direction: column;
                width: 100%;
                padding: 0 1vw;
                gap: 2vw;
            }

            .wam-op {
                width: 100%;
                margin-right: 0;
                margin-bottom: 0;
                height: auto;
                min-height: auto;
                padding: 3vw;
            }

            .wam-right-container {
                width: 100%;
                margin-top: 0;
                margin-bottom: 2vw;
                height: auto;
                gap: 2vw;
            }

            .wam-result {
                flex: 1;
                min-height: 400px;
            }

            .wam-prompt {
                flex: none;
                height: 200px;
                min-height: 200px;
                padding: 18px;
            }

            .floating-btn {
                font-size: 8px;                padding: 6px 12px;
                min-width: 50px;
                max-width: none;
                display: inline-flex;
            }

            .floating-buttons {
                gap: 8px;
                bottom: -5px;
                flex-wrap: nowrap;
                flex-direction: row;
            }

            .draw-hint {
                bottom: 70px;
                font-size: 10px;
                padding: 6px 12px;
            }

            .new-panel-title {
                font-size: 3vw;
            }

            .edit-functions-grid {
                grid-template-columns: 1fr;
                gap: 1vw;
                margin-top: 0.67vw;
            }

            .edit-function-item {
                min-height: max(6.62vw, 66px);
                height: max(6.62vw, 66px);
                padding: 2vw;
            }

            .function-icon {
                width: 7vw;
                height: 7vw;
                margin-right: 2vw;
                background: #ffffff;
                padding: 0.88vw;
                border-radius: 0.65vw;
            }

            .function-name {
                font-size: max(2.5vw, 14px);
                line-height: 1.4;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .function-credits {
                font-size: 2vw;
                color: #666;
                font-weight: 400;
                margin-left: 0.8vw;
                flex-shrink: 0;
            }

            .function-desc {
                font-size: 2vw;
            }

            .wam-prompt {
                height: max(18vh, 160px);
                min-height: 160px;
                max-height: 220px;
                padding: 18px;
            }

            .prompt-window-title {
                font-size: 14px;
                margin-bottom: 8px;
                line-height: 1.2;
            }

            .prompt-input-container {
                position: relative;
                min-height: 100px;
            }

            .prompt-textarea {
                font-size: 19px;
                padding: 30px 213px 42px 18px;
                min-height: 100px;
                border: 2px solid transparent;
                background:
                    linear-gradient(#fff, #fff) padding-box,
                    linear-gradient(to right, #0491e8, #1c1fd8) border-box;
                border-radius: 8px;
                text-align: left;
                line-height: 1.4;
            }

            .prompt-textarea.ai-product-mode {
                padding-right: calc(1.2vw + 0.5vw + 175px + 4 * 30px + 1.5vw);
            }
            .prompt-textarea.ai-object-replace-mode {
                padding-right: calc(0.33vw + 175px + 3 * 30px + 2 * 0.5vw);            }

            .prompt-textarea::placeholder {
                font-size: 17px;                line-height: 1.4;            }

            .generate-button {
                position: absolute;
                right: 18px;
                top: 50%;
                transform: translateY(-50%);
                width: auto;
                min-width: 175px;
                height: var(--prompt-btn-size, 30px);
                padding: 0 23px;
                flex-direction: row;
                border-radius: 8px;
            }

            .button-text {
                font-size: 14px; 
                margin-bottom: 2px; 
                margin-right: 0; 
            }

            .button-credits {
                font-size: 12px;
            }

            .new-upload-container,
            .object-replace-upload-container {
                min-height: 225px;
                max-height: 375px;
                padding: 15px;
            }

            .new-upload-btn {
                font-size: 14px;
                padding: 8px 16px;
                min-width: 80px;
                max-width: 120px;
                margin: 0 5px 10px;
            }

            .new-upload-btn svg {
                width: 11px !important; 
                height: 11px !important;
            }

            .new-upload-tip {
                font-size: 12px; 
                margin-bottom: 15px; 
                padding: 0 10px; 
            }

            .upload-buttons {
                gap: 10px; 
                margin-bottom: 15px; 
                flex-wrap: wrap; 
            }

            .example-img {
                width: 60px; 
                height: 42px; 
                min-width: 45px; 
                min-height: 30px; 
            }

            .new-examples {
                gap: 8px; 
                margin-top: 10px; 
            }

            .new-close-btn {
                width: 30px; 
                height: 30px;
                font-size: 16px; 
                top: 8px; 
                right: 8px;
            }

            .new-param-label {
                font-size: 2.5vw;
            }

            .new-constraint-btn {
                font-size: 2vw;
                padding: 1.5vw 2.5vw;
            }

            .new-switch-label {
                width: 60px; 
                height: 15px; 
            }

            .new-switch-label::after {
                width: 30px; 
                height: 15px; 
                top: 0;
                left: 0;
            }

            .new-switch input[type="checkbox"]:checked + .new-switch-label::after {
                transform: translateX(30px); 
            }

            .new-prompt-input {
                font-size: 2vw;
            }

            .new-prompt-input.show {
                max-height: 12vh;
            }

            .wamo2-help {
                font-size: 2.5vw;
            }

        }

        @media (max-width: 1200px) and (min-width: 769px) {
            
            .wam-prompt {
                height: max(13vh, 145px);
                min-height: 145px;
                max-height: 190px;
                padding: 18px; 
            }

            .prompt-window-title {
                font-size: max(0.7vw, 12px);
                margin-bottom: max(0.4vw, 8px);
                line-height: 1.2;
            }

            .prompt-input-container {
                min-height: 85px;
            }

            .prompt-textarea {
                font-size: max(0.7vw, 14px);
                padding: max(1.7vw, 25px) max(16.25vw, 213px) max(2.3vw, 35px) max(1vw, 15px);
                min-height: 85px;
                border-radius: max(0.4vw, 6px);
                text-align: left;
                line-height: 1.4;
            }

            .prompt-textarea.ai-product-mode {
                padding-right: calc(1.2vw + 0.5vw + 175px + 4 * 30px + 1.5vw);
            }

            .prompt-textarea.ai-object-replace-mode {
                padding-right: calc(0.33vw + 175px + 3 * 30px + 2 * 0.5vw);
            }

            .prompt-textarea::placeholder {
                font-size: max(0.7vw, 14px); 
                line-height: 1.4;            }

            .generate-button {
                right: max(1.2vw, 18px);
                min-width: max(13.75vw, 175px);
                height: var(--prompt-btn-size, max(2.5vw, 30px));
                padding: 0 max(1.75vw, 23px);
                border-radius: max(0.44vw, 6px);
            }

            .button-text {
                font-size: max(0.8vw, 15px);
                margin-bottom: max(0.08vw, 1px);
            }

            .button-credits {
                font-size: max(0.65vw, 12px);
            }
            .new-upload-container,
            .object-replace-upload-container {
                min-height: 200px;
                max-height: 350px;
                padding: max(1vw, 12px);
            }

            .new-upload-btn {
                font-size: max(0.7vw, 11px); 
                padding: max(0.5vw, 6px) max(1vw, 14px); 
                min-width: max(4vw, 75px); 
                max-width: min(45%, 130px); 
            }

            .new-upload-btn svg {
                width: max(0.64vw, 10px) !important; 
                height: max(0.64vw, 10px) !important;
            }

            .new-upload-tip {
                font-size: max(0.65vw, 11px); 
                margin-bottom: max(1vw, 12px); 
                padding: 0 10px; 
            }

            .upload-buttons {
                gap: max(0.7vw, 8px); 
                margin-bottom: max(1vw, 12px); 
            }

            .example-img {
                width: max(4.8vw, 57px); 
                height: max(3.3vw, 39px); 
                min-width: 48px; 
                min-height: 33px; 
            }

            .new-examples {
                gap: max(0.6vw, 7px); 
                margin-top: max(0.6vw, 8px); 
            }
            
            .functions-content {
                max-height: calc(100vh - 350px);
            }
            
            .functions-content::-webkit-scrollbar {
                width: 5px;
            }
        }

        @media (max-width: 1000px) and (min-width: 769px) {
            
            .edit-functions-grid {
                gap: 0.8vw; 
            }

            .edit-function-item {
                min-height: 3.73vw; 
                height: 3.73vw; 
                padding: 1vw; 
            }

            .function-icon {
                width: max(2.42vw, 42.4px); 
                height: max(2.42vw, 42.4px);
                margin-right: 0.5vw;
                background: #ffffff;
                padding: 0.31vw;
                border-radius: 0.23vw;
            }

            .function-name {
                font-size: max(0.715vw, 13.2px); 
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .function-credits {
                font-size: max(0.605vw, 11px);
                color: #666;
                font-weight: 400;
                margin-left: 0.2vw;
                flex-shrink: 0;
            }

            .function-desc {
                font-size: max(0.605vw, 11px); 
            }

            .wo-title.head {
                font-size: 0.9vw;
            }

            .wsbi > div {
                font-size: 0.7vw;
            }

            .wop-title {
                font-size: 0.8vw;
                width: 5vw;
            }

            .wop-param {
                font-size: 0.8vw;
            }
        }

        .image-compare-container {
            position: relative;
            width: 100%;
            height: 100%;
            max-width: 100%;
            margin: 0 auto;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .image-compare-container img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
        }

        .example-image-display {
            width: 100%;
            height: 100%;
            min-height: 300px;
            object-fit: cover !important;
        }

        .wr-lists.result .example-image-display {
            width: 100% !important;
            height: 100% !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: cover !important;
            object-position: center center;
            display: block;
            margin: 0;
            min-height: 0 !important;
        }

        .wr-lists.result .user-image-display,
        .wr-lists.result .comparison-container.user-comparison img,
        .wr-lists.result #imageCompareContainer.user-comparison img,
        .wr-lists.result .user-comparison .compare-image-before img,
        .wr-lists.result .user-comparison .compare-image-after img {
            width: auto !important;
            height: auto !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
            object-position: center center !important;
            display: block !important;
            margin: auto !important;
        }

        .user-image-display {
            width: 100%;
            height: 100%;
            max-width: 100%;
            max-height: 100%;
            object-fit: contain !important;
            display: block;
            margin: auto; 
        }

        .wr-lists.result:has(.example-image-display) {
            min-height: 400px;
        }

        .example-comparison .comparison-image img {
            object-fit: cover !important;
        }

        .user-comparison .compare-image-before img,
        .user-comparison .compare-image-after img {
            object-fit: contain !important;
        }
        .compare-image-before,
        .compare-image-after {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .compare-image-before {
            z-index: 1;
        }

        .compare-image-after {
            z-index: 2;
            clip-path: inset(0 0 0 50%);
        }

        .compare-image-before img,
        .compare-image-after img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            max-width: 100%;
            max-height: 100%;
        }

        .compare-slider {
            position: absolute;
            top: 0;
            left: 50%;
            width: 4px;
            height: 100%;
            background: #fff;
            cursor: ew-resize;
            z-index: 3;
            transform: translateX(-50%);
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.6);
        }

        .compare-slider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 40px;
            height: 40px;
            background: #fff;
            border: 3px solid #007bff;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .compare-slider::after {
            content: '⇔';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #007bff;
            font-size: 16px;
            font-weight: bold;
            z-index: 1;
        }

        .compare-labels {
            position: absolute;
            bottom: 20px;
            left: 20px;
            right: 20px;
            display: flex;
            justify-content: space-between;
            z-index: 4;
            pointer-events: none;
        }

        .compare-label {
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 500;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .compare-instructions {
            text-align: center;
            margin-bottom: 20px;
            color: #666;
            font-size: 14px;
        }

        .example-hint {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 123, 255, 0.9);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            z-index: 5;
            animation: fadeInOut 3s ease-in-out;
        }

        @keyframes fadeInOut {
            0%, 100% { opacity: 0; }
            20%, 80% { opacity: 1; }
        }

        
        .draw-layout-ele {
            display: none !important;
        }

        .draw-layout-ele.show {
            display: flex !important;
        }

        
        .draw-btn {
            display: inline-flex !important;
        }

        .draw-btn.hidden {
            display: none !important;
        }

        
        .draw-overlay {
            display: none !important;
        }
        .draw-hint {
            display: none !important;
        }
        .new-panel-title {
            font-size: .8vw;
            font-weight: bold;
            color: #333;
            margin-bottom: 0.5vw; 
        }

        .edit-functions-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: max(0.4vw, 6px);
            margin-top: 0.2vw;
            flex: 1;
            align-content: start;
        }

        .edit-function-item {
            background: #f8f8f8;
            border: none;
            border-radius: 0.4vw;
            padding: 0.6vw;
            text-align: left;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: flex-start;
            min-height: max(2.9vw, 59px);
            height: max(2.9vw, 59px);
            position: relative;
            overflow: hidden;
        }

        .edit-function-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border: 1.5px solid #e8e8e8;
            border-radius: 0.4vw;
            pointer-events: none;
            z-index: 2;
        }

        .new-badge {
            position: absolute;
            top: -3px;
            right: -3px;
            background: #007bff;
            color: white;
            font-size: 9px;
            font-weight: normal;
            padding: 3px 7px;
            border-radius: 10px;
            text-transform: lowercase;
            z-index: 1;
            box-shadow: 0 2px 4px rgba(0,123,255,0.3);
        }

        .edit-function-item .new-badge {
            display: none;
        }

        .edit-function-item[data-function="nano-banana"] .new-badge,
        .edit-function-item[data-function="soft-decoration-analysis"] .new-badge,
        .edit-function-item[data-function="object-replace"] .new-badge,
        .edit-function-item[data-function="design-generator"] .new-badge,
        .edit-function-item[data-function="diagram-generator"] .new-badge,
        .edit-function-item[data-function="image-to-video"] .new-badge {
            display: inline-flex;
        }

        .upgrade-badge {
            background: #ff9800;
            box-shadow: 0 2px 4px rgba(255,152,0,0.3);
        }

        .new-badge.upgrade-badge {
            background: #007bff;
            box-shadow: 0 2px 4px rgba(0,123,255,0.3);
        }

        .new-badge.soon-badge {
            background: #666666;
            box-shadow: 0 2px 4px rgba(102,102,102,0.3);
        }

        .button-container .new-badge {
            top: 0;
            right: 0;
            font-size: 8.4px;
            padding: 1px 4px 3px 4px;
            border-radius: 0 0.3vw 0 6px;
            z-index: 10;
            line-height: 1;
            background: #555555;
            box-shadow: 0 2px 4px rgba(85,85,85,0.3);
            display: none;
        }
        
        .button-container .new-badge.show {
            display: block;
        }
        
        .button-container .prompt-button {
            overflow: hidden;
        }

        .res-badge {
            position: absolute;
            top: 0;
            right: 0;
            font-size: 8px;
            font-weight: 600;
            padding: 1px 4px 2px 4px;
            border-radius: 0 0.3vw 0 4px;
            z-index: 10;
            line-height: 1;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            pointer-events: none;
        }

        .res-1k {
            background: linear-gradient(135deg, #ffd93d, #ff8a00);
            color: #000000 !important;
        }

        .res-2k {
            background: linear-gradient(135deg, #ffd93d, #ff8a00);
            color: #000000 !important;
        }

        #objectReplaceModelButton {
            width: calc(2 * max(2.5vw, 30px));
            padding: 0 6px;
            white-space: nowrap;
            font-size: max(0.55vw, 10px);
            font-weight: 600;
            color: #495057;
        }
        #objectReplaceModelButton::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        #objectReplaceModelButton:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }
        #objectReplaceModelDropdown {
            min-width: calc(2 * max(2.5vw, 30px));
        }

        #softDecorationAnalysisModeButton {
            width: calc(2 * max(2.5vw, 30px));
            padding: 0 6px;
            white-space: nowrap;
            font-size: max(0.55vw, 10px);
            font-weight: 600;
            color: #495057;
        }
        #softDecorationAnalysisModeButton::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        #softDecorationAnalysisModeButton:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }
        #softDecorationAnalysisModeDropdown {
            min-width: calc(2 * max(2.5vw, 30px));
        }

        #designGeneratorModeButton {
            width: calc(2 * max(2.5vw, 30px));
            padding: 0 6px;
            white-space: nowrap;
            font-size: max(0.55vw, 10px);
            font-weight: 600;
            color: #495057;
        }
        #designGeneratorModeButton::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        #designGeneratorModeButton:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }
        #designGeneratorModeDropdown {
            min-width: calc(2 * max(2.5vw, 30px));
        }

        .design-generator-prompt-container {
            display: none;
            width: 100%;
            min-height: 80px;
            padding: 0 calc(1.2vw + 0.5vw + max(15vw, 188px) + 4 * max(2.5vw, 30px) + 1.5vw) 0 1.2vw;
            font-size: max(0.7vw, 14px);
            line-height: 1.4;
            color: #495057;
            border: 2px solid transparent;
            background:
                linear-gradient(#fff, #fff) padding-box,
                linear-gradient(to right, #0491e8, #1c1fd8) border-box;
            border-radius: 0.5vw;
            box-sizing: border-box;
        }
        .design-generator-prompt-container.show {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            flex-wrap: nowrap;
        }
        
        #promptTextarea.design-generator-active {
            display: none !important;
        }
        .design-generator-prompt-label {
            color: #495057;
            font-weight: 500;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .design-generator-prompt-input {
            display: inline-block;
            width: 101px;
            max-width: 154px;
            padding: 3px 8px;
            margin: 0 2px;
            background: #fff;
            border: 1px solid #adb5bd;
            border-radius: 6px;
            font-size: 13px;
            color: #212529;
            outline: none;
            transition: all 0.2s ease;
            flex-shrink: 1;
        }
        .design-generator-prompt-input:focus {
            border-color: #868e96;
            box-shadow: 0 0 0 2px rgba(134, 142, 150, 0.2);
        }
        .design-generator-prompt-input::placeholder {
            color: #adb5bd;
            font-style: italic;
        }
        .design-generator-prompt-input:not(:placeholder-shown) {
            color: #212529;
        }

        #designGeneratorBuildingVolume {
            width: 174px;
            max-width: 265px;
        }

        @media (max-width: 1500px) {
            .design-generator-prompt-label {
                display: none;
            }
            .design-generator-prompt-input {
                flex: 1;
                min-width: 80px;
            }
            #designGeneratorBuildingVolume {
                min-width: 138px;
            }
            .design-generator-prompt-container {
                gap: 8px;
            }
        }

        @media (max-width: 1200px) {
            .design-generator-prompt-label {
                display: none;
            }
            .design-generator-prompt-input {
                flex: 1;
                min-width: 64px;
                max-width: 144px;
            }
            .design-generator-prompt-container {
                gap: 10px;
            }

            #designGeneratorBuildingVolume {
                max-width: 249px;
            }
        }
        @media (max-width: 800px) {
            .design-generator-prompt-input {
                min-width: 48px;
                max-width: 96px;
            }

            #designGeneratorBuildingVolume {
                max-width: 165px;
            }
        }

        #diagramGeneratorModeButton {
            width: calc(2 * max(2.5vw, 30px));
            padding: 0 6px;
            white-space: nowrap;
            font-size: max(0.55vw, 10px);
            font-weight: 600;
            color: #495057;
        }
        #diagramGeneratorModeButton::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        #diagramGeneratorModeButton:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }
        #diagramGeneratorModeDropdown {
            min-width: calc(2 * max(2.5vw, 30px));
        }

        .res-4k {
            background: linear-gradient(135deg, #ffd93d, #ff8a00);
            color: #000000;
        }

        #resolutionButton {
            position: relative;
            overflow: visible;
        }

        #button3.wide::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        
        #button3.wide:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }

        #productModeButton::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        
        #productModeButton:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }

        #buildingFacadeModeButton::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        
        #buildingFacadeModeButton:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }

        #modeButton::after {
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            margin-left: 4px;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 4px solid currentColor;
            vertical-align: middle;
            opacity: 0.6;
            transition: transform 0.2s ease;
        }
        
        #modeButton:hover::after {
            transform: translateY(1px);
            opacity: 0.8;
        }

        .edit-function-item:hover {
            background: #f0f0f0;
            transform: translateY(-1px);
        }

        .edit-function-item:hover::before {
            border-color: #d0d0d0;
        }

        .edit-function-item.active {
            background: #fff;
            border: 4px solid transparent !important;
            border-radius: 0.4vw !important;
            background-image: linear-gradient(white, white), linear-gradient(to right, #1c1fd8, #007bff) !important;
            background-origin: border-box !important;
            background-clip: padding-box, border-box !important;
            box-shadow: 0 4px 12px rgba(4, 145, 232, 0.25), 0 0 0 1px rgba(4, 145, 232, 0.1) !important;
            transform: translateY(-2px);
        }

        .edit-function-item.active::before {
            display: none;
        }

        .edit-function-item.active .function-icon {
            transform: scale(1.2);
        }

        .edit-function-item.active .function-name {
            color: rgb(3, 135, 217) !important;
            font-weight: 600 !important;
        }

        .edit-function-item.active .function-credits {
            color: rgb(3, 135, 217) !important;
            font-weight: 500 !important;
        }

        .edit-function-item.active .function-desc {
            color: rgb(3, 135, 217) !important;
            font-weight: 500 !important;
        }

        .edit-function-item.active .new-badge {
            display: none !important;
        }

        .edit-function-item[data-function="inpaint"] .new-badge {
            display: none !important;
        }

        .edit-function-item[data-function="nano-banana"].active {
            background-image: linear-gradient(white, white), linear-gradient(120deg, #ff8a00, #ffd93d) !important;
            box-shadow: 0 4px 12px rgba(255, 166, 0, 0.35), 0 0 0 1px rgba(255, 166, 0, 0.15) !important;
        }

            .edit-function-item.disabled {
            background: #f5f5f5;
            opacity: 0.6;
            cursor: not-allowed;
            position: relative;
            pointer-events: none; 
        }

        .edit-function-item.disabled::before {
            border-color: #ddd;
        }

        .edit-function-item.disabled:hover {
            background: #f5f5f5;
            transform: none;
        }

        .edit-function-item.disabled:hover::before {
            border-color: #ddd;
        }
        
        .edit-function-item[data-function="furniture-space-integration"] {
            opacity: 1 !important;
            cursor: pointer !important;
            pointer-events: auto !important;
            user-select: none;
            position: relative !important;
            z-index: 10 !important;
        }
        
        .edit-function-item[data-function="furniture-space-integration"]:hover {
            cursor: pointer !important;
            pointer-events: auto !important;
        }
        
        .edit-function-item[data-function="furniture-space-integration"] * {
            pointer-events: auto !important;
        }
        
        .edit-function-item[data-function="similar-generation"] {
            cursor: pointer !important;
            pointer-events: auto !important;
            user-select: none;
            position: relative !important;
            z-index: 10 !important;
        }

        .edit-function-item[data-function="object-replace"] {
            cursor: pointer !important;
            pointer-events: auto !important;
            user-select: none;
            position: relative !important;
            z-index: 10 !important;
        }

        .edit-function-item[data-function="object-replace"]:hover {
            cursor: pointer !important;
            pointer-events: auto !important;
        }

        .edit-function-item[data-function="object-replace"] * {
            pointer-events: auto !important;
        }

        .edit-function-item[data-function="object-replace"] {
            background: #f8f8f8 !important;
            border: none !important;
            border-radius: 0.4vw !important;
            padding: 0.6vw !important;
            text-align: left !important;
            cursor: pointer !important;
            transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease !important;
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            justify-content: flex-start !important;
            min-height: max(2.9vw, 59px) !important;
            height: max(2.9vw, 59px) !important;
            pointer-events: auto !important;
        }
        
        .edit-function-item[data-function="object-replace"]::before {
            border-color: #e8e8e8;
        }

        .edit-function-item[data-function="object-replace"]:hover {
            background: #f0f0f0 !important;
        }
        
        .edit-function-item[data-function="object-replace"]:hover::before {
            border-color: #d0d0d0;
        }
        .edit-function-item[data-function="object-replace"].active {
            background: #fff !important;
            border: 4px solid transparent !important;
            border-radius: 0.4vw !important;
            background-image: linear-gradient(white, white), linear-gradient(to right, #1c1fd8, #007bff) !important;
            background-origin: border-box !important;
            background-clip: padding-box, border-box !important;
            box-shadow: 0 4px 12px rgba(4, 145, 232, 0.25), 0 0 0 1px rgba(4, 145, 232, 0.1) !important;
        }

        .edit-function-item[data-function="object-replace"].active::before {
            display: none;
        }

        .edit-function-item[data-function="object-replace"].active .function-icon {
            transform: scale(1.2);
        }

        .edit-function-item[data-function="object-replace"].active .function-name {
            color: rgb(3, 135, 217) !important;
            font-weight: 600 !important;
        }

        .edit-function-item[data-function="object-replace"].active .function-credits {
            color: rgb(3, 135, 217) !important;
            font-weight: 500 !important;
        }

        .edit-function-item[data-function="object-replace"].active .function-desc {
            color: rgb(3, 135, 217) !important;
            font-weight: 500 !important;
        }
        .function-icon {
            width: max(1.91vw, 30.74px);
            height: max(1.91vw, 30.74px);
            margin-right: 0.5vw;
            object-fit: contain;
            display: block;
            flex-shrink: 0;
            background: #ffffff;
            padding: 0.37vw;
            border-radius: 0.24vw;
            transition: transform 0.2s ease;
        }

        .function-name {
            font-size: max(0.55vw, 9.9px);
            font-weight: 500;
            color: #333;
            line-height: 1.2;
            word-wrap: break-word;
            hyphens: auto;
            transition: color 0.15s ease, font-weight 0.15s ease;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex: 1;
        }

        .function-credits {
            font-size: max(0.44vw, 8.8px);
            color: #666;
            font-weight: 400;
            margin-left: 0.2vw;
            flex-shrink: 0;
            display: none;
        }

        .function-desc {
            font-size: max(0.44vw, 8.8px);
            color: #666;
            transition: color 0.15s ease, font-weight 0.15s ease;
        }

        .new-panel-title:first-child {
            margin-top: 12px;
        }

        .new-upload-container {
            background: #f8f8f8;
            border: 1.5px dashed #ccc;
            border-radius: 0.8vw;
            padding: 1.5vw;
            width: 100%;
            
            min-height: 313px;
            max-height: 500px;
            height: auto;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .new-upload-container:hover {
            border-color: #007bff;
        }

        #objectReplaceUploadContainer,
        #materialReplaceUploadContainer,
        #buildingFacadeUploadContainer,
        #diagramGeneratorUploadContainer {
            border: none !important;
        }

        #diagramGeneratorUploadContainer .object-upload-title,
        #objectReplaceUploadContainer .object-upload-title,
        #materialReplaceUploadContainer .object-upload-title,
        #buildingFacadeUploadContainer .object-upload-title {
            border-radius: 8px 0 16px 0 !important;
            left: 2px !important;
            top: 0 !important;
            padding: 4px 14px !important; 
            z-index: 3 !important; 
        }

        .upload-section > .new-upload-container {
            position: relative;
        }
        
        .upload-section > .new-upload-container[style*="display: none"],
        .upload-section > .new-upload-container[style*="display:none"] {
            display: none !important;
        }

        .new-upload-default {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            padding: 8px;
            box-sizing: border-box;
            gap: 0.3vw;
        }

        .new-upload-btn {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 0.4vw;
            padding: 0.3vw 0.8vw;
            font-size: max(0.6vw, 10px);
            color: #333;
            display: flex;
            align-items: center;
            gap: 0.25vw;
            cursor: pointer;
            margin-bottom: 0;
            transition: all 0.2s ease;
            white-space: nowrap;
            min-height: 28px;
        }

        .new-upload-btn:disabled {
            background: #f0f0f0;
            border-color: #ddd;
            color: #999;
            cursor: not-allowed;
            opacity: .6;
        }

        .new-upload-btn:hover {
            background: #f5f5f5;
            border-color: #007bff;
        }

        .new-upload-btn svg {
            width: 13px !important;
            height: 13px !important;
            flex-shrink: 0;
        }

        .new-upload-tip {
            color: #999;
            font-size: max(0.55vw, 10px);
            margin-bottom: 0.6vw;
            text-align: center;
            line-height: 1.3;
            padding: 0 10px;
        }

        .new-examples {
            display: flex;
            gap: min(0.4vw, 6px); 
            justify-content: center;
            flex-wrap: nowrap; 
            margin-top: 0.3vw; 
        }

        .example-img {
            width: min(4.2vw, 68px); 
            height: min(3vw, 48px); 
            min-width: 42px; 
            min-height: 30px; 
            object-fit: cover;
            border-radius: 0.25vw;
            cursor: pointer;
            opacity: 0.7;
            transition: all 0.2s ease;
            border: 1px solid #ddd;
        }

        .example-img:hover {
            opacity: 1;
            transform: scale(1.05);
            border-color: #007bff;
        }

        .new-upload-preview {
            position: absolute;
            top: 0.8vw;
            left: 0.8vw;
            width: calc(100% - 1.6vw);
            height: calc(100% - 1.6vw);
            background: #fff;
            border-radius: 0.6vw;
            overflow: hidden;
        }

        .new-close-btn {
            position: absolute;
            top: 1.0vw;
            right: 1.0vw;
            width: 1.875vw; 
            height: 1.875vw;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.0vw; 
            font-weight: bold;
            z-index: 10;
            transition: all 0.2s ease;
        }

        .new-close-btn:hover {
            background: rgba(255, 0, 0, 0.8);
            transform: scale(1.1);
        }

        .new-param-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1vw; 
        }

        .new-param-label {
            font-size: .7vw;
            color: #333;
            font-weight: 500;
        }
        .new-constraint-buttons {
            display: flex;
            gap: 0.5vw;
        }

        .new-constraint-btn {
            background: #f5f5f5;
            border: 2px solid #ddd;
            border-radius: 0.4vw;
            padding: 0.4vw 1vw;
            font-size: .7vw;
            color: #666; 
            cursor: pointer;
            font-weight: 500;
            position: relative;
            overflow: hidden;
            transition: background-color 0.25s ease, 
                        border-color 0.25s ease, 
                        color 0.25s ease,
                        font-weight 0.25s ease,
                        transform 0.15s ease;
            will-change: background-color, border-color, color, font-weight;
        }

        .new-constraint-btn:hover {
            background: #e9ecef;
            border-color: #bbb;
        }

        .new-constraint-btn.active {
            background: #fff;
            border-color: #333;
            color: #000;
            font-weight: 600;
        }

        .new-constraint-btn:disabled {
            pointer-events: none;
            opacity: 1; 
        }

        .new-switch {
            position: relative;
        }

        .new-switch input[type="checkbox"] {
            display: none;
        }

        .new-switch-label {
            display: block;
            width: 60px; 
            height: 15px; 
            background: #d9d9d9;
            border-radius: 15px; 
            cursor: pointer;
            position: relative;
            transition: background-color 0.3s;
        }

        .new-switch-label::after {
            content: '';
            position: absolute;
            width: 30px; 
            height: 15px; 
            background: #1256e0;
            border-radius: 15px; 
            top: 0;
            left: 0;
            transition: transform 0.3s;
        }

        .new-switch input[type="checkbox"]:checked + .new-switch-label {
            background: #d9d9d9;
        }

        .new-switch input[type="checkbox"]:checked + .new-switch-label::after {
            transform: translateX(30px); 
        }

        .new-prompt-input {
            background: #f0f0f0;
            width: 100%;
            height: 8vh;
            padding: .5vw;
            border-radius: .3vw;
            border: none;
            font-size: .6vw;
            color: #333;
            resize: none;
            margin-top: .25vw; 
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: all 0.3s ease;
            display: none; 
        }

        .new-prompt-input.show {
            max-height: 8vh;
            opacity: 1;
            display: block; 
        }

        .upload-buttons {
            display: flex;
            flex-direction: row; 
            gap: min(0.4vw, 8px); 
            justify-content: center;
            align-items: center; 
            margin-bottom: 0.4vw; 
            flex-wrap: wrap; 
        }

        #pasteBtn {
            position: relative;
        }

        #pasteBtn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        #pasteBtn:disabled:hover {
            background-color: #f5f5f5 !important;
            border-color: #ddd !important;
            transform: none !important;
        }

        .upload-btn {
            display: flex;
            align-items: center;
            gap: min(0.3vw, 5px); 
            padding: min(0.4vw, 8px) min(0.8vw, 12px); 
            border-radius: 0.25vw; 
            border: none;
            font-size: max(0.55vw, 10px); 
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: max(3.5vw, 70px); 
            max-width: min(40%, 120px); 
            justify-content: center;
            flex: 0 0 auto; 
            white-space: nowrap; 
        }

        .upload-btn svg {
            width: max(0.51vw, 10px); 
            height: max(0.51vw, 10px);
            flex-shrink: 0; 
        }

        .upload-btn-primary {
            background-color: #f5f5f5;
            color: #333;
            border: 1px solid #ddd;
        }

        .upload-btn-primary:hover {
            background-color: #e9e9e9;
            border-color: #ccc;
        }

        .upload-btn-secondary {
            background-color: #f5f5f5; 
            color: #333; 
            border: 1px solid #ddd; 
        }

        .upload-btn-secondary:hover {
            background-color: #e9e9e9; 
            border-color: #ccc; 
        }

        .upload-tips {
            text-align: center;
            color: #999;
        }

        .upload-tip-main {
            font-size: 0.45vw; 
            line-height: 1.4;
            margin-bottom: 0.2vw; 
        }

        .upload-tip-format {
            font-size: 0.4vw; 
            color: #bbb;
        }

        .wo-picture {
            border: 2px dashed #ddd;
            border-radius: 0.6vw;
        }

        .wo-picture:hover {
            border-color: #007bff;
        }

        .wo-title.head {
            font-weight: bold;
            font-size: .8vw;
        }

        .comparison-container {
            position: relative;
            height: 100%;
            width: 100%;
        }

        .image-comparison {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.15);
        }

        .comparison-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .comparison-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            margin-top: auto;
            margin-bottom: auto;
        }

        .comparison-after {
            clip-path: inset(0 0 0 50%);
            transition: clip-path 0.1s ease;
        }

        .comparison-slider {
            position: absolute;
            top: 0;
            left: 50%;
            width: 2px;
            height: 100%;
            background: #007bff;
            cursor: ew-resize;
            z-index: 10;
            transform: translateX(-50%);
            box-shadow: 0 0 20px rgba(0, 123, 255, 0.5), 0 0 8px rgba(0, 0, 0, 0.6);
        }

        .comparison-slider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 40px;
            height: 40px;
            background: #007bff;
            border: 3px solid white;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            cursor: ew-resize;
            box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .comparison-slider::after {
            content: '↔';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 16px;
            font-weight: bold;
            pointer-events: none;
            z-index: 1;
        }

        .comparison-labels {
            position: absolute;
            top: 10px;
            width: 100%;
            display: flex;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 5;
        }
        .comparison-label {
            background: rgba(0,0,0,0.7);
            color: white;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.6vw;
            font-weight: bold;
        }
        
        .material-library-modal {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            border-radius: 0.6vw;
        }

        .material-library-modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 0.5vw;
            width: 95%;
            height: auto; 
            max-width: 700px; 
            max-height: 90vh; 
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1vw;
            border-bottom: 1px solid #eee;
            background: #f8f9fa;
            border-radius: 0.5vw 0.5vw 0 0;
        }

        .modal-title {
            font-size: 0.8vw;
            font-weight: bold;
            color: #333;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.2vw;
            cursor: pointer;
            color: #666;
            width: 2vw;
            height: 2vw;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
        }

        .modal-close:hover {
            background: #f0f0f0;
            color: #333;
        }

        .modal-tabs {
            display: flex;
            border-bottom: 1px solid #eee;
            background: #f8f9fa;
        }

        .modal-tab {
            flex: 1;
            padding: 0.8vw;
            text-align: center;
            font-size: 0.65vw;
            cursor: pointer;
            border: none;
            background: none;
            color: #666;
            transition: all 0.2s ease;
            border-bottom: 2px solid transparent;
        }

        .modal-tab.active {
            color: #007bff;
            border-bottom-color: #007bff;
            background: white;
        }

        .modal-tab:hover {
            color: #007bff;
            background: rgba(0, 123, 255, 0.05);
        }

        .modal-body {
            flex: 1;
            overflow: visible; 
            padding: 1vw;
            min-height: auto; 
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .material-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.6vw; 
            padding: 0.3vw; 
            max-height: none; 
        }

        .material-item {
            aspect-ratio: 1;
            border-radius: 0.3vw;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            background: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 80px; 
        }

        .material-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            border-color: #007bff;
        }

        .material-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .material-placeholder {
            color: #999;
            font-size: 0.5vw;
            text-align: center;
        }
        
        @media (max-width: 768px) {
            .modal-content {
                width: 98%;
                height: auto; 
                max-height: 95vh; 
            }

            .modal-title {
                font-size: 1.2vw;
            }

            .modal-close {
                font-size: 1.8vw;
                width: 3vw;
                height: 3vw;
            }

            .modal-tab {
                font-size: 1vw;
                padding: 1.2vw;
            }

            .material-grid {
                gap: 1vw; 
                padding: 0.5vw; 
            }

            .material-item {
                min-height: 60px; 
            }

            .material-placeholder {
                font-size: 0.8vw;
            }

            .modal-body {
                padding: 0.8vw; 
            }
        }

        @media (min-width: 1600px) {
            
            .prompt-buttons-container {
                right: calc(min(2.25vw, 24px) + 0.75vw + min(15vw, 213px)); 
            }
            .prompt-buttons-container.inpaint-compact { right: calc(min(2.25vw, 24px) + 0.375vw + min(15vw, 213px)); }
            
            .action-right {
                gap: 0.75vw; 
            }
            
            .prompt-textarea {
                font-size: min(0.9vw, 21px);
                padding: min(2vw, 32px) calc(min(2.25vw, 24px) + 0.75vw + min(15vw, 213px) + 4 * min(2.5vw, 30px) + 1.5vw) min(2.8vw, 45px) min(1.2vw, 20px); 
                min-height: 90px;
                max-height: 140px;
                border-radius: min(0.5vw, 8px);
                text-align: left;
                line-height: 1.4;
            }
            
            .generate-button {
                right: min(2.25vw, 24px);
                min-width: min(15vw, 213px);
                max-width: 238px;
                padding: min(1vw, 18px) min(2.25vw, 33px);
                border-radius: min(0.5vw, 8px);
            }
        }

        
        .object-replace-upload-container {
            min-height: 313px;
            max-height: 500px;
            padding: 12px 0.75vw 12px 0.75vw;
            gap: 0.5vw;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            width: 100%;
            box-sizing: border-box;
        }
        .object-replace-columns {
            display: flex;
            flex-direction: row;
            gap: 0.5vw;
            width: 100%;
        }
        
        .object-thumbs-row {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.5vw;
            margin-top: 8px; 
            padding: 0 0.625vw; 
            box-sizing: border-box;
        }
        .object-thumb {
            height: 42px; 
            background: #fff;
            border: none; 
            border-radius: 5.33px; 
            overflow: hidden;
        }
        .object-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .object-upload-col {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            min-width: 0;
            padding: 0 0.1vw; 
            position: relative; 
        }
        
        .object-upload-title {
            position: absolute;
            top: 0px; 
            left: calc(0.1vw); 
            margin: 0;
            padding: 3px 10px; 
            background: #007bff;
            color: #fff;
            border-radius: 8px; 
            font-weight: 600;
            font-size: max(0.48vw, 9.6px);
            text-align: center;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto;
            line-height: max(0.72vw, 14.4px);
            z-index: 2;
            pointer-events: none;
        }
        .multi-edit-mode .object-upload-title {
            display: none !important;
        }
        .object-upload-box {
            width: 100%;
            max-width: 100%;
        }
        .object-upload-inner {
            width: 100%;
            height: 200px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: #f8f8f8;
            border-radius: 0.6vw;
            border: 1.66px dashed #007bff;
            position: relative; 
            box-sizing: border-box;
        }

        .object-upload-inner img {
            margin: 0.3vw !important;
            width: calc(100% - 0.6vw) !important;
            height: calc(100% - 0.6vw) !important;
            border-radius: 0.4vw !important;
        }

        .multi-images-grid .multi-image-item img {
            margin: 0 !important;
            width: 100% !important;
            height: 100% !important;
        }

        #materialReplaceUploadContainer.multi-edit-mode {
            border: none !important;
        }
        
        #materialReplaceUploadContainer.multi-edit-mode .object-upload-inner {
            height: 200px;
            min-height: 200px;
        }
        .object-upload-btns {
            margin-bottom: 4px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: center;
            justify-content: center;
        }
        .object-upload-btns .new-upload-btn {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 0.4vw;
            padding: 0.3vw 0.8vw;
            font-size: max(0.6vw, 10px);
            color: #333;
            display: flex;
            align-items: center;
            gap: 0.25vw;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            min-height: 28px;
            width: 80px;
            justify-content: center;
        }
        .object-upload-btns .new-upload-btn:hover {
            background: #f5f5f5;
            border-color: #007bff;
        }
        .object-upload-btns .new-upload-btn svg {
            width: 13px !important;
            height: 13px !important;
        }
        @media (max-width: 900px) {
            .object-replace-upload-container {
                flex-direction: column;
                gap: 0.5vw;
                padding: 12px;
            }
            .object-upload-title {
                font-size: 1.6vw;
                line-height: 1.6vw;
            }
            .object-upload-col {
                padding: 0;
            }
            .object-upload-btns .new-upload-btn {
                font-size: 12px;
                padding: 6px 12px;
                width: 70px;
            }
            .object-upload-btns .new-upload-btn svg {
                width: 11px !important;
                height: 11px !important;
            }
        }

        @media (max-width: 480px) {
            .object-replace-upload-container {
                padding: 12px;
            }
            .object-upload-title {
                font-size: 1.6vw;
                line-height: 1.6vw;
            }
        }

        .scroll-down-icon {
            display: inline-block;
            animation: bounceUpDown 2s ease-in-out infinite;
            cursor: pointer;
            position: relative; 
            top: 8px; 
        }

        .scroll-down-icon svg {
            width: 1.2vw;
            height: 1.2vw;
            min-width: 16px;
            min-height: 16px;
        }

        @keyframes bounceUpDown {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(8px);
            }
        }

        .scroll-down-icon:hover {
            animation-duration: 1s;
        }

        .scroll-down-tip {
            font-size: 9px; 
            color: #6b7280; 
            line-height: 1.6;
            margin-top: 6px;
            user-select: none;
        }

        .prompt-input-container.ai-rotate-auto-layout {
            --prompt-gap: 10px;          
            --action-right-w: 188px;     
            --reserve-right: 280px;      
        }
        .prompt-input-container.ai-rotate-auto-layout .prompt-buttons-container {
            gap: var(--prompt-gap) !important;
            right: calc(1.2vw + var(--action-right-w) + var(--prompt-gap)) !important;
        }
        .prompt-input-container.ai-rotate-auto-layout .action-right {
            gap: var(--prompt-gap) !important;
        }
        .prompt-input-container.ai-rotate-auto-layout #promptTextarea {
            padding-right: calc(var(--reserve-right) + 16px) !important;
        }

        
        @media (min-width: 2000px) {
            .new-upload-container,
            .object-replace-upload-container {
                min-height: 313px;
                max-height: 500px;
            }
        }
