       
        #PreviewAndRoughAreaContainer {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            height: 250px;
        }

        #previewArea {
            flex: 3; /* Takes up 60% of the container width */
            background-color: #f0f0f0; /* Optional background color for visualization */
            padding: 10px;
            height: 100%; /* Adjust height to account for padding */
            overflow: auto;
            border: 5px solid #d4e8f3;
            text-align: center;
            box-sizing: border-box;
        }

        /* Rough Area */
        #roughArea {
            flex: 2; /* Takes up 40% of the container width */
            background-color: #fff;
            background-image: linear-gradient(to bottom, #706c6c 1px, transparent 1px);
            background-size: 100% 24px; /* Adjust the height between lines here */
            padding: 10px;
            height: 100%; /* Adjust height to account for padding */
            overflow: auto;
            border: 5px solid #ccc;
            box-sizing: border-box;
            white-space: pre-wrap;
            font-family: "Courier New", Courier, monospace;
            font-weight: 600;
            font-size: 14px;
        }

        #resultsContainer {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .resultArea {
            width: 98%;
            height: 300px;
            overflow: auto; /* Enables both horizontal and vertical scrolling */
            border: 5px solid #ccc;
            padding: 10px;
            box-sizing: border-box;
            white-space: pre-wrap;
            font-family: "Courier New", Courier, monospace;
            font-weight: 600; /* Bold text */
            font-size: 14px; /* Smaller text size */

        }

        #cameraPopup {
            display: none;
            position: fixed; /* Changed to fixed to make it stay on screen */
            top: 10%;
            left: 20%;
            width: 50%;
            height: 30%;
            border: 1px solid #ccc;
            background: #fff;
            z-index: 1000; /* Ensure it's on top of other content */
        }

        #captureButton, #startRecording, #stopRecording, #fullscreenToggle, #closePopup  {
            position: absolute;
            cursor: pointer;
            font-size: 30px; /* Adjust size of icons */
        }
        
        #captureButton {
            top: 10px;
            left: 10px;
        }
        
        #startRecording {
            top: 10px;
            left: 60px;
        }
        
        #stopRecording {
            top: 10px;
            left: 110px;
            display: none; /* Hidden by default */
        }
        
        #closePopup {
            top: 10px;
            right: 10px;
        }
        
        canvas {
            max-width: none;
            max-height: none;
            width: auto;
            height: auto;
            display: block;
        }

        /* Loading Spinner Styles */
        #loadingSpinner {
            display: none; /* Hidden by default */
            border: 8px solid #f3f3f3;
            border-top: 8px solid #3498db;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .selectionBox {
            position: absolute;
            border: 2px dashed #3498db;
            background-color: rgba(52, 152, 219, 0.3);
            pointer-events: none;
        }

        #videoOverlay {
            position: relative;
            width: 100%;
            height: 100%;
            display: none;
            object-fit: contain;
        }
        
        #previewVideo {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10; /* Ensure it appears above the canvas content */
        }


        .context-menu {
            background-color: #ffffff;
            border: 1px solid #ccc;
            box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            width: 150px;
        }
        
        .menu-item {
            padding: 8px 12px;
            cursor: pointer;
        }
        
        .menu-item:hover {
            background-color: #f0f0f0;
        }

        .genericPopout {
            position: absolute;
            background-color: rgb(243, 243, 165);
            border: 5px solid #ccc;
            padding: 10px;
            display: none;
            z-index: 1000;
            font-family: 'Patrick Hand'; /* Handwritten font */
            font-weight: bold; /* Set font weight to normal */
            font-size: 14px;
            top: 50%; /* Vertically center the popout */
            left: 50%; /* Horizontally center the popout */
            transform: translate(-50%, -50%);
            width: 80%; /* Flexible width to adapt to different screen sizes */
            max-width: 800px; /* Limit maximum width for desktop */
            height: auto; /* Adjust height based on content */
            max-height: 80vh; /* Prevent the popout from taking up too much height */
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
            overflow: auto; /* Scroll if content overflows */
            white-space: normal; /* Wrap text */
            word-wrap: break-word; /* Break long words */
            line-height: 1.5; /* Improve readability with better line spacing */
            box-sizing: border-box; /* Include padding in the element’s width/height */
            white-space: pre-wrap; /* IMPORTANT - Preserve whitespace and line breaks etc. Otherwise all text will appear as one-long-line.*/
        }
        
        /* Responsive adjustments for mobile devices */
        @media (max-width: 600px) {
            .genericPopout {
                width: 95%; /* More flexible width for small screens */
                max-width: 100%; /* Allow the popout to use full width on mobile */
                max-height: 90vh; /* Slightly larger max height for mobile devices */
                font-size: 13px; /* Slightly smaller font size for better fit */
                padding: 8px; /* Reduce padding for mobile */
            }
        }
        
        
        .previewResultRoughAreaMaximized {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            bottom: 400;
            z-index: 100;
            background-color: #f0f0f0;
            border: 5px solid #d4e8f3;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Optional: Adds a shadow effect */
            overflow: auto; /* Ensures content can scroll if necessary */
            box-sizing: border-box; /* Includes padding and border in element's total width and height */
          }
          
          .previewResultRoughAreaHidden {
            display: none;
          }

        .left-links a {
        color: grey;           /* text color */
        text-decoration: none; /* removes underline */
        }

        .left-links a:hover {
        color: darkgrey;       /* optional hover effect */
        text-decoration: underline; /* optional hover underline */
        }





