body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    height: 100vh;
}

#container {
    /* display: flex; */
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100%;
}

/* Custom styles for left column */
#left-column {
    flex: 1;
    max-width: 250px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #ffffff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    position: relative; /* Relative positioning for image upload container */
    display: flex;
    flex-direction: column; /* Stack elements vertically in the left column */
    overflow-x: auto; /* Enable horizontal scrolling when content exceeds container width */
    max-width: 100%;

}

#left-column, #center-column, #right-column {
    flex: 1;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #ffffff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    position: relative;
}

#left-column h2, #center-column h2, #right-column h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #dddddd;
}

/* Custom styles for the legend */
#legend {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
    margin-left: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border-radius: 50%;
}

.legend-item span {
    font-size: 14px;
}

/*/* Custom styles for the center column */
/* #center-column {
  padding: 20px;
  margin-bottom: 20px;
  background-color: #ffffff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
} */


#neural-network {
    width: 100%;
    min-height: 400px;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Custom styles for the neuralNetwork SVG */
#neural-network svg {
    width: 100%;
    height: 100%;
    display: flex;
}

.layer {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #2196F3;
    position: absolute;
    top: 50%;
    left: 50%; /* Set left to 50% to center the circles horizontally */
    transform: translate(-50%, -50%); /* Center the circles both horizontally and vertically */
    pointer-events: none; /* Disable pointer events for the circles to prevent interaction */
}

#slider-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

#slider-container span {
    font-size: 14px;
    color: #666666;
}

#slider-container input[type="range"] {
    width: 80%;
    cursor: pointer;
}

/* Custom styles for image upload container */
#upload-container {
    margin-top: auto; /* Push the upload button to the bottom of the left column */
    display: flex;
    flex-direction: row;
    justify-content: flex-end; /* Align the upload button to the right side of the left column */
    align-items: center; /* Center the upload button vertically */
}


#upload-button {
    padding: 10px;
    background-color: #2196F3;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: box-shadow 0.3s;
}

.upload-button-glowing {
    box-shadow: 0 2px 12px 2px rgba(3, 140, 220, .6)
}

#imageUpload {
    display: none;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    #container {
        justify-content: center;
    }

    #left-column, #center-column, #right-column {
        flex: 0 0 calc(100% - 40px);
    }

    #neural-network {
        height: 300px;
    }


    /* Threshold section on mobile */
    #threshold-container {
        position: static;
        margin-top: 20px;
        display: flex;
        justify-content: center;
    }
}


/* Custom styles for uploaded images */
.image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Add a transition effect for a smooth scaling transition */
    transition: transform 0.3s ease;
}

/* CSS code to style the selected image */
.image-overlay.selected-image:before {
    /* Overlay styles for the selected image */
    opacity: 1;
    z-index: 1;
}

/* CSS styles for response tags */
#deviceResponseTags, #cloudResponseTags, #deviceCloudResponseTags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    max-height: 500px;
    max-height: calc(100% - 50px); /* Set a maximum height for the container */
    overflow-y: auto; /* Enable vertical scrolling when tags exceed container height */
    background-color: #f9f9f9; /* Add background color to the container */
    border-radius: 5px; /* Add border radius to the container */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add box shadow to the container */
}

#response-info {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    max-height: 500px;
    max-height: calc(100% - 50px); /* Set a maximum height for the container */
    overflow-y: auto; /* Enable vertical scrolling when tags exceed container height */
    background-color: #f9f9f9; /* Add background color to the container */
    border-radius: 5px; /* Add border radius to the container */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add box shadow to the container */
}

#deviceResponseTags .response-tag, #cloudResponseTags .response-tag, #deviceCloudResponseTags .response-tag {
    padding: 8px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

#deviceResponseTags .response-time, #cloudResponseTags .response-time, #deviceCloudResponseTags .response-time {
    padding: 8px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    background-color: hsla(247.5, 42.1%, 22.4%, 0.13);
    color: #444343;
}

/* Updated CSS for the loading element */
#loading {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}

/* Additional styling for the spinner */
#loading .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

/* Keyframe animation for the spinning effect */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Container for the overlay text and the image */
.image-overlay {
    position: relative;
    max-width: 250px;
    margin: 10px;
    min-width: 150px;
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    padding: 10px;
}

/* Overlay styles for different layerSlider values */
.image-overlay:before {
    content: attr(data-layer-text);
    position: absolute;
    top: 10px;
    left: 10px;
    color: #ffffff;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}

/* Show the overlay */
.image-overlay:before {
    opacity: 0.7;
}

/* Show the overlay on click for the selected image */
.image-overlay.selected-image:before {
    /* Overlay styles for the selected image */
    opacity: 1;
    z-index: 1;
}

/* CSS code to style the selected image */
.image-overlay.selected-image {
    border: 2px solid #2196F3; /* Add a border for the selected image */
    box-shadow: 0 0 8px #2196F3 !important; /* Add !important to override inline styles */
    opacity: 1 !important; /* Set the opacity to 1 for the selected image */
}


/* Updated CSS for the loading element */
#loading {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}

/* Additional styling for the spinner */
#loading .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

/* Keyframe animation for the spinning effect */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#uploadedImageContainer {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    max-height: 150px; /* Set a maximum height for the container */
    overflow-x: auto; /* Enable horizontal scrolling when images exceed container width */
    overflow-y: hidden; /* Hide vertical scrollbar */
    padding: 10px; /* Add padding to the container */
    background-color: #f9f9f9; /* Add background color to the container */
    border-radius: 5px; /* Add border radius to the container */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add box shadow to the container */
}

@media (max-width: 768px) {
    /* Adjusting for smaller screens */
    #uploadedImageContainer {
        max-height: 100px; /* Reduce maximum height on smaller screens */
    }
}

/* Custom styles for uploaded images inside image-overlay containers */
.image-overlay img {
    flex: 0 0 150px; /* Set a fixed width of 150px for each image on desktop */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Add a transition effect for a smooth scaling transition */
    transition: transform 0.3s ease;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    /* Custom styles for left column image container on mobile */
    #uploadedImageContainer {
        max-height: 100px; /* Reduce maximum height on smaller screens */
    }

    /* Custom styles for uploaded images inside image-overlay containers on mobile */
    .image-overlay img {
        flex: 0 0 100px; /* Set a fixed width of 100px for each image on mobile */
        height: 100px; /* Set a fixed height for each image on mobile */
    }

    /* Update upload container for horizontal scrolling on mobile */
    #left-column #upload-container {
        flex-direction: row;
        overflow-x: auto; /* Enable horizontal scrolling when content exceeds container width */
    }

    #left-column {
        max-width: 100%;
    }

}

/* Overlay styles for different layerSlider values */
.image-overlay[data-layer-text="Cloud"]:before {
    content: attr(data-layer-text);
    position: absolute;
    top: 10px;
    left: 10px;
    color: #ffffff;
    font-size: 16px;
    background-color: rgba(0, 0, 255, 0.7); /* Blue color for Cloud */
    padding: 5px;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}

/* Overlay styles for different layerSlider values */
.image-overlay[data-layer-text="Device-Cloud"]:before {
    content: attr(data-layer-text);
    position: absolute;
    top: 10px;
    left: 10px;
    color: #ffffff;
    font-size: 16px;
    background-color: rgba(255, 165, 0, 0.7); /* Orange color for Device-Cloud */
    padding: 5px;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}

/* Overlay styles for different layerSlider values */
.image-overlay[data-layer-text="Device"]:before {
    content: attr(data-layer-text);
    position: absolute;
    top: 10px;
    left: 10px;
    color: #ffffff;
    font-size: 16px;
    background-color: rgba(60, 179, 113, 0.7); /* Medium Sea Green color for Device */
    padding: 5px;
    border-radius: 5px;
    transition: opacity 0.3s ease;
}

/* Styling for right column and sub-column_details */
#sub-column-container {
    display: flex;
    justify-content: space-between; /* Ensures sub-column_details are evenly spaced */
    align-items: flex-start; /* Aligns items to the top */
    width: 100%;
}

.sub-column {
    flex: 1; /* Each sub-column takes equal space */
    margin-right: 20px; /* Space between sub-column_details */
    padding: 10px;
    background-color: #ffffff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.sub-column:last-child {
    margin-right: 0; /* Remove margin for the last sub-column */
}

/* Styling for individual sections within sub-column_details */
.threshold-container, .response-container, .tags-container {
    margin-bottom: 20px; /* Space between sections */
}


h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #dddddd; /* Adds a line below the header */
}

/* Responsive styling */
@media (max-width: 768px) {
    #right-column {
        flex-direction: column;
    }

    .sub-column {
        margin-right: 0;
        margin-bottom: 20px; /* Add space between stacked sub-column_details on small screens */
    }
}

/* Additional styles for specific components */
input[type="range"] {
    width: 100%; /* Makes slider take full width of its container */
    cursor: pointer;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.tag-cloud {
    background-color: rgba(251, 176, 59, 0.5);
    color: lightslategray;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: small;
    font-weight: bold;
}

.tag-device {
    background-color: rgba(0, 169, 157, 0.5);
    color: slategray;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: small;
    font-weight: bold;
}

/*.tag-neurosplit {*/
/*    background-color: rgba(156, 39, 176, 0.5);*/
/*    color: slategray !important;*/
/*    padding: 3px 6px !important;*/
/*    border-radius: 6px;*/
/*    font-size: small;*/
/*    font-weight: bold;*/
/*}*/

.tag-neurosplit {
    background-image: linear-gradient(to left, rgba(251, 176, 59, 0.5), rgba(0, 169, 157, 0.5));
    color: slategray;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: small;
    font-weight: bold;
}

.icon-cloud {
    background-image: url(../image/neurosplit-custom-icons.png);
    background-position-x: 0px;
    background-position-y: -32px;
    background-repeat: no-repeat;
    height: 32px;
    width: 32px;
    background-size: 32px;
    opacity: 0.75;
    display: inline-block;
    background-clip: content-box;
    background-origin: content-box;
    padding: 0 !important;
    margin-left: 5px !important;
}

.icon-neurosplit {
    background-image: url(../image/neurosplit-custom-icons.png);
    background-position-x: 0px;
    background-position-y: 0px;
    background-repeat: no-repeat;
    height: 32px;
    width: 32px;
    background-size: 32px;
    opacity: 0.75;
    display: inline-block;
    background-clip: content-box;
    background-origin: content-box;
    padding: 0 !important;
    margin-left: 5px !important;
}

.icon-device {
    background-image: url(../image/neurosplit-custom-icons.png);
    background-position-x: 0px;
    background-position-y: -64px;
    background-repeat: no-repeat;
    height: 32px;
    width: 32px;
    background-size: 32px;
    opacity: 0.75;
    display: inline-block;
    background-clip: content-box;
    background-origin: content-box;
    padding: 0 !important;
    margin-left: 5px !important;
}

.icon-question {
    background-image: url(../image/neurosplit-custom-icons.png);
    background-position-x: 0px;
    background-position-y: -96px;
    background-repeat: no-repeat;
    height: 32px;
    width: 32px;
    background-size: 32px;
    opacity: 0.75;
    display: inline-block;
    background-clip: content-box;
    background-origin: content-box;
}

.response-heading {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: flex-start;
    align-items: center;
}

.threshold-label {
    display: inline-flex;
    float: left;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.chart-canvas {
    width: 95%;
    height: 95%;
    padding: 7px;
    overflow: hidden;
}

.latency-parent-div {
    vertical-align: middle;
    text-align: left;
    color: slategray;
    display: flex;
    height: fit-content;
    width: 100%;
    align-content: center;
    margin: 3px;
    border-width: thin !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.latency-parent-div-cloud {
    border: solid rgba(251, 176, 59, 0.5);
    padding: 3px !important;
}

.latency-parent-div-device {
    border: solid rgba(0, 169, 157, 0.5);
    padding: 3px !important;
}

.latency-parent-div-neurosplit {
    border: solid rgba(156, 39, 176, 0.5);
    padding: 3px !important;
}

.response-time-tag {
    border-radius: 4px;
    color: white;
    padding: 3px 5px;
    text-align: center;
    vertical-align: middle;
    font-size: 16px !important;
    font-weight: initial;
    min-width: 62px;
    display: inline-flex;
    font-family: 'Nunito Sans', sans-serif !important;
    align-content: center;
    justify-content: center;
    align-items: center;
}

#top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    max-height: 300px;
}

.threshold-container {
    flex: 1; /* Less space allocated to threshold */
    display: flex;
    align-items: center;
    gap: 10px;
}

#chart-container {
    flex: 3; /* More space allocated to the chart */
    padding: 5px;
    position: relative; /* For positioning the expand button correctly */
    cursor: pointer; /* Indicates the chart is clickable */
}

#latencyChart {
    max-height: 300px; /* Reduced default height */
    max-width: 600px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    #top-controls {
        flex-direction: column;
    }

    #chart-container {
        order: -1;
    }
}

#left-controls {
    margin-right: 20px;
}

#chart-container.expanded {
    position: fixed; /* Makes the chart fixed position when expanded */
    top: 5%; /* Centered vertically a bit more to the top */
    left: 5%; /* Centered horizontally a bit more to the left */
    width: 90%; /* Takes more space when expanded */
    height: 90vh; /* Responsive height based on viewport */
    z-index: 100; /* Ensures it's on top of other content */
    background-color: rgba(255, 255, 255, 0.95); /* Nearly opaque background to enhance focus */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7); /* Stronger shadow for better focus */
    padding: 20px; /* Padding to ensure content inside does not touch edges */
    overflow: hidden; /* Ensures no internal content spills out */
    border-radius: 10px; /* Rounded corners for better aesthetics */
}

#latencyChart.expanded {
    height: 100%; /* Takes full height of the container */
    width: 100%; /* Ensures the chart fills the expanded container */
}

#averageLatencies div span {
    color: rgb(241, 239, 239);
    padding: 2px 5px;
    border-radius: 4px; /* Optional: Adds rounded corners for aesthetic appearance */
}

#averageLatencies div {
    border-radius: 4px;
    padding: 3px;
    margin-bottom: 7px;
}

#container {
    max-width: 100%;
    box-sizing: border-box;
}
body {
    min-height: 100vh;
}
#top-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    max-height: none;
}
#left-controls {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
    overflow: visible;
}
#control-wrapper {
    display: flex;
    flex-direction: column;
}
.threshold-container {
    width: 100%;
    margin-bottom: 10px;
}
#averageLatencies {
    width: 100%;
}
.latency-parent-div {
    margin-bottom: 5px;
}

.compression-controls {
    background-color: #f8f9fa;
    border: 1px solid #E8E7EF;
    border-radius: 5px;
    padding: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.compression-controls h3 {
    color: #1e1666 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-bottom: 10px;
}

.compression-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.compression-controls .form-group {
    flex: 1;
    min-width: 100px;
    margin-bottom: 0;
}

.compression-controls label {
    display: block;
    font-weight: 600;
    color: #494488;
    font-size: 12px;
    margin-bottom: 2px;
}

.compression-controls input[type="text"],
.compression-controls input[type="number"],
.compression-controls select {
    width: 100%;
    border: 1px solid #E8E7EF;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 12px;
}

.compression-controls input[type="checkbox"] {
    margin-right: 5px;
}

/*!* Adjustments for the lossless checkbox *!*/
/*.compression-controls .form-group:last-child {*/
/*    display: flex;*/
/*    align-items: center;*/
/*    min-width: auto;*/
/*}*/

/*.compression-controls .form-group:last-child label {*/
/*    margin-bottom: 0;*/
/*    display: flex;*/
/*    align-items: center;*/
/*}*/


@media (max-width: 768px) {
    #container {
        padding: 10px;
    }
    #left-column, #center-column, #right-column {
        flex: 1 1 100%;
        padding: 15px;
        margin-bottom: 15px;
    }
    #uploadedImageContainer {
        max-height: 120px;
    }
    .image-overlay img {
        max-width: 100%;
        height: auto;
    }
    #sub-column-container {
        flex-direction: column;
    }
    .sub-column {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    #chart-container {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    #latencyChart {
        max-width: 100%;
        height: auto;
    }
    .threshold-container {
        flex-direction: column;
        align-items: flex-start;
    }
    #thresholdSlider {
        width: 100%;
    }
    body, p, span, div {
        font-size: 14px;
    }
    h2 {
        font-size: 18px;
    }
    h3 {
        font-size: 16px;
    }
    button, .quote-btn, #upload-button {
        min-height: 44px;
        min-width: 44px;
        padding: 10px;
    }
    .margin-large {
        margin: 1.5rem;
    }
    .pay-for-sec .text-title h2 {
        font-size: 2rem !important;
    }
    .pay-for-sec .right-sec h3 {
        font-size: 1.5rem !important;
    }
    #chart-container.expanded {
        width: 95%;
        height: 95vh;
        top: 2.5%;
        left: 2.5%;
    }
    .tag-cloud, .tag-device, .tag-neurosplit {
        font-size: 12px;
        padding: 2px 4px;
    }
}
@media (min-width: 768px) {
    #top-controls {
        flex-direction: row;
    }
    #left-controls {
        flex: 1;
        margin-right: 15px;
    }
    #chart-container {
        flex: 2;
    }
}
@media (max-width: 768px) {
    .compression-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .compression-controls .form-group {
        width: 100%;
    }
}
@media (max-width: 480px) {
    #thresholdSlider {
        width: 100%;
    }
    .threshold-label, #thresholdValue {
        font-size: 14px;
    }
    .latency-parent-div {
        font-size: 12px;
    }
}