  body {
            font-family: Arial, sans-serif;
        }
        .container {
            
        }
        .controls {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        button {
            padding: 8px 16px;
            cursor: pointer;
        }
        #editor-container {
            position: relative;
            border: 1px solid #ccc;
            overflow: hidden;
            width: 500px;
            height: 500px;
        }
        #background-canvas {
            width: 500px;
            height: 500px;
            display: block;
            background-color: #f0f0f0;
        }
        #output-container {
            margin-top: 20px;
            border: 1px solid #ccc;
        }
        #output-canvas {
            display: block;
            max-width: 100%;
        }
        .overlay {
            position: absolute;
            border: 2px dashed rgba(0, 0, 255, 0.5);
            cursor: move;
            overflow: visible;
            transform-origin: center center;
        }
        .overlay-container {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }
        
        .overlay-boundary {
            position: absolute;
            border: 2px dashed rgba(0, 0, 255, 0.5);
            cursor: move;
            overflow: visible;
            transform-origin: center center;
            pointer-events: auto;
        }
        .overlay img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            pointer-events: none;
        }
       
        
        /* Resize handles */
        .resize-handle_im {
            position: absolute;
            width: 8px;
            height: 8px;
            background: white;
            border: 1px solid #333;
            z-index: 10;
        }
        .resize-handle-nw {
            top: -4px;
            left: -4px;
            cursor: nwse-resize;
        }
        .resize-handle-ne {
            top: -4px;
            right: -4px;
            cursor: nesw-resize;
        }
        .resize-handle-sw {
            bottom: -4px;
            left: -4px;
            cursor: nesw-resize;
        }
        .resize-handle-se {
            bottom: -4px;
            right: -4px;
            cursor: nwse-resize;
        }
        .resize-handle-n {
            top: -4px;
            left: 50%;
            margin-left: -4px;
            cursor: ns-resize;
        }
        .resize-handle-s {
            bottom: -4px;
            left: 50%;
            margin-left: -4px;
            cursor: ns-resize;
        }
        .resize-handle-w {
            left: -4px;
            top: 50%;
            margin-top: -4px;
            cursor: ew-resize;
        }
        .resize-handle-e {
            right: -4px;
            top: 50%;
            margin-top: -4px;
            cursor: ew-resize;
        }
         .overlay-controls {
            position: absolute;
            top: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.7);
            padding: 2px;
            display: block;
			z-index:1000;
        }
        .overlay:hover .overlay-controls {
            display: block;
        }
        .delete-btn {
            background: red;
            color: white;
            border: none;
            cursor: pointer;
            font-size: 14px;
            width: 20px;
            height: 20px;
            line-height: 20px;
            text-align: center;
            padding: 0;
			min-height: 20px;
        }
        /* Rotation handle */
        .rotate-handle_im{
            position: absolute;
            width: 16px;
            height: 16px;
            background: white;
            border: 1px solid #333;
            border-radius: 50%;
            cursor: grab;
            top: -25px;
            left: 50%;
            margin-left: -8px;
            z-index: 10;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .rotate-handle_im:after {
            content: "↻";
            font-size: 12px;
        }
        .rotate-handle_im:active {
            cursor: grabbing;
        }
        
        /* Rotation line connecting handle to overlay */
        .rotate-line {
            position: absolute;
            background: rgba(0, 0, 255, 0.3);
            width: 2px;
            height: 15px;
            top: -15px;
            left: 50%;
            margin-left: -1px;
            z-index: 9;
        }
		/**/
		
		