        :root { --primary: #4F46E5; }
        .div-container {
            background: #2c3e50;
            border: 4px solid #3f8fef;
            margin-left: auto;
            margin-right: auto;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            width: 95vw;
            max-width: 800px;
            max-height: 1000px;
            text-align: center;
            overflow: hidden; 
           
        #canvas-container {
            flex: 1;
            position: relative;
            background: #1a1a1a;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            padding: 10px;
        }
        canvas {
            background-color: white;
            box-shadow: 0 10px 40px rgba(0,0,0,0.6);
            touch-action: none;
            max-width: 600px;
            max-height: 600px;
            object-fit: contain;
        }
        #controls {
            max-height: 400px;
            background: #2c3e50;
            border-top-left-radius: 24px;
            border-top-right-radius: 24px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 -10px 30px rgba(0,0,0,0.4);
            z-index: 100;
        }
        .tab-btn {
            flex: 1;
            padding: 12px 5px;
            font-size: 11px;
            font-weight: 700;
            color: #666;
            text-align: center;
            border-bottom: 3px solid transparent;
            white-space: nowrap;
        }
        .tab-btn.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
            background: rgba(79, 70, 229, 0.05);
        }
        .tab-content {
            flex: 1;
            overflow-y: auto;
            padding: 15px 20px;
            display: none;
        }
        .tab-content.active { display: block; }
        .control-label { display: block; font-size: 11px; font-weight: bold; color: #444; margin-bottom: 4px; }
        .slider-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
        input[type="range"] { flex: 1; accent-color: var(--primary); height: 6px; border-radius: 3px; background: #e5e7eb; appearance: none; }
        .val-text { min-width: 40px; text-align: right; font-size: 11px; font-weight: bold; color: var(--primary); }
        .layer-item {
            padding: 12px 15px;
            background: #f9fafb;
            border-radius: 12px;
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 2px solid #e5e7eb;
            cursor: pointer;
        }
        .layer-item.selected { border-color: var(--primary); background: #f5f3ff; }
        #loadingOverlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.85);
            display: none; flex-direction: column; align-items: center; justify-content: center;
            color: white; z-index: 2000;
        }