/* Custom styles for the app */
        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Beautiful gradient background */
            background-attachment: fixed; /* Fixed background for parallax effect */
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            padding: 20px;
            box-sizing: border-box;
        }
        .container {
            background-color: #ffffff;
            border-radius: 1.5rem; /* Rounded corners */
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
            padding: 2.5rem;
            width: 100%;
            max-width: 1000px; /* Increased max width for desktop */
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        .image-display-area {
            display: flex;
            flex-wrap: wrap; /* Allow wrapping on smaller screens */
            gap: 1rem;
            justify-content: center;
            align-items: flex-start;
        }
        .image-box {
            flex: 1 1 350px; /* Flex basis for responsiveness */
            min-width: 280px; /* Minimum width for small screens */
            background-color: #e5e7eb; /* Light gray checkerboard effect for transparency */
            background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                              linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                              linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                              linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
            background-size: 20px 20px;
            background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
            border-radius: 0.75rem;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 250px; /* Minimum height for image display */
            position: relative;
            flex-direction: column; /* Stack image and title vertically */
        }
        canvas, img {
            max-width: 100%;
            max-height: 350px; /* Limit height of images */
            display: block; /* Remove extra space below images */
            object-fit: contain; /* Ensure image fits without cropping */
            border-radius: 0.5rem; /* Slightly rounded images */
            margin-top: 2rem; /* Space for title */
        }
        .button-group {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            justify-content: center;
        }
        button {
            padding: 0.75rem 1.5rem;
            border-radius: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
        }
        #loadInput {
            display: none; /* Hide the default file input */
        }
        .custom-file-upload {
            background-color: #4CAF50; /* Green */
            color: white;
            padding: 0.75rem 1.5rem;
            border-radius: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            display: inline-block; /* Allows padding and margin */
        }
        .custom-file-upload:hover {
            background-color: #45a049; /* Darker green */
            transform: translateY(-2px);
        }
        /* Styles for the processed image list */
        #processedImagesContainer {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            justify-content: center;
            margin-top: 1.5rem;
        }
        .processed-image-card {
            background-color: #f9fafb;
            border-radius: 0.75rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            padding: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            flex: 0 0 calc(33% - 1rem); /* Approx 3 cards per row on larger screens */
            max-width: 280px; /* Max width for individual cards */
            min-width: 200px;
        }
        .processed-image-card canvas {
            max-width: 100%;
            height: auto;
            border: 1px solid #e0e0e0;
            border-radius: 0.5rem;
            background-color: #e5e7eb;
            background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                              linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                              linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                              linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
            background-size: 20px 20px;
            background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        }
        .processed-image-card span {
            font-size: 0.875rem;
            color: #4b5563;
            text-align: center;
            word-break: break-all;
        }
        .action-buttons-wrapper {
            display: flex;
            flex-direction: column; /* Stack buttons vertically for smaller screens */
            gap: 0.75rem;
            width: 100%; /* Make buttons take full width of card */
        }
        @media (min-width: 768px) {
            .action-buttons-wrapper {
                flex-direction: row; /* Buttons in a row on larger screens */
                justify-content: center;
            }
            .processed-image-card {
                flex: 0 0 calc(25% - 1rem); /* 4 cards per row on wider screens */
            }
        }
        @media (max-width: 640px) {
            .processed-image-card {
                flex: 0 0 100%; /* Full width on extra small screens */
            }
            .image-box {
                flex: 1 1 100%;
            }
        }