body {
    font-family: Arial, sans-serif;
    margin: 0 20px 20px 20px; /* Reduce top margin to 0 */
    padding-top: 10px; /* Add a little padding instead */
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="file"] {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 10px 20px;
    background-color: #5cb85c; /* Green button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #4cae4c; /* Darker green on hover */
}

h3 {
    margin-top: 30px;
    color: #333;
}

#outputData {
    margin-top: 10px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    text-align: center; /* Center the image/text output */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

#outputData canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    cursor: zoom-in;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}


.controls-container {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Stretch controls to container width */
    margin-bottom: 20px;
    width: 80%; /* Use more width */
    max-width: 900px; /* Increase maximum width for controls */
}

.model-selection,
.custom-model-upload,
.image-upload-section {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.drop-area {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.drop-area.highlight {
    border-color: #5cb85c; /* Highlight color when dragging over */
    background-color: #f0fddf;
}

.drop-area p {
    margin-bottom: 10px;
}

.model-selection select,
.custom-model-upload button,
.image-upload-section button {
    padding: 8px 15px;
    font-size: 14px;
}

.model-selection select {
    width: 100%; /* Make select fill container */
}

.progress-bar-container {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #eee;
    border-radius: 3px;
    overflow: hidden; /* Ensure fill stays within rounded corners */
}

.progress-bar-fill {
    height: 100%;
    background-color: #5cb85c; /* Green progress color */
    width: 0%; /* Initial width is 0 */
    transition: width 0.3s ease; /* Smooth width transition */
}

.progress-bar-text {
    display: block; /* Ensure text is below the bar */
    margin-top: 5px;
    font-size: 0.9em;
    color: #555;
}

.model-selection ul {
    list-style: none; /* Remove default list styling */
    padding: 0;
    margin: 0;
}

.model-list-item {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.model-list-item:last-child {
    margin-bottom: 0; /* Remove margin from the last item */
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.model-variants {
    flex-shrink: 0;
    margin-left: 15px;
}

.model-variant-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.model-variant-select:hover {
    border-color: #007bff;
}

.model-variant-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.model-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 10px;
    flex-grow: 1;
}

.model-description {
    color: #555;
    margin-bottom: 8px;
}

.model-type {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 8px;
}

.model-source {
    font-size: 0.9em;
    margin-bottom: 8px;
    word-break: break-all; /* Allows long URLs to wrap */
}

.model-source a {
    color: #007bff;
    text-decoration: none;
    display: inline;
    margin-left: 4px;
}

.model-source a:hover {
    text-decoration: underline;
    color: #0056b3;
}

.load-model-button {
    padding: 8px 15px;
    background-color: #007bff; /* Blue button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.load-model-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.hidden {
    display: none !important;
}

.image-comparison-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.comparison-images {
    position: relative;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
}

.comparison-image {
    max-width: 100%;
    display: block;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    pointer-events: none !important;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    draggable: false !important;
}

.comparison-image.original {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    z-index: 2;
}

.comparison-image.upscaled {
    width: 100%;
    height: auto;
    object-fit: cover;
    clip-path: inset(0 0 0 50%);
}

.comparison-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    pointer-events: auto;
}

.comparison-separator {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #fff;
    cursor: ew-resize;
    z-index: 3;
    pointer-events: auto;
}

.comparison-separator::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    border: 3px solid #fff;
    cursor: ew-resize;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M8 5v14l11-7z'/%3E%3Cpath fill='%23666' d='M5 5v14l11-7z' transform='rotate(180 10.5 12)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.comparison-slider {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    margin: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    pointer-events: auto;
}

.comparison-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.comparison-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    border: none;
}

.comparison-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.comparison-button:hover {
    background-color: #4cae4c;
}

.comparison-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.5);
}

.model {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    box-sizing: border-box;
}

.model-content {
    display: block;
    max-width: none;
    max-height: none;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    cursor: zoom-out;
}

.model-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.model-close:hover {
    color: #bbb;
}

.model-content.comparison-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.output-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.action-button {
    padding: 10px 20px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: #4cae4c;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #5cb85c;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 18px;
    margin-top: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-container {
    margin-bottom: 15px;
}

#modelSearch {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.model-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background-color: white;
}

.model-list-container::-webkit-scrollbar {
    width: 8px;
}

.model-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.model-list-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.model-list-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.custom-model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.info-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background-color: #666;
    color: white;
    font-size: 12px;
    font-style: italic;
    margin-left: 5px;
    cursor: help;
}

.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.dark-mode .info-icon:hover::after {
    background-color: #444;
    color: #fff;
}

/* Specific positioning for cache indicator tooltips */
.cache-indicator .info-icon:hover::after {
    bottom: auto;
    top: 100%;
    margin-top: 5px;
}

/* CPU-only note tooltip positioning */
.cpu-only-note .info-icon:hover::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.info-model {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.info-model.hidden {
    display: none;
    opacity: 0;
}

.info-model-content {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-model-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 1; /* Ensure close button is above content */
}

.info-model-close:hover {
    color: #333;
}

.model-requirements {
    margin-top: 15px;
}

.model-requirements ul {
    padding-left: 20px;
    margin: 10px 0;
}

.model-requirements li {
    margin: 8px 0;
    color: #555;
}

.model-requirements p {
    color: #666;
    margin: 10px 0;
}

.webgpu-error {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
}

.error-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #dc3545;
}

.error-content h2 {
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 15px;
}

.error-content p {
    color: #666;
    margin: 10px 0;
    line-height: 1.5;
}

.browser-support {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.browser-support h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

.browser-support ul, 
.browser-support ol {
    margin: 10px 0;
    padding-left: 25px;
}

.browser-support li {
    margin: 8px 0;
    color: #555;
    line-height: 1.4;
}

.browser-support p {
    margin: 15px 0 10px 0;
    font-weight: bold;
}

.execution-provider-global {
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.execution-provider-global label {
    font-weight: bold;
    margin-right: 10px;
}

.execution-provider-global select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.provider-note {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.cpu-only-note {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin: 5px 0;
}

/* Add dark mode styling for CPU-only indicator */
body.dark-mode .model-list-item .cpu-only-note {
    background-color: #4a1515;  /* Dark red background */
    color: #ef9a9a;            /* Light red text */
}

.continue-button {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.continue-button:hover {
    background-color: #4cae4c;
}

.execution-provider-global select:disabled,
.execution-provider-global select option:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .webgpu-error {
    background-color: #333;
    color: #fff;
}

.dark-mode .preview-container img {
    border-color: #444;
}

.dark-mode .segment-loading-screen {
    background-color: #333;
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.dark-mode .model-list-item {
    background-color: #333;
    color: #fff;
    border-color: #444;
}

.dark-mode .model-list-item .model-header {
    /* background-color: #444; */
}

.dark-mode .model-list-item .model-description,
.dark-mode .model-list-item .model-type,
.dark-mode .model-list-item .model-source {
    color: #ccc;
}

.dark-mode #outputData {
    background-color: #222; /* Match other dark containers */
    border-color: #444;
}

.dark-mode .model-list-item .load-model-button {
    background-color: #555;
    color: #fff;
}

.dark-mode .model-list-item .load-model-button:hover {
    background-color: #666;
}

.dark-mode .model-selection,
.dark-mode .custom-model-upload,
.dark-mode .image-upload-section,
.dark-mode .model-list-container {
    background-color: #222;
    border-color: #444;
}

.dark-mode .model-content.comparison-container {
    background: #333; /* Dark background for modal */
}

.dark-mode .execution-provider-global {
    background-color: #222;
    border-color: #444;
}

.dark-mode .progress-bar-container {
    background-color: #222;
    border-color: #444;
}

.dark-mode .progress-bar {
    background-color: #333;
}

.dark-mode .progress-bar-fill {
    background-color: #76c7c0; /* Brighter teal color */
}

.dark-mode .progress-bar-text {
    color: #fff;
}

.dark-mode .segmentation-container,
.dark-mode .segmentation-options {
    background-color: #222;
    border-color: #444;
}

.dark-mode .preview-container {
    background-color: #222;
    border-color: #444;
}

/* Dark mode styles for segmentation options */
.dark-mode .segmentation-container {
    background-color: #222;
    border-color: #444;
}

.dark-mode .segmentation-options {
    background-color: #222;
    border-color: #444;
}

.segmentation-container label {
    color: #333 !important; /* Default text color for light mode */
}

.dark-mode .segmentation-container label {
    color: #ccc !important; /* Text color for dark mode */
}

#darkModeToggleContainer {
    background-color: rgba(200, 200, 200, 0.7); /* Semi-transparent light grey */
    padding: 5px 8px;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

body.dark-mode #darkModeToggleContainer {
    background-color: rgba(60, 60, 60, 0.7); /* Semi-transparent dark grey */
}

#darkModeToggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#darkModeToggle:hover {
    color: #555;
}

.dark-mode button {
    background-color: #008080; /* Teal button */
}

.dark-mode button:hover {
    background-color: #006666; /* Darker teal on hover */
}

/* Dark mode styles for dropdowns */
.dark-mode select {
    background-color: #333;
    color: #fff;
    border-color: #444;
}

.dark-mode select:focus {
    border-color: #76c7c0; /* Brighter teal color */
    box-shadow: 0 0 0 2px rgba(118, 199, 192, 0.5);
}

/* Dark mode styles for search box */
.dark-mode #modelSearch {
    background-color: #333;
    color: #fff;
    border-color: #444;
}

.dark-mode #modelSearch::placeholder {
    color: #aaa;
}

.dark-mode .segment-loading-screen .progress-bar {
    background-color: #444;
}

.dark-mode .segment-loading-screen .progress-bar-fill {
    background-color: #76c7c0; /* Brighter teal color */
}

.dark-mode .segment-loading-screen .status-text {
    color: #fff;
}

.cache-indicator {
    display: inline-flex;
    align-items: center;
    background: #e8f5e9;  /* Light green background */
    color: #2e7d32;      /* Darker green text */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin: 5px 0;
    margin-left: 8px;
    vertical-align: middle;
}

.cache-indicator .info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #2e7d32;
    color: #e8f5e9;
    font-size: 10px;
    margin-left: 6px;
    font-style: italic;
    cursor: help;
}

/* Make dark mode selector more specific */
body.dark-mode .model-list-item .cache-indicator {
    background-color: #1b5e20;  /* Dark green background */
    color: #a5d6a7;            /* Light green text */
}

body.dark-mode .model-list-item .cache-indicator .info-icon {
    background-color: #a5d6a7;
    color: #1b5e20;
}

/* Add specific styling for the custom model info icon */
.custom-model-upload .info-icon {
    background-color: #008080;  /* Teal color */
    margin-left: 8px;
}

.dark-mode .custom-model-upload .info-icon {
    background-color: #006666;  /* Darker teal */
}

/* General tooltip positioning */
.custom-model-upload .info-icon:hover::after {
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 5px;
}

.site-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-top: 10px; /* Reduce top margin */
    color: #333;
}

.abbreviation-breakdown {
    font-size: 1.2em;
    text-align: center;
    margin-top: 5px; /* Reduced margin for closer appearance */
    color: #666;
    font-style: italic;
}

/* Dark mode styles */
body.dark-mode .site-title {
    color: #fff;
}

body.dark-mode .abbreviation-breakdown {
    color: #ccc;
}

/* Two-column layout for models */
.model-columns-container {
    display: flex;
    flex-direction: column; /* Default to single column */
    gap: 20px; /* Space between columns */
    margin-top: 15px;
}

.model-column {
    flex: 1; /* Each column takes equal space when horizontal */
    display: flex;
    flex-direction: column;
}

.model-column h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    text-align: center;
}

.dark-mode .model-column h2 {
    border-bottom-color: #444;
}

/* Media query for wider screens - Increased breakpoint */
@media (min-width: 1200px) { /* Changed from 768px */
    .model-columns-container {
        flex-direction: row; /* Switch to horizontal layout */
    }
}

/* Update custom model note link styling */
.custom-model-note a {
    color: blue !important;
}

.custom-model-note a:hover,
.custom-model-note a:visited {
    color: blue !important;
}

/* Add dark mode variant */
body.dark-mode .custom-model-note a {
    color: #76c7c0 !important; /* Teal color to match dark mode accents */
}

body.dark-mode .custom-model-note a:hover,
body.dark-mode .custom-model-note a:visited {
    color: #76c7c0 !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 767px) {
    body {
        margin: 0 10px 10px 10px; /* Reduce side margins */
        padding-top: 5px;
    }

    .controls-container {
        width: 95%; /* Use more width on smaller screens */
    }

    .site-title {
        font-size: 2em; /* Slightly smaller title */
    }

    .abbreviation-breakdown {
        font-size: 1em; /* Slightly smaller subtitle */
    }

    .execution-provider-global {
        flex-direction: column; /* Stack provider selection vertically */
        align-items: flex-start; /* Align items to the start */
        gap: 5px; /* Reduce gap */
    }

    .provider-note {
        font-size: 0.85em; /* Slightly smaller note text */
    }

    .model-columns-container {
        /* Already defaults to column, which is good for mobile */
        gap: 15px; /* Slightly reduce gap between columns */
    }

    .model-column h2 {
        font-size: 1.1em; /* Slightly smaller column titles */
    }

    .model-list-container {
        max-height: 300px; /* Reduce max height slightly */
    }

    .action-buttons,
    .output-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 8px;
        align-items: stretch; /* Make buttons fill width */
    }

    .action-button,
    .output-buttons button {
        width: 100%; /* Make buttons full width */
        box-sizing: border-box; /* Include padding in width */
    }

    .info-model-content {
        max-width: 90%; /* Allow modal to use more screen width */
        padding: 20px;
    }

    .model-content.comparison-container {
        width: 95%; /* Allow comparison modal to use more screen width */
        padding: 15px;
    }

    .comparison-separator::after {
        width: 30px; /* Smaller handle */
        height: 30px;
    }

    .comparison-slider {
        width: 150px; /* Smaller slider */
    }
}

/* Add custom styling for the description class */
.description {
    font-size: 1.1em;
    line-height: 1.5;
    color: #555;
    margin: 8px 0 15px 0; /* Reduced top margin from 15px to 8px */
    max-width: 800px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Dark mode styling for the description */
body.dark-mode .description {
    color: #bbb;
}

/* Add responsive styling for smaller screens */
@media (max-width: 767px) {
    .description {
        font-size: 1em;
        margin: 5px 0 10px 0; /* Reduced top margin from 10px to 5px for mobile */
        line-height: 1.4;
    }
}
