        /* Full-screen overlay styling */
        #loadingOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1050; /* High z-index to overlay on top of other content */
            visibility: hidden; /* Initially hidden */
            opacity: 0;
            transition: visibility 0s, opacity 0.3s ease-in-out;
        }
        #loadingOverlay.show {
            visibility: visible;
            opacity: 1;
        }

        body {
            padding-bottom: env(safe-area-inset-bottom);
          }