
        :root {
            --ui-bg: #f0f2f5;
            --ui-primary: #1F3C88;
            --card-shadow: 0 10px 25px rgba(0,0,0,0.1);
            --sidebar-width: 380px;
        }

        * { box-sizing: border-box; }

        body {
            font-family: 'Kalpurush', 'SolaimanLipi', 'Siyam Rupali', 'Vrinda', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--ui-bg);
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            width: 100vw;
            overflow: hidden;
            color: #1c1e21;
        }

        .app-container {
            width: 98vw;
            height: 96vh;
            max-width: 1400px;
            display: grid;
            grid-template-columns: 1fr var(--sidebar-width);
            gap: 12px;
            background: #ffffff;
            padding: 12px;
            border-radius: 12px;
            box-shadow: var(--card-shadow);
        }

        @media (max-width: 1100px) {
            .app-container {
                grid-template-columns: 1fr;
                overflow-y: auto;
                height: 98vh;
            }
            body { overflow: auto; height: auto; padding: 5px; }
            .preview-pane { height: 500px !important; }
        }

        .preview-pane {
            background: #eef0f2;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 10px;
            height: 100%;
            overflow: hidden;
            position: relative;
        }

        canvas {
            max-width: 100%;
            max-height: 92%;
            width: auto;
            height: auto;
            border-radius: 4px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.15);
            background: white;
            object-fit: contain;
        }

        .canvas-meta {
            margin-top: 8px;
            font-size: 10px;
            font-weight: 600;
            color: #8a8d91;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .controls-pane {
            display: flex;
            flex-direction: column;
            gap: 10px;
            height: 100%;
            border-left: 1px solid #eee;
            padding-left: 12px;
            overflow: hidden;
        }

        .brand-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--ui-primary);
        }

        .brand-logo-ui {
            width: 24px;
            height: 24px;
            background: var(--ui-primary);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 900;
            font-size: 12px;
        }

        .brand-header h1 {
            font-size: 16px;
            margin: 0;
            color: var(--ui-primary);
            font-weight: 800;
        }

        .controls-scroll {
            flex: 1;
            overflow-y: auto;
            padding-right: 4px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .controls-scroll::-webkit-scrollbar { width: 4px; }
        .controls-scroll::-webkit-scrollbar-track { background: transparent; }
        .controls-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

        .control-group {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
        }

        label {
            font-size: 9px;
            font-weight: 800;
            color: #65676b;
            text-transform: uppercase;
        }

        select, input[type="text"], textarea, input[type="range"] {
            width: 100%;
            padding: 6px 8px;
            border: 1px solid #dddfe2;
            border-radius: 6px;
            font-size: 12px;
            background: #f8f9fa;
            transition: all 0.2s;
        }

        textarea {
            height: 54px;
            resize: none;
            font-weight: 600;
            line-height: 1.3;
        }

        .theme-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            padding: 5px 2px;
        }

        /* Liquid Style Preset Buttons */
        .theme-btn {
            padding: 8px 4px;
            border-radius: 15px; /* 15px corner carve */
            font-size: 9px;
            font-weight: 800;
            cursor: pointer;
            border: 1px solid rgba(0,0,0,0.05);
            text-align: center;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            position: relative;
        }

        .theme-btn:hover {
            transform: scale(1.08) translateY(-2px);
            box-shadow: 0 5px 12px rgba(0,0,0,0.1);
            z-index: 2;
        }

        .theme-btn.active {
            border-color: var(--ui-primary);
            box-shadow: 0 4px 10px rgba(31, 60, 136, 0.2);
            transform: scale(1.05);
            z-index: 1;
            outline: 2px solid rgba(31, 60, 136, 0.1);
        }

        .highlight-box {
            background: #f7f8f9;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid #e4e6eb;
        }

        .btn {
            width: 100%;
            padding: 10px;
            border: none;
            border-radius: 6px;
            font-weight: 800;
            cursor: pointer;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: 0.2s;
        }

        .btn-upload { background: #e4e6eb; color: #050505; }
        .btn-upload:hover { background: #d8dadf; }
        .btn-download { background: var(--ui-primary); color: white; margin-top: auto; }
        .btn-download:hover { background: #162d66; transform: translateY(-1.5px); }

        .hidden { display: none; }
        
        input[type=range] { height: 3px; -webkit-appearance: none; background: #ddd; padding: 0; }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none; height: 12px; width: 12px; border-radius: 50%; background: var(--ui-primary);
        }
  /* Mobile / Tablet Responsive */
@media (max-width: 1100px) {
    .app-container {
        grid-template-columns: 1fr; /* এক কলামে রূপান্তর */
        height: auto;
        overflow-y: auto;
        padding: 10px;
    }

    body {
        overflow: auto;
        height: auto;
        padding: 0;
    }

    .preview-pane {
        width: 100%;
        height: 400px; /* মোবাইলে canvas হাইট কমানো */
        margin-bottom: 12px;
    }

    canvas {
        width: 100%;
        height: 100%;
    }

    .controls-pane {
        border-left: none;
        padding-left: 0;
        width: 100%;
    }

    .row {
        grid-template-columns: 1fr; /* মোবাইলে দুটি ইনপুট এক লাইনে না দিয়ে নিচে নামাবে */
        gap: 8px;
    }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr); /* theme buttons 2 কলামে দেখাবে */
    }
}

/* ছোট মোবাইল (max-width: 600px) */
@media (max-width: 600px) {
    .preview-pane {
        height: 300px; /* আরো ছোট স্ক্রিনে canvas হাইট কমানো */
    }

    textarea {
        height: 48px; /* headline input ছোট করা */
    }

    input, select, button {
        font-size: 11px; /* text ছোট করা */
        padding: 5px;
    }
}
