
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
            min-height: 100vh;
            /* padding: 1.5rem; */
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        /* Header */
        .header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .header h1 {
            font-size: 2.2rem;
            font-weight: 800;
            background: linear-gradient(135deg, #1e293b, #dc2626, #ea580c);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            display: inline-flex;
            align-items: center;
            gap: 12px;
        }

        .header p {
            color: #475569;
            margin-top: 0.5rem;
        }

        .badge-pro {
            background: linear-gradient(135deg, #dc2626, #ea580c);
            color: white;
            padding: 0.2rem 0.6rem;
            border-radius: 20px;
            font-size: 0.7rem;
            font-weight: 600;
            margin-left: 8px;
        }

        /* Main Grid */
        .main-grid {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 1.5rem;
        }

        @media (max-width: 900px) {
            .main-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Cards */
        .card {
            background: white;
            border-radius: 1.5rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.08);
            overflow: hidden;
        }

        .card-header {
            padding: 1.2rem 1.5rem;
            background: #fafcff;
            border-bottom: 2px solid #f1f5f9;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #1e293b;
        }

        .card-body {
            padding: 1.5rem;
        }

        /* Upload Area */
        .upload-area {
            border: 2px dashed #cbd5e1;
            border-radius: 1.2rem;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            background: #fefefe;
            margin-bottom: 1.2rem;
        }

        .upload-area:hover {
            border-color: #dc2626;
            background: #fef2f2;
            transform: translateY(-2px);
        }

        .upload-area i {
            font-size: 2.5rem;
            color: #dc2626;
            margin-bottom: 0.5rem;
        }

        /* Controls Bar */
        .controls-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 0.8rem;
            align-items: center;
            margin-bottom: 1.2rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #e2e8f0;
        }

        .btn {
            padding: 0.6rem 1.2rem;
            border-radius: 2rem;
            font-weight: 600;
            font-size: 0.85rem;
            border: none;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s;
        }

        .btn-primary {
            background: #dc2626;
            color: white;
        }

        .btn-primary:hover {
            background: #b91c1c;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(220,38,38,0.3);
        }

        .btn-secondary {
            background: #f1f5f9;
            color: #334155;
            border: 1px solid #e2e8f0;
        }

        .btn-secondary:hover {
            background: #e2e8f0;
        }

        .btn-success {
            background: #059669;
            color: white;
        }

        .btn-success:hover {
            background: #047857;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid #cbd5e1;
            color: #475569;
        }

        .btn-outline:hover {
            background: #f8fafc;
            border-color: #dc2626;
        }

        .file-count {
            margin-left: auto;
            color: #64748b;
            font-size: 0.85rem;
            font-weight: 500;
            background: #f1f5f9;
            padding: 0.3rem 0.8rem;
            border-radius: 2rem;
        }

        /* Image Grid */
        .image-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 1rem;
            max-height: 500px;
            overflow-y: auto;
            padding: 0.2rem;
        }

        .image-card {
            background: #f8fafc;
            border-radius: 1rem;
            overflow: hidden;
            border: 2px solid #e2e8f0;
            transition: all 0.2s;
            position: relative;
            cursor: grab;
        }

        .image-card.dragging {
            opacity: 0.5;
            cursor: grabbing;
        }

        .image-card:hover {
            border-color: #dc2626;
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        }

        .image-preview {
            width: 100%;
            height: 140px;
            object-fit: cover;
            background: #e2e8f0;
        }

        .image-info {
            padding: 0.6rem;
            font-size: 0.7rem;
            background: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .image-name {
            color: #334155;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 90px;
        }

        .image-size {
            font-size: 0.6rem;
            color: #94a3b8;
            margin-top: 2px;
        }

        .remove-btn {
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            padding: 0.3rem 0.5rem;
            border-radius: 0.5rem;
            transition: all 0.2s;
        }

        .remove-btn:hover {
            color: #dc2626;
            background: #fee2e2;
        }

        .drag-handle {
            cursor: grab;
            color: #94a3b8;
            margin-right: 0.3rem;
            font-size: 0.8rem;
        }

        /* Options Panel */
        .options-panel {
            background: #f8fafc;
            border-radius: 1rem;
            padding: 1rem;
            margin-bottom: 1rem;
        }

        .option-group {
            margin-bottom: 1rem;
        }

        .option-group label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.8rem;
            font-weight: 600;
            color: #334155;
            margin-bottom: 0.5rem;
        }

        select, input[type="number"], input[type="range"] {
            width: 100%;
            padding: 0.5rem 0.8rem;
            border: 1px solid #cbd5e1;
            border-radius: 0.8rem;
            font-family: 'Inter', sans-serif;
            font-size: 0.85rem;
            outline: none;
            background: white;
        }

        .slider-value {
            display: inline-block;
            background: #e2e8f0;
            padding: 0.2rem 0.5rem;
            border-radius: 0.5rem;
            font-size: 0.7rem;
            margin-left: 0.5rem;
        }

        .margin-control {
            display: flex;
            gap: 0.5rem;
        }

        .margin-control input {
            text-align: center;
        }

        /* Stats Panel */
        .stats-panel {
            background: linear-gradient(135deg, #fef2f2, #fff5eb);
            border-radius: 1rem;
            padding: 1rem;
            margin-top: 1rem;
        }

        .stat-item {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem 0;
            border-bottom: 1px solid #f1c4c4;
            font-size: 0.8rem;
        }

        .stat-item:last-child {
            border-bottom: none;
        }

        .stat-label {
            color: #64748b;
        }

        .stat-value {
            font-weight: 700;
            color: #dc2626;
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 3rem;
            color: #94a3b8;
        }

        .empty-state i {
            font-size: 3rem;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        /* Loading Overlay */
        .loading {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(8px);
        }

        .loading-content {
            background: white;
            padding: 2rem;
            border-radius: 1.5rem;
            text-align: center;
            min-width: 280px;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #e2e8f0;
            border-top-color: #dc2626;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 1rem;
        }

        .progress-bar {
            width: 100%;
            height: 6px;
            background: #e2e8f0;
            border-radius: 3px;
            overflow: hidden;
            margin-top: 1rem;
        }

        .progress-fill {
            height: 100%;
            background: #dc2626;
            transition: width 0.3s;
            width: 0%;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Toast Notification */
        .toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: #1e293b;
            color: white;
            padding: 0.8rem 1.2rem;
            border-radius: 1rem;
            display: flex;
            align-items: center;
            gap: 10px;
            z-index: 1100;
            animation: slideIn 0.3s ease;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .toast.success {
            background: #059669;
        }

        .toast.error {
            background: #dc2626;
        }

        /* Right Panel */
        .right-panel {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .info-text {
            font-size: 0.7rem;
            color: #94a3b8;
            text-align: center;
            margin-top: 0.5rem;
        }
