 /* Full-viewport v3.js banner */
 #v3-banner {
     position: relative;
     top: 0;
     left: 50%;
     transform: translateX(-50%);
     width: 100vw;
     height: 100vh;
     background: #fff;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
 }

 #banner-v3-container {
     width: min(90vw, 90vh);
     height: min(90vw, 90vh);
     position: relative;
 }

 #banner-v3-container canvas {
     width: 95%;
     height: 95%;
     cursor: crosshair;
 }

 #scroll-indicator {
     position: absolute;
     bottom: 30px;
     font-size: 2em;
     color: #333;
     opacity: 0.7;
     animation: bounce 2s infinite;
 }

 @keyframes bounce {
     0%, 20%, 50%, 80%, 100% {
         transform: translateY(0);
     }
     40% {
         transform: translateY(-10px);
     }
     60% {
         transform: translateY(-5px);
     }
 }

 /* Main content positioned below banner */
 #main_wrapper {
     position: relative;
     background: #fff;
 }

 #visualization-container {
     display: flex;
     align-items: center;
     justify-content: center;
     position: relative;
     background: #fff;
     min-height: min(350px, 50vh);
     padding: 10px;
     box-sizing: border-box;
     gap: clamp(5px, 2vw, 20px);
 }

 .source-image-container {
     position: relative;
     border: 2px solid #fff;
     border-radius: 4px;
     overflow: hidden;
     background: white;
 }

 .source-image {
     display: block;
     width: clamp(200px, 40vw, 300px);
     height: clamp(200px, 40vw, 300px);
     max-width: 45vw;
     object-fit: cover;
 }

 #extrapolated-container {
     position: absolute;
     overflow: hidden;
     background: white;
     z-index: 10;
     display: none;
 }

 #extrapolated-canvas {
     display: block;
     width: clamp(200px, 40vw, 300px);
     height: clamp(200px, 40vw, 300px);
     max-width: 45vw;
 }

 #source-images {
     display: none;
 }

 .loading-message {
     text-align: center;
     padding: 20px;
     color: #666;
     font-style: italic;
 }

 #sandwich-container {
     width: min(70%, 90vw);
     height: min(1000px, 80vh);
     position: relative;
     margin: auto;
     background: #fff;
     border-radius: 8px;
     overflow: hidden;
 }

 #three-canvas {
     display: block;
     width: 100%;
     height: 100%;
 }

 #sandwich-canvas {
     display: none;
     /* or position absolute if you need it visible */
     width: min(800px, 90vw);
     height: min(800px, 90vw);
     max-width: 100%;
 }

 #v3-container {
     margin: auto;
     max-width: min(90vw, 90vh);
     max-height: min(90vw, 90vh);
     width: 100%;
 }

 #v3-container canvas {
     max-width: 100%;
     max-height: 100%;
     width: auto;
     height: auto;
     cursor: crosshair;
 }


 .item {
     flex: 1;
     margin: 5px;
     padding: 20px;
 }

 .image-preview-row {
     width: 95%;
     display: flex;
     justify-content: center;
     align-items: center;
     gap: clamp(10px, 3vw, 30px);
     margin: auto;
     flex-wrap: wrap;
 }

 .preview-container {
     display: flex;
     flex-wrap: wrap;
     width: 100%;
 }

 .preview-image {
     width: 100%;
     max-width: 400px;
     height: auto;
     aspect-ratio: 1;
     object-fit: cover;
 }

 .preview-container img {
     width: 80%;
     height: auto;
 }

 .preview-container canvas {
     width: 100%;
 }

 .image-label {
     text-align: center;
     font-size: 12px;
     margin-top: 5px;
     color: #666;
 }


 /* Control buttons styling */
 .controls-container {
     display: flex;
     gap: clamp(10px, 2vw, 20px);
     margin: 20px 0;
     justify-content: center;
     flex-wrap: wrap;
     padding: 0 10px;
 }

 .control-button {
     background: #333;
     color: white;
     border: none;
     padding: 12px 24px;
     border-radius: 6px;
     font-family: 'Roboto Mono', monospace;
     font-size: 14px;
     font-weight: 300;
     cursor: pointer;
     transition: all 0.2s ease;
     min-width: 120px;
 }

 .control-button:hover {
     background: #555;
     transform: translateY(-1px);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
 }

 .control-button:active {
     transform: translateY(0);
     box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
 }

 /* High DPI displays */
 @media screen and (-webkit-min-device-pixel-ratio: 2),
 screen and (min-resolution: 192dpi) {
     canvas {
         /* Ensure crisp rendering on high DPI displays */
         image-rendering: -webkit-optimize-contrast;
         image-rendering: crisp-edges;
     }
 }

 canvas:fullscreen {
     width: 100vw !important;
     height: 100vh !important;
     object-fit: contain;
     background: black;
 }

 /* Webkit browsers */
 canvas:-webkit-full-screen {
     width: 100vw !important;
     height: 100vh !important;
     object-fit: contain;
     background: black;
 }

 /* Firefox */
 canvas:-moz-full-screen {
     width: 100vw !important;
     height: 100vh !important;
     object-fit: contain;
     background: black;
 }

 /* IE/Edge */
 canvas:-ms-fullscreen {
     width: 100vw !important;
     height: 100vh !important;
     object-fit: contain;
     background: black;
 }

 .gray-bg {
     background-color: #f5f5f5;
     padding: 12px 16px;
     border-radius: 8px;
     margin-bottom: 30px;
     margin-top: 30px;
 }

 /* Mobile-specific responsive adjustments */
 @media (max-width: 900px) {
     #banner-v3-container {
         width: min(95vw, 95vh);
         height: min(95vw, 95vh);
     }
     
     #scroll-indicator {
         bottom: 20px;
         font-size: 1.5em;
     }
     
     #visualization-container {
         min-height: auto;
         padding: 15px 5px;
     }

     .source-image {
         width: clamp(150px, 42vw, 350px);
         height: clamp(150px, 42vw, 350px);
         max-width: 47vw;
     }

     #extrapolated-canvas {
         width: clamp(150px, 42vw, 350px);
         height: clamp(150px, 42vw, 350px);
         max-width: 47vw;
     }

     #sandwich-container {
         width: 95%;
         height: min(600px, 70vh);
     }

     #sandwich-canvas {
         width: min(600px, 85vw);
         height: min(600px, 85vw);
     }

     #v3-container {
         max-width: 95vw;
         max-height: 85vh;
     }

     .image-preview-row {
         flex-direction: column;
         gap: 15px;
     }

     .preview-image {
         max-width: min(300px, 80vw);
     }

     .controls-container {
         gap: 10px;
         padding: 0 5px;
     }

     .control-button {
         min-width: 100px;
         padding: 10px 16px;
         font-size: 12px;
     }
 }

 @media (max-width: 480px) {
     #banner-v3-container {
         width: min(98vw, 98vh);
         height: min(98vw, 98vh);
     }
     
     #scroll-indicator {
         bottom: 15px;
         font-size: 1.2em;
     }
     
     .source-image {
         width: clamp(120px, 44vw, 280px);
         height: clamp(120px, 44vw, 280px);
         max-width: 48vw;
     }

     #extrapolated-canvas {
         width: clamp(120px, 44vw, 280px);
         height: clamp(120px, 44vw, 280px);
         max-width: 48vw;
     }

     #sandwich-container {
         width: 98%;
         height: min(400px, 60vh);
     }

     #v3-container {
         max-width: 98vw;
         max-height: 80vh;
     }

     .preview-image {
         max-width: min(250px, 85vw);
     }

     .control-button {
         min-width: 80px;
         padding: 8px 12px;
         font-size: 11px;
     }
 }